]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'for-next' of git://git.pengutronix.de/git/ukl/linux into devel-stable
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 19 May 2013 00:22:53 +0000 (01:22 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 22 May 2013 09:52:24 +0000 (10:52 +0100)
Pull ARM-v7M support from Uwe Kleine-König:
"All but the last patch were in next since next-20130418 without issues.
The last patch fixes a problem in combination with

  8164f7a (ARM: 7680/1: Detect support for SDIV/UDIV from ISAR0 register)

which triggers a WARN_ON without an implemented read_cpuid_ext.

The branch merges fine into v3.10-rc1 and I'd be happy if you pulled it
for 3.11-rc1. The only missing piece to be able to run a Cortex-M3 is
the irqchip driver that will go in via Thomas Gleixner and platform
specific stuff."

1  2 
arch/arm/Kconfig
arch/arm/Makefile
arch/arm/include/asm/glue-cache.h
arch/arm/kernel/entry-common.S
arch/arm/kernel/entry-header.S
arch/arm/kernel/setup.c
arch/arm/kernel/traps.c
arch/arm/mm/Kconfig
arch/arm/mm/Makefile

diff --combined arch/arm/Kconfig
index 49d993cee51232874a81814fe39ca99e09b88bad,7c8c6079f948b13229a15793932669378e36c66d..5543d36c2834d6e4804de8e23d7a059f72f702b9
@@@ -9,13 -9,12 +9,13 @@@ config AR
        select BUILDTIME_EXTABLE_SORT if MMU
        select CPU_PM if (SUSPEND || CPU_IDLE)
        select DCACHE_WORD_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && !CPU_BIG_ENDIAN && MMU
-       select GENERIC_ATOMIC64 if (CPU_V6 || !CPU_32v6K || !AEABI)
+       select GENERIC_ATOMIC64 if (CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI)
        select GENERIC_CLOCKEVENTS_BROADCAST if SMP
        select GENERIC_IRQ_PROBE
        select GENERIC_IRQ_SHOW
        select GENERIC_PCI_IOMAP
        select GENERIC_SMP_IDLE_THREAD
 +      select GENERIC_IDLE_POLL_SETUP
        select GENERIC_STRNCPY_FROM_USER
        select GENERIC_STRNLEN_USER
        select HARDIRQS_SW_RESEND
@@@ -38,7 -37,6 +38,7 @@@
        select HAVE_GENERIC_HARDIRQS
        select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7))
        select HAVE_IDE if PCI || ISA || PCMCIA
 +      select HAVE_IRQ_TIME_ACCOUNTING
        select HAVE_KERNEL_GZIP
        select HAVE_KERNEL_LZMA
        select HAVE_KERNEL_LZO
@@@ -51,6 -49,7 +51,6 @@@
        select HAVE_REGS_AND_STACK_ACCESS_API
        select HAVE_SYSCALL_TRACEPOINTS
        select HAVE_UID16
 -      select HAVE_VIRT_TO_BUS
        select KTIME_SCALAR
        select PERF_USE_VMALLOC
        select RTC_LIB
@@@ -60,7 -59,6 +60,7 @@@
        select CLONE_BACKWARDS
        select OLD_SIGSUSPEND3
        select OLD_SIGACTION
 +      select HAVE_CONTEXT_TRACKING
        help
          The ARM series is a line of low-power-consumption RISC chip designs
          licensed by ARM Ltd and targeted at embedded applications and
@@@ -110,6 -108,9 +110,6 @@@ config MIGHT_HAVE_PC
  config SYS_SUPPORTS_APM_EMULATION
        bool
  
 -config GENERIC_GPIO
 -      bool
 -
  config HAVE_TCM
        bool
        select GENERIC_ALLOCATOR
@@@ -361,6 -362,37 +361,6 @@@ config ARCH_AT9
          This enables support for systems based on Atmel
          AT91RM9200 and AT91SAM9* processors.
  
 -config ARCH_BCM2835
 -      bool "Broadcom BCM2835 family"
 -      select ARCH_REQUIRE_GPIOLIB
 -      select ARM_AMBA
 -      select ARM_ERRATA_411920
 -      select ARM_TIMER_SP804
 -      select CLKDEV_LOOKUP
 -      select CLKSRC_OF
 -      select COMMON_CLK
 -      select CPU_V6
 -      select GENERIC_CLOCKEVENTS
 -      select MULTI_IRQ_HANDLER
 -      select PINCTRL
 -      select PINCTRL_BCM2835
 -      select SPARSE_IRQ
 -      select USE_OF
 -      help
 -        This enables support for the Broadcom BCM2835 SoC. This SoC is
 -        use in the Raspberry Pi, and Roku 2 devices.
 -
 -config ARCH_CNS3XXX
 -      bool "Cavium Networks CNS3XXX family"
 -      select ARM_GIC
 -      select CPU_V6K
 -      select GENERIC_CLOCKEVENTS
 -      select MIGHT_HAVE_CACHE_L2X0
 -      select MIGHT_HAVE_PCI
 -      select PCI_DOMAINS if PCI
 -      help
 -        Support for Cavium Networks CNS3XXX platform.
 -
  config ARCH_CLPS711X
        bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
        select ARCH_REQUIRE_GPIOLIB
@@@ -379,11 -411,25 +379,11 @@@ config ARCH_GEMIN
        bool "Cortina Systems Gemini"
        select ARCH_REQUIRE_GPIOLIB
        select ARCH_USES_GETTIMEOFFSET
 +      select NEED_MACH_GPIO_H
        select CPU_FA526
        help
          Support for the Cortina Systems Gemini family SoCs
  
 -config ARCH_SIRF
 -      bool "CSR SiRF"
 -      select ARCH_REQUIRE_GPIOLIB
 -      select AUTO_ZRELADDR
 -      select COMMON_CLK
 -      select GENERIC_CLOCKEVENTS
 -      select GENERIC_IRQ_CHIP
 -      select MIGHT_HAVE_CACHE_L2X0
 -      select NO_IOPORT
 -      select PINCTRL
 -      select PINCTRL_SIRF
 -      select USE_OF
 -      help
 -        Support for CSR SiRFprimaII/Marco/Polo platforms
 -
  config ARCH_EBSA110
        bool "EBSA-110"
        select ARCH_USES_GETTIMEOFFSET
@@@ -423,6 -469,21 +423,6 @@@ config ARCH_FOOTBRIDG
          Support for systems based on the DC21285 companion chip
          ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.
  
 -config ARCH_MXS
 -      bool "Freescale MXS-based"
 -      select ARCH_REQUIRE_GPIOLIB
 -      select CLKDEV_LOOKUP
 -      select CLKSRC_MMIO
 -      select COMMON_CLK
 -      select GENERIC_CLOCKEVENTS
 -      select HAVE_CLK_PREPARE
 -      select MULTI_IRQ_HANDLER
 -      select PINCTRL
 -      select SPARSE_IRQ
 -      select USE_OF
 -      help
 -        Support for Freescale MXS-based family of processors
 -
  config ARCH_NETX
        bool "Hilscher NetX based"
        select ARM_VIC
        help
          This enables support for systems based on the Hilscher NetX Soc
  
 -config ARCH_H720X
 -      bool "Hynix HMS720x-based"
 -      select ARCH_USES_GETTIMEOFFSET
 -      select CPU_ARM720T
 -      select ISA_DMA_API
 -      help
 -        This enables support for systems based on the Hynix HMS720x
 -
  config ARCH_IOP13XX
        bool "IOP13xx-based"
        depends on MMU
@@@ -481,22 -550,20 +481,22 @@@ config ARCH_IXP4X
        select GENERIC_CLOCKEVENTS
        select MIGHT_HAVE_PCI
        select NEED_MACH_IO_H
 +      select USB_EHCI_BIG_ENDIAN_MMIO
 +      select USB_EHCI_BIG_ENDIAN_DESC
        help
          Support for Intel's IXP4XX (XScale) family of processors.
  
  config ARCH_DOVE
        bool "Marvell Dove"
        select ARCH_REQUIRE_GPIOLIB
 -      select COMMON_CLK_DOVE
 -      select CPU_V7
 +      select CPU_PJ4
        select GENERIC_CLOCKEVENTS
        select MIGHT_HAVE_PCI
        select PINCTRL
        select PINCTRL_DOVE
        select PLAT_ORION_LEGACY
        select USB_ARCH_HAS_EHCI
 +      select MVEBU_MBUS
        help
          Support for the Marvell Dove SoC 88AP510
  
@@@ -510,7 -577,6 +510,7 @@@ config ARCH_KIRKWOO
        select PINCTRL
        select PINCTRL_KIRKWOOD
        select PLAT_ORION_LEGACY
 +      select MVEBU_MBUS
        help
          Support for the following Marvell Kirkwood series SoCs:
          88F6180, 88F6192 and 88F6281.
@@@ -522,7 -588,6 +522,7 @@@ config ARCH_MV78XX
        select GENERIC_CLOCKEVENTS
        select PCI
        select PLAT_ORION_LEGACY
 +      select MVEBU_MBUS
        help
          Support for the following Marvell MV78xx0 series SoCs:
          MV781x0, MV782x0.
@@@ -535,7 -600,6 +535,7 @@@ config ARCH_ORION5
        select GENERIC_CLOCKEVENTS
        select PCI
        select PLAT_ORION_LEGACY
 +      select MVEBU_MBUS
        help
          Support for the following Marvell Orion 5x series SoCs:
          Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182),
@@@ -599,6 -663,24 +599,6 @@@ config ARCH_LPC32X
        help
          Support for the NXP LPC32XX family of processors
  
 -config ARCH_TEGRA
 -      bool "NVIDIA Tegra"
 -      select ARCH_HAS_CPUFREQ
 -      select ARCH_REQUIRE_GPIOLIB
 -      select CLKDEV_LOOKUP
 -      select CLKSRC_MMIO
 -      select CLKSRC_OF
 -      select COMMON_CLK
 -      select GENERIC_CLOCKEVENTS
 -      select HAVE_CLK
 -      select HAVE_SMP
 -      select MIGHT_HAVE_CACHE_L2X0
 -      select SPARSE_IRQ
 -      select USE_OF
 -      help
 -        This enables support for NVIDIA Tegra based systems (Tegra APX,
 -        Tegra 6xx and Tegra 2 series).
 -
  config ARCH_PXA
        bool "PXA2xx/PXA3xx-based"
        depends on MMU
@@@ -636,8 -718,6 +636,8 @@@ config ARCH_SHMOBIL
        bool "Renesas SH-Mobile / R-Mobile"
        select CLKDEV_LOOKUP
        select GENERIC_CLOCKEVENTS
 +      select HAVE_ARM_SCU if SMP
 +      select HAVE_ARM_TWD if LOCAL_TIMERS
        select HAVE_CLK
        select HAVE_MACH_CLKDEV
        select HAVE_SMP
        select MULTI_IRQ_HANDLER
        select NEED_MACH_MEMORY_H
        select NO_IOPORT
 -      select PINCTRL
 +      select PINCTRL if ARCH_WANT_OPTIONAL_GPIOLIB
        select PM_GENERIC_DOMAINS if PM
        select SPARSE_IRQ
        help
@@@ -664,7 -744,6 +664,7 @@@ config ARCH_RP
        select NEED_MACH_IO_H
        select NEED_MACH_MEMORY_H
        select NO_IOPORT
 +      select VIRT_TO_BUS
        help
          On the Acorn Risc-PC, Linux can support the internal IDE disk and
          CD-ROM interface, serial and parallel port, and the floppy drive.
@@@ -691,15 -770,12 +691,15 @@@ config ARCH_SA110
  config ARCH_S3C24XX
        bool "Samsung S3C24XX SoCs"
        select ARCH_HAS_CPUFREQ
 -      select ARCH_USES_GETTIMEOFFSET
 +      select ARCH_REQUIRE_GPIOLIB
        select CLKDEV_LOOKUP
 +      select CLKSRC_MMIO
 +      select GENERIC_CLOCKEVENTS
        select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
        select HAVE_S3C_RTC if RTC_CLASS
 +      select MULTI_IRQ_HANDLER
        select NEED_MACH_GPIO_H
        select NEED_MACH_IO_H
        help
@@@ -712,11 -788,10 +712,11 @@@ config ARCH_S3C64X
        bool "Samsung S3C64XX"
        select ARCH_HAS_CPUFREQ
        select ARCH_REQUIRE_GPIOLIB
 -      select ARCH_USES_GETTIMEOFFSET
        select ARM_VIC
        select CLKDEV_LOOKUP
 +      select CLKSRC_MMIO
        select CPU_V6
 +      select GENERIC_CLOCKEVENTS
        select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
@@@ -750,11 -825,9 +750,11 @@@ config ARCH_S5P64X
  
  config ARCH_S5PC100
        bool "Samsung S5PC100"
 -      select ARCH_USES_GETTIMEOFFSET
 +      select ARCH_REQUIRE_GPIOLIB
        select CLKDEV_LOOKUP
 +      select CLKSRC_MMIO
        select CPU_V7
 +      select GENERIC_CLOCKEVENTS
        select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
@@@ -787,7 -860,6 +787,7 @@@ config ARCH_EXYNO
        select ARCH_HAS_HOLES_MEMORYMODEL
        select ARCH_SPARSEMEM_ENABLE
        select CLKDEV_LOOKUP
 +      select COMMON_CLK
        select CPU_V7
        select GENERIC_CLOCKEVENTS
        select HAVE_CLK
@@@ -807,7 -879,6 +807,7 @@@ config ARCH_SHAR
        select ISA_DMA
        select NEED_MACH_MEMORY_H
        select PCI
 +      select VIRT_TO_BUS
        select ZONE_DMA
        help
          Support for the StrongARM based Digital DNARD machine, also known
@@@ -830,6 -901,51 +830,6 @@@ config ARCH_U30
        help
          Support for ST-Ericsson U300 series mobile platforms.
  
 -config ARCH_U8500
 -      bool "ST-Ericsson U8500 Series"
 -      depends on MMU
 -      select ARCH_HAS_CPUFREQ
 -      select ARCH_REQUIRE_GPIOLIB
 -      select ARM_AMBA
 -      select CLKDEV_LOOKUP
 -      select CPU_V7
 -      select GENERIC_CLOCKEVENTS
 -      select HAVE_SMP
 -      select MIGHT_HAVE_CACHE_L2X0
 -      select SPARSE_IRQ
 -      help
 -        Support for ST-Ericsson's Ux500 architecture
 -
 -config ARCH_NOMADIK
 -      bool "STMicroelectronics Nomadik"
 -      select ARCH_REQUIRE_GPIOLIB
 -      select ARM_AMBA
 -      select ARM_VIC
 -      select CLKSRC_NOMADIK_MTU
 -      select COMMON_CLK
 -      select CPU_ARM926T
 -      select GENERIC_CLOCKEVENTS
 -      select MIGHT_HAVE_CACHE_L2X0
 -      select USE_OF
 -      select PINCTRL
 -      select PINCTRL_STN8815
 -      select SPARSE_IRQ
 -      help
 -        Support for the Nomadik platform by ST-Ericsson
 -
 -config PLAT_SPEAR
 -      bool "ST SPEAr"
 -      select ARCH_HAS_CPUFREQ
 -      select ARCH_REQUIRE_GPIOLIB
 -      select ARM_AMBA
 -      select CLKDEV_LOOKUP
 -      select CLKSRC_MMIO
 -      select COMMON_CLK
 -      select GENERIC_CLOCKEVENTS
 -      select HAVE_CLK
 -      help
 -        Support for ST's SPEAr platform (SPEAr3xx, SPEAr6xx and SPEAr13xx).
 -
  config ARCH_DAVINCI
        bool "TI DaVinci"
        select ARCH_HAS_HOLES_MEMORYMODEL
@@@ -890,14 -1006,15 +890,14 @@@ config ARCH_MULTI_V4_V
        bool
  
  config ARCH_MULTI_V6
 -      bool "ARMv6 based platforms (ARM11, Scorpion, ...)"
 +      bool "ARMv6 based platforms (ARM11)"
        select ARCH_MULTI_V6_V7
        select CPU_V6
  
  config ARCH_MULTI_V7
 -      bool "ARMv7 based platforms (Cortex-A, PJ4, Krait)"
 +      bool "ARMv7 based platforms (Cortex-A, PJ4, Scorpion, Krait)"
        default y
        select ARCH_MULTI_V6_V7
 -      select ARCH_VEXPRESS
        select CPU_V7
  
  config ARCH_MULTI_V6_V7
@@@ -920,8 -1037,6 +920,8 @@@ source "arch/arm/mach-at91/Kconfig
  
  source "arch/arm/mach-bcm/Kconfig"
  
 +source "arch/arm/mach-bcm2835/Kconfig"
 +
  source "arch/arm/mach-clps711x/Kconfig"
  
  source "arch/arm/mach-cns3xxx/Kconfig"
@@@ -936,6 -1051,8 +936,6 @@@ source "arch/arm/mach-footbridge/Kconfi
  
  source "arch/arm/mach-gemini/Kconfig"
  
 -source "arch/arm/mach-h720x/Kconfig"
 -
  source "arch/arm/mach-highbank/Kconfig"
  
  source "arch/arm/mach-integrator/Kconfig"
@@@ -987,7 -1104,7 +987,7 @@@ source "arch/arm/plat-samsung/Kconfig
  
  source "arch/arm/mach-socfpga/Kconfig"
  
 -source "arch/arm/plat-spear/Kconfig"
 +source "arch/arm/mach-spear/Kconfig"
  
  source "arch/arm/mach-s3c24xx/Kconfig"
  
@@@ -1056,7 -1173,7 +1056,7 @@@ config PLAT_VERSATIL
  config ARM_TIMER_SP804
        bool
        select CLKSRC_MMIO
 -      select HAVE_SCHED_CLOCK
 +      select CLKSRC_OF if OF
  
  source arch/arm/mm/Kconfig
  
@@@ -1066,9 -1183,9 +1066,9 @@@ config ARM_NR_BANK
        default 8
  
  config IWMMXT
 -      bool "Enable iWMMXt support"
 +      bool "Enable iWMMXt support" if !CPU_PJ4
        depends on CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_PJ4
 -      default y if PXA27x || PXA3xx || ARCH_MMP
 +      default y if PXA27x || PXA3xx || ARCH_MMP || CPU_PJ4
        help
          Enable support for iWMMXt context switching at run time if
          running on a CPU that supports it.
@@@ -1322,16 -1439,6 +1322,16 @@@ config ARM_ERRATA_77542
         to deadlock. This workaround puts DSB before executing ISB if
         an abort may occur on cache maintenance.
  
 +config ARM_ERRATA_798181
 +      bool "ARM errata: TLBI/DSB failure on Cortex-A15"
 +      depends on CPU_V7 && SMP
 +      help
 +        On Cortex-A15 (r0p0..r3p2) the TLBI*IS/DSB operations are not
 +        adequately shooting down all use of the old entries. This
 +        option enables the Linux kernel workaround for this erratum
 +        which sends an IPI to the CPUs that are running the same ASID
 +        as the one being invalidated.
 +
  endmenu
  
  source "arch/arm/common/Kconfig"
@@@ -1355,6 -1462,10 +1355,6 @@@ config ISA_DM
        bool
        select ISA_DMA_API
  
 -config ARCH_NO_VIRT_TO_BUS
 -      def_bool y
 -      depends on !ARCH_RPC && !ARCH_NETWINDER && !ARCH_SHARK
 -
  # Select ISA DMA interface
  config ISA_DMA_API
        bool
@@@ -1415,6 -1526,7 +1415,6 @@@ config SM
        depends on GENERIC_CLOCKEVENTS
        depends on HAVE_SMP
        depends on MMU
 -      select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP
        select USE_GENERIC_SMP_HELPERS
        help
          This enables support for systems with more than one CPU. If you have
@@@ -1485,18 -1597,9 +1485,18 @@@ config HAVE_ARM_ARCH_TIME
  config HAVE_ARM_TWD
        bool
        depends on SMP
 +      select CLKSRC_OF if OF
        help
          This options enables support for the ARM timer and watchdog unit
  
 +config MCPM
 +      bool "Multi-Cluster Power Management"
 +      depends on CPU_V7 && SMP
 +      help
 +        This option provides the common power management infrastructure
 +        for (multi-)cluster based systems, such as big.LITTLE based
 +        systems.
 +
  choice
        prompt "Memory split"
        default VMSPLIT_3G
@@@ -1547,23 -1650,20 +1547,23 @@@ config LOCAL_TIMER
        bool "Use local timer interrupts"
        depends on SMP
        default y
 -      select HAVE_ARM_TWD if (!ARCH_MSM_SCORPIONMP && !EXYNOS4_MCT)
        help
          Enable support for local timers on SMP platforms, rather then the
          legacy IPI broadcast method.  Local timers allows the system
          accounting to be spread across the timer interval, preventing a
          "thundering herd" at every timer tick.
  
 +# The GPIO number here must be sorted by descending number. In case of
 +# a multiplatform kernel, we just want the highest value required by the
 +# selected platforms.
  config ARCH_NR_GPIO
        int
        default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
 -      default 355 if ARCH_U8500
 -      default 264 if MACH_H4700
        default 512 if SOC_OMAP5
 -      default 288 if ARCH_VT8500 || ARCH_SUNXI
 +      default 392 if ARCH_U8500
 +      default 352 if ARCH_VT8500
 +      default 288 if ARCH_SUNXI
 +      default 264 if MACH_H4700
        default 0
        help
          Maximum number of GPIOs in the system.
@@@ -1585,7 -1685,7 +1585,7 @@@ config SCHED_HRTIC
  
  config THUMB2_KERNEL
        bool "Compile the kernel in Thumb-2 mode" if !CPU_THUMBONLY
-       depends on CPU_V7 && !CPU_V6 && !CPU_V6K
+       depends on (CPU_V7 || CPU_V7M) && !CPU_V6 && !CPU_V6K
        default y if CPU_THUMBONLY
        select AEABI
        select ARM_ASM_UNIFIED
@@@ -1788,10 -1888,8 +1788,10 @@@ config XEN_DOM
  
  config XEN
        bool "Xen guest support on ARM (EXPERIMENTAL)"
 -      depends on ARM && OF
 +      depends on ARM && AEABI && OF
        depends on CPU_V7 && !CPU_V6
 +      depends on !GENERIC_ATOMIC64
 +      select ARM_PSCI
        help
          Say Y if you want to run Linux in a Virtual Machine on Xen on ARM.
  
@@@ -2053,8 -2151,40 +2053,8 @@@ endmen
  menu "CPU Power Management"
  
  if ARCH_HAS_CPUFREQ
 -
  source "drivers/cpufreq/Kconfig"
  
 -config CPU_FREQ_IMX
 -      tristate "CPUfreq driver for i.MX CPUs"
 -      depends on ARCH_MXC && CPU_FREQ
 -      select CPU_FREQ_TABLE
 -      help
 -        This enables the CPUfreq driver for i.MX CPUs.
 -
 -config CPU_FREQ_SA1100
 -      bool
 -
 -config CPU_FREQ_SA1110
 -      bool
 -
 -config CPU_FREQ_INTEGRATOR
 -      tristate "CPUfreq driver for ARM Integrator CPUs"
 -      depends on ARCH_INTEGRATOR && CPU_FREQ
 -      default y
 -      help
 -        This enables the CPUfreq driver for ARM Integrator CPUs.
 -
 -        For details, take a look at <file:Documentation/cpu-freq>.
 -
 -        If in doubt, say Y.
 -
 -config CPU_FREQ_PXA
 -      bool
 -      depends on CPU_FREQ && ARCH_PXA && PXA25x
 -      default y
 -      select CPU_FREQ_DEFAULT_GOV_USERSPACE
 -      select CPU_FREQ_TABLE
 -
  config CPU_FREQ_S3C
        bool
        help
diff --combined arch/arm/Makefile
index 1ba358ba16b871aec3b366cab9b4e4066048e69c,f11b8da17672c31233d5eb8713dee0fd54c4d7f5..3380c4f517579ebd4da5a3d5fb5ed7fc30e55fb6
@@@ -59,6 -59,7 +59,7 @@@ comma = 
  # Note that GCC does not numerically define an architecture version
  # macro, but instead defines a whole series of macros which makes
  # testing for a specific architecture or later rather impossible.
+ arch-$(CONFIG_CPU_32v7M)      :=-D__LINUX_ARM_ARCH__=7 -march=armv7-m -Wa,-march=armv7-m
  arch-$(CONFIG_CPU_32v7)               :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
  arch-$(CONFIG_CPU_32v6)               :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
  # Only override the compiler option if ARMv6. The ARMv6K extensions are
@@@ -147,6 -148,7 +148,6 @@@ machine-$(CONFIG_ARCH_DOVE)                += dov
  machine-$(CONFIG_ARCH_EBSA110)                += ebsa110
  machine-$(CONFIG_ARCH_EP93XX)         += ep93xx
  machine-$(CONFIG_ARCH_GEMINI)         += gemini
 -machine-$(CONFIG_ARCH_H720X)          += h720x
  machine-$(CONFIG_ARCH_HIGHBANK)               += highbank
  machine-$(CONFIG_ARCH_INTEGRATOR)     += integrator
  machine-$(CONFIG_ARCH_IOP13XX)                += iop13xx
@@@ -190,7 -192,9 +191,7 @@@ machine-$(CONFIG_ARCH_VT8500)              += vt850
  machine-$(CONFIG_ARCH_W90X900)                += w90x900
  machine-$(CONFIG_FOOTBRIDGE)          += footbridge
  machine-$(CONFIG_ARCH_SOCFPGA)                += socfpga
 -machine-$(CONFIG_ARCH_SPEAR13XX)      += spear13xx
 -machine-$(CONFIG_ARCH_SPEAR3XX)               += spear3xx
 -machine-$(CONFIG_MACH_SPEAR600)               += spear6xx
 +machine-$(CONFIG_PLAT_SPEAR)          += spear
  machine-$(CONFIG_ARCH_VIRT)           += virt
  machine-$(CONFIG_ARCH_ZYNQ)           += zynq
  machine-$(CONFIG_ARCH_SUNXI)          += sunxi
@@@ -204,6 -208,7 +205,6 @@@ plat-$(CONFIG_PLAT_ORION)  += orio
  plat-$(CONFIG_PLAT_PXA)               += pxa
  plat-$(CONFIG_PLAT_S3C24XX)   += samsung
  plat-$(CONFIG_PLAT_S5P)               += samsung
 -plat-$(CONFIG_PLAT_SPEAR)     += spear
  plat-$(CONFIG_PLAT_VERSATILE) += versatile
  
  ifeq ($(CONFIG_ARCH_EBSA110),y)
@@@ -309,7 -314,7 +310,7 @@@ define archhel
    echo  '  Image         - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
    echo  '* xipImage      - XIP kernel image, if configured (arch/$(ARCH)/boot/xipImage)'
    echo  '  uImage        - U-Boot wrapped zImage'
 -  echo  '  bootpImage    - Combined zImage and initial RAM disk' 
 +  echo  '  bootpImage    - Combined zImage and initial RAM disk'
    echo  '                  (supply initrd image via make variable INITRD=<path>)'
    echo  '* dtbs          - Build device tree blobs for enabled boards'
    echo  '  install       - Install uncompressed kernel'
index ea289e1435e742807f48550200582de5630bf817,65c9faf7a34aeaee6496c7f6368d40b48c585020..c81adc08b3fba5268b0acc81588203b9ef06aeae
  #undef _CACHE
  #undef MULTI_CACHE
  
 -#if defined(CONFIG_CPU_CACHE_V3)
 -# ifdef _CACHE
 -#  define MULTI_CACHE 1
 -# else
 -#  define _CACHE v3
 -# endif
 -#endif
 -
  #if defined(CONFIG_CPU_CACHE_V4)
  # ifdef _CACHE
  #  define MULTI_CACHE 1
  # endif
  #endif
  
+ #if defined(CONFIG_CPU_V7M)
+ # ifdef _CACHE
+ #  define MULTI_CACHE 1
+ # else
+ #  define _CACHE nop
+ # endif
+ #endif
  #if !defined(_CACHE) && !defined(MULTI_CACHE)
  #error Unknown cache maintenance model
  #endif
  
+ #ifndef __ASSEMBLER__
+ extern inline void nop_flush_icache_all(void) { }
+ extern inline void nop_flush_kern_cache_all(void) { }
+ extern inline void nop_flush_kern_cache_louis(void) { }
+ extern inline void nop_flush_user_cache_all(void) { }
+ extern inline void nop_flush_user_cache_range(unsigned long a,
+               unsigned long b, unsigned int c) { }
+ extern inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { }
+ extern inline int nop_coherent_user_range(unsigned long a,
+               unsigned long b) { return 0; }
+ extern inline void nop_flush_kern_dcache_area(void *a, size_t s) { }
+ extern inline void nop_dma_flush_range(const void *a, const void *b) { }
+ extern inline void nop_dma_map_area(const void *s, size_t l, int f) { }
+ extern inline void nop_dma_unmap_area(const void *s, size_t l, int f) { }
+ #endif
  #ifndef MULTI_CACHE
  #define __cpuc_flush_icache_all               __glue(_CACHE,_flush_icache_all)
  #define __cpuc_flush_kern_all         __glue(_CACHE,_flush_kern_cache_all)
index bc5bc0a971319674c552b578367a19a5a464d798,c45e0027613b508bc3402d997e55759b3203317d..85a72b0809ca11c445352c4f49b54a5b0638ba48
@@@ -35,11 -35,12 +35,11 @@@ ret_fast_syscall
        ldr     r1, [tsk, #TI_FLAGS]
        tst     r1, #_TIF_WORK_MASK
        bne     fast_work_pending
 -#if defined(CONFIG_IRQSOFF_TRACER)
        asm_trace_hardirqs_on
 -#endif
  
        /* perform architecture specific actions before user return */
        arch_ret_to_user r1, lr
 +      ct_user_enter
  
        restore_user_regs fast = 1, offset = S_OFF
   UNWIND(.fnend                )
@@@ -70,11 -71,11 +70,11 @@@ ENTRY(ret_to_user_from_irq
        tst     r1, #_TIF_WORK_MASK
        bne     work_pending
  no_work_pending:
 -#if defined(CONFIG_IRQSOFF_TRACER)
        asm_trace_hardirqs_on
 -#endif
 +
        /* perform architecture specific actions before user return */
        arch_ret_to_user r1, lr
 +      ct_user_enter save = 0
  
        restore_user_regs fast = 0, offset = 0
  ENDPROC(ret_to_user_from_irq)
@@@ -275,13 -276,7 +275,13 @@@ ENDPROC(ftrace_graph_caller_old
   */
  
  .macro mcount_enter
 +/*
 + * This pad compensates for the push {lr} at the call site.  Note that we are
 + * unable to unwind through a function which does not otherwise save its lr.
 + */
 + UNWIND(.pad  #4)
        stmdb   sp!, {r0-r3, lr}
 + UNWIND(.save {r0-r3, lr})
  .endm
  
  .macro mcount_get_lr reg
  .endm
  
  ENTRY(__gnu_mcount_nc)
 +UNWIND(.fnstart)
  #ifdef CONFIG_DYNAMIC_FTRACE
        mov     ip, lr
        ldmia   sp!, {lr}
  #else
        __mcount
  #endif
 +UNWIND(.fnend)
  ENDPROC(__gnu_mcount_nc)
  
  #ifdef CONFIG_DYNAMIC_FTRACE
  ENTRY(ftrace_caller)
 +UNWIND(.fnstart)
        __ftrace_caller
 +UNWIND(.fnend)
  ENDPROC(ftrace_caller)
  #endif
  
  #ifdef CONFIG_FUNCTION_GRAPH_TRACER
  ENTRY(ftrace_graph_caller)
 +UNWIND(.fnstart)
        __ftrace_graph_caller
 +UNWIND(.fnend)
  ENDPROC(ftrace_graph_caller)
  #endif
  
@@@ -350,6 -339,9 +350,9 @@@ ENDPROC(ftrace_stub
  
        .align  5
  ENTRY(vector_swi)
+ #ifdef CONFIG_CPU_V7M
+       v7m_exception_entry
+ #else
        sub     sp, sp, #S_FRAME_SIZE
        stmia   sp, {r0 - r12}                  @ Calling r0 - r12
   ARM( add     r8, sp, #S_PC           )
        str     lr, [sp, #S_PC]                 @ Save calling PC
        str     r8, [sp, #S_PSR]                @ Save CPSR
        str     r0, [sp, #S_OLD_R0]             @ Save OLD_R0
+ #endif
        zero_fp
  
        /*
        mcr     p15, 0, ip, c1, c0              @ update control register
  #endif
        enable_irq
 +      ct_user_exit
  
        get_thread_info tsk
        adr     tbl, sys_call_table             @ load syscall table pointer
index 160f3376ba6da8f1a697ef62cb9180795a0576e6,b02e1394dc54679cfc85dec2310b8a70eea53060..de23a9beed1333d86d1143a7b31613ff7376440d
@@@ -5,6 -5,7 +5,7 @@@
  #include <asm/asm-offsets.h>
  #include <asm/errno.h>
  #include <asm/thread_info.h>
+ #include <asm/v7m.h>
  
  @ Bad Abort numbers
  @ -----------------
  #endif
        .endm
  
+ #ifdef CONFIG_CPU_V7M
+ /*
+  * ARMv7-M exception entry/exit macros.
+  *
+  * xPSR, ReturnAddress(), LR (R14), R12, R3, R2, R1, and R0 are
+  * automatically saved on the current stack (32 words) before
+  * switching to the exception stack (SP_main).
+  *
+  * If exception is taken while in user mode, SP_main is
+  * empty. Otherwise, SP_main is aligned to 64 bit automatically
+  * (CCR.STKALIGN set).
+  *
+  * Linux assumes that the interrupts are disabled when entering an
+  * exception handler and it may BUG if this is not the case. Interrupts
+  * are disabled during entry and reenabled in the exit macro.
+  *
+  * v7m_exception_slow_exit is used when returning from SVC or PendSV.
+  * When returning to kernel mode, we don't return from exception.
+  */
+       .macro  v7m_exception_entry
+       @ determine the location of the registers saved by the core during
+       @ exception entry. Depending on the mode the cpu was in when the
+       @ exception happend that is either on the main or the process stack.
+       @ Bit 2 of EXC_RETURN stored in the lr register specifies which stack
+       @ was used.
+       tst     lr, #EXC_RET_STACK_MASK
+       mrsne   r12, psp
+       moveq   r12, sp
+       @ we cannot rely on r0-r3 and r12 matching the value saved in the
+       @ exception frame because of tail-chaining. So these have to be
+       @ reloaded.
+       ldmia   r12!, {r0-r3}
+       @ Linux expects to have irqs off. Do it here before taking stack space
+       cpsid   i
+       sub     sp, #S_FRAME_SIZE-S_IP
+       stmdb   sp!, {r0-r11}
+       @ load saved r12, lr, return address and xPSR.
+       @ r0-r7 are used for signals and never touched from now on. Clobbering
+       @ r8-r12 is OK.
+       mov     r9, r12
+       ldmia   r9!, {r8, r10-r12}
+       @ calculate the original stack pointer value.
+       @ r9 currently points to the memory location just above the auto saved
+       @ xPSR.
+       @ The cpu might automatically 8-byte align the stack. Bit 9
+       @ of the saved xPSR specifies if stack aligning took place. In this case
+       @ another 32-bit value is included in the stack.
+       tst     r12, V7M_xPSR_FRAMEPTRALIGN
+       addne   r9, r9, #4
+       @ store saved r12 using str to have a register to hold the base for stm
+       str     r8, [sp, #S_IP]
+       add     r8, sp, #S_SP
+       @ store r13-r15, xPSR
+       stmia   r8!, {r9-r12}
+       @ store old_r0
+       str     r0, [r8]
+       .endm
+         /*
+        * PENDSV and SVCALL are configured to have the same exception
+        * priorities. As a kernel thread runs at SVCALL execution priority it
+        * can never be preempted and so we will never have to return to a
+        * kernel thread here.
+          */
+       .macro  v7m_exception_slow_exit ret_r0
+       cpsid   i
+       ldr     lr, =EXC_RET_THREADMODE_PROCESSSTACK
+       @ read original r12, sp, lr, pc and xPSR
+       add     r12, sp, #S_IP
+       ldmia   r12, {r1-r5}
+       @ an exception frame is always 8-byte aligned. To tell the hardware if
+       @ the sp to be restored is aligned or not set bit 9 of the saved xPSR
+       @ accordingly.
+       tst     r2, #4
+       subne   r2, r2, #4
+       orrne   r5, V7M_xPSR_FRAMEPTRALIGN
+       biceq   r5, V7M_xPSR_FRAMEPTRALIGN
+       @ write basic exception frame
+       stmdb   r2!, {r1, r3-r5}
+       ldmia   sp, {r1, r3-r5}
+       .if     \ret_r0
+       stmdb   r2!, {r0, r3-r5}
+       .else
+       stmdb   r2!, {r1, r3-r5}
+       .endif
+       @ restore process sp
+       msr     psp, r2
+       @ restore original r4-r11
+       ldmia   sp!, {r0-r11}
+       @ restore main sp
+       add     sp, sp, #S_FRAME_SIZE-S_IP
+       cpsie   i
+       bx      lr
+       .endm
+ #endif        /* CONFIG_CPU_V7M */
        @
        @ Store/load the USER SP and LR registers by switching to the SYS
        @ mode. Useful in Thumb-2 mode where "stm/ldm rd, {sp, lr}^" is not
        .endm
  
  #ifndef CONFIG_THUMB2_KERNEL
 -      .macro  svc_exit, rpsr
 +      .macro  svc_exit, rpsr, irq = 0
 +      .if     \irq != 0
 +      @ IRQs already off
 +#ifdef CONFIG_TRACE_IRQFLAGS
 +      @ The parent context IRQs must have been enabled to get here in
 +      @ the first place, so there's no point checking the PSR I bit.
 +      bl      trace_hardirqs_on
 +#endif
 +      .else
 +      @ IRQs off again before pulling preserved data off the stack
 +      disable_irq_notrace
 +#ifdef CONFIG_TRACE_IRQFLAGS
 +      tst     \rpsr, #PSR_I_BIT
 +      bleq    trace_hardirqs_on
 +      tst     \rpsr, #PSR_I_BIT
 +      blne    trace_hardirqs_off
 +#endif
 +      .endif
        msr     spsr_cxsf, \rpsr
  #if defined(CONFIG_CPU_V6)
        ldr     r0, [sp]
        mov     pc, \reg
        .endm
  #else /* CONFIG_THUMB2_KERNEL */
 -      .macro  svc_exit, rpsr
 +      .macro  svc_exit, rpsr, irq = 0
 +      .if     \irq != 0
 +      @ IRQs already off
 +#ifdef CONFIG_TRACE_IRQFLAGS
 +      @ The parent context IRQs must have been enabled to get here in
 +      @ the first place, so there's no point checking the PSR I bit.
 +      bl      trace_hardirqs_on
 +#endif
 +      .else
 +      @ IRQs off again before pulling preserved data off the stack
 +      disable_irq_notrace
 +#ifdef CONFIG_TRACE_IRQFLAGS
 +      tst     \rpsr, #PSR_I_BIT
 +      bleq    trace_hardirqs_on
 +      tst     \rpsr, #PSR_I_BIT
 +      blne    trace_hardirqs_off
 +#endif
 +      .endif
        ldr     lr, [sp, #S_SP]                 @ top of the stack
        ldrd    r0, r1, [sp, #S_LR]             @ calling lr and pc
        clrex                                   @ clear the exclusive monitor
        rfeia   sp!
        .endm
  
+ #ifdef CONFIG_CPU_V7M
+       /*
+        * Note we don't need to do clrex here as clearing the local monitor is
+        * part of each exception entry and exit sequence.
+        */
+       .macro  restore_user_regs, fast = 0, offset = 0
+       .if     \offset
+       add     sp, #\offset
+       .endif
+       v7m_exception_slow_exit ret_r0 = \fast
+       .endm
+ #else /* ifdef CONFIG_CPU_V7M */
        .macro  restore_user_regs, fast = 0, offset = 0
        clrex                                   @ clear the exclusive monitor
        mov     r2, sp
        add     sp, sp, #S_FRAME_SIZE - S_SP
        movs    pc, lr                          @ return & move spsr_svc into cpsr
        .endm
+ #endif        /* ifdef CONFIG_CPU_V7M / else */
  
        .macro  get_thread_info, rd
        mov     \rd, sp
        .endm
  #endif        /* !CONFIG_THUMB2_KERNEL */
  
 +/*
 + * Context tracking subsystem.  Used to instrument transitions
 + * between user and kernel mode.
 + */
 +      .macro ct_user_exit, save = 1
 +#ifdef CONFIG_CONTEXT_TRACKING
 +      .if     \save
 +      stmdb   sp!, {r0-r3, ip, lr}
 +      bl      user_exit
 +      ldmia   sp!, {r0-r3, ip, lr}
 +      .else
 +      bl      user_exit
 +      .endif
 +#endif
 +      .endm
 +
 +      .macro ct_user_enter, save = 1
 +#ifdef CONFIG_CONTEXT_TRACKING
 +      .if     \save
 +      stmdb   sp!, {r0-r3, ip, lr}
 +      bl      user_enter
 +      ldmia   sp!, {r0-r3, ip, lr}
 +      .else
 +      bl      user_enter
 +      .endif
 +#endif
 +      .endm
 +
  /*
   * These are the registers used in the syscall handler, and allow us to
   * have in theory up to 7 arguments to a function - r0 to r6.
diff --combined arch/arm/kernel/setup.c
index 1522c7ae31b0c239901237569bad5cbb4ec7b02e,829124590e4c16eb889a48fe54183a095d589e51..ea5cd6e3beb6d8646798b66a4e7b7dceb0a004eb
@@@ -18,7 -18,6 +18,7 @@@
  #include <linux/bootmem.h>
  #include <linux/seq_file.h>
  #include <linux/screen_info.h>
 +#include <linux/of_platform.h>
  #include <linux/init.h>
  #include <linux/kexec.h>
  #include <linux/of_fdt.h>
@@@ -57,6 -56,7 +57,6 @@@
  #include <asm/virt.h>
  
  #include "atags.h"
 -#include "tcm.h"
  
  
  #if defined(CONFIG_FPE_NWFPE) || defined(CONFIG_FPE_FASTFPE)
@@@ -128,7 -128,9 +128,9 @@@ struct stack 
        u32 und[3];
  } ____cacheline_aligned;
  
+ #ifndef CONFIG_CPU_V7M
  static struct stack stacks[NR_CPUS];
+ #endif
  
  char elf_platform[ELF_PLATFORM_SIZE];
  EXPORT_SYMBOL(elf_platform);
@@@ -207,7 -209,7 +209,7 @@@ static const char *proc_arch[] = 
        "5TEJ",
        "6TEJ",
        "7",
-       "?(11)",
+       "7M",
        "?(12)",
        "?(13)",
        "?(14)",
        "?(17)",
  };
  
+ #ifdef CONFIG_CPU_V7M
+ static int __get_cpu_architecture(void)
+ {
+       return CPU_ARCH_ARMv7M;
+ }
+ #else
  static int __get_cpu_architecture(void)
  {
        int cpu_arch;
  
        return cpu_arch;
  }
+ #endif
  
  int __pure cpu_architecture(void)
  {
@@@ -293,7 -302,9 +302,9 @@@ static void __init cacheid_init(void
  {
        unsigned int arch = cpu_architecture();
  
-       if (arch >= CPU_ARCH_ARMv6) {
+       if (arch == CPU_ARCH_ARMv7M) {
+               cacheid = 0;
+       } else if (arch >= CPU_ARCH_ARMv6) {
                unsigned int cachetype = read_cpuid_cachetype();
                if ((cachetype & (7 << 29)) == 4 << 29) {
                        /* ARMv7 register format */
@@@ -353,23 -364,6 +364,23 @@@ void __init early_print(const char *str
        printk("%s", buf);
  }
  
 +static void __init cpuid_init_hwcaps(void)
 +{
 +      unsigned int divide_instrs;
 +
 +      if (cpu_architecture() < CPU_ARCH_ARMv7)
 +              return;
 +
 +      divide_instrs = (read_cpuid_ext(CPUID_EXT_ISAR0) & 0x0f000000) >> 24;
 +
 +      switch (divide_instrs) {
 +      case 2:
 +              elf_hwcap |= HWCAP_IDIVA;
 +      case 1:
 +              elf_hwcap |= HWCAP_IDIVT;
 +      }
 +}
 +
  static void __init feat_v6_fixup(void)
  {
        int id = read_cpuid_id();
   *
   * cpu_init sets up the per-CPU stacks.
   */
 -void cpu_init(void)
 +void notrace cpu_init(void)
  {
+ #ifndef CONFIG_CPU_V7M
        unsigned int cpu = smp_processor_id();
        struct stack *stk = &stacks[cpu];
  
              "I" (offsetof(struct stack, und[0])),
              PLC (PSR_F_BIT | PSR_I_BIT | SVC_MODE)
            : "r14");
+ #endif
  }
  
  int __cpu_logical_map[NR_CPUS];
@@@ -500,11 -496,8 +513,11 @@@ static void __init setup_processor(void
        snprintf(elf_platform, ELF_PLATFORM_SIZE, "%s%c",
                 list->elf_name, ENDIANNESS);
        elf_hwcap = list->elf_hwcap;
 +
 +      cpuid_init_hwcaps();
 +
  #ifndef CONFIG_ARM_THUMB
 -      elf_hwcap &= ~HWCAP_THUMB;
 +      elf_hwcap &= ~(HWCAP_THUMB | HWCAP_IDIVT);
  #endif
  
        feat_v6_fixup();
@@@ -544,7 -537,7 +557,7 @@@ int __init arm_add_memory(phys_addr_t s
        size -= start & ~PAGE_MASK;
        bank->start = PAGE_ALIGN(start);
  
 -#ifndef CONFIG_LPAE
 +#ifndef CONFIG_ARM_LPAE
        if (bank->start + size < bank->start) {
                printk(KERN_CRIT "Truncating memory at 0x%08llx to fit in "
                        "32-bit physical address space\n", (long long)start);
@@@ -660,19 -653,9 +673,19 @@@ struct screen_info screen_info = 
  
  static int __init customize_machine(void)
  {
 -      /* customizes platform devices, or adds new ones */
 +      /*
 +       * customizes platform devices, or adds new ones
 +       * On DT based machines, we fall back to populating the
 +       * machine from the device tree, if no callback is provided,
 +       * otherwise we would always need an init_machine callback.
 +       */
        if (machine_desc->init_machine)
                machine_desc->init_machine();
 +#ifdef CONFIG_OF
 +      else
 +              of_platform_populate(NULL, of_default_bus_match_table,
 +                                      NULL, NULL);
 +#endif
        return 0;
  }
  arch_initcall(customize_machine);
@@@ -808,6 -791,8 +821,6 @@@ void __init setup_arch(char **cmdline_p
  
        reserve_crashkernel();
  
 -      tcm_init();
 -
  #ifdef CONFIG_MULTI_IRQ_HANDLER
        handle_arch_irq = mdesc->handle_irq;
  #endif
diff --combined arch/arm/kernel/traps.c
index 18b32e8e4497f4c1966f43ac6fbb4963315fb968,ec64571462d25a9484df57ec608fc36f53d2bb43..486e12a0f26a1bc2a7a7339e3a507a9708f64dc1
@@@ -204,6 -204,13 +204,6 @@@ static void dump_backtrace(struct pt_re
  }
  #endif
  
 -void dump_stack(void)
 -{
 -      dump_backtrace(NULL, NULL);
 -}
 -
 -EXPORT_SYMBOL(dump_stack);
 -
  void show_stack(struct task_struct *tsk, unsigned long *sp)
  {
        dump_backtrace(NULL, tsk);
@@@ -812,6 -819,7 +812,7 @@@ static void __init kuser_get_tls_init(u
  
  void __init early_trap_init(void *vectors_base)
  {
+ #ifndef CONFIG_CPU_V7M
        unsigned long vectors = (unsigned long)vectors_base;
        extern char __stubs_start[], __stubs_end[];
        extern char __vectors_start[], __vectors_end[];
  
        flush_icache_range(vectors, vectors + PAGE_SIZE);
        modify_domain(DOMAIN_USER, DOMAIN_CLIENT);
+ #else /* ifndef CONFIG_CPU_V7M */
+       /*
+        * on V7-M there is no need to copy the vector table to a dedicated
+        * memory area. The address is configurable and so a table in the kernel
+        * image can be used.
+        */
+ #endif
  }
diff --combined arch/arm/mm/Kconfig
index 35955b54944c1c5ed39bf051667b337aeaa7dee3,cce78b070825de6c1fbe01f904ffee2b070a46f7..9e8101ecd63e6a2b158849b74e14921a2b273177
@@@ -43,7 -43,7 +43,7 @@@ config CPU_ARM740
        depends on !MMU
        select CPU_32v4T
        select CPU_ABRT_LV4T
 -      select CPU_CACHE_V3     # although the core is v4t
 +      select CPU_CACHE_V4
        select CPU_CP15_MPU
        select CPU_PABRT_LEGACY
        help
@@@ -397,6 -397,15 +397,15 @@@ config CPU_V
        select CPU_PABRT_V7
        select CPU_TLB_V7 if MMU
  
+ # ARMv7M
+ config CPU_V7M
+       bool
+       select CPU_32v7M
+       select CPU_ABRT_NOMMU
+       select CPU_CACHE_NOP
+       select CPU_PABRT_LEGACY
+       select CPU_THUMBONLY
  config CPU_THUMBONLY
        bool
        # There are no CPUs available with MMU that don't implement an ARM ISA:
@@@ -441,6 -450,9 +450,9 @@@ config CPU_32v6
  config CPU_32v7
        bool
  
+ config CPU_32v7M
+       bool
  # The abort model
  config CPU_ABRT_NOMMU
        bool
@@@ -476,6 -488,9 +488,6 @@@ config CPU_PABRT_V
        bool
  
  # The cache model
 -config CPU_CACHE_V3
 -      bool
 -
  config CPU_CACHE_V4
        bool
  
@@@ -491,6 -506,9 +503,9 @@@ config CPU_CACHE_V
  config CPU_CACHE_V7
        bool
  
+ config CPU_CACHE_NOP
+       bool
  config CPU_CACHE_VIVT
        bool
  
@@@ -613,7 -631,11 +628,11 @@@ config ARCH_DMA_ADDR_T_64BI
  
  config ARM_THUMB
        bool "Support Thumb user binaries" if !CPU_THUMBONLY
-       depends on CPU_ARM720T || CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_V6 || CPU_V6K || CPU_V7 || CPU_FEROCEON
+       depends on CPU_ARM720T || CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || \
+               CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || \
+               CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || \
+               CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_V6 || CPU_V6K || \
+               CPU_V7 || CPU_FEROCEON || CPU_V7M
        default y
        help
          Say Y if you want to include kernel support for running user space
diff --combined arch/arm/mm/Makefile
index 9e51be96f635b5945b978bed2c6978fd3d2b61ba,317b57559340d2268ed51cbf1b1fd1566418d17a..ee558a01f390925ca016f901697091660be48af4
@@@ -33,12 -33,14 +33,13 @@@ obj-$(CONFIG_CPU_PABRT_LEGACY)     += pabor
  obj-$(CONFIG_CPU_PABRT_V6)    += pabort-v6.o
  obj-$(CONFIG_CPU_PABRT_V7)    += pabort-v7.o
  
 -obj-$(CONFIG_CPU_CACHE_V3)    += cache-v3.o
  obj-$(CONFIG_CPU_CACHE_V4)    += cache-v4.o
  obj-$(CONFIG_CPU_CACHE_V4WT)  += cache-v4wt.o
  obj-$(CONFIG_CPU_CACHE_V4WB)  += cache-v4wb.o
  obj-$(CONFIG_CPU_CACHE_V6)    += cache-v6.o
  obj-$(CONFIG_CPU_CACHE_V7)    += cache-v7.o
  obj-$(CONFIG_CPU_CACHE_FA)    += cache-fa.o
+ obj-$(CONFIG_CPU_CACHE_NOP)   += cache-nop.o
  
  AFLAGS_cache-v6.o     :=-Wa,-march=armv6
  AFLAGS_cache-v7.o     :=-Wa,-march=armv7-a
@@@ -87,6 -89,7 +88,7 @@@ obj-$(CONFIG_CPU_FEROCEON)    += proc-fero
  obj-$(CONFIG_CPU_V6)          += proc-v6.o
  obj-$(CONFIG_CPU_V6K)         += proc-v6.o
  obj-$(CONFIG_CPU_V7)          += proc-v7.o
+ obj-$(CONFIG_CPU_V7M)         += proc-v7m.o
  
  AFLAGS_proc-v6.o      :=-Wa,-march=armv6
  AFLAGS_proc-v7.o      :=-Wa,-march=armv7-a