summaryrefslogtreecommitdiff
path: root/include/my_cpu.h
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2017-11-28 16:34:31 +0400
committerSergey Vojtovich <svoj@mariadb.org>2017-11-28 16:34:31 +0400
commita489d9199321fc842916f65487be832a1816e6fe (patch)
tree13e7cd96edcb472149bf6dd0de0c6641f114a358 /include/my_cpu.h
parent1c4968f2f39ee7796853d70d71b061989293bacb (diff)
downloadmariadb-git-a489d9199321fc842916f65487be832a1816e6fe.tar.gz
Cleanup UT_LOW_PRIORITY_CPU/UT_RESUME_PRIORITY_CPU
Server already has HMT_low/HMT_medium.
Diffstat (limited to 'include/my_cpu.h')
-rw-r--r--include/my_cpu.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/my_cpu.h b/include/my_cpu.h
index 026b92c1b74..e255de85960 100644
--- a/include/my_cpu.h
+++ b/include/my_cpu.h
@@ -21,17 +21,18 @@
The defines are the same ones used by the linux kernel
*/
-#if defined(__powerpc__)
+#ifdef _ARCH_PWR8
+#include <sys/platform/ppc.h>
/* Very low priority */
-#define HMT_very_low() asm volatile("or 31,31,31")
+#define HMT_very_low() __ppc_set_ppr_very_low()
/* Low priority */
-#define HMT_low() asm volatile("or 1,1,1")
+#define HMT_low() __ppc_set_ppr_low()
/* Medium low priority */
-#define HMT_medium_low() asm volatile("or 6,6,6")
+#define HMT_medium_low() __ppc_set_ppr_med_low()
/* Medium priority */
-#define HMT_medium() asm volatile("or 2,2,2")
+#define HMT_medium() __ppc_set_ppr_med()
/* Medium high priority */
-#define HMT_medium_high() asm volatile("or 5,5,5")
+#define HMT_medium_high() __ppc_set_ppr_med_high()
/* High priority */
#define HMT_high() asm volatile("or 3,3,3")
#else