aboutsummaryrefslogblamecommitdiffstats
path: root/main/mariadb/ppc-remove-glibc-dep.patch
blob: 57f5008b860dff01355f28c4eb851fca90bf2000 (plain) (tree)
1
2
3
4
5
6
7
8
9





                                                
 
                  
                              
















                                                   
      


















                                                                                                                
      

                                                 
diff --git a/include/my_cpu.h b/include/my_cpu.h
index f2e26fca..94599b74 100644
--- a/include/my_cpu.h
+++ b/include/my_cpu.h
@@ -24,17 +24,16 @@
 */
 
 #ifdef _ARCH_PWR8
-#include <sys/platform/ppc.h>
 /* Very low priority */
-#define HMT_very_low() __ppc_set_ppr_very_low()
+#define HMT_very_low() asm volatile("or 31,31,31")
 /* Low priority */
-#define HMT_low() __ppc_set_ppr_low()
+#define HMT_low() asm volatile ("or 1,1,1")
 /* Medium low priority */
-#define HMT_medium_low() __ppc_set_ppr_med_low()
+#define HMT_medium_low() asm volatile ("or 6,6,6")
 /* Medium priority */
-#define HMT_medium() __ppc_set_ppr_med()
+#define HMT_medium() asm volatile ("or 2,2,2")
 /* Medium high priority */
-#define HMT_medium_high() __ppc_set_ppr_med_high()
+#define HMT_medium_high() asm volatile("or 5,5,5")
 /* High priority */
 #define HMT_high() asm volatile("or 3,3,3")
 #else
@@ -72,7 +71,7 @@ static inline void MY_RELAX_CPU(void)
   */
   YieldProcessor();
 #elif defined(_ARCH_PWR8)
-  __ppc_get_timebase();
+  __builtin_ppc_get_timebase();
 #else
   int32 var, oldval = 0;
   my_atomic_cas32_strong_explicit(&var, &oldval, 1, MY_MEMORY_ORDER_RELAXED,
diff --git a/storage/tokudb/PerconaFT/portability/toku_time.h b/storage/tokudb/PerconaFT/portability/toku_time.h
index c4c45b8e..2f7a07f5 100644
--- a/storage/tokudb/PerconaFT/portability/toku_time.h
+++ b/storage/tokudb/PerconaFT/portability/toku_time.h
@@ -110,7 +110,7 @@ static inline tokutime_t toku_time_now(void) {
     __asm __volatile__ ("mrs %[rt], cntvct_el0" : [rt] "=r" (result));
     return result;
 #elif defined(__powerpc__)
-    return __ppc_get_timebase();
+    return __builtin_ppc_get_timebase();
 #else
 #error No timer implementation for this platform
 #endif