diff options
author | Chris Metcalf <cmetcalf@ezchip.com> | 2015-12-23 21:02:47 +0100 |
---|---|---|
committer | Chris Metcalf <cmetcalf@ezchip.com> | 2016-01-18 20:49:26 +0100 |
commit | 9ce815ed50bbc518526106071f395deacaf94ad7 (patch) | |
tree | 3f3c9324f74c7ddb669c4e9f57c899e40eb4da2c /arch | |
parent | tile: fix tilepro casts for readl, writel, etc (diff) | |
download | linux-9ce815ed50bbc518526106071f395deacaf94ad7.tar.xz linux-9ce815ed50bbc518526106071f395deacaf94ad7.zip |
tile: fix bug in setting PT_FLAGS_DISABLE_IRQ on kernel entry
This flag value is saved in ptregs and used to decide whether
to disable irqs when returning from the kernel. Commit 1168df528fe4
("tile: don't assume user privilege is zero") performed a bad
merge from some KVM-enabled code that had not yet been upstreamed.
The only issue with the old code is that we will read the interrupt
mask in more conditions than we need to (e.g., coming from user
space when user space has the Interrupt Critical Section bit set, or
coming from a guest kernel), which is a slow multi-cycle operation.
This change saves those few cycles in the common case.
Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/tile/kernel/intvec_64.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/tile/kernel/intvec_64.S b/arch/tile/kernel/intvec_64.S index a41c994ce237..080b77269ccd 100644 --- a/arch/tile/kernel/intvec_64.S +++ b/arch/tile/kernel/intvec_64.S @@ -658,7 +658,7 @@ intvec_\vecname: */ mfspr r32, SPR_EX_CONTEXT_K_1 { - IS_KERNEL_EX1(r22, r22) + IS_KERNEL_EX1(r32, r32) PTREGS_PTR(r21, PTREGS_OFFSET_FLAGS) } beqzt r32, 1f /* zero if from user space */ |