All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Philippe Gerum <rpm@xenomai.org>
Cc: Franz Engel <franz_lambert_engel@domain.hid>,
	"xenomai@xenomai.org" <xenomai@xenomai.org>,
	adeos-main <adeos-main@gna.org>
Subject: [Xenomai-help] [PATCH] ipipe: x86: Fix irq->vector lookup for IRQ_MOVE_CLEANUP_VECTOR
Date: Thu, 05 May 2011 16:45:24 +0200	[thread overview]
Message-ID: <4DC2B804.9070604@domain.hid> (raw)
In-Reply-To: <4DC29BB9.1090709@domain.hid>

The IRQ migration IRQ has no irq_cfg and is outside of the range
ipipe_apic_irq_vector can handle. This causes oopses when
__ipipe_get_ioapic_irq_vector is processing it.

Reported-by: Franz Engel <franz_lambert_engel@domain.hid>
Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
---
 arch/x86/kernel/apic/io_apic.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 8eaaadc..52f9686 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3985,8 +3985,12 @@ int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity)
 #ifdef CONFIG_IPIPE
 unsigned __ipipe_get_ioapic_irq_vector(int irq)
 {
-	return irq >= IPIPE_FIRST_APIC_IRQ && irq < IPIPE_NR_XIRQS ?
-		ipipe_apic_irq_vector(irq) : irq_cfg(irq)->vector;
+	if (irq >= IPIPE_FIRST_APIC_IRQ && irq < IPIPE_NR_XIRQS)
+		return ipipe_apic_irq_vector(irq);
+	else if (irq == IRQ_MOVE_CLEANUP_VECTOR)
+		return irq;
+	else
+		return irq_cfg(irq)->vector;
 }
 #endif /* CONFIG_IPIPE */
 
-- 
1.7.1


  reply	other threads:[~2011-05-05 14:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03 17:45 [Xenomai-help] Problem with the configuration of new system Franz Engel
2011-05-03 17:50 ` Gilles Chanteperdrix
2011-05-05  5:30   ` Franz Engel
2011-05-05  6:36     ` Jan Kiszka
2011-05-05  8:30       ` Franz Engel
2011-05-05  8:35         ` Jan Kiszka
2011-05-05  8:44           ` Franz Engel
2011-05-05 11:48           ` Franz Engel
2011-05-05 11:57             ` Jan Kiszka
2011-05-05 12:44               ` Jan Kiszka
2011-05-05 14:45                 ` Jan Kiszka [this message]
2011-05-06 17:12                   ` [Xenomai-help] Problems with rt pipes after upgrade Thomas Schaefer
2011-05-11 14:46                     ` Thomas Schaefer
2011-05-13 10:26                       ` Philippe Gerum
2011-05-13 22:39                         ` Thomas Schaefer
2011-05-14 17:21                           ` Gilles Chanteperdrix
2011-05-14 17:25                             ` Gilles Chanteperdrix
2011-05-15 15:21                               ` Philippe Gerum
2011-05-15 15:26                                 ` Jan Kiszka
2011-05-15 15:29                                   ` Philippe Gerum
2011-05-15 15:32                                   ` Philippe Gerum
2011-05-16 16:13                                     ` Thomas Schaefer

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=4DC2B804.9070604@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=adeos-main@gna.org \
    --cc=franz_lambert_engel@domain.hid \
    --cc=rpm@xenomai.org \
    --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.