summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2021-07-05 20:57:49 +0200
committerVasily Gorbik <gor@linux.ibm.com>2021-07-08 22:12:17 +0200
commitbb250e64e4702774ddee052b57136ab222f59ce1 (patch)
tree30a462c9cc5294f508dcf287721bca3896c5d476 /arch
parent2ae6521504941650fd48bcefd288730c3e44211a (diff)
s390/irq: simplify on_async_stack()
Make on_async_stack() a bit more readable, even though as usual it depends if one considers "!!!" readable or not. At least the new construct to check if the async stack is in use or not is a bit shorter and generates slightly better code. Reviewed-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/kernel/irq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c
index b55af916fbd5..a1af5ecdabdf 100644
--- a/arch/s390/kernel/irq.c
+++ b/arch/s390/kernel/irq.c
@@ -110,7 +110,7 @@ static int on_async_stack(void)
{
unsigned long frame = current_frame_address();
- return !!!((S390_lowcore.async_stack - frame) >> (PAGE_SHIFT + THREAD_SIZE_ORDER));
+ return ((S390_lowcore.async_stack ^ frame) & ~(THREAD_SIZE - 1)) == 0;
}
static void do_irq_async(struct pt_regs *regs, int irq)