alpha: Replace bogus in_interrupt()
PATCH 1/1 alpha: Replace bogus in_interrupt()
From: Thomas Gleixner <[email protected]>
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.
---
Repost of
https://www.spinics.net/lists/linux-alpha/msg06721.html
arch/alpha/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/alpha/kernel/process.c +1 -1
@@ -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 ();
Signature · 1 line
2.29.2
Quoted 9 lines · On Fri, 13 Nov 2020 14:58:32 +0100 Sebastian Andrzej Siewior…
From: Thomas Gleixner <[email protected]>
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 callingirq_exit()would do more harm than good.
Gee, how to test it. Does anyone run current kernels on alpha?
Serge Belyshev
Tested-byQuoted 8 lines · Andrew Morton
Quoted 6 lines · On Fri, 13 Nov 2020 14:58:32 +0100 Sebastian Andrzej Siewior…
From: Thomas Gleixner <[email protected]>
in_interrupt()is true for a variety of things including bottom half disabled regions. Deducing hard interrupt context from it is dubious at best.
Quoted 5 lines
Quoted 3 lines
Use
in_irq()which is true if called in hard interrupt context. Otherwise callingirq_exit()would do more harm than good.Gee, how to test it. Does anyone run current kernels on alpha?
Hold my beer:
arch/alpha/kernel/process.c +3 -1
@@ -134,8 +134,10 @@ 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_irq ()) +if (in_irq ()) { +printk ("in_irq(): true\n" );irq_exit (); + }/* This has the effect of resetting the VGA video origin. */ console_lock ();do_take_over_console (&dummy_con,0 ,MAX_NR_CONSOLES -1 ,1 );
and then sysrq-b over serial console:
[ 56.531250] sysrq: Resetting [ 56.531250] in_irq(): true [ 56.531250] Console: switching to colour dummy device 80x25
halted CPU 0
halt code = 5
HALT instruction executed
PC = fffffc0000310040
Resetting I/O buses...
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 42 lines · On Sat, 14 Nov 2020 11:05:08 +0300 Serge Belyshev <[email protected]>…
Quoted 8 lines · Andrew Morton
Quoted 6 lines · On Fri, 13 Nov 2020 14:58:32 +0100 Sebastian Andrzej Siewior…
From: Thomas Gleixner <[email protected]>
in_interrupt()is true for a variety of things including bottom half disabled regions. Deducing hard interrupt context from it is dubious at best.Quoted 5 lines
Quoted 3 lines
Use
in_irq()which is true if called in hard interrupt context. Otherwise callingirq_exit()would do more harm than good.Gee, how to test it. Does anyone run current kernels on alpha?
Hold my beer:
arch/alpha/kernel/process.c +3
-1@@ -134,8 +134,10 @@ 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_irq ()) +if (in_irq ()) { +printk ("in_irq(): true\n" );irq_exit (); + }/* This has the effect of resetting the VGA video origin. */ console_lock ();do_take_over_console (&dummy_con,0 ,MAX_NR_CONSOLES -1 ,1 );and then sysrq-b over serial console:
[ 56.531250] sysrq: Resetting [ 56.531250] in_irq(): true [ 56.531250] Console: switching to colour dummy device 80x25halted CPU 0
Quoted 7 lines
halt code = 5
HALT instruction executed
PC =fffffc0000310040
Resetting I/O buses...Quoted 1 line
Quoted 1 line
Quoted 1 line
Tested-by Serge Belyshev <[email protected]>
Thanks ;)
Here, have that beer back - I kept some for you.