Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 89877e42827f16fa5f86b1df0c2860b1 > files > 2662

kernel-2.6.18-128.1.10.el5.src.rpm

From: Don Dutile <ddutile@redhat.com>
Date: Fri, 24 Oct 2008 15:09:39 -0400
Subject: [xen] FV: fix lockdep warnings when running debug kernel
Message-id: 49021D73.7050201@redhat.com
O-Subject: [RHEL5.3 Patch] Eliminate bogus lockdep warning in debug kernel when running as FV xen guest
Bugzilla: 459876
RH-Acked-by: Rik van Riel <riel@redhat.com>
RH-Acked-by: Prarit Bhargava <prarit@redhat.com>
RH-Acked-by: Bill Burns <bburns@redhat.com>

BZ 459876

When running the 5.3 debug kernel as a FV xen guest,
a lockdep warning is generated in the xen event handler.

The problem is that lockdep doesn't like an interrupt handler
to re-enable interrupts, which is what the xen event handler does.
It's not a problem, just an 'unknown' for lockdep, so it
whines (generates a warning).

Fortunately, the lockdep support realized that this condition
could arise, and you can modify the enabler such that a debug kernel
won't yell foul. That's what the patch does.

Note: the bz also reports a networking problem;  that existed with -105,
      and wasn't xen/FV kernel specific.  That problem has gone away
      with follow-on builds of the rhel5.3 kernel.

Brew built the fix against -118.
No need to test kernel-xen as dom0, domU since the code is only included
in bare-metal/FV kernel, thus no regressions there;  tested the non debug/FV/bare-metal
kernel as FV guest for non-regressions;
tested the debug kernel such that the warning is no longer generated and
it functions as well.
-- a lot of fuss for an unknown, non-lockdep problem.

Please review & ack.

- Don

diff --git a/drivers/xenpv_hvm/platform-pci/evtchn.c b/drivers/xenpv_hvm/platform-pci/evtchn.c
index aa876d5..4be53ea 100644
--- a/drivers/xenpv_hvm/platform-pci/evtchn.c
+++ b/drivers/xenpv_hvm/platform-pci/evtchn.c
@@ -290,7 +290,7 @@ static irqreturn_t evtchn_interrupt(int irq, void *dev_id,
 			irq_evtchn[irq].in_handler = 1;
 			spin_unlock(&irq_evtchn[irq].lock);
 
-			local_irq_enable();
+			local_irq_enable_in_hardirq();
 			handler(irq, irq_evtchn[irq].dev_id, regs);
 			local_irq_disable();