Port CPU_SPINWAIT to __powerpc64__
Hyper-threaded CPUs may need a special instruction inside spin loops in order to yield to another virtual CPU. The 'pause' instruction that is available for x86 is not supported on Power. Apparently the extended mnemonics like yield, mdoio, and mdoom are not actually implemented on POWER8, although mentioned in the ISA 2.07 document. The recommended magic bits are an 'or 31,31,31'.
This commit is contained in:
parent
04ef218d87
commit
701daa5298
@ -398,8 +398,9 @@ case "${host_cpu}" in
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
powerpc)
|
powerpc*)
|
||||||
AC_DEFINE_UNQUOTED([HAVE_ALTIVEC], [ ])
|
AC_DEFINE_UNQUOTED([HAVE_ALTIVEC], [ ])
|
||||||
|
CPU_SPINWAIT='__asm__ volatile("or 31,31,31")'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user