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