You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.9 KiB

  1. Index: mariadb-10.4.17/include/my_cpu.h
  2. ===================================================================
  3. --- mariadb-10.4.17.orig/include/my_cpu.h
  4. +++ mariadb-10.4.17/include/my_cpu.h
  5. @@ -24,17 +24,16 @@
  6. */
  7. #ifdef _ARCH_PWR8
  8. -#include <sys/platform/ppc.h>
  9. /* Very low priority */
  10. -#define HMT_very_low() __ppc_set_ppr_very_low()
  11. +#define HMT_very_low() asm volatile("or 31,31,31")
  12. /* Low priority */
  13. -#define HMT_low() __ppc_set_ppr_low()
  14. +#define HMT_low() asm volatile ("or 1,1,1")
  15. /* Medium low priority */
  16. -#define HMT_medium_low() __ppc_set_ppr_med_low()
  17. +#define HMT_medium_low() asm volatile ("or 6,6,6")
  18. /* Medium priority */
  19. -#define HMT_medium() __ppc_set_ppr_med()
  20. +#define HMT_medium() asm volatile ("or 2,2,2")
  21. /* Medium high priority */
  22. -#define HMT_medium_high() __ppc_set_ppr_med_high()
  23. +#define HMT_medium_high() asm volatile("or 5,5,5")
  24. /* High priority */
  25. #define HMT_high() asm volatile("or 3,3,3")
  26. #else
  27. @@ -80,7 +79,7 @@ static inline void MY_RELAX_CPU(void)
  28. __asm__ __volatile__ ("pause");
  29. #endif
  30. #elif defined(_ARCH_PWR8)
  31. - __ppc_get_timebase();
  32. + __builtin_ppc_get_timebase();
  33. #elif defined __GNUC__ && (defined __arm__ || defined __aarch64__)
  34. /* Mainly, prevent the compiler from optimizing away delay loops */
  35. __asm__ __volatile__ ("":::"memory");
  36. Index: mariadb-10.4.17/storage/tokudb/PerconaFT/portability/toku_time.h
  37. ===================================================================
  38. --- mariadb-10.4.17.orig/storage/tokudb/PerconaFT/portability/toku_time.h
  39. +++ mariadb-10.4.17/storage/tokudb/PerconaFT/portability/toku_time.h
  40. @@ -124,7 +124,7 @@ static inline tokutime_t toku_time_now(v
  41. __asm __volatile__ ("mrs %[rt], cntvct_el0" : [rt] "=r" (result));
  42. return result;
  43. #elif defined(__powerpc__)
  44. - return __ppc_get_timebase();
  45. + return __builtin_ppc_get_timebase();
  46. #else
  47. #error No timer implementation for this platform
  48. #endif