Merge branch 'devel-stable' into devel
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 31 Jul 2010 13:20:16 +0000 (14:20 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 31 Jul 2010 13:20:16 +0000 (14:20 +0100)
Conflicts:
arch/arm/kernel/entry-armv.S
arch/arm/kernel/setup.c
arch/arm/mm/init.c

1  2 
arch/arm/Kconfig
arch/arm/Makefile
arch/arm/boot/compressed/Makefile
arch/arm/kernel/Makefile
arch/arm/kernel/entry-armv.S
arch/arm/kernel/process.c
arch/arm/kernel/setup.c
arch/arm/mm/init.c

Simple merge
index bea37a2512e74b33cafdb63b1173969c95ee49dd,21ceada460ddd232c48d7d74e9a8b9ded54fd30a..63d998e8c672ef4488eb72df2cfdcce2f7ae502f
@@@ -139,8 -143,10 +143,9 @@@ machine-$(CONFIG_ARCH_IXP23XX)            := ixp2
  machine-$(CONFIG_ARCH_IXP4XX)         := ixp4xx
  machine-$(CONFIG_ARCH_KIRKWOOD)               := kirkwood
  machine-$(CONFIG_ARCH_KS8695)         := ks8695
 -machine-$(CONFIG_ARCH_L7200)          := l7200
  machine-$(CONFIG_ARCH_LH7A40X)                := lh7a40x
  machine-$(CONFIG_ARCH_LOKI)           := loki
+ machine-$(CONFIG_ARCH_LPC32XX)                := lpc32xx
  machine-$(CONFIG_ARCH_MMP)            := mmp
  machine-$(CONFIG_ARCH_MSM)            := msm
  machine-$(CONFIG_ARCH_MV78XX0)                := mv78xx0
Simple merge
Simple merge
index e864e482118aa7222ebc3f9362408d1ca7190487,9ef9a82669969df7e51242d2a478072eb333ca6d..bb8e93a76407241042345c51273690f6cdc35578
@@@ -736,7 -735,17 +736,12 @@@ ENTRY(__switch_to
  #ifdef CONFIG_MMU
        ldr     r6, [r2, #TI_CPU_DOMAIN]
  #endif
 -#if defined(CONFIG_HAS_TLS_REG)
 -      mcr     p15, 0, r3, c13, c0, 3          @ set TLS register
 -#elif !defined(CONFIG_TLS_REG_EMUL)
 -      mov     r4, #0xffff0fff
 -      str     r3, [r4, #-15]                  @ TLS val at 0xffff0ff0
 -#endif
 +      set_tls r3, r4, r5
+ #if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP)
+       ldr     r7, [r2, #TI_TASK]
+       ldr     r8, =__stack_chk_guard
+       ldr     r7, [r7, #TSK_STACK_CANARY]
+ #endif
  #ifdef CONFIG_MMU
        mcr     p15, 0, r6, c3, c0, 0           @ Set domain register
  #endif
index 2e2ec97cc50caeaae9b212705bb632aed057c446,43557a1eb6109d3f878fa58e882e10b97a534ab4..401e38be1f787c16e7b36d6429406a05229d83da
@@@ -28,8 -28,8 +28,9 @@@
  #include <linux/tick.h>
  #include <linux/utsname.h>
  #include <linux/uaccess.h>
+ #include <linux/random.h>
  
 +#include <asm/cacheflush.h>
  #include <asm/leds.h>
  #include <asm/processor.h>
  #include <asm/system.h>
index 776ea1aa974b689285006edc70f8ba1158a36c3b,cbc6ddb1c9bde7204fd2e184ad0bcb80ffc69c31..d5231ae7355aa286bf5503e0180954f84e4f6022
@@@ -682,79 -665,13 +684,86 @@@ static int __init customize_machine(voi
  }
  arch_initcall(customize_machine);
  
 +#ifdef CONFIG_KEXEC
 +static inline unsigned long long get_total_mem(void)
 +{
 +      unsigned long total;
 +
 +      total = max_low_pfn - min_low_pfn;
 +      return total << PAGE_SHIFT;
 +}
 +
 +/**
 + * reserve_crashkernel() - reserves memory are for crash kernel
 + *
 + * This function reserves memory area given in "crashkernel=" kernel command
 + * line parameter. The memory reserved is used by a dump capture kernel when
 + * primary kernel is crashing.
 + */
 +static void __init reserve_crashkernel(void)
 +{
 +      unsigned long long crash_size, crash_base;
 +      unsigned long long total_mem;
 +      int ret;
 +
 +      total_mem = get_total_mem();
 +      ret = parse_crashkernel(boot_command_line, total_mem,
 +                              &crash_size, &crash_base);
 +      if (ret)
 +              return;
 +
 +      ret = reserve_bootmem(crash_base, crash_size, BOOTMEM_EXCLUSIVE);
 +      if (ret < 0) {
 +              printk(KERN_WARNING "crashkernel reservation failed - "
 +                     "memory is in use (0x%lx)\n", (unsigned long)crash_base);
 +              return;
 +      }
 +
 +      printk(KERN_INFO "Reserving %ldMB of memory at %ldMB "
 +             "for crashkernel (System RAM: %ldMB)\n",
 +             (unsigned long)(crash_size >> 20),
 +             (unsigned long)(crash_base >> 20),
 +             (unsigned long)(total_mem >> 20));
 +
 +      crashk_res.start = crash_base;
 +      crashk_res.end = crash_base + crash_size - 1;
 +      insert_resource(&iomem_resource, &crashk_res);
 +}
 +#else
 +static inline void reserve_crashkernel(void) {}
 +#endif /* CONFIG_KEXEC */
 +
 +/*
 + * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by
 + * is_kdump_kernel() to determine if we are booting after a panic. Hence
 + * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE.
 + */
 +
 +#ifdef CONFIG_CRASH_DUMP
 +/*
 + * elfcorehdr= specifies the location of elf core header stored by the crashed
 + * kernel. This option will be passed by kexec loader to the capture kernel.
 + */
 +static int __init setup_elfcorehdr(char *arg)
 +{
 +      char *end;
 +
 +      if (!arg)
 +              return -EINVAL;
 +
 +      elfcorehdr_addr = memparse(arg, &end);
 +      return end > arg ? 0 : -EINVAL;
 +}
 +early_param("elfcorehdr", setup_elfcorehdr);
 +#endif /* CONFIG_CRASH_DUMP */
 +
+ static void __init squash_mem_tags(struct tag *tag)
+ {
+       for (; tag->hdr.size; tag = tag_next(tag))
+               if (tag->hdr.tag == ATAG_MEM)
+                       tag->hdr.tag = ATAG_NONE;
+ }
  void __init setup_arch(char **cmdline_p)
  {
        struct tag *tags = (struct tag *)&init_tags;
index 240b68d511dc1437c6fcb8bbfb491582fea72280,e18c7cedb4824c08a2389faa3a120c0b777c75bc..7185b00650fe419d0fa0f43b3e79e2e0d90cf6e6
@@@ -398,11 -495,10 +398,10 @@@ static void __init free_unused_memmap(s
        unsigned int i;
  
        /*
-        * [FIXME] This relies on each bank being in address order.  This
-        * may not be the case, especially if the user has provided the
-        * information on the command line.
+        * This relies on each bank being in address order.
+        * The banks are sorted previously in bootmem_init().
         */
 -      for_each_nodebank(i, mi, node) {
 +      for_each_bank(i, mi) {
                struct membank *bank = &mi->bank[i];
  
                bank_start = bank_pfn_start(bank);
                 * If we had a previous bank, and there is a space
                 * between the current bank and the previous, free it.
                 */
-               if (prev_bank_end && prev_bank_end != bank_start)
+               if (prev_bank_end && prev_bank_end < bank_start)
 -                      free_memmap(node, prev_bank_end, bank_start);
 +                      free_memmap(prev_bank_end, bank_start);
  
-               prev_bank_end = bank_pfn_end(bank);
+               /*
+                * Align up here since the VM subsystem insists that the
+                * memmap entries are valid from the bank end aligned to
+                * MAX_ORDER_NR_PAGES.
+                */
+               prev_bank_end = ALIGN(bank_pfn_end(bank), MAX_ORDER_NR_PAGES);
        }
  }