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/evtchn: allocate pirq_needs_eoi

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] linux/evtchn: allocate pirq_needs_eoi bitmap dynamically
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 Dec 2008 14:00:10 -0800
Delivery-date: Thu, 11 Dec 2008 13:59:54 -0800
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 1228915898 0
# Node ID 0d10be086a781afa2dd220e247e4a8047a296b38
# Parent  2fa1d9446f2fdc7e9361e55ebc82d8dcf33ad13e
linux/evtchn: allocate pirq_needs_eoi bitmap dynamically

Original patch from: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 drivers/xen/core/evtchn.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff -r 2fa1d9446f2f -r 0d10be086a78 drivers/xen/core/evtchn.c
--- a/drivers/xen/core/evtchn.c Wed Dec 10 13:21:23 2008 +0000
+++ b/drivers/xen/core/evtchn.c Wed Dec 10 13:31:38 2008 +0000
@@ -35,6 +35,7 @@
 #include <linux/interrupt.h>
 #include <linux/sched.h>
 #include <linux/kernel_stat.h>
+#include <linux/bootmem.h>
 #include <linux/version.h>
 #include <asm/atomic.h>
 #include <asm/system.h>
@@ -755,8 +756,7 @@ static struct hw_interrupt_type dynirq_t
 
 /* Bitmap indicating which PIRQs require Xen to be notified on unmask. */
 static int pirq_eoi_does_unmask;
-static DECLARE_BITMAP(pirq_needs_eoi, ALIGN(NR_PIRQS, PAGE_SIZE * 8))
-       __attribute__ ((__section__(".bss.page_aligned"), 
__aligned__(PAGE_SIZE)));
+static unsigned long *pirq_needs_eoi;
 
 static void pirq_unmask_and_notify(unsigned int evtchn, unsigned int irq)
 {
@@ -1041,8 +1041,7 @@ void irq_resume(void)
        if (pirq_eoi_does_unmask) {
                struct physdev_pirq_eoi_gmfn eoi_gmfn;
 
-               eoi_gmfn.gmfn = arbitrary_virt_to_machine(pirq_needs_eoi)
-                       >> PAGE_SHIFT;
+               eoi_gmfn.gmfn = virt_to_machine(pirq_needs_eoi) >> PAGE_SHIFT;
                if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn, &eoi_gmfn))
                        BUG();
        }
@@ -1137,9 +1136,9 @@ void __init xen_init_IRQ(void)
 
        init_evtchn_cpu_bindings();
 
-       BUG_ON(!bitmap_empty(pirq_needs_eoi, PAGE_SIZE * 8));
-       eoi_gmfn.gmfn = arbitrary_virt_to_machine(pirq_needs_eoi)
-               >> PAGE_SHIFT;
+       pirq_needs_eoi = alloc_bootmem_pages(sizeof(unsigned long)
+               * BITS_TO_LONGS(ALIGN(NR_PIRQS, PAGE_SIZE * 8)));
+       eoi_gmfn.gmfn = virt_to_machine(pirq_needs_eoi) >> PAGE_SHIFT;
        if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn, &eoi_gmfn) == 0)
                pirq_eoi_does_unmask = 1;
 

_______________________________________________
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/evtchn: allocate pirq_needs_eoi bitmap dynamically, Xen patchbot-linux-2.6.18-xen <=