]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
xen: balloon: allow PVMMU interfaces to be compiled out
authorIan Campbell <ian.campbell@citrix.com>
Wed, 3 Oct 2012 11:17:50 +0000 (12:17 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 29 Oct 2012 14:11:37 +0000 (10:11 -0400)
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>
arch/x86/xen/Kconfig
drivers/xen/Kconfig
drivers/xen/balloon.c

index c9660bf3c293e19f1b660d5a5402497b90c83fac..7e938baa576d583f06e3375f9402cbe4b134e366 100644 (file)
@@ -6,6 +6,7 @@ config XEN
        bool "Xen guest support"
        select PARAVIRT
        select PARAVIRT_CLOCK
+       select XEN_HAVE_PVMMU
        depends on X86_64 || (X86_32 && X86_PAE && !X86_VISWS)
        depends on X86_CMPXCHG && X86_TSC
        help
index 126d8ce591ce5fc7e69348f746e91e60b04bc4ee..cabfa97f4674ef12c1fcd13d1a55c4affd47f635 100644 (file)
@@ -206,4 +206,7 @@ config XEN_MCE_LOG
          Allow kernel fetching MCE error from Xen platform and
          converting it into Linux mcelog format for mcelog tools
 
+config XEN_HAVE_PVMMU
+       bool
+
 endmenu
index 66fad338bdb00e64dfba06b5b0723500db173664..d42da3b9a58a99d1a0c46742c31a79b85dce68b4 100644 (file)
@@ -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) &&
                    !xen_feature(XENFEAT_auto_translated_physmap)) {
@@ -370,6 +371,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);
@@ -418,6 +420,7 @@ 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)) {
                        if (!xen_feature(XENFEAT_auto_translated_physmap)) {
                                ret = HYPERVISOR_update_va_mapping(
@@ -426,6 +429,7 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp)
                                BUG_ON(ret);
                        }
                }
+#endif
        }
 
        /* Ensure that ballooned highmem pages don't have kmaps. */