aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2015-04-23 14:54:10 +0800
committerAlex Shi <alex.shi@linaro.org>2015-04-23 14:54:10 +0800
commit9a59ceb84312843046362a3503120ec6f70e56c5 (patch)
treeb7243f833d80778c0742cb40bb493c9f05111695
parent7531142ed9492bcb94e20c1baeca19ab296a5b31 (diff)
parent1dcd9896384ec3fe5c75829701d9babec7fe0d25 (diff)
Merge branch 'linux-linaro-lsk-v3.14' into linux-linaro-lsk-v3.14-androidlsk-v3.14-15.04-android
-rw-r--r--arch/arm64/kernel/setup.c19
-rw-r--r--arch/arm64/mm/init.c19
-rw-r--r--include/linux/kvm_host.h1
-rw-r--r--virt/kvm/eventfd.c3
4 files changed, 22 insertions, 20 deletions
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index 8290d06ef188..76b30b984e65 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -300,25 +300,6 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys)
dump_stack_set_arch_desc("%s (DT)", of_flat_dt_get_machine_name());
}
-/*
- * Limit the memory size that was specified via FDT.
- */
-static int __init early_mem(char *p)
-{
- phys_addr_t limit;
-
- if (!p)
- return 1;
-
- limit = memparse(p, &p) & PAGE_MASK;
- pr_notice("Memory limited to %lldMB\n", limit >> 20);
-
- memblock_enforce_memory_limit(limit);
-
- return 0;
-}
-early_param("mem", early_mem);
-
static void __init request_standard_resources(void)
{
struct memblock_region *region;
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index aa44a7bc9ae9..43e8a9ee77c9 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -126,10 +126,29 @@ static void arm64_memory_present(void)
}
#endif
+static phys_addr_t memory_limit = (phys_addr_t)ULLONG_MAX;
+
+/*
+ * Limit the memory size that was specified via FDT.
+ */
+static int __init early_mem(char *p)
+{
+ if (!p)
+ return 1;
+
+ memory_limit = memparse(p, &p) & PAGE_MASK;
+ pr_notice("Memory limited to %lldMB\n", memory_limit >> 20);
+
+ return 0;
+}
+early_param("mem", early_mem);
+
void __init arm64_memblock_init(void)
{
u64 *reserve_map, base, size;
+ memblock_enforce_memory_limit(memory_limit);
+
/*
* Register the kernel text, kernel data, initrd, and initial
* pagetables with memblock.
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 55d75a7cba73..bf933ba17529 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -1054,7 +1054,6 @@ int kvm_register_device_ops(struct kvm_device_ops *ops, u32 type);
extern struct kvm_device_ops kvm_mpic_ops;
extern struct kvm_device_ops kvm_xics_ops;
-extern struct kvm_device_ops kvm_vfio_ops;
#ifdef CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index 0ab1411eb007..ce3ca4c54534 100644
--- a/virt/kvm/eventfd.c
+++ b/virt/kvm/eventfd.c
@@ -36,6 +36,9 @@
#include <linux/seqlock.h>
#include <trace/events/kvm.h>
+#ifdef __KVM_HAVE_IOAPIC
+#include "ioapic.h"
+#endif
#include "iodev.h"
#ifdef CONFIG_HAVE_KVM_IRQFD