diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2017-05-22 15:53:02 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-06-06 20:49:06 +1000 |
commit | 05b8834b5a4ff9bd14548594700d354bc4486c5c (patch) | |
tree | bd6c90151fada7ab78a0dc1be3ffcbe319ca94d9 /core/test | |
parent | db9c1422002c1333fd09177d32edb8c2003fb4ea (diff) | |
download | talos-skiboot-05b8834b5a4ff9bd14548594700d354bc4486c5c.tar.gz talos-skiboot-05b8834b5a4ff9bd14548594700d354bc4486c5c.zip |
Convert important polling loops to spin at lowest SMT priority
The pattern of calling cpu_relax() inside a polling loop does
not suit the powerpc SMT priority instructions. Prefrred is to
set a low priority then spin until break condition is reached,
then restore priority.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[stewart@linux.vnet.ibm.com: fixup lpc-uart wait_tx_room() and unit test]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/test')
-rw-r--r-- | core/test/run-timer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/test/run-timer.c b/core/test/run-timer.c index 75c40fe2..0270cfee 100644 --- a/core/test/run-timer.c +++ b/core/test/run-timer.c @@ -7,6 +7,8 @@ #define mftb() (stamp) #define sync() +#define smt_lowest() +#define smt_medium() static uint64_t stamp, last; struct lock; |