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-devel

[Xen-devel] [PATCH] linux/evtchn: allocate pirq_needs_eoi bitmap dynamic

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux/evtchn: allocate pirq_needs_eoi bitmap dynamically
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Wed, 10 Dec 2008 10:59:12 +0000
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Delivery-date: Wed, 10 Dec 2008 02:59:23 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Original patch from: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

As usual, written and tested on 2.6.27.8 and made apply to the 2.6.18
tree without further testing.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- head-2008-12-08.orig/drivers/xen/core/evtchn.c      2008-12-05 
10:53:12.000000000 +0100
+++ head-2008-12-08/drivers/xen/core/evtchn.c   2008-12-10 10:47:20.000000000 
+0100
@@ -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 irq_chip dynirq_chip = {
 
 /* 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 +1137,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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux/evtchn: allocate pirq_needs_eoi bitmap dynamically, Jan Beulich <=