Commit 26c38de8 authored by Daniel Black's avatar Daniel Black

MDEV-8684: Use POWER wrappers rather than direct asm

i.e. __ppc_set_ppr_low rather than 'or 1,1,1'
parent 64824a76
...@@ -857,10 +857,11 @@ IF(NOT CMAKE_CROSSCOMPILING AND NOT MSVC) ...@@ -857,10 +857,11 @@ IF(NOT CMAKE_CROSSCOMPILING AND NOT MSVC)
ENDIF() ENDIF()
IF (NOT HAVE_PAUSE_INSTRUCTION) IF (NOT HAVE_PAUSE_INSTRUCTION)
CHECK_C_SOURCE_COMPILES(" CHECK_C_SOURCE_COMPILES("
#include <sys/platform/ppc.h>
int main() int main()
{ {
__asm__ __volatile__ (\"or 1,1,1\"); __ppc_set_ppr_low();
__asm__ __volatile__ (\"or 2,2,2\"); __ppc_set_ppr_med();
return 0; return 0;
} }
" HAVE_HMT_PRIORITY_INSTRUCTION) " HAVE_HMT_PRIORITY_INSTRUCTION)
......
...@@ -100,8 +100,9 @@ struct ut_when_dtor { ...@@ -100,8 +100,9 @@ struct ut_when_dtor {
#define UT_COMPILER_BARRIER() __asm__ __volatile__ ("":::"memory") #define UT_COMPILER_BARRIER() __asm__ __volatile__ ("":::"memory")
# if defined(HAVE_HMT_PRIORITY_INSTRUCTION) # if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
# define UT_LOW_PRIORITY_CPU() __asm__ __volatile__ ("or 1,1,1") #include <sys/platform/ppc.h>
# define UT_RESUME_PRIORITY_CPU() __asm__ __volatile__ ("or 2,2,2") # define UT_LOW_PRIORITY_CPU() __ppc_set_ppr_low()
# define UT_RESUME_PRIORITY_CPU() __ppc_set_ppr_med()
# else # else
# define UT_LOW_PRIORITY_CPU() ((void)0) # define UT_LOW_PRIORITY_CPU() ((void)0)
# define UT_RESUME_PRIORITY_CPU() ((void)0) # define UT_RESUME_PRIORITY_CPU() ((void)0)
......
...@@ -97,8 +97,9 @@ struct ut_when_dtor { ...@@ -97,8 +97,9 @@ struct ut_when_dtor {
#define UT_COMPILER_BARRIER() __asm__ __volatile__ ("":::"memory") #define UT_COMPILER_BARRIER() __asm__ __volatile__ ("":::"memory")
# if defined(HAVE_HMT_PRIORITY_INSTRUCTION) # if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
# define UT_LOW_PRIORITY_CPU() __asm__ __volatile__ ("or 1,1,1") #include <sys/platform/ppc.h>
# define UT_RESUME_PRIORITY_CPU() __asm__ __volatile__ ("or 2,2,2") # define UT_LOW_PRIORITY_CPU() __ppc_set_ppr_low()
# define UT_RESUME_PRIORITY_CPU() __ppc_set_ppr_med()
# else # else
# define UT_LOW_PRIORITY_CPU() ((void)0) # define UT_LOW_PRIORITY_CPU() ((void)0)
# define UT_RESUME_PRIORITY_CPU() ((void)0) # define UT_RESUME_PRIORITY_CPU() ((void)0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment