]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
genirq: Provide disable_hardirq()
authorPeter Zijlstra <peterz@infradead.org>
Thu, 5 Feb 2015 13:06:23 +0000 (14:06 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 18 Feb 2015 14:08:33 +0000 (15:08 +0100)
commit02cea3958664723a5d2236f0f0058de97c7e4693
tree0bf1e7116f925131c34dc1bc217942a6e6f00688
parent4fe7ffb7e17ca6ad9173b8de35f260c9c8fc2f79
genirq: Provide disable_hardirq()

For things like netpoll there is a need to disable an interrupt from
atomic context. Currently netpoll uses disable_irq() which will
sleep-wait on threaded handlers and thus forced_irqthreads breaks
things.

Provide disable_hardirq(), which uses synchronize_hardirq() to only wait
for active hardirq handlers; also change synchronize_hardirq() to
return the status of threaded handlers.

This will allow one to try-disable an interrupt from atomic context, or
in case of request_threaded_irq() to only wait for the hardirq part.

Suggested-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Miller <davem@davemloft.net>
Cc: Eyal Perry <eyalpe@mellanox.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Quentin Lambert <lambert.quentin@gmail.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Russell King <linux@arm.linux.org.uk>
Link: http://lkml.kernel.org/r/20150205130623.GH5029@twins.programming.kicks-ass.net
[ Fixed typos and such. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/hardirq.h
include/linux/interrupt.h
kernel/irq/manage.c