Merge tag 'efi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi...
[cascardo/linux.git] / arch / x86 / kernel / setup.c
index e3ed628..30b4c44 100644 (file)
@@ -317,15 +317,12 @@ static u64 __init get_ramdisk_size(void)
        return ramdisk_size;
 }
 
-#define MAX_MAP_CHUNK  (NR_FIX_BTMAPS << PAGE_SHIFT)
 static void __init relocate_initrd(void)
 {
        /* Assume only end is not page aligned */
        u64 ramdisk_image = get_ramdisk_image();
        u64 ramdisk_size  = get_ramdisk_size();
        u64 area_size     = PAGE_ALIGN(ramdisk_size);
-       unsigned long slop, clen, mapaddr;
-       char *p, *q;
 
        /* We need to move the initrd down into directly mapped mem */
        relocated_ramdisk = memblock_find_in_range(0, PFN_PHYS(max_pfn_mapped),
@@ -343,25 +340,8 @@ static void __init relocate_initrd(void)
        printk(KERN_INFO "Allocated new RAMDISK: [mem %#010llx-%#010llx]\n",
               relocated_ramdisk, relocated_ramdisk + ramdisk_size - 1);
 
-       q = (char *)initrd_start;
-
-       /* Copy the initrd */
-       while (ramdisk_size) {
-               slop = ramdisk_image & ~PAGE_MASK;
-               clen = ramdisk_size;
-               if (clen > MAX_MAP_CHUNK-slop)
-                       clen = MAX_MAP_CHUNK-slop;
-               mapaddr = ramdisk_image & PAGE_MASK;
-               p = early_memremap(mapaddr, clen+slop);
-               memcpy(q, p+slop, clen);
-               early_memunmap(p, clen+slop);
-               q += clen;
-               ramdisk_image += clen;
-               ramdisk_size  -= clen;
-       }
+       copy_from_early_mem((void *)initrd_start, ramdisk_image, ramdisk_size);
 
-       ramdisk_image = get_ramdisk_image();
-       ramdisk_size  = get_ramdisk_size();
        printk(KERN_INFO "Move RAMDISK from [mem %#010llx-%#010llx] to"
                " [mem %#010llx-%#010llx]\n",
                ramdisk_image, ramdisk_image + ramdisk_size - 1,
@@ -498,7 +478,7 @@ static void __init memblock_x86_reserve_range_setup_data(void)
  * --------- Crashkernel reservation ------------------------------
  */
 
-#ifdef CONFIG_KEXEC
+#ifdef CONFIG_KEXEC_CORE
 
 /*
  * Keep the crash kernel below this limit.  On 32 bits earlier kernels
@@ -916,11 +896,6 @@ void __init setup_arch(char **cmdline_p)
 #ifdef CONFIG_X86_32
        apm_info.bios = boot_params.apm_bios_info;
        ist_info = boot_params.ist_info;
-       if (boot_params.sys_desc_table.length != 0) {
-               machine_id = boot_params.sys_desc_table.table[0];
-               machine_submodel_id = boot_params.sys_desc_table.table[1];
-               BIOS_revision = boot_params.sys_desc_table.table[2];
-       }
 #endif
        saved_video_mode = boot_params.hdr.vid_mode;
        bootloader_type = boot_params.hdr.type_of_loader;