]> git.baikalelectronics.ru Git - kernel.git/commit
[S390] race safe external interrupt registration
authorJan Glauber <jang@linux.vnet.ibm.com>
Sun, 24 Jul 2011 08:48:27 +0000 (10:48 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Sun, 24 Jul 2011 08:48:22 +0000 (10:48 +0200)
commite082f39b068700153a224c44295d9ba5b2cca72e
treed7c62f412b1e99b2ebb5d37e8f86539b7dc03d9d
parentb1c9960ca4c6321fcf7c7d042d4d9184af8b5339
[S390] race safe external interrupt registration

The (un-)register_external_interrupt functions are not race safe if
more than one interrupt handler is added or deleted for an external
interrupt concurrently.

Make the registration / unregistration of external interrupts race safe
by using RCU and a spinlock. RCU is used to avoid a performance penalty
in the external interrupt handler, the register and unregister functions
are protected by the spinlock and are not performance critical.
call_rcu must be used since the SCLP driver uses the interface with
IRQs disabled. Also use the generic list implementation rather than
homebrewn list code.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/irq.c