WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] linux: restrict IRQ probing

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] linux: restrict IRQ probing
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 03 Oct 2008 09:40:09 -0700
Delivery-date: Fri, 03 Oct 2008 09:39:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1223023177 -3600
# Node ID 39a4dda735d373195f57f56e30f614cb564184da
# Parent  b54652ee29ef09b4a0cc0e3460629c5638d9cafb
linux: restrict IRQ probing

Since IRQ probing may touch all currently unused interrupts, we must
prevent probing for those where it doesn't make sense (to avoid
triggering BUG()s or de-referencing NULL function pointers):
- dynamic IRQs must never be probed
- physical IRQs should only be probed when registered or
identity-mapped

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 drivers/xen/core/evtchn.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletion(-)

diff -r b54652ee29ef -r 39a4dda735d3 drivers/xen/core/evtchn.c
--- a/drivers/xen/core/evtchn.c Thu Oct 02 11:29:02 2008 +0100
+++ b/drivers/xen/core/evtchn.c Fri Oct 03 09:39:37 2008 +0100
@@ -756,7 +756,16 @@ static struct hw_interrupt_type dynirq_t
 
 void evtchn_register_pirq(int irq)
 {
+       struct irq_desc *desc;
+       unsigned long flags;
+
        irq_info[irq] = mk_irq_info(IRQT_PIRQ, irq, 0);
+
+       /* Cannot call set_irq_probe(), as that's marked __init. */
+       desc = irq_desc + irq;
+       spin_lock_irqsave(&desc->lock, flags);
+       desc->status &= ~IRQ_NOPROBE;
+       spin_unlock_irqrestore(&desc->lock, flags);
 }
 
 #if defined(CONFIG_X86_IO_APIC)
@@ -1105,7 +1114,7 @@ void __init xen_init_IRQ(void)
        for (i = DYNIRQ_BASE; i < (DYNIRQ_BASE + NR_DYNIRQS); i++) {
                irq_bindcount[i] = 0;
 
-               irq_desc[i].status = IRQ_DISABLED;
+               irq_desc[i].status = IRQ_DISABLED|IRQ_NOPROBE;
                irq_desc[i].action = NULL;
                irq_desc[i].depth = 1;
                irq_desc[i].chip = &dynirq_type;
@@ -1123,6 +1132,8 @@ void __init xen_init_IRQ(void)
 #endif
 
                irq_desc[i].status = IRQ_DISABLED;
+               if (!identity_mapped_irq(i))
+                       irq_desc[i].status |= IRQ_NOPROBE;
                irq_desc[i].action = NULL;
                irq_desc[i].depth = 1;
                irq_desc[i].chip = &pirq_type;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] linux: restrict IRQ probing, Xen patchbot-linux-2.6.18-xen <=