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.

34 lines
1.1 KiB

  1. --- a/include/my_cpu.h
  2. +++ b/include/my_cpu.h
  3. @@ -24,17 +24,16 @@
  4. */
  5. #ifdef _ARCH_PWR8
  6. -#include <sys/platform/ppc.h>
  7. /* Very low priority */
  8. -#define HMT_very_low() __ppc_set_ppr_very_low()
  9. +#define HMT_very_low() asm volatile("or 31,31,31")
  10. /* Low priority */
  11. -#define HMT_low() __ppc_set_ppr_low()
  12. +#define HMT_low() asm volatile ("or 1,1,1")
  13. /* Medium low priority */
  14. -#define HMT_medium_low() __ppc_set_ppr_med_low()
  15. +#define HMT_medium_low() asm volatile ("or 6,6,6")
  16. /* Medium priority */
  17. -#define HMT_medium() __ppc_set_ppr_med()
  18. +#define HMT_medium() asm volatile ("or 2,2,2")
  19. /* Medium high priority */
  20. -#define HMT_medium_high() __ppc_set_ppr_med_high()
  21. +#define HMT_medium_high() asm volatile("or 5,5,5")
  22. /* High priority */
  23. #define HMT_high() asm volatile("or 3,3,3")
  24. #else
  25. @@ -81,7 +80,7 @@ static inline void MY_RELAX_CPU(void)
  26. __asm__ __volatile__ ("pause");
  27. #endif
  28. #elif defined(_ARCH_PWR8)
  29. - __ppc_get_timebase();
  30. + __builtin_ppc_get_timebase();
  31. #elif defined __GNUC__ && (defined __arm__ || defined __aarch64__)
  32. /* Mainly, prevent the compiler from optimizing away delay loops */
  33. __asm__ __volatile__ ("":::"memory");