[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 2/2] linux: rename PHYSDEVOP_pirq_eoi_mfn to PHYSDEVOP_pirq_eoi_gmfn



evtchn, phydev: rename PHYSDEVOP_pirq_eoi_mfn to PHYSDEVOP_pirq_eoi_gmfn

rename PHYSDEVOP_pirq_eoi_mfn to PHYSDEVOP_pirq_eoi_gmfn

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff --git a/drivers/xen/core/evtchn.c b/drivers/xen/core/evtchn.c
--- a/drivers/xen/core/evtchn.c
+++ b/drivers/xen/core/evtchn.c
@@ -1032,9 +1032,13 @@ static void restore_cpu_ipis(unsigned in
        }
 }
 
-static void physdev_set_pirq_eoi_mfn(struct physdev_pirq_eoi_mfn *eoi_mfn)
+static void physdev_set_pirq_eoi_gmfn(struct physdev_pirq_eoi_gmfn *eoi_gmfn)
 {
-       eoi_mfn->mfn = arbitrary_virt_to_bus(pirq_needs_eoi) >> PAGE_SHIFT;
+       if (xen_feature(XENFEAT_auto_translated_physmap))
+               eoi_gmfn->gmfn = __pa(pirq_needs_eoi) >> PAGE_SHIFT;
+       else
+               eoi_gmfn->gmfn =
+                       arbitrary_virt_to_bus(pirq_needs_eoi) >> PAGE_SHIFT;
 }
 
 void irq_resume(void)
@@ -1044,10 +1048,10 @@ 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;
 
-               physdev_set_pirq_eoi_mfn(&eoi_mfn);
-               if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_mfn, &eoi_mfn))
+               physdev_set_pirq_eoi_gmfn(&eoi_gmfn);
+               if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn, &eoi_gmfn))
                        BUG();
        }
 
@@ -1137,13 +1141,13 @@ void __init xen_init_IRQ(void)
 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));
-       physdev_set_pirq_eoi_mfn(&eoi_mfn);
-       if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_mfn, &eoi_mfn) == 0)
+       physdev_set_pirq_eoi_gmfn(&eoi_gmfn);
+       if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn, &eoi_gmfn) == 0)
                pirq_eoi_does_unmask = 1;
 
        /* No event channels are 'live' right now. */
diff --git a/include/xen/interface/physdev.h b/include/xen/interface/physdev.h
--- a/include/xen/interface/physdev.h
+++ b/include/xen/interface/physdev.h
@@ -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_mfn physdev_pirq_eoi_gmfn_t;
+DEFINE_XEN_GUEST_HANDLE(physdev_pirq_eoi_gmfn_t);
 
 /*
  * Query the status of an IRQ line.


-- 
yamahata

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.