ia64/linux-2.6.18-xen.hg

changeset 752:ca213a56dba1

evtchn, phydev: rename PHYSDEVOP_pirq_eoi_mfn to PHYSDEVOP_pirq_eoi_gmfn

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Dec 03 11:54:23 2008 +0000 (2008-12-03)
parents 63a878f8851b
children 17adc5c344fe
files drivers/xen/core/evtchn.c include/asm-ia64/maddr.h include/xen/interface/physdev.h
line diff
     1.1 --- a/drivers/xen/core/evtchn.c	Tue Dec 02 11:54:47 2008 +0000
     1.2 +++ b/drivers/xen/core/evtchn.c	Wed Dec 03 11:54:23 2008 +0000
     1.3 @@ -1039,10 +1039,11 @@ void irq_resume(void)
     1.4  	init_evtchn_cpu_bindings();
     1.5  
     1.6  	if (pirq_eoi_does_unmask) {
     1.7 -		struct physdev_pirq_eoi_mfn eoi_mfn;
     1.8 +		struct physdev_pirq_eoi_gmfn eoi_gmfn;
     1.9  
    1.10 -		eoi_mfn.mfn = virt_to_bus(pirq_needs_eoi) >> PAGE_SHIFT;
    1.11 -		if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_mfn, &eoi_mfn))
    1.12 +		eoi_gmfn.gmfn = arbitrary_virt_to_machine(pirq_needs_eoi)
    1.13 +			>> PAGE_SHIFT;
    1.14 +		if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn, &eoi_gmfn))
    1.15  			BUG();
    1.16  	}
    1.17  
    1.18 @@ -1132,13 +1133,14 @@ int evtchn_get_xen_pirq(int irq)
    1.19  void __init xen_init_IRQ(void)
    1.20  {
    1.21  	unsigned int i;
    1.22 -	struct physdev_pirq_eoi_mfn eoi_mfn;
    1.23 +	struct physdev_pirq_eoi_gmfn eoi_gmfn;
    1.24  
    1.25  	init_evtchn_cpu_bindings();
    1.26  
    1.27  	BUG_ON(!bitmap_empty(pirq_needs_eoi, PAGE_SIZE * 8));
    1.28 -	eoi_mfn.mfn = virt_to_bus(pirq_needs_eoi) >> PAGE_SHIFT;
    1.29 -	if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_mfn, &eoi_mfn) == 0)
    1.30 +	eoi_gmfn.gmfn = arbitrary_virt_to_machine(pirq_needs_eoi)
    1.31 +		>> PAGE_SHIFT;
    1.32 +	if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn, &eoi_gmfn) == 0)
    1.33  		pirq_eoi_does_unmask = 1;
    1.34  
    1.35  	/* No event channels are 'live' right now. */
     2.1 --- a/include/asm-ia64/maddr.h	Tue Dec 02 11:54:47 2008 +0000
     2.2 +++ b/include/asm-ia64/maddr.h	Wed Dec 03 11:54:23 2008 +0000
     2.3 @@ -99,6 +99,7 @@ mfn_to_local_pfn(unsigned long mfn)
     2.4  #define mfn_to_virt(mfn) (__va((mfn) << PAGE_SHIFT))
     2.5  #define virt_to_mfn(virt) (__pa(virt) >> PAGE_SHIFT)
     2.6  #define virt_to_machine(virt) __pa(virt) /* for tpmfront.c */
     2.7 +#define arbitrary_virt_to_machine(virt) virt_to_machine(ia64_imva(virt))
     2.8  
     2.9  #define set_phys_to_machine(pfn, mfn) do { } while (0)
    2.10  
     3.1 --- a/include/xen/interface/physdev.h	Tue Dec 02 11:54:47 2008 +0000
     3.2 +++ b/include/xen/interface/physdev.h	Wed Dec 03 11:54:23 2008 +0000
     3.3 @@ -47,13 +47,13 @@ DEFINE_XEN_GUEST_HANDLE(physdev_eoi_t);
     3.4   * will automatically get unmasked. The page registered is used as a bit
     3.5   * array indexed by Xen's PIRQ value.
     3.6   */
     3.7 -#define PHYSDEVOP_pirq_eoi_mfn          17
     3.8 -struct physdev_pirq_eoi_mfn {
     3.9 +#define PHYSDEVOP_pirq_eoi_gmfn         17
    3.10 +struct physdev_pirq_eoi_gmfn {
    3.11      /* IN */
    3.12 -    xen_pfn_t mfn;
    3.13 +    xen_pfn_t gmfn;
    3.14  };
    3.15 -typedef struct physdev_pirq_eoi_mfn physdev_pirq_eoi_mfn_t;
    3.16 -DEFINE_XEN_GUEST_HANDLE(physdev_pirq_eoi_mfn_t);
    3.17 +typedef struct physdev_pirq_eoi_gmfn physdev_pirq_eoi_gmfn_t;
    3.18 +DEFINE_XEN_GUEST_HANDLE(physdev_pirq_eoi_gmfn_t);
    3.19  
    3.20  /*
    3.21   * Query the status of an IRQ line.