]> xenbits.xensource.com Git - people/aperard/linux-chromebook.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)
committerAnthony PERARD <anthony.perard@citrix.com>
Wed, 27 Feb 2013 12:06:03 +0000 (12:06 +0000)
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>
Conflicts:
drivers/xen/Kconfig

arch/x86/xen/Kconfig
drivers/xen/Kconfig
drivers/xen/balloon.c

index fdce49c7aff6cf2ce931f25154d8e7c0ada8338c..c31ee77e1ec1fed6cda1372eebca22c1d147f690 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 ea20c51d24c76420c5c586fc4e9203478094ecda..bd3e5921a2b86c36dc58604330760609a00826c9 100644 (file)
@@ -196,4 +196,7 @@ config XEN_ACPI_PROCESSOR
          called xen_acpi_processor  If you do not know what to choose, select
          M here. If the CPUFREQ drivers are built in, select Y here.
 
+config XEN_HAVE_PVMMU
+       bool
+
 endmenu
index d6886d90ccfd53eed62773a755ee282e9553a55f..a56776dbe0958ece67b1c12a4a13b8be5bdb023c 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)) {
                        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. */