alpha: replace bogus in_interrupt()
authorThomas Gleixner <tglx@linutronix.de>
Wed, 16 Dec 2020 04:42:29 +0000 (20:42 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2020 06:46:15 +0000 (22:46 -0800)
in_interrupt() is true for a variety of things including bottom half
disabled regions.  Deducing hard interrupt context from it is dubious at
best.

Use in_irq() which is true if called in hard interrupt context.  Otherwise
calling irq_exit() would do more harm than good.

Link: https://lkml.kernel.org/r/20201113135832.2202833-1-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Tested-by: Serge Belyshev <belyshev@depni.sinp.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/alpha/kernel/process.c

index 4c7b0414a3ff3b2437ab27ece6bbb9b04f9eb31d..6c71554206ccb238aeb348bb3041f988710eaf39 100644 (file)
@@ -134,7 +134,7 @@ common_shutdown_1(void *generic_ptr)
 #ifdef CONFIG_DUMMY_CONSOLE
                /* If we've gotten here after SysRq-b, leave interrupt
                   context before taking over the console. */
-               if (in_interrupt())
+               if (in_irq())
                        irq_exit();
                /* This has the effect of resetting the VGA video origin.  */
                console_lock();