Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 1 | Upstream-Status: Pending |
| 2 | |
Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame] | 3 | Remove glibc specific function dependencies |
| 4 | |
| 5 | Sourced from: https://git.alpinelinux.org/aports/tree/main/mariadb/ppc-remove-glibc-dep.patch |
| 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 7 | |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 8 | diff --git a/include/my_cpu.h b/include/my_cpu.h |
| 9 | index f2e26fca..94599b74 100644 |
Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame] | 10 | --- a/include/my_cpu.h |
| 11 | +++ b/include/my_cpu.h |
| 12 | @@ -24,17 +24,16 @@ |
| 13 | */ |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 14 | |
Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame] | 15 | #ifdef _ARCH_PWR8 |
| 16 | -#include <sys/platform/ppc.h> |
| 17 | /* Very low priority */ |
| 18 | -#define HMT_very_low() __ppc_set_ppr_very_low() |
| 19 | +#define HMT_very_low() asm volatile("or 31,31,31") |
| 20 | /* Low priority */ |
| 21 | -#define HMT_low() __ppc_set_ppr_low() |
| 22 | +#define HMT_low() asm volatile ("or 1,1,1") |
| 23 | /* Medium low priority */ |
| 24 | -#define HMT_medium_low() __ppc_set_ppr_med_low() |
| 25 | +#define HMT_medium_low() asm volatile ("or 6,6,6") |
| 26 | /* Medium priority */ |
| 27 | -#define HMT_medium() __ppc_set_ppr_med() |
| 28 | +#define HMT_medium() asm volatile ("or 2,2,2") |
| 29 | /* Medium high priority */ |
| 30 | -#define HMT_medium_high() __ppc_set_ppr_med_high() |
| 31 | +#define HMT_medium_high() asm volatile("or 5,5,5") |
| 32 | /* High priority */ |
| 33 | #define HMT_high() asm volatile("or 3,3,3") |
| 34 | #else |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 35 | @@ -72,7 +71,7 @@ static inline void MY_RELAX_CPU(void) |
Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame] | 36 | __asm__ __volatile__ ("pause"); |
| 37 | #endif |
| 38 | #elif defined(_ARCH_PWR8) |
| 39 | - __ppc_get_timebase(); |
| 40 | + __builtin_ppc_get_timebase(); |
| 41 | #elif defined __GNUC__ && (defined __arm__ || defined __aarch64__) |
| 42 | /* Mainly, prevent the compiler from optimizing away delay loops */ |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 43 | __asm__ __volatile__ ("":::"memory"); |