summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorDaniel Black <daniel.black@au.ibm.com>2016-04-01 09:03:57 +1100
committerDaniel Black <daniel.black@au.ibm.com>2016-04-01 09:38:17 +1100
commit26c38de804ecb87eae7fbe6ac32dadebb7803b4d (patch)
treec8e1e0b69d9e2c29bd4fe3bdd64a0af61ee78e43 /storage
parent64824a760d3ee4715d301dcdff541b66fac32992 (diff)
downloadmariadb-git-26c38de804ecb87eae7fbe6ac32dadebb7803b4d.tar.gz
MDEV-8684: Use POWER wrappers rather than direct asm
i.e. __ppc_set_ppr_low rather than 'or 1,1,1'
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/include/ut0ut.h5
-rw-r--r--storage/xtradb/include/ut0ut.h5
2 files changed, 6 insertions, 4 deletions
diff --git a/storage/innobase/include/ut0ut.h b/storage/innobase/include/ut0ut.h
index 9ed1a87508c..1334a6000be 100644
--- a/storage/innobase/include/ut0ut.h
+++ b/storage/innobase/include/ut0ut.h
@@ -100,8 +100,9 @@ private:
#define UT_COMPILER_BARRIER() __asm__ __volatile__ ("":::"memory")
# if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
-# define UT_LOW_PRIORITY_CPU() __asm__ __volatile__ ("or 1,1,1")
-# define UT_RESUME_PRIORITY_CPU() __asm__ __volatile__ ("or 2,2,2")
+#include <sys/platform/ppc.h>
+# define UT_LOW_PRIORITY_CPU() __ppc_set_ppr_low()
+# define UT_RESUME_PRIORITY_CPU() __ppc_set_ppr_med()
# else
# define UT_LOW_PRIORITY_CPU() ((void)0)
# define UT_RESUME_PRIORITY_CPU() ((void)0)
diff --git a/storage/xtradb/include/ut0ut.h b/storage/xtradb/include/ut0ut.h
index 328ccdf7430..722acdb607e 100644
--- a/storage/xtradb/include/ut0ut.h
+++ b/storage/xtradb/include/ut0ut.h
@@ -97,8 +97,9 @@ private:
#define UT_COMPILER_BARRIER() __asm__ __volatile__ ("":::"memory")
# if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
-# define UT_LOW_PRIORITY_CPU() __asm__ __volatile__ ("or 1,1,1")
-# define UT_RESUME_PRIORITY_CPU() __asm__ __volatile__ ("or 2,2,2")
+#include <sys/platform/ppc.h>
+# define UT_LOW_PRIORITY_CPU() __ppc_set_ppr_low()
+# define UT_RESUME_PRIORITY_CPU() __ppc_set_ppr_med()
# else
# define UT_LOW_PRIORITY_CPU() ((void)0)
# define UT_RESUME_PRIORITY_CPU() ((void)0)