diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2012-10-03 12:17:50 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2012-11-29 12:59:13 +0000 |
commit | c2374bf57e7861039bb129ead538515502ef7860 (patch) | |
tree | 3b32e9891ec0b133e676c4cc5cf9617499310725 /drivers/xen/balloon.c | |
parent | d71f513985c22f1050295d1a7e4327cf9fb060da (diff) | |
download | op-kernel-dev-c2374bf57e7861039bb129ead538515502ef7860.zip op-kernel-dev-c2374bf57e7861039bb129ead538515502ef7860.tar.gz |
xen: balloon: allow PVMMU interfaces to be compiled out
The ARM platform has no concept of PVMMU and therefor no
HYPERVISOR_update_va_mapping et al. Allow this code to be compiled out
when not required.
In some similar situations (e.g. P2M) we have defined dummy functions
to avoid this, however I think we can/should draw the line at dummying
out actual hypercalls.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen/balloon.c')
-rw-r--r-- | drivers/xen/balloon.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index d6886d9..a56776d 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -359,6 +359,7 @@ static enum bp_state increase_reservation(unsigned long nr_pages) set_phys_to_machine(pfn, frame_list[i]); +#ifdef CONFIG_XEN_HAVE_PVMMU /* Link back into the page tables if not highmem. */ if (xen_pv_domain() && !PageHighMem(page)) { int ret; @@ -368,6 +369,7 @@ static enum bp_state increase_reservation(unsigned long nr_pages) 0); BUG_ON(ret); } +#endif /* Relinquish the page back to the allocator. */ ClearPageReserved(page); @@ -416,13 +418,14 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp) scrub_page(page); +#ifdef CONFIG_XEN_HAVE_PVMMU if (xen_pv_domain() && !PageHighMem(page)) { ret = HYPERVISOR_update_va_mapping( (unsigned long)__va(pfn << PAGE_SHIFT), __pte_ma(0), 0); BUG_ON(ret); } - +#endif } /* Ensure that ballooned highmem pages don't have kmaps. */ |