All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Giammarco Zacheo <g.zacheo@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>, adeos-main@gna.org
Subject: Re: [Xenomai-help] Kernel oops while trying first boot w/ Xenomai 2.4rc5
Date: Tue, 13 Nov 2007 09:38:39 +0100	[thread overview]
Message-ID: <4739628F.8000100@domain.hid> (raw)
In-Reply-To: <b054e88e0711091028v76750ff0jcf3b20aa12317d69@domain.hid>


[-- Attachment #1.1: Type: text/plain, Size: 1153 bytes --]

Hi Giammarco,

Giammarco Zacheo wrote:
> Ok, I hope this is what you asked for...
> 
> I added printk in mask_ack_irq. Look at mask_ack_irq--> in the text
> below, those are the addresses of the function pointers.
> the printk related to mask_ack is printed once at the first pass in
> the function, otherwise the kernel would be choked by the output.

Yep, this pointed to the right spot. I still don't get why we didn't
stumble over this earlier (obviously, most x86_64 boxes take a different
code path here), but it is at least clear now what went wrong:

I-pipe ran into one of the remaining non-genirq code paths on x86_64.
More precisely, the IRQ chip of timer interrupt was changed from 8259 to
APIC without going through the generic API so that I-pipe was still
using the old ack handler, stepping later on the missing mask and
mack_ack handler.

This patch now updates irq_chip.ipipe_ack when it changes for IRQ0. This
is a temporary fix, I guess kernel people will refactor io_apic_*.c into
a shared variant soon, overcoming this "minor" variation between i386
and x86_64...

Please let us know if this helps!

Jan

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: update-ipipe_ack_irq-for-irq0.patch --]
[-- Type: text/x-patch; name="update-ipipe_ack_irq-for-irq0.patch", Size: 984 bytes --]

---
 arch/x86_64/kernel/io_apic.c |    5 +++++
 1 file changed, 5 insertions(+)

Index: linux-2.6.23.1-xeno_64/arch/x86_64/kernel/io_apic.c
===================================================================
--- linux-2.6.23.1-xeno_64.orig/arch/x86_64/kernel/io_apic.c
+++ linux-2.6.23.1-xeno_64/arch/x86_64/kernel/io_apic.c
@@ -1659,6 +1659,8 @@ static inline void unlock_ExtINT_logic(v
 	spin_unlock_irqrestore(&ioapic_lock, flags);
 }
 
+void __ipipe_ack_edge_irq(unsigned irq, struct irq_desc *desc);
+
 /*
  * This code may look a bit paranoid, but it's supposed to cooperate with
  * a wide range of boards and BIOS bugs.  Fortunately only the timer IRQ
@@ -1752,6 +1754,9 @@ static inline void check_timer(void)
 
 	disable_8259A_irq(0);
 	irq_desc[0].chip = &lapic_irq_type;
+#ifdef CONFIG_IPIPE
+	irq_desc[0].ipipe_ack = &__ipipe_ack_edge_irq;
+#endif
 	apic_write(APIC_LVT0, APIC_DM_FIXED | cfg->vector);	/* Fixed mode */
 	enable_8259A_irq(0);
 

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

  reply	other threads:[~2007-11-13  8:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09 14:16 [Xenomai-help] Kernel oops while trying first boot w/ Xenomai 2.4rc5 Giammarco Zacheo
2007-11-09 14:43 ` Jan Kiszka
2007-11-09 14:49   ` Jan Kiszka
     [not found]     ` <b054e88e0711090652h176ef99dx740a5c0deb333829@domain.hid>
     [not found]       ` <4734755F.2010301@domain.hid>
     [not found]         ` <47347593.3040605@domain.hid>
     [not found]           ` <b054e88e0711090747m315c1ecdsa998c41653737046@domain.hid>
     [not found]             ` <47348393.5030202@domain.hid>
2007-11-09 18:28               ` Giammarco Zacheo
2007-11-13  8:38                 ` Jan Kiszka [this message]
2007-11-13 11:23                   ` Giammarco Zacheo
2007-11-09 14:51   ` Gilles Chanteperdrix
2007-11-09 14:45 ` Gilles Chanteperdrix
2007-11-09 14:54   ` Jan Kiszka
2007-11-09 15:32     ` Gilles Chanteperdrix

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=4739628F.8000100@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=adeos-main@gna.org \
    --cc=g.zacheo@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.