]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
Merge branch 'core-memblock-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 22 Oct 2010 01:52:11 +0000 (18:52 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 22 Oct 2010 01:52:11 +0000 (18:52 -0700)
* 'core-memblock-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (74 commits)
  x86-64: Only set max_pfn_mapped to 512 MiB if we enter via head_64.S
  xen: Cope with unmapped pages when initializing kernel pagetable
  memblock, bootmem: Round pfn properly for memory and reserved regions
  memblock: Annotate memblock functions with __init_memblock
  memblock: Allow memblock_init to be called early
  memblock/arm: Fix memblock_region_is_memory() typo
  x86, memblock: Remove __memblock_x86_find_in_range_size()
  memblock: Fix wraparound in find_region()
  x86-32, memblock: Make add_highpages honor early reserved ranges
  x86, memblock: Fix crashkernel allocation
  arm, memblock: Fix the sparsemem build
  memblock: Fix section mismatch warnings
  powerpc, memblock: Fix memblock API change fallout
  memblock, microblaze: Fix memblock API change fallout
  x86: Remove old bootmem code
  x86, memblock: Use memblock_memory_size()/memblock_free_memory_size() to get correct dma_reserve
  x86: Remove not used early_res code
  x86, memblock: Replace e820_/_early string with memblock_
  x86: Use memblock to replace early_res
  x86, memblock: Use memblock_debug to control debug message print out
  ...

Fix up trivial conflicts in arch/x86/kernel/setup.c and kernel/Makefile

1  2 
arch/arm/mm/init.c
arch/x86/Kconfig
arch/x86/include/asm/io.h
arch/x86/kernel/setup.c
arch/x86/kernel/setup_percpu.c
arch/x86/mm/init_32.c
arch/x86/mm/init_64.c
arch/x86/mm/k8topology_64.c
arch/x86/mm/numa_64.c
arch/x86/xen/mmu.c
kernel/Makefile

Simple merge
index 7ab9db88ab6ac326acb1a000f429f5e12505ac3f,01a572992fa0b58387b00b24ddc82caa8e03c81a..dfabfefc21c48981c456faa683108dd9b6b7a9a8
@@@ -25,9 -25,9 +25,10 @@@ config X8
        select HAVE_IDE
        select HAVE_OPROFILE
        select HAVE_PERF_EVENTS if (!M386 && !M486)
 +      select HAVE_IRQ_WORK
        select HAVE_IOREMAP_PROT
        select HAVE_KPROBES
+       select HAVE_MEMBLOCK
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select ARCH_WANT_FRAME_POINTERS
        select HAVE_DMA_ATTRS
Simple merge
index a59f6a6df5e25d104651bbeaf7202b8063f205bd,c3cebfe7bfc94b429bef9b00ea999d21be9cf1ac..420e6419785025f39c1e4095a9d7e6f558c8a1db
@@@ -614,10 -620,82 +619,10 @@@ static __init void reserve_ibft_region(
        addr = find_ibft_region(&size);
  
        if (size)
-               reserve_early_overlap_ok(addr, addr + size, "ibft");
+               memblock_x86_reserve_range(addr, addr + size, "* ibft");
  }
  
 -#ifdef CONFIG_X86_RESERVE_LOW_64K
 -static int __init dmi_low_memory_corruption(const struct dmi_system_id *d)
 -{
 -      printk(KERN_NOTICE
 -              "%s detected: BIOS may corrupt low RAM, working around it.\n",
 -              d->ident);
 -
 -      e820_update_range(0, 0x10000, E820_RAM, E820_RESERVED);
 -      sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
 -
 -      return 0;
 -}
 -#endif
 -
 -/* List of systems that have known low memory corruption BIOS problems */
 -static struct dmi_system_id __initdata bad_bios_dmi_table[] = {
 -#ifdef CONFIG_X86_RESERVE_LOW_64K
 -      {
 -              .callback = dmi_low_memory_corruption,
 -              .ident = "AMI BIOS",
 -              .matches = {
 -                      DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
 -              },
 -      },
 -      {
 -              .callback = dmi_low_memory_corruption,
 -              .ident = "Phoenix BIOS",
 -              .matches = {
 -                      DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies"),
 -              },
 -      },
 -      {
 -              .callback = dmi_low_memory_corruption,
 -              .ident = "Phoenix/MSC BIOS",
 -              .matches = {
 -                      DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix/MSC"),
 -              },
 -      },
 -      /*
 -       * AMI BIOS with low memory corruption was found on Intel DG45ID and
 -       * DG45FC boards.
 -       * It has a different DMI_BIOS_VENDOR = "Intel Corp.", for now we will
 -       * match only DMI_BOARD_NAME and see if there is more bad products
 -       * with this vendor.
 -       */
 -      {
 -              .callback = dmi_low_memory_corruption,
 -              .ident = "AMI BIOS",
 -              .matches = {
 -                      DMI_MATCH(DMI_BOARD_NAME, "DG45ID"),
 -              },
 -      },
 -      {
 -              .callback = dmi_low_memory_corruption,
 -              .ident = "AMI BIOS",
 -              .matches = {
 -                      DMI_MATCH(DMI_BOARD_NAME, "DG45FC"),
 -              },
 -      },
 -      /*
 -       * The Dell Inspiron Mini 1012 has DMI_BIOS_VENDOR = "Dell Inc.", so
 -       * match on the product name.
 -       */
 -      {
 -              .callback = dmi_low_memory_corruption,
 -              .ident = "Phoenix BIOS",
 -              .matches = {
 -                      DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1012"),
 -              },
 -      },
 -#endif
 -      {}
 -};
 +static unsigned reserve_low = CONFIG_X86_RESERVE_LOW << 10;
  
  static void __init trim_bios_range(void)
  {
        sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
  }
  
 +static int __init parse_reservelow(char *p)
 +{
 +      unsigned long long size;
 +
 +      if (!p)
 +              return -EINVAL;
 +
 +      size = memparse(p, &p);
 +
 +      if (size < 4096)
 +              size = 4096;
 +
 +      if (size > 640*1024)
 +              size = 640*1024;
 +
 +      reserve_low = size;
 +
 +      return 0;
 +}
 +
 +early_param("reservelow", parse_reservelow);
 +
+ static u64 __init get_max_mapped(void)
+ {
+       u64 end = max_pfn_mapped;
+       end <<= PAGE_SHIFT;
+       return end;
+ }
  /*
   * Determine if we were loaded by an EFI loader.  If so, then we have also been
   * passed the efi memmap, systab, etc., so we should use these data structures
@@@ -794,8 -852,11 +808,8 @@@ void __init setup_arch(char **cmdline_p
  
        x86_report_nx();
  
 -      /* Must be before kernel pagetables are setup */
 -      vmi_activate();
 -
        /* after early param, so could get panic from serial */
-       reserve_early_setup_data();
+       memblock_x86_reserve_range_setup_data();
  
        if (acpi_mps_check()) {
  #ifdef CONFIG_X86_LOCAL_APIC
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index b2363fcbcd0f71e55d8aa88433cffdd93314d24a,7d55e9ee3a76a044d746df02607f0dbef9d72838..f72d18c692217d67c45e57c16ea8585904097d1f
@@@ -1969,13 -1984,10 +1984,9 @@@ static const struct pv_mmu_ops xen_mmu_
        .alloc_pte = xen_alloc_pte_init,
        .release_pte = xen_release_pte_init,
        .alloc_pmd = xen_alloc_pmd_init,
 -      .alloc_pmd_clone = paravirt_nop,
        .release_pmd = xen_release_pmd_init,
  
- #ifdef CONFIG_X86_64
-       .set_pte = xen_set_pte,
- #else
        .set_pte = xen_set_pte_init,
- #endif
        .set_pte_at = xen_set_pte_at,
        .set_pmd = xen_set_pmd_hyper,
  
diff --cc kernel/Makefile
index e2c9d52cfe9e52b31eb6a430195d63da22e8aa30,4c19ebe9053cc15567b0b2aeb10d7c8b70739482..0b5ff083fa22fa381a6fc1f092a824f255bda01a
@@@ -10,8 -10,7 +10,7 @@@ obj-y     = sched.o fork.o exec_domain.
            kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \
            hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \
            notifier.o ksysfs.o pm_qos_params.o sched_clock.o cred.o \
 -          async.o range.o
 +          async.o range.o jump_label.o
- obj-$(CONFIG_HAVE_EARLY_RES) += early_res.o
  obj-y += groups.o
  
  ifdef CONFIG_FUNCTION_TRACER