From: Philippe Gerum <rpm@xenomai.org>
To: Anders Blomdell <anders.blomdell@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] [BUG] Interrupt problem on powerpc
Date: Mon, 30 Jan 2006 17:31:16 +0100 [thread overview]
Message-ID: <43DE3F54.8090105@domain.hid> (raw)
In-Reply-To: <43DE1DAD.8050302@domain.hid>
Anders Blomdell wrote:
> On a PrPMC800 (PPC 7410 processor) withe Xenomai-2.1-rc2, I get the
> following if the interrupt handler takes too long (i.e. next interrupt
> gets generated before the previous one has finished)
>
> [ 42.543765] [c00c2008] spin_bug+0xa8/0xc4
> [ 42.597617] [c00c22d4] _raw_spin_lock+0x180/0x184
Someone (in arch/ppc64/kernel/*.c?) is spinlocking+irqsave desc->lock for any
given IRQ without using the Adeos *_hw() spinlock variant that masks the interrupt
at hw level. So we seem to have:
spin_lock_irqsave(&desc->lock)
<hw IRQ>
__ipipe_grab_irq
__ipipe_handle_irq
__ipipe_ack_irq
spin_lock...(&desc->lock)
deadlock.
The point is about having spinlock_irqsave only _virtually_ masking the interrupts
by preventing their associated Linux handler from being called, but despite this,
Adeos still actually acquires and acknowledges the incoming hw events before
logging them, even if their associated action happen to be postponed until
spinlock_irq_restore() is called.
To solve this, all spinlocks potentially touched by the ipipe's primary IRQ
handler and/or the code it calls indirectly, _must_ be operated using the _hw()
call variant all over the kernel, so that no hw IRQ can be taken while those
spinlocks are held by Linux. Usually, only the spinlock(s) protecting the
interrupt descriptors or the PIC hardware are concerned.
> [ 42.660637] [c000f388] __ipipe_ack_irq+0x88/0x130
> [ 42.723657] [c000efe4] __ipipe_handle_irq+0x140/0x268
> [ 42.791259] [c000f144] __ipipe_grab_irq+0x38/0xa4
> [ 42.854279] [c0005058] __ipipe_ret_from_except+0x0/0xc
> [ 42.923029] [00000000] 0x0
> [ 42.959695] [c0038348] __do_IRQ+0x134/0x164
> [ 43.015839] [c000ed04] __ipipe_do_IRQ+0x2c/0x44
> [ 43.076567] [c000eb08] __ipipe_sync_stage+0x1ec/0x228
> [ 43.144170] [c0039420] ipipe_suspend_domain+0x7c/0xc4
> [ 43.211774] [c000f0b0] __ipipe_handle_irq+0x20c/0x268
> [ 43.279377] [c000f144] __ipipe_grab_irq+0x38/0xa4
> [ 43.342396] [c0005058] __ipipe_ret_from_except+0x0/0xc
> [ 43.411145] [c0006524] default_idle+0x10/0x60
>
>
> Any ideas of where to look?
>
> Regards
>
> Anders Blomdell
>
>
>
> _______________________________________________
> Xenomai-core mailing list
> Xenomai-core@domain.hid
> https://mail.gna.org/listinfo/xenomai-core
>
--
Philippe.
next prev parent reply other threads:[~2006-01-30 16:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-30 14:07 [Xenomai-core] [BUG] Interrupt problem on powerpc Anders Blomdell
2006-01-30 14:39 ` Jan Kiszka
2006-01-30 16:10 ` Anders Blomdell
2006-01-30 16:31 ` Jan Kiszka
2006-01-30 16:50 ` Anders Blomdell
2006-02-01 9:12 ` [Xenomai-core] [BUG] version mismatch Anders Blomdell
2006-02-01 18:17 ` Philippe Gerum
2006-01-30 16:31 ` Philippe Gerum [this message]
2006-01-30 16:54 ` [Xenomai-core] [BUG] Interrupt problem on powerpc Anders Blomdell
2006-01-30 18:03 ` Philippe Gerum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43DE3F54.8090105@domain.hid \
--to=rpm@xenomai.org \
--cc=anders.blomdell@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.