]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/x86/kernel/setup.c
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux.git] / arch / x86 / kernel / setup.c
index 04e6c62f1a9386535f9b1e4f5156e37ec14f402d..0a2421cca01fad095bbb7caa8e7c779d910d751b 100644 (file)
@@ -89,6 +89,7 @@
 #include <asm/cacheflush.h>
 #include <asm/processor.h>
 #include <asm/bugs.h>
+#include <asm/kasan.h>
 
 #include <asm/vsyscall.h>
 #include <asm/cpu.h>
@@ -431,15 +432,13 @@ static void __init parse_setup_data(void)
 
        pa_data = boot_params.hdr.setup_data;
        while (pa_data) {
-               u32 data_len, map_len, data_type;
+               u32 data_len, data_type;
 
-               map_len = max(PAGE_SIZE - (pa_data & ~PAGE_MASK),
-                             (u64)sizeof(struct setup_data));
-               data = early_memremap(pa_data, map_len);
+               data = early_memremap(pa_data, sizeof(*data));
                data_len = data->len + sizeof(struct setup_data);
                data_type = data->type;
                pa_next = data->next;
-               early_iounmap(data, map_len);
+               early_iounmap(data, sizeof(*data));
 
                switch (data_type) {
                case SETUP_E820_EXT:
@@ -1176,6 +1175,8 @@ void __init setup_arch(char **cmdline_p)
 
        x86_init.paging.pagetable_init();
 
+       kasan_init();
+
        if (boot_cpu_data.cpuid_level >= 0) {
                /* A CPU has %cr4 if and only if it has CPUID */
                mmu_cr4_features = __read_cr4();