]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
evtchn, phydev: rename PHYSDEVOP_pirq_eoi_mfn to PHYSDEVOP_pirq_eoi_gmfn
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 3 Dec 2008 11:54:23 +0000 (11:54 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 3 Dec 2008 11:54:23 +0000 (11:54 +0000)
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
drivers/xen/core/evtchn.c
include/asm-ia64/maddr.h
include/xen/interface/physdev.h

index 3cf69c26971270a5c6cf0bc849fce0997b880c76..53296932a8556e67294cd488afdd3149a64c4643 100644 (file)
@@ -1039,10 +1039,11 @@ void irq_resume(void)
        init_evtchn_cpu_bindings();
 
        if (pirq_eoi_does_unmask) {
-               struct physdev_pirq_eoi_mfn eoi_mfn;
+               struct physdev_pirq_eoi_gmfn eoi_gmfn;
 
-               eoi_mfn.mfn = virt_to_bus(pirq_needs_eoi) >> PAGE_SHIFT;
-               if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_mfn, &eoi_mfn))
+               eoi_gmfn.gmfn = arbitrary_virt_to_machine(pirq_needs_eoi)
+                       >> PAGE_SHIFT;
+               if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn, &eoi_gmfn))
                        BUG();
        }
 
@@ -1132,13 +1133,14 @@ int evtchn_get_xen_pirq(int irq)
 void __init xen_init_IRQ(void)
 {
        unsigned int i;
-       struct physdev_pirq_eoi_mfn eoi_mfn;
+       struct physdev_pirq_eoi_gmfn eoi_gmfn;
 
        init_evtchn_cpu_bindings();
 
        BUG_ON(!bitmap_empty(pirq_needs_eoi, PAGE_SIZE * 8));
-       eoi_mfn.mfn = virt_to_bus(pirq_needs_eoi) >> PAGE_SHIFT;
-       if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_mfn, &eoi_mfn) == 0)
+       eoi_gmfn.gmfn = arbitrary_virt_to_machine(pirq_needs_eoi)
+               >> PAGE_SHIFT;
+       if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn, &eoi_gmfn) == 0)
                pirq_eoi_does_unmask = 1;
 
        /* No event channels are 'live' right now. */
index d072e97b9adf71badc705665634c2f13246fa540..bb5a5f62f67eee2653bec379f7b5063fd32f7908 100644 (file)
@@ -99,6 +99,7 @@ mfn_to_local_pfn(unsigned long mfn)
 #define mfn_to_virt(mfn) (__va((mfn) << PAGE_SHIFT))
 #define virt_to_mfn(virt) (__pa(virt) >> PAGE_SHIFT)
 #define virt_to_machine(virt) __pa(virt) /* for tpmfront.c */
+#define arbitrary_virt_to_machine(virt) virt_to_machine(ia64_imva(virt))
 
 #define set_phys_to_machine(pfn, mfn) do { } while (0)
 
index 80a10329907df5e11638715cf81fd59955ae3dde..b4d303ffe34cb0bbdfeee09e3388e9f60ec95bd0 100644 (file)
@@ -47,13 +47,13 @@ DEFINE_XEN_GUEST_HANDLE(physdev_eoi_t);
  * will automatically get unmasked. The page registered is used as a bit
  * array indexed by Xen's PIRQ value.
  */
-#define PHYSDEVOP_pirq_eoi_mfn          17
-struct physdev_pirq_eoi_mfn {
+#define PHYSDEVOP_pirq_eoi_gmfn         17
+struct physdev_pirq_eoi_gmfn {
     /* IN */
-    xen_pfn_t mfn;
+    xen_pfn_t gmfn;
 };
-typedef struct physdev_pirq_eoi_mfn physdev_pirq_eoi_mfn_t;
-DEFINE_XEN_GUEST_HANDLE(physdev_pirq_eoi_mfn_t);
+typedef struct physdev_pirq_eoi_gmfn physdev_pirq_eoi_gmfn_t;
+DEFINE_XEN_GUEST_HANDLE(physdev_pirq_eoi_gmfn_t);
 
 /*
  * Query the status of an IRQ line.