#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>
/* 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)
{
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();
}
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;