mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 02:34:01 +08:00
xen: compilation fix to balloon driver for ia64 support
fix compilation error of ballon driver on ia64. extent_start member is pointer argument. On x86 pointer argument for xen hypercall is passed as virtual address. On the other hand, ia64 and ppc, pointer argument is passed in pseudo physical address. (guest physicall address.) So they must be passed as handle and convert right before issuing hypercall. CC drivers/xen/balloon.o linux-2.6-x86/drivers/xen/balloon.c: In function 'increase_reservation': linux-2.6-x86/drivers/xen/balloon.c:228: error: incompatible types in assignment linux-2.6-x86/drivers/xen/balloon.c: In function 'decrease_reservation': linux-2.6-x86/drivers/xen/balloon.c:324: error: incompatible types in assignment linux-2.6-x86/drivers/xen/balloon.c: In function 'dealloc_pte_fn': linux-2.6-x86/drivers/xen/balloon.c:486: error: incompatible types in assignment linux-2.6-x86/drivers/xen/balloon.c: In function 'alloc_empty_pages_and_pagevec': linux-2.6-x86/drivers/xen/balloon.c:522: error: incompatible types in assignment make[2]: *** [drivers/xen/balloon.o] Error 1 Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
ec9b2065d4
commit
a90971ebdd
@ -225,7 +225,7 @@ static int increase_reservation(unsigned long nr_pages)
|
||||
page = balloon_next_page(page);
|
||||
}
|
||||
|
||||
reservation.extent_start = (unsigned long)frame_list;
|
||||
set_xen_guest_handle(reservation.extent_start, frame_list);
|
||||
reservation.nr_extents = nr_pages;
|
||||
rc = HYPERVISOR_memory_op(
|
||||
XENMEM_populate_physmap, &reservation);
|
||||
@ -321,7 +321,7 @@ static int decrease_reservation(unsigned long nr_pages)
|
||||
balloon_append(pfn_to_page(pfn));
|
||||
}
|
||||
|
||||
reservation.extent_start = (unsigned long)frame_list;
|
||||
set_xen_guest_handle(reservation.extent_start, frame_list);
|
||||
reservation.nr_extents = nr_pages;
|
||||
ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation, &reservation);
|
||||
BUG_ON(ret != nr_pages);
|
||||
@ -483,7 +483,7 @@ static int dealloc_pte_fn(
|
||||
.extent_order = 0,
|
||||
.domid = DOMID_SELF
|
||||
};
|
||||
reservation.extent_start = (unsigned long)&mfn;
|
||||
set_xen_guest_handle(reservation.extent_start, &mfn);
|
||||
set_pte_at(&init_mm, addr, pte, __pte_ma(0ull));
|
||||
set_phys_to_machine(__pa(addr) >> PAGE_SHIFT, INVALID_P2M_ENTRY);
|
||||
ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation, &reservation);
|
||||
@ -519,7 +519,7 @@ static struct page **alloc_empty_pages_and_pagevec(int nr_pages)
|
||||
.extent_order = 0,
|
||||
.domid = DOMID_SELF
|
||||
};
|
||||
reservation.extent_start = (unsigned long)&gmfn;
|
||||
set_xen_guest_handle(reservation.extent_start, &gmfn);
|
||||
ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation,
|
||||
&reservation);
|
||||
if (ret == 1)
|
||||
|
Loading…
Reference in New Issue
Block a user