diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2012-08-20 15:52:07 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-09-05 15:42:19 -0500 |
commit | 1c6e1a4cddde411b6219b9e881039ffbda0deb4f (patch) | |
tree | 1e1ff02f7e51c0f7667ae30154e3bb326838fca4 /src/include/arch/ppc.H | |
parent | c07b8bb150f1464e17ebf3672460564ec3e8947c (diff) | |
download | talos-hostboot-1c6e1a4cddde411b6219b9e881039ffbda0deb4f.tar.gz talos-hostboot-1c6e1a4cddde411b6219b9e881039ffbda0deb4f.zip |
Set "high" thread priority as 2 rather than 3.
The Power processor has instructions of the form 'or a,a,a'
that allow code to change the priority of a hw-thread relative
to the others. We initially used 'or 1,1,1' as low priority
and 'or 3,3,3' as high priority. This is used in, for instance,
spinlocks to reduce the priority of a hw-thread while waiting
for another thread to perform an activity.
This code originally came from HAL. In reading the Power ISA
closer I realized that 'or 3,3,3' has no effect when in
user-space code, which means that a spinlock-like effect in
user code is going to end up with the thread stuck at low
priority until the next context switch. To prevent this we
are going to change from 1/3 to 1/2 as the priority levels.
Change-Id: I60ee866cde37499106f5e1e1d68a0b5ddeedf403
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1569
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/arch/ppc.H')
-rw-r--r-- | src/include/arch/ppc.H | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/src/include/arch/ppc.H b/src/include/arch/ppc.H index 4e6add553..42ec52db4 100644 --- a/src/include/arch/ppc.H +++ b/src/include/arch/ppc.H @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/arch/ppc.H $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2011-2012 - * - * p1 - * - * Object Code Only (OCO) source materials - * Licensed Internal Code Source Materials - * IBM HostBoot Licensed Internal Code - * - * The source code for this program is not published or other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/arch/ppc.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ #ifndef __KERNEL_PPCARCH_H #define __KERNEL_PPCARCH_H @@ -255,7 +254,7 @@ inline void setThreadPriorityLow() ALWAYS_INLINE inline void setThreadPriorityHigh() { - asm volatile("or 3,3,3"); + asm volatile("or 2,2,2"); } ALWAYS_INLINE |