]> Git Repo - linux.git/commitdiff
Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <[email protected]>
Tue, 30 Apr 2013 15:42:11 +0000 (08:42 -0700)
committerLinus Torvalds <[email protected]>
Tue, 30 Apr 2013 15:42:11 +0000 (08:42 -0700)
Pull x86 platform changes from Ingo Molnar:
 "Small fixes and cleanups all over the map"

* 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/setup: Drop unneeded include <asm/dmi.h>
  x86/olpc/xo1/sci: Don't call input_free_device() after input_unregister_device()
  x86/platform/intel/mrst: Remove cast for kmalloc() return value
  x86/platform/uv: Replace kmalloc() & memset with kzalloc()

1  2 
arch/x86/kernel/setup.c

diff --combined arch/x86/kernel/setup.c
index a5d550f2fa6e30c2cc65482b70eb036e0838d941,a60b245951e103a7ae527c06fc90243772eea71e..4689855c2f8a49eb2696a18b0fd7a3afa57b8ba7
@@@ -82,7 -82,6 +82,6 @@@
  #include <asm/timer.h>
  #include <asm/i8259.h>
  #include <asm/sections.h>
- #include <asm/dmi.h>
  #include <asm/io_apic.h>
  #include <asm/ist.h>
  #include <asm/setup_arch.h>
@@@ -173,10 -172,12 +172,10 @@@ static struct resource bss_resource = 
  /* cpu data as detected by the assembly code in head.S */
  struct cpuinfo_x86 new_cpu_data __cpuinitdata = {
        .wp_works_ok = -1,
 -      .fdiv_bug = -1,
  };
  /* common cpu data for all cpus */
  struct cpuinfo_x86 boot_cpu_data __read_mostly = {
        .wp_works_ok = -1,
 -      .fdiv_bug = -1,
  };
  EXPORT_SYMBOL(boot_cpu_data);
  
@@@ -505,14 -506,11 +504,14 @@@ static void __init memblock_x86_reserve
  /*
   * Keep the crash kernel below this limit.  On 32 bits earlier kernels
   * would limit the kernel to the low 512 MiB due to mapping restrictions.
 + * On 64bit, old kexec-tools need to under 896MiB.
   */
  #ifdef CONFIG_X86_32
 -# define CRASH_KERNEL_ADDR_MAX        (512 << 20)
 +# define CRASH_KERNEL_ADDR_LOW_MAX    (512 << 20)
 +# define CRASH_KERNEL_ADDR_HIGH_MAX   (512 << 20)
  #else
 -# define CRASH_KERNEL_ADDR_MAX        MAXMEM
 +# define CRASH_KERNEL_ADDR_LOW_MAX    (896UL<<20)
 +# define CRASH_KERNEL_ADDR_HIGH_MAX   MAXMEM
  #endif
  
  static void __init reserve_crashkernel_low(void)
        unsigned long long low_base = 0, low_size = 0;
        unsigned long total_low_mem;
        unsigned long long base;
 +      bool auto_set = false;
        int ret;
  
        total_low_mem = memblock_mem_size(1UL<<(32-PAGE_SHIFT));
 +      /* crashkernel=Y,low */
        ret = parse_crashkernel_low(boot_command_line, total_low_mem,
                                                &low_size, &base);
 -      if (ret != 0 || low_size <= 0)
 -              return;
 +      if (ret != 0) {
 +              /*
 +               * two parts from lib/swiotlb.c:
 +               *      swiotlb size: user specified with swiotlb= or default.
 +               *      swiotlb overflow buffer: now is hardcoded to 32k.
 +               *              We round it to 8M for other buffers that
 +               *              may need to stay low too.
 +               */
 +              low_size = swiotlb_size_or_default() + (8UL<<20);
 +              auto_set = true;
 +      } else {
 +              /* passed with crashkernel=0,low ? */
 +              if (!low_size)
 +                      return;
 +      }
  
        low_base = memblock_find_in_range(low_size, (1ULL<<32),
                                        low_size, alignment);
  
        if (!low_base) {
 -              pr_info("crashkernel low reservation failed - No suitable area found.\n");
 +              if (!auto_set)
 +                      pr_info("crashkernel low reservation failed - No suitable area found.\n");
  
                return;
        }
@@@ -571,22 -553,14 +570,22 @@@ static void __init reserve_crashkernel(
        const unsigned long long alignment = 16<<20;    /* 16M */
        unsigned long long total_mem;
        unsigned long long crash_size, crash_base;
 +      bool high = false;
        int ret;
  
        total_mem = memblock_phys_mem_size();
  
 +      /* crashkernel=XM */
        ret = parse_crashkernel(boot_command_line, total_mem,
                        &crash_size, &crash_base);
 -      if (ret != 0 || crash_size <= 0)
 -              return;
 +      if (ret != 0 || crash_size <= 0) {
 +              /* crashkernel=X,high */
 +              ret = parse_crashkernel_high(boot_command_line, total_mem,
 +                              &crash_size, &crash_base);
 +              if (ret != 0 || crash_size <= 0)
 +                      return;
 +              high = true;
 +      }
  
        /* 0 means: find the address automatically */
        if (crash_base <= 0) {
                 *  kexec want bzImage is below CRASH_KERNEL_ADDR_MAX
                 */
                crash_base = memblock_find_in_range(alignment,
 -                             CRASH_KERNEL_ADDR_MAX, crash_size, alignment);
 +                                      high ? CRASH_KERNEL_ADDR_HIGH_MAX :
 +                                             CRASH_KERNEL_ADDR_LOW_MAX,
 +                                      crash_size, alignment);
  
                if (!crash_base) {
                        pr_info("crashkernel reservation failed - No suitable area found.\n");
This page took 0.068351 seconds and 4 git commands to generate.