]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
Merge branch 'devel-stable' into devel
authorRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 19 Oct 2010 21:06:36 +0000 (22:06 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 19 Oct 2010 21:06:36 +0000 (22:06 +0100)
1  2 
Makefile
arch/arm/Kconfig
arch/arm/Kconfig.debug
arch/arm/kernel/entry-common.S
arch/arm/kernel/process.c
arch/arm/mach-at91/Kconfig
arch/arm/mach-at91/Makefile
arch/arm/mm/mmu.c
arch/arm/mm/proc-v7.S

diff --combined Makefile
index cf7fcb3bf24564132f19f4d14f1598382bbaff5e,7583116e5d9a2e4cdcd33d33bc1fb9da43c2fcb4..97eb76f1f0df137498e172ed54c3df9fe4374ba5
+++ b/Makefile
@@@ -1,8 -1,8 +1,8 @@@
  VERSION = 2
  PATCHLEVEL = 6
  SUBLEVEL = 36
- EXTRAVERSION = -rc6
- NAME = Sheep on Meth
+ EXTRAVERSION = -rc8
+ NAME = Flesh-Eating Bats with Fangs
  
  # *DOCUMENTATION*
  # To see a list of typical targets execute "make help"
@@@ -554,15 -554,8 +554,15 @@@ endi
  ifdef CONFIG_FRAME_POINTER
  KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
  else
 +# Some targets (ARM with Thumb2, for example), can't be built with frame
 +# pointers.  For those, we don't have FUNCTION_TRACER automatically
 +# select FRAME_POINTER.  However, FUNCTION_TRACER adds -pg, and this is
 +# incompatible with -fomit-frame-pointer with current GCC, so we don't use
 +# -fomit-frame-pointer with FUNCTION_TRACER.
 +ifndef CONFIG_FUNCTION_TRACER
  KBUILD_CFLAGS += -fomit-frame-pointer
  endif
 +endif
  
  ifdef CONFIG_DEBUG_INFO
  KBUILD_CFLAGS += -g
diff --combined arch/arm/Kconfig
index b404e5eec0c1d8b7e74c8c59ad02d32748435961,b27f8abf163c5bc9aa2f87df4e290f47eb6e4ebd..19792a9192b71f44910876075dfb026be6ef0bce
@@@ -19,8 -19,6 +19,8 @@@ config AR
        select HAVE_KPROBES if (!XIP_KERNEL)
        select HAVE_KRETPROBES if (HAVE_KPROBES)
        select HAVE_FUNCTION_TRACER if (!XIP_KERNEL)
 +      select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL)
 +      select HAVE_DYNAMIC_FTRACE if (!XIP_KERNEL)
        select HAVE_GENERIC_DMA_COHERENT
        select HAVE_KERNEL_GZIP
        select HAVE_KERNEL_LZO
@@@ -28,7 -26,6 +28,7 @@@
        select HAVE_PERF_EVENTS
        select PERF_USE_VMALLOC
        select HAVE_REGS_AND_STACK_ACCESS_API
 +      select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V7))
        help
          The ARM series is a line of low-power-consumption RISC chip designs
          licensed by ARM Ltd and targeted at embedded applications and
@@@ -148,9 -145,6 +148,9 @@@ config ARCH_HAS_CPUFRE
          and that the relevant menu configurations are displayed for
          it.
  
 +config ARCH_HAS_CPU_IDLE_WAIT
 +       def_bool y
 +
  config GENERIC_HWEIGHT
        bool
        default y
@@@ -516,6 -510,7 +516,7 @@@ config ARCH_MM
        select GENERIC_CLOCKEVENTS
        select TICK_ONESHOT
        select PLAT_PXA
+       select SPARSE_IRQ
        help
          Support for Marvell's PXA168/PXA910(MMP) and MMP2 processor line.
  
@@@ -593,6 -588,7 +594,7 @@@ config ARCH_PX
        select GENERIC_CLOCKEVENTS
        select TICK_ONESHOT
        select PLAT_PXA
+       select SPARSE_IRQ
        help
          Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
  
@@@ -684,8 -680,8 +686,8 @@@ config ARCH_S3C64X
        help
          Samsung S3C64XX series based systems
  
- config ARCH_S5P6440
-       bool "Samsung S5P6440"
+ config ARCH_S5P64X0
+       bool "Samsung S5P6440 S5P6450"
        select CPU_V6
        select GENERIC_GPIO
        select HAVE_CLK
        select HAVE_S3C2410_I2C
        select HAVE_S3C_RTC
        help
-         Samsung S5P6440 CPU based systems
+         Samsung S5P64X0 CPU based systems, such as the Samsung SMDK6440,
+         SMDK6450.
  
  config ARCH_S5P6442
        bool "Samsung S5P6442"
@@@ -753,6 -750,15 +756,15 @@@ config ARCH_SHAR
          Support for the StrongARM based Digital DNARD machine, also known
          as "Shark" (<http://www.shark-linux.de/shark.html>).
  
+ config ARCH_TCC_926
+       bool "Telechips TCC ARM926-based systems"
+       select CPU_ARM926T
+       select HAVE_CLK
+       select COMMON_CLKDEV
+       select GENERIC_CLOCKEVENTS
+       help
+         Support for Telechips TCC ARM926-based systems.
  config ARCH_LH7A40X
        bool "Sharp LH7A40X"
        select CPU_ARM922T
@@@ -921,6 -927,8 +933,8 @@@ source "arch/arm/plat-s5p/Kconfig
  
  source "arch/arm/plat-spear/Kconfig"
  
+ source "arch/arm/plat-tcc/Kconfig"
  if ARCH_S3C2410
  source "arch/arm/mach-s3c2400/Kconfig"
  source "arch/arm/mach-s3c2410/Kconfig"
@@@ -934,7 -942,7 +948,7 @@@ if ARCH_S3C64X
  source "arch/arm/mach-s3c64xx/Kconfig"
  endif
  
- source "arch/arm/mach-s5p6440/Kconfig"
+ source "arch/arm/mach-s5p64x0/Kconfig"
  
  source "arch/arm/mach-s5p6442/Kconfig"
  
@@@ -1008,7 -1016,7 +1022,7 @@@ endi
  
  config ARM_ERRATA_411920
        bool "ARM errata: Invalidation of the Instruction Cache operation can fail"
 -      depends on CPU_V6 && !SMP
 +      depends on CPU_V6
        help
          Invalidation of the Instruction Cache operation can
          fail. This erratum is present in 1136 (before r1p4), 1156 and 1176.
@@@ -1107,6 -1115,20 +1121,20 @@@ config ARM_ERRATA_72078
          invalidated are not, resulting in an incoherency in the system page
          tables. The workaround changes the TLB flushing routines to invalidate
          entries regardless of the ASID.
+ config ARM_ERRATA_743622
+       bool "ARM errata: Faulty hazard checking in the Store Buffer may lead to data corruption"
+       depends on CPU_V7
+       help
+         This option enables the workaround for the 743622 Cortex-A9
+         (r2p0..r2p2) erratum. Under very rare conditions, a faulty
+         optimisation in the Cortex-A9 Store Buffer may lead to data
+         corruption. This workaround sets a specific bit in the diagnostic
+         register of the Cortex-A9 which disables the Store Buffer
+         optimisation, preventing the defect from occurring. This has no
+         visible impact on the overall performance or power consumption of the
+         processor.
  endmenu
  
  source "arch/arm/common/Kconfig"
@@@ -1173,13 -1195,13 +1201,13 @@@ source "kernel/time/Kconfig
  
  config SMP
        bool "Symmetric Multi-Processing (EXPERIMENTAL)"
 -      depends on EXPERIMENTAL && (REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP ||\
 -               MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 ||\
 -               ARCH_S5PV310 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4)
 +      depends on EXPERIMENTAL
        depends on GENERIC_CLOCKEVENTS
 +      depends on REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP || \
 +               MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 ||\
 +               ARCH_S5PV310 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4
        select USE_GENERIC_SMP_HELPERS
 -      select HAVE_ARM_SCU if ARCH_REALVIEW || ARCH_OMAP4 || ARCH_S5PV310 ||\
 -               ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4
 +      select HAVE_ARM_SCU
        help
          This enables support for systems with more than one CPU. If you have
          a system with only one CPU, like most personal computers, say N. If
  
          If you don't know what to do here, say N.
  
 +config SMP_ON_UP
 +      bool "Allow booting SMP kernel on uniprocessor systems (EXPERIMENTAL)"
 +      depends on EXPERIMENTAL
 +      depends on SMP && !XIP && !THUMB2_KERNEL
 +      default y
 +      help
 +        SMP kernels contain instructions which fail on non-SMP processors.
 +        Enabling this option allows the kernel to modify itself to make
 +        these instructions safe.  Disabling it allows about 1K of space
 +        savings.
 +
 +        If you don't know what to do here, say Y.
 +
  config HAVE_ARM_SCU
        bool
        depends on SMP
@@@ -1260,9 -1269,12 +1288,9 @@@ config HOTPLUG_CP
  
  config LOCAL_TIMERS
        bool "Use local timer interrupts"
 -      depends on SMP && (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || \
 -              REALVIEW_EB_A9MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \
 -              ARCH_S5PV310 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4)
 +      depends on SMP
        default y
 -      select HAVE_ARM_TWD if ARCH_REALVIEW || ARCH_OMAP4 || ARCH_S5PV310 || \
 -              ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS
 +      select HAVE_ARM_TWD
        help
          Enable support for local timers on SMP platforms, rather then the
          legacy IPI broadcast method.  Local timers allows the system
@@@ -1273,7 -1285,7 +1301,7 @@@ source kernel/Kconfig.preemp
  
  config HZ
        int
-       default 200 if ARCH_EBSA110 || ARCH_S3C2410 || ARCH_S5P6440 || \
+       default 200 if ARCH_EBSA110 || ARCH_S3C2410 || ARCH_S5P64X0 || \
                ARCH_S5P6442 || ARCH_S5PV210 || ARCH_S5PV310
        default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER
        default AT91_TIMER_HZ if ARCH_AT91
@@@ -1479,6 -1491,20 +1507,20 @@@ config UACCESS_WITH_MEMCP
          However, if the CPU data cache is using a write-allocate mode,
          this option is unlikely to provide any performance gain.
  
+ config SECCOMP
+       bool
+       prompt "Enable seccomp to safely compute untrusted bytecode"
+       ---help---
+         This kernel feature is useful for number crunching applications
+         that may need to compute untrusted bytecode during their
+         execution. By using pipes or other transports made available to
+         the process as file descriptors supporting the read/write
+         syscalls, it's possible to isolate those applications in
+         their own address space using seccomp. Once seccomp is
+         enabled via prctl(PR_SET_SECCOMP), it cannot be disabled
+         and the task is only allowed to execute a few safe syscalls
+         defined by each seccomp mode.
  config CC_STACKPROTECTOR
        bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
        help
diff --combined arch/arm/Kconfig.debug
index 4dbce538fec403138730ba79bce75cc886eb6d89,c29fb382aeee306a80959db5e135c1fe2a6c1187..2fd0b99afc4bc849cd448780358fa5fdd68ff644
@@@ -2,6 -2,20 +2,20 @@@ menu "Kernel hacking
  
  source "lib/Kconfig.debug"
  
+ config STRICT_DEVMEM
+       bool "Filter access to /dev/mem"
+       depends on MMU
+       ---help---
+         If this option is disabled, you allow userspace (root) access to all
+         of memory, including kernel and userspace memory. Accidental
+         access to this is obviously disastrous, but specific access can
+         be used by people debugging the kernel.
+         If this option is switched on, the /dev/mem file only allows
+         userspace access to memory mapped peripherals.
+           If in doubt, say Y.
  # RMK wants arm kernels compiled with frame pointers or stack unwinding.
  # If you know what you are doing and are willing to live without stack
  # traces, you can get a slightly smaller kernel by setting this option to
@@@ -27,11 -41,6 +41,11 @@@ config ARM_UNWIN
          the performance is not affected. Currently, this feature
          only works with EABI compilers. If unsure say Y.
  
 +config OLD_MCOUNT
 +      bool
 +      depends on FUNCTION_TRACER && FRAME_POINTER
 +      default y
 +
  config DEBUG_USER
        bool "Verbose user fault messages"
        help
index 2d23ad985180d5f5ba2d79b6c42ec9480b722ab3,0385a8207b6730c9e09dfb71a34ebd34eee474ef..8bfa98757cd2f3fc9ef128011944a55fa7838ffd
@@@ -129,58 -129,30 +129,58 @@@ ENDPROC(ret_from_fork
   * clobber the ip register.  This is OK because the ARM calling convention
   * allows it to be clobbered in subroutines and doesn't use it to hold
   * parameters.)
 + *
 + * When using dynamic ftrace, we patch out the mcount call by a "mov r0, r0"
 + * for the mcount case, and a "pop {lr}" for the __gnu_mcount_nc case (see
 + * arch/arm/kernel/ftrace.c).
   */
 +
 +#ifndef CONFIG_OLD_MCOUNT
 +#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
 +#error Ftrace requires CONFIG_FRAME_POINTER=y with GCC older than 4.4.0.
 +#endif
 +#endif
 +
  #ifdef CONFIG_DYNAMIC_FTRACE
 -ENTRY(mcount)
 +ENTRY(__gnu_mcount_nc)
 +      mov     ip, lr
 +      ldmia   sp!, {lr}
 +      mov     pc, ip
 +ENDPROC(__gnu_mcount_nc)
 +
 +ENTRY(ftrace_caller)
        stmdb   sp!, {r0-r3, lr}
        mov     r0, lr
        sub     r0, r0, #MCOUNT_INSN_SIZE
 +      ldr     r1, [sp, #20]
  
 -      .globl mcount_call
 -mcount_call:
 +      .global ftrace_call
 +ftrace_call:
        bl      ftrace_stub
 -      ldr     lr, [fp, #-4]                   @ restore lr
 -      ldmia   sp!, {r0-r3, pc}
 +      ldmia   sp!, {r0-r3, ip, lr}
 +      mov     pc, ip
 +ENDPROC(ftrace_caller)
  
 -ENTRY(ftrace_caller)
 +#ifdef CONFIG_OLD_MCOUNT
 +ENTRY(mcount)
 +      stmdb   sp!, {lr}
 +      ldr     lr, [fp, #-4]
 +      ldmia   sp!, {pc}
 +ENDPROC(mcount)
 +
 +ENTRY(ftrace_caller_old)
        stmdb   sp!, {r0-r3, lr}
        ldr     r1, [fp, #-4]
        mov     r0, lr
        sub     r0, r0, #MCOUNT_INSN_SIZE
  
 -      .globl ftrace_call
 -ftrace_call:
 +      .globl ftrace_call_old
 +ftrace_call_old:
        bl      ftrace_stub
        ldr     lr, [fp, #-4]                   @ restore lr
        ldmia   sp!, {r0-r3, pc}
 +ENDPROC(ftrace_caller_old)
 +#endif
  
  #else
  
@@@ -188,7 -160,7 +188,7 @@@ ENTRY(__gnu_mcount_nc
        stmdb   sp!, {r0-r3, lr}
        ldr     r0, =ftrace_trace_function
        ldr     r2, [r0]
 -      adr     r0, ftrace_stub
 +      adr     r0, .Lftrace_stub
        cmp     r0, r2
        bne     gnu_trace
        ldmia   sp!, {r0-r3, ip, lr}
@@@ -198,19 -170,11 +198,19 @@@ gnu_trace
        ldr     r1, [sp, #20]                   @ lr of instrumented routine
        mov     r0, lr
        sub     r0, r0, #MCOUNT_INSN_SIZE
 -      mov     lr, pc
 +      adr     lr, BSYM(1f)
        mov     pc, r2
 +1:
        ldmia   sp!, {r0-r3, ip, lr}
        mov     pc, ip
 +ENDPROC(__gnu_mcount_nc)
  
 +#ifdef CONFIG_OLD_MCOUNT
 +/*
 + * This is under an ifdef in order to force link-time errors for people trying
 + * to build with !FRAME_POINTER with a GCC which doesn't use the new-style
 + * mcount.
 + */
  ENTRY(mcount)
        stmdb   sp!, {r0-r3, lr}
        ldr     r0, =ftrace_trace_function
@@@ -229,15 -193,12 +229,15 @@@ trace
        mov     pc, r2
        ldr     lr, [fp, #-4]                   @ restore lr
        ldmia   sp!, {r0-r3, pc}
 +ENDPROC(mcount)
 +#endif
  
  #endif /* CONFIG_DYNAMIC_FTRACE */
  
 -      .globl ftrace_stub
 -ftrace_stub:
 +ENTRY(ftrace_stub)
 +.Lftrace_stub:
        mov     pc, lr
 +ENDPROC(ftrace_stub)
  
  #endif /* CONFIG_FUNCTION_TRACER */
  
@@@ -334,7 -295,6 +334,6 @@@ ENTRY(vector_swi
  
        get_thread_info tsk
        adr     tbl, sys_call_table             @ load syscall table pointer
-       ldr     ip, [tsk, #TI_FLAGS]            @ check for syscall tracing
  
  #if defined(CONFIG_OABI_COMPAT)
        /*
        eor     scno, scno, #__NR_SYSCALL_BASE  @ check OS number
  #endif
  
+       ldr     r10, [tsk, #TI_FLAGS]           @ check for syscall tracing
        stmdb   sp!, {r4, r5}                   @ push fifth and sixth args
-       tst     ip, #_TIF_SYSCALL_TRACE         @ are we tracing syscalls?
+ #ifdef CONFIG_SECCOMP
+       tst     r10, #_TIF_SECCOMP
+       beq     1f
+       mov     r0, scno
+       bl      __secure_computing      
+       add     r0, sp, #S_R0 + S_OFF           @ pointer to regs
+       ldmia   r0, {r0 - r3}                   @ have to reload r0 - r3
+ 1:
+ #endif
+       tst     r10, #_TIF_SYSCALL_TRACE                @ are we tracing syscalls?
        bne     __sys_trace
  
        cmp     scno, #NR_syscalls              @ check upper syscall limit
index 3af34bf4f4dfb293f4261605ea75b5ed056a7e68,66ac9c926200adf44da29173197206b95ac8cd85..e76fcaadce03fca34f20524bc03df51f73cb2d99
@@@ -29,7 -29,6 +29,7 @@@
  #include <linux/utsname.h>
  #include <linux/uaccess.h>
  #include <linux/random.h>
 +#include <linux/hw_breakpoint.h>
  
  #include <asm/cacheflush.h>
  #include <asm/leds.h>
@@@ -136,25 -135,6 +136,25 @@@ EXPORT_SYMBOL(pm_power_off)
  void (*arm_pm_restart)(char str, const char *cmd) = arm_machine_restart;
  EXPORT_SYMBOL_GPL(arm_pm_restart);
  
 +static void do_nothing(void *unused)
 +{
 +}
 +
 +/*
 + * cpu_idle_wait - Used to ensure that all the CPUs discard old value of
 + * pm_idle and update to new pm_idle value. Required while changing pm_idle
 + * handler on SMP systems.
 + *
 + * Caller must have changed pm_idle to the new value before the call. Old
 + * pm_idle value will not be used by any CPU after the return of this function.
 + */
 +void cpu_idle_wait(void)
 +{
 +      smp_mb();
 +      /* kick all the CPUs so that they exit out of pm_idle */
 +      smp_call_function(do_nothing, NULL, 1);
 +}
 +EXPORT_SYMBOL_GPL(cpu_idle_wait);
  
  /*
   * This is our default idle handler.  We need to disable
@@@ -337,8 -317,6 +337,8 @@@ void flush_thread(void
        struct thread_info *thread = current_thread_info();
        struct task_struct *tsk = current;
  
 +      flush_ptrace_hw_breakpoint(tsk);
 +
        memset(thread->used_cp, 0, sizeof(thread->used_cp));
        memset(&tsk->thread.debug, 0, sizeof(struct debug_info));
        memset(&thread->fpstate, 0, sizeof(union fp_state));
@@@ -367,8 -345,6 +367,8 @@@ copy_thread(unsigned long clone_flags, 
        thread->cpu_context.sp = (unsigned long)childregs;
        thread->cpu_context.pc = (unsigned long)ret_from_fork;
  
 +      clear_ptrace_hw_breakpoint(p);
 +
        if (clone_flags & CLONE_SETTLS)
                thread->tp_value = regs->ARM_r3;
  
@@@ -482,3 -458,24 +482,24 @@@ unsigned long arch_randomize_brk(struc
        unsigned long range_end = mm->brk + 0x02000000;
        return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
  }
+ /*
+  * The vectors page is always readable from user space for the
+  * atomic helpers and the signal restart code.  Let's declare a mapping
+  * for it so it is visible through ptrace and /proc/<pid>/mem.
+  */
+ int vectors_user_mapping(void)
+ {
+       struct mm_struct *mm = current->mm;
+       return install_special_mapping(mm, 0xffff0000, PAGE_SIZE,
+                                      VM_READ | VM_EXEC |
+                                      VM_MAYREAD | VM_MAYEXEC |
+                                      VM_ALWAYSDUMP | VM_RESERVED,
+                                      NULL);
+ }
+ const char *arch_vma_name(struct vm_area_struct *vma)
+ {
+       return (vma->vm_start == 0xffff0000) ? "[vectors]" : NULL;
+ }
index ca33862b4bf4d2adb9565099030296fa6f22b657,bbd5efa65099a4efcd790c464b2c72c9cbb591be..851e8139ef9d1a4c9511022696b10fc17a49ff52
@@@ -33,6 -33,7 +33,7 @@@ config ARCH_AT91SAM926
        select HAVE_AT91_USART3
        select HAVE_AT91_USART4
        select HAVE_AT91_USART5
+       select HAVE_NET_MACB
  
  config ARCH_AT91SAM9261
        bool "AT91SAM9261"
@@@ -51,6 -52,7 +52,7 @@@ config ARCH_AT91SAM926
        select CPU_ARM926T
        select GENERIC_CLOCKEVENTS
        select HAVE_FB_ATMEL
+       select HAVE_NET_MACB
  
  config ARCH_AT91SAM9RL
        bool "AT91SAM9RL"
@@@ -66,6 -68,7 +68,7 @@@ config ARCH_AT91SAM9G2
        select HAVE_AT91_USART3
        select HAVE_AT91_USART4
        select HAVE_AT91_USART5
+       select HAVE_NET_MACB
  
  config ARCH_AT91SAM9G45
        bool "AT91SAM9G45"
@@@ -73,6 -76,7 +76,7 @@@
        select GENERIC_CLOCKEVENTS
        select HAVE_AT91_USART3
        select HAVE_FB_ATMEL
+       select HAVE_NET_MACB
  
  config ARCH_AT91CAP9
        bool "AT91CAP9"
@@@ -248,12 -252,6 +252,12 @@@ config MACH_CPU926
          Select this if you are using a Eukrea Electromatique's
          CPU9260 Board <http://www.eukrea.com/>
  
 +config MACH_FLEXIBITY
 +      bool "Flexibity Connect board"
 +      help
 +        Select this if you are using Flexibity Connect board
 +        <http://www.flexibity.com>
 +
  endif
  
  # ----------------------------------------------------------
@@@ -344,6 -342,7 +348,7 @@@ config MACH_AT91SAM9G20E
          that embeds only one SD/MMC slot.
  
  config MACH_AT91SAM9G20EK_2MMC
+       depends on MACH_AT91SAM9G20EK
        bool "Atmel AT91SAM9G20-EK Evaluation Kit with 2 SD/MMC Slots"
        select HAVE_NAND_ATMEL_BUSWIDTH_16
        help
@@@ -389,8 -388,8 +394,8 @@@ if ARCH_AT91SAM9G4
  
  comment "AT91SAM9G45 Board Type"
  
- config MACH_AT91SAM9G45EKES
-       bool "Atmel AT91SAM9G45-EKES Evaluation Kit"
+ config MACH_AT91SAM9M10G45EK
+       bool "Atmel AT91SAM9M10G45-EK Evaluation Kits"
        select HAVE_NAND_ATMEL_BUSWIDTH_16
        help
          Select this if you are using Atmel's AT91SAM9G45-EKES Evaluation Kit.
index 7cbe06d7cee93372686b42a7d7e308761ed36e22,3a07a36964417b3fb921cc36b66fc3947acca189..412b3a471a4b43e4a6053c5f57deb822a0e14633
@@@ -46,7 -46,6 +46,7 @@@ obj-$(CONFIG_MACH_USB_A9260)  += board-u
  obj-$(CONFIG_MACH_QIL_A9260)  += board-qil-a9260.o
  obj-$(CONFIG_MACH_AFEB9260)   += board-afeb-9260v1.o
  obj-$(CONFIG_MACH_CPU9260)    += board-cpu9krea.o
 +obj-$(CONFIG_MACH_FLEXIBITY)  += board-flexibity.o
  
  # AT91SAM9261 board-specific support
  obj-$(CONFIG_MACH_AT91SAM9261EK) += board-sam9261ek.o
@@@ -62,7 -61,6 +62,6 @@@ obj-$(CONFIG_MACH_AT91SAM9RLEK)       += boar
  
  # AT91SAM9G20 board-specific support
  obj-$(CONFIG_MACH_AT91SAM9G20EK) += board-sam9g20ek.o
- obj-$(CONFIG_MACH_AT91SAM9G20EK_2MMC) += board-sam9g20ek-2slot-mmc.o
  obj-$(CONFIG_MACH_CPU9G20)    += board-cpu9krea.o
  obj-$(CONFIG_MACH_STAMP9G20)  += board-stamp9g20.o
  obj-$(CONFIG_MACH_PORTUXG20)  += board-stamp9g20.o
@@@ -71,7 -69,7 +70,7 @@@
  obj-$(CONFIG_MACH_SNAPPER_9260)       += board-snapper9260.o
  
  # AT91SAM9G45 board-specific support
- obj-$(CONFIG_MACH_AT91SAM9G45EKES) += board-sam9m10g45ek.o
+ obj-$(CONFIG_MACH_AT91SAM9M10G45EK) += board-sam9m10g45ek.o
  
  # AT91CAP9 board-specific support
  obj-$(CONFIG_MACH_AT91CAP9ADK)        += board-cap9adk.o
diff --combined arch/arm/mm/mmu.c
index e2335811c02e6b3b2985681fa1bbc55b227451f1,e8ed9dc461fe39631efeeb4746b80854e13415c6..c32f731d56d3db4ad51453718c5d1c43f6053f2e
@@@ -248,7 -248,7 +248,7 @@@ static struct mem_type mem_types[] = 
        },
        [MT_MEMORY] = {
                .prot_pte  = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
-                               L_PTE_USER | L_PTE_EXEC,
+                               L_PTE_WRITE | L_PTE_EXEC,
                .prot_l1   = PMD_TYPE_TABLE,
                .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE,
                .domain    = DOMAIN_KERNEL,
        },
        [MT_MEMORY_NONCACHED] = {
                .prot_pte  = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
-                               L_PTE_USER | L_PTE_EXEC | L_PTE_MT_BUFFERABLE,
+                               L_PTE_WRITE | L_PTE_EXEC | L_PTE_MT_BUFFERABLE,
                .prot_l1   = PMD_TYPE_TABLE,
                .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE,
                .domain    = DOMAIN_KERNEL,
@@@ -310,8 -310,9 +310,8 @@@ static void __init build_mem_type_table
                        cachepolicy = CPOLICY_WRITEBACK;
                ecc_mask = 0;
        }
 -#ifdef CONFIG_SMP
 -      cachepolicy = CPOLICY_WRITEALLOC;
 -#endif
 +      if (is_smp())
 +              cachepolicy = CPOLICY_WRITEALLOC;
  
        /*
         * Strip out features not present on earlier architectures.
        cp = &cache_policies[cachepolicy];
        vecs_pgprot = kern_pgprot = user_pgprot = cp->pte;
  
 -#ifndef CONFIG_SMP
        /*
         * Only use write-through for non-SMP systems
         */
 -      if (cpu_arch >= CPU_ARCH_ARMv5 && cachepolicy > CPOLICY_WRITETHROUGH)
 +      if (!is_smp() && cpu_arch >= CPU_ARCH_ARMv5 && cachepolicy > CPOLICY_WRITETHROUGH)
                vecs_pgprot = cache_policies[CPOLICY_WRITETHROUGH].pte;
 -#endif
  
        /*
         * Enable CPU-specific coherency if supported.
                mem_types[MT_MINICLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE;
                mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE;
  
 -#ifdef CONFIG_SMP
 -              /*
 -               * Mark memory with the "shared" attribute for SMP systems
 -               */
 -              user_pgprot |= L_PTE_SHARED;
 -              kern_pgprot |= L_PTE_SHARED;
 -              vecs_pgprot |= L_PTE_SHARED;
 -              mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_S;
 -              mem_types[MT_DEVICE_WC].prot_pte |= L_PTE_SHARED;
 -              mem_types[MT_DEVICE_CACHED].prot_sect |= PMD_SECT_S;
 -              mem_types[MT_DEVICE_CACHED].prot_pte |= L_PTE_SHARED;
 -              mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S;
 -              mem_types[MT_MEMORY].prot_pte |= L_PTE_SHARED;
 -              mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_S;
 -              mem_types[MT_MEMORY_NONCACHED].prot_pte |= L_PTE_SHARED;
 -#endif
 +              if (is_smp()) {
 +                      /*
 +                       * Mark memory with the "shared" attribute
 +                       * for SMP systems
 +                       */
 +                      user_pgprot |= L_PTE_SHARED;
 +                      kern_pgprot |= L_PTE_SHARED;
 +                      vecs_pgprot |= L_PTE_SHARED;
 +                      mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_S;
 +                      mem_types[MT_DEVICE_WC].prot_pte |= L_PTE_SHARED;
 +                      mem_types[MT_DEVICE_CACHED].prot_sect |= PMD_SECT_S;
 +                      mem_types[MT_DEVICE_CACHED].prot_pte |= L_PTE_SHARED;
 +                      mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S;
 +                      mem_types[MT_MEMORY].prot_pte |= L_PTE_SHARED;
 +                      mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_S;
 +                      mem_types[MT_MEMORY_NONCACHED].prot_pte |= L_PTE_SHARED;
 +              }
        }
  
        /*
@@@ -827,7 -829,8 +827,7 @@@ static void __init sanity_check_meminfo
                         * rather difficult.
                         */
                        reason = "with VIPT aliasing cache";
 -#ifdef CONFIG_SMP
 -              } else if (tlb_ops_need_broadcast()) {
 +              } else if (is_smp() && tlb_ops_need_broadcast()) {
                        /*
                         * kmap_high needs to occasionally flush TLB entries,
                         * however, if the TLB entries need to be broadcast
                         *   (must not be called with irqs off)
                         */
                        reason = "without hardware TLB ops broadcasting";
 -#endif
                }
                if (reason) {
                        printk(KERN_CRIT "HIGHMEM is not supported %s, ignoring high memory\n",
diff --combined arch/arm/mm/proc-v7.S
index 055e9d50d015aaa9d1d3f84ce6c3dc66587afce3,197f21bed5e919f3a13f3cbc9404d428ad80fb97..53cbe2225153de55cf6848394d63d1fb1ea00a18
  #define TTB_IRGN_WT   ((1 << 0) | (0 << 6))
  #define TTB_IRGN_WB   ((1 << 0) | (1 << 6))
  
 -#ifndef CONFIG_SMP
  /* PTWs cacheable, inner WB not shareable, outer WB not shareable */
 -#define TTB_FLAGS     TTB_IRGN_WB|TTB_RGN_OC_WB
 -#define PMD_FLAGS     PMD_SECT_WB
 -#else
 +#define TTB_FLAGS_UP  TTB_IRGN_WB|TTB_RGN_OC_WB
 +#define PMD_FLAGS_UP  PMD_SECT_WB
 +
  /* PTWs cacheable, inner WBWA shareable, outer WBWA not shareable */
 -#define TTB_FLAGS     TTB_IRGN_WBWA|TTB_S|TTB_NOS|TTB_RGN_OC_WBWA
 -#define PMD_FLAGS     PMD_SECT_WBWA|PMD_SECT_S
 -#endif
 +#define TTB_FLAGS_SMP TTB_IRGN_WBWA|TTB_S|TTB_NOS|TTB_RGN_OC_WBWA
 +#define PMD_FLAGS_SMP PMD_SECT_WBWA|PMD_SECT_S
  
  ENTRY(cpu_v7_proc_init)
        mov     pc, lr
@@@ -103,8 -105,7 +103,8 @@@ ENTRY(cpu_v7_switch_mm
  #ifdef CONFIG_MMU
        mov     r2, #0
        ldr     r1, [r1, #MM_CONTEXT_ID]        @ get mm->context.id
 -      orr     r0, r0, #TTB_FLAGS
 +      ALT_SMP(orr     r0, r0, #TTB_FLAGS_SMP)
 +      ALT_UP(orr      r0, r0, #TTB_FLAGS_UP)
  #ifdef CONFIG_ARM_ERRATA_430973
        mcr     p15, 0, r2, c7, c5, 6           @ flush BTAC/BTB
  #endif
@@@ -168,7 -169,7 +168,7 @@@ cpu_v7_name
        .ascii  "ARMv7 Processor"
        .align
  
 -      __INIT
 +      __CPUINIT
  
  /*
   *    __v7_setup
   */
  __v7_ca9mp_setup:
  #ifdef CONFIG_SMP
 -      mrc     p15, 0, r0, c1, c0, 1
 +      ALT_SMP(mrc     p15, 0, r0, c1, c0, 1)
 +      ALT_UP(mov      r0, #(1 << 6))          @ fake it for UP
        tst     r0, #(1 << 6)                   @ SMP/nAMP mode enabled?
        orreq   r0, r0, #(1 << 6) | (1 << 0)    @ Enable SMP/nAMP mode and
        mcreq   p15, 0, r0, c1, c0, 1           @ TLB ops broadcasting
@@@ -253,6 -253,14 +253,14 @@@ __v7_setup
        orreq   r10, r10, #1 << 22              @ set bit #22
        mcreq   p15, 0, r10, c15, c0, 1         @ write diagnostic register
  #endif
+ #ifdef CONFIG_ARM_ERRATA_743622
+       teq     r6, #0x20                       @ present in r2p0
+       teqne   r6, #0x21                       @ present in r2p1
+       teqne   r6, #0x22                       @ present in r2p2
+       mrceq   p15, 0, r10, c15, c0, 1         @ read diagnostic register
+       orreq   r10, r10, #1 << 6               @ set bit #6
+       mcreq   p15, 0, r10, c15, c0, 1         @ write diagnostic register
+ #endif
  
  3:    mov     r10, #0
  #ifdef HARVARD_CACHE
  #ifdef CONFIG_MMU
        mcr     p15, 0, r10, c8, c7, 0          @ invalidate I + D TLBs
        mcr     p15, 0, r10, c2, c0, 2          @ TTB control register
 -      orr     r4, r4, #TTB_FLAGS
 +      ALT_SMP(orr     r4, r4, #TTB_FLAGS_SMP)
 +      ALT_UP(orr      r4, r4, #TTB_FLAGS_UP)
        mcr     p15, 0, r4, c2, c0, 1           @ load TTB1
        mov     r10, #0x1f                      @ domains 0, 1 = manager
        mcr     p15, 0, r10, c3, c0, 0          @ load domain access register
@@@ -325,8 -332,6 +333,8 @@@ v7_crval
  __v7_setup_stack:
        .space  4 * 11                          @ 11 registers
  
 +      __INITDATA
 +
        .type   v7_processor_functions, #object
  ENTRY(v7_processor_functions)
        .word   v7_early_abort
        .word   cpu_v7_set_pte_ext
        .size   v7_processor_functions, . - v7_processor_functions
  
 +      .section ".rodata"
 +
        .type   cpu_arch_name, #object
  cpu_arch_name:
        .asciz  "armv7"
@@@ -359,16 -362,10 +367,16 @@@ cpu_elf_name
  __v7_ca9mp_proc_info:
        .long   0x410fc090              @ Required ID value
        .long   0xff0ffff0              @ Mask for ID
 -      .long   PMD_TYPE_SECT | \
 +      ALT_SMP(.long \
 +              PMD_TYPE_SECT | \
                PMD_SECT_AP_WRITE | \
                PMD_SECT_AP_READ | \
 -              PMD_FLAGS
 +              PMD_FLAGS_SMP)
 +      ALT_UP(.long \
 +              PMD_TYPE_SECT | \
 +              PMD_SECT_AP_WRITE | \
 +              PMD_SECT_AP_READ | \
 +              PMD_FLAGS_UP)
        .long   PMD_TYPE_SECT | \
                PMD_SECT_XN | \
                PMD_SECT_AP_WRITE | \
        b       __v7_ca9mp_setup
        .long   cpu_arch_name
        .long   cpu_elf_name
-       .long   HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
+       .long   HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_TLS
        .long   cpu_v7_name
        .long   v7_processor_functions
        .long   v7wbi_tlb_fns
  __v7_proc_info:
        .long   0x000f0000              @ Required ID value
        .long   0x000f0000              @ Mask for ID
 -      .long   PMD_TYPE_SECT | \
 +      ALT_SMP(.long \
 +              PMD_TYPE_SECT | \
 +              PMD_SECT_AP_WRITE | \
 +              PMD_SECT_AP_READ | \
 +              PMD_FLAGS_SMP)
 +      ALT_UP(.long \
 +              PMD_TYPE_SECT | \
                PMD_SECT_AP_WRITE | \
                PMD_SECT_AP_READ | \
 -              PMD_FLAGS
 +              PMD_FLAGS_UP)
        .long   PMD_TYPE_SECT | \
                PMD_SECT_XN | \
                PMD_SECT_AP_WRITE | \