mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Spinlock recursion detected on preempt-RT and interrupt handler  set_type code
@ 2009-01-25 21:46 Remy Bohmer
  0 siblings, 0 replies; only message in thread
From: Remy Bohmer @ 2009-01-25 21:46 UTC (permalink / raw)
  To: LKML; +Cc: linux-rt-users, Steven Rostedt, Thomas Gleixner

Hello All,

I ran into a spinlock recursion problem while testing the locking
corrctness of a 2.6.24.7-rt26-kernel on a Freescale iMX processor
(ARM). Unfortunately this Freescale architecture code is not in
mainline, but at least the blackfin architecture seems to have the
same setup (looking at bfin_gpio_irq_type() ), so it is not a
Freescale only problem.

What happens is that these routines are called in this order:
-> request_irq()
    -> setup_irq()  --> Lock the spinlock
(spin_lock_irqsave(&desc->lock, flags)) for the first time
        -> gpio_set_irq_type()  (or bfin_gpio_irq_type() on blackfin
in arch/blackfin/mach-common/ints-priority-sc.c)
            -> set_irq_handler()
               -> __set_irq_handler()   --> Locks the same spinlock a
2nd time, resulting in a BUG/hang, see below

I am looking at this code for a while now, and have not found a proper
solution to solve this problem yet. Does anyone have a great idea?

Kind Regards,

Remy


[    3.705384] BUG: spinlock recursion on CPU#0, swapper/1
[    3.710630]  lock: c03bc3c4, .magic: dead4ead, .owner: swapper/1,
.owner_cpu: 0
[    3.717944] [<c0034da8>] (dump_stack+0x0/0x14) from [<c016b558>]
(spin_bug+0x94/0xa8)
[    3.725867] [<c016b4c4>] (spin_bug+0x0/0xa8) from [<c02d49c4>]
(_raw_spin_lock+0x50/0x130)
[    3.734219]  r6:c7c26000 r5:c03bc3c4 r4:c03bc3c4
[    3.738890] [<c02d4974>] (_raw_spin_lock+0x0/0x130) from
[<c02d4250>] (__spin_lock_irqsave+0x28/0x30)
[    3.748181] [<c02d4228>] (__spin_lock_irqsave+0x0/0x30) from
[<c007cd44>] (__set_irq_handler+0x90/0x16c)
[    3.757731]  r5:0000007a r4:c03bc344
[    3.761343] [<c007ccb4>] (__set_irq_handler+0x0/0x16c) from
[<c00424a8>] (gpio_set_irq_type+0xd4/0x138)
[    3.770814] [<c00423d4>] (gpio_set_irq_type+0x0/0x138) from
[<c007c178>] (setup_irq+0x12c/0x20c)
[    3.779688]  r6:c7e877e0 r5:c03bc344 r4:00000000
[    3.784356] [<c007c04c>] (setup_irq+0x0/0x20c) from [<c007c2f0>]
(request_irq+0x98/0xc0)
[    3.792512] [<c007c258>] (request_irq+0x0/0xc0) from [<c01fb210>]
(clearpad_probe+0x3a0/0x414)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-25 21:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-25 21:46 Spinlock recursion detected on preempt-RT and interrupt handler set_type code Remy Bohmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®