aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-10-05 15:42:36 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-10-05 15:43:53 -0400
commit9fce0c226536fc36c7fb0a80000ca38a995be43e (patch)
treed1d03d4a831bb143ffd401cefa0f44f636ac0084 /arch/arm
parent3cc2691227203c00cac1d82d6b0772224d5c87b2 (diff)
parentc8d2bc9bc39ebea8437fd974fdbc21847bb897a3 (diff)
Merge tag 'v4.8' into patchwork
Linux 4.8 * tag 'v4.8': (1761 commits) Linux 4.8 ARM: 8618/1: decompressor: reset ttbcr fields to use TTBR0 on ARMv7 MIPS: CM: Fix mips_cm_max_vp_width for non-MT kernels on MT systems include/linux/property.h: fix typo/compile error ocfs2: fix deadlock on mmapped page in ocfs2_write_begin_nolock() mm: workingset: fix crash in shadow node shrinker caused by replace_page_cache_page() MAINTAINERS: Switch to kernel.org email address for Javi Merino x86/entry/64: Fix context tracking state warning when load_gs_index fails x86/boot: Initialize FPU and X86_FEATURE_ALWAYS even if we don't have CPUID x86/vdso: Fix building on big endian host x86/boot: Fix another __read_cr4() case on 486 sctp: fix the issue sctp_diag uses lock_sock in rcu_read_lock sctp: change to check peer prsctp_capable when using prsctp polices sctp: remove prsctp_param from sctp_chunk sctp: move sent_count to the memory hole in sctp_chunk tg3: Avoid NULL pointer dereference in tg3_io_error_detected() x86/init: Fix cr4_init_shadow() on CR4-less machines MIPS: Fix detection of unsupported highmem with cache aliases MIPS: Malta: Fix IOCU disable switch read for MIPS64 MIPS: Fix BUILD_ROLLBACK_PROLOGUE for microMIPS ...
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--arch/arm/Makefile2
-rw-r--r--arch/arm/boot/compressed/head.S2
-rw-r--r--arch/arm/boot/dts/am335x-baltos.dtsi2
-rw-r--r--arch/arm/boot/dts/am335x-igep0033.dtsi2
-rw-r--r--arch/arm/boot/dts/am335x-phycore-som.dtsi2
-rw-r--r--arch/arm/boot/dts/arm-realview-pbx-a9.dts9
-rw-r--r--arch/arm/boot/dts/armada-388-clearfog.dts8
-rw-r--r--arch/arm/boot/dts/bcm2835-rpi.dtsi1
-rw-r--r--arch/arm/boot/dts/bcm283x.dtsi3
-rw-r--r--arch/arm/boot/dts/exynos5410-odroidxu.dts3
-rw-r--r--arch/arm/boot/dts/imx6qdl.dtsi2
-rw-r--r--arch/arm/boot/dts/imx6sx-sabreauto.dts2
-rw-r--r--arch/arm/boot/dts/imx7d-sdb.dts2
-rw-r--r--arch/arm/boot/dts/integratorap.dts2
-rw-r--r--arch/arm/boot/dts/integratorcp.dts2
-rw-r--r--arch/arm/boot/dts/keystone.dtsi8
-rw-r--r--arch/arm/boot/dts/kirkwood-ib62x0.dts2
-rw-r--r--arch/arm/boot/dts/kirkwood-openrd.dtsi4
-rw-r--r--arch/arm/boot/dts/logicpd-som-lv.dtsi11
-rw-r--r--arch/arm/boot/dts/logicpd-torpedo-som.dtsi1
-rw-r--r--arch/arm/boot/dts/omap3-overo-base.dtsi4
-rw-r--r--arch/arm/boot/dts/omap3-overo-chestnut43-common.dtsi2
-rw-r--r--arch/arm/boot/dts/omap3-overo-tobi-common.dtsi2
-rw-r--r--arch/arm/boot/dts/omap3-overo-tobiduo-common.dtsi3
-rw-r--r--arch/arm/boot/dts/rk3066a.dtsi2
-rw-r--r--arch/arm/boot/dts/rk3288.dtsi2
-rw-r--r--arch/arm/boot/dts/rk3xxx.dtsi2
-rw-r--r--arch/arm/boot/dts/stih407-family.dtsi10
-rw-r--r--arch/arm/boot/dts/stih410.dtsi12
-rw-r--r--arch/arm/boot/dts/sun5i-a13.dtsi2
-rw-r--r--arch/arm/boot/dts/tegra114-dalmore.dts2
-rw-r--r--arch/arm/boot/dts/tegra114-roth.dts2
-rw-r--r--arch/arm/boot/dts/tegra114-tn7.dts2
-rw-r--r--arch/arm/common/locomo.c5
-rw-r--r--arch/arm/common/sa1111.c32
-rw-r--r--arch/arm/configs/aspeed_g4_defconfig2
-rw-r--r--arch/arm/configs/aspeed_g5_defconfig2
-rw-r--r--arch/arm/configs/keystone_defconfig1
-rw-r--r--arch/arm/configs/multi_v7_defconfig2
-rw-r--r--arch/arm/crypto/aes-ce-glue.c2
-rw-r--r--arch/arm/include/asm/dma-mapping.h2
-rw-r--r--arch/arm/include/asm/pgtable-2level-hwdef.h1
-rw-r--r--arch/arm/include/asm/pgtable-3level-hwdef.h1
-rw-r--r--arch/arm/include/asm/uaccess.h11
-rw-r--r--arch/arm/kernel/devtree.c14
-rw-r--r--arch/arm/kernel/entry-armv.S1
-rw-r--r--arch/arm/kernel/hyp-stub.S13
-rw-r--r--arch/arm/kernel/sys_oabi-compat.c8
-rw-r--r--arch/arm/kvm/arm.c8
-rw-r--r--arch/arm/kvm/mmu.c6
-rw-r--r--arch/arm/mach-clps711x/Kconfig2
-rw-r--r--arch/arm/mach-exynos/suspend.c6
-rw-r--r--arch/arm/mach-imx/gpc.c6
-rw-r--r--arch/arm/mach-imx/mach-imx6ul.c1
-rw-r--r--arch/arm/mach-imx/pm-imx6.c4
-rw-r--r--arch/arm/mach-mvebu/Makefile3
-rw-r--r--arch/arm/mach-omap2/cm33xx.c6
-rw-r--r--arch/arm/mach-omap2/cminst44xx.c6
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c8
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.h4
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c2
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c12
-rw-r--r--arch/arm/mach-oxnas/Kconfig2
-rw-r--r--arch/arm/mach-pxa/corgi.c1
-rw-r--r--arch/arm/mach-pxa/idp.c3
-rw-r--r--arch/arm/mach-pxa/lubbock.c14
-rw-r--r--arch/arm/mach-pxa/spitz.c1
-rw-r--r--arch/arm/mach-pxa/xcep.c3
-rw-r--r--arch/arm/mach-realview/Makefile3
-rw-r--r--arch/arm/mach-realview/core.c3
-rw-r--r--arch/arm/mach-s5pv210/Makefile2
-rw-r--r--arch/arm/mach-sa1100/clock.c5
-rw-r--r--arch/arm/mach-sa1100/generic.c4
-rw-r--r--arch/arm/mach-sa1100/generic.h2
-rw-r--r--arch/arm/mach-sa1100/pleb.c2
-rw-r--r--arch/arm/mach-shmobile/platsmp.c3
-rw-r--r--arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c62
-rw-r--r--arch/arm/mm/mmu.c23
-rw-r--r--arch/arm/mm/proc-v7.S1
-rw-r--r--arch/arm/xen/enlighten.c9
81 files changed, 271 insertions, 161 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2d601d769a1c..a9c4e48bb7ec 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -35,6 +35,7 @@ config ARM
35 select HARDIRQS_SW_RESEND 35 select HARDIRQS_SW_RESEND
36 select HAVE_ARCH_AUDITSYSCALL if (AEABI && !OABI_COMPAT) 36 select HAVE_ARCH_AUDITSYSCALL if (AEABI && !OABI_COMPAT)
37 select HAVE_ARCH_BITREVERSE if (CPU_32v7M || CPU_32v7) && !CPU_32v6 37 select HAVE_ARCH_BITREVERSE if (CPU_32v7M || CPU_32v7) && !CPU_32v6
38 select HAVE_ARCH_HARDENED_USERCOPY
38 select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL && !CPU_ENDIAN_BE32 && MMU 39 select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL && !CPU_ENDIAN_BE32 && MMU
39 select HAVE_ARCH_KGDB if !CPU_ENDIAN_BE32 && MMU 40 select HAVE_ARCH_KGDB if !CPU_ENDIAN_BE32 && MMU
40 select HAVE_ARCH_MMAP_RND_BITS if MMU 41 select HAVE_ARCH_MMAP_RND_BITS if MMU
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 56ea5c60b318..61f6ccc19cfa 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -260,12 +260,14 @@ machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
260platdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y))) 260platdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y)))
261 261
262ifneq ($(CONFIG_ARCH_MULTIPLATFORM),y) 262ifneq ($(CONFIG_ARCH_MULTIPLATFORM),y)
263ifneq ($(CONFIG_ARM_SINGLE_ARMV7M),y)
263ifeq ($(KBUILD_SRC),) 264ifeq ($(KBUILD_SRC),)
264KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(machdirs) $(platdirs)) 265KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(machdirs) $(platdirs))
265else 266else
266KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs) $(platdirs)) 267KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs) $(platdirs))
267endif 268endif
268endif 269endif
270endif
269 271
270export TEXT_OFFSET GZFLAGS MMUEXT 272export TEXT_OFFSET GZFLAGS MMUEXT
271 273
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index af11c2f8f3b7..fc6d541549a2 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -779,7 +779,7 @@ __armv7_mmu_cache_on:
779 orrne r0, r0, #1 @ MMU enabled 779 orrne r0, r0, #1 @ MMU enabled
780 movne r1, #0xfffffffd @ domain 0 = client 780 movne r1, #0xfffffffd @ domain 0 = client
781 bic r6, r6, #1 << 31 @ 32-bit translation system 781 bic r6, r6, #1 << 31 @ 32-bit translation system
782 bic r6, r6, #3 << 0 @ use only ttbr0 782 bic r6, r6, #(7 << 0) | (1 << 4) @ use only ttbr0
783 mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer 783 mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer
784 mcrne p15, 0, r1, c3, c0, 0 @ load domain access control 784 mcrne p15, 0, r1, c3, c0, 0 @ load domain access control
785 mcrne p15, 0, r6, c2, c0, 2 @ load ttb control 785 mcrne p15, 0, r6, c2, c0, 2 @ load ttb control
diff --git a/arch/arm/boot/dts/am335x-baltos.dtsi b/arch/arm/boot/dts/am335x-baltos.dtsi
index c8609d8d2c55..b689172632ef 100644
--- a/arch/arm/boot/dts/am335x-baltos.dtsi
+++ b/arch/arm/boot/dts/am335x-baltos.dtsi
@@ -226,7 +226,7 @@
226 226
227 #address-cells = <1>; 227 #address-cells = <1>;
228 #size-cells = <1>; 228 #size-cells = <1>;
229 elm_id = <&elm>; 229 ti,elm-id = <&elm>;
230 }; 230 };
231}; 231};
232 232
diff --git a/arch/arm/boot/dts/am335x-igep0033.dtsi b/arch/arm/boot/dts/am335x-igep0033.dtsi
index df63484ef9b3..e7d9ca1305fa 100644
--- a/arch/arm/boot/dts/am335x-igep0033.dtsi
+++ b/arch/arm/boot/dts/am335x-igep0033.dtsi
@@ -161,7 +161,7 @@
161 161
162 #address-cells = <1>; 162 #address-cells = <1>;
163 #size-cells = <1>; 163 #size-cells = <1>;
164 elm_id = <&elm>; 164 ti,elm-id = <&elm>;
165 165
166 /* MTD partition table */ 166 /* MTD partition table */
167 partition@0 { 167 partition@0 {
diff --git a/arch/arm/boot/dts/am335x-phycore-som.dtsi b/arch/arm/boot/dts/am335x-phycore-som.dtsi
index 86f773165d5c..1263c9d4cba3 100644
--- a/arch/arm/boot/dts/am335x-phycore-som.dtsi
+++ b/arch/arm/boot/dts/am335x-phycore-som.dtsi
@@ -197,7 +197,7 @@
197 gpmc,wr-access-ns = <30>; 197 gpmc,wr-access-ns = <30>;
198 gpmc,wr-data-mux-bus-ns = <0>; 198 gpmc,wr-data-mux-bus-ns = <0>;
199 199
200 elm_id = <&elm>; 200 ti,elm-id = <&elm>;
201 201
202 #address-cells = <1>; 202 #address-cells = <1>;
203 #size-cells = <1>; 203 #size-cells = <1>;
diff --git a/arch/arm/boot/dts/arm-realview-pbx-a9.dts b/arch/arm/boot/dts/arm-realview-pbx-a9.dts
index db808f92dd79..90d00b407f85 100644
--- a/arch/arm/boot/dts/arm-realview-pbx-a9.dts
+++ b/arch/arm/boot/dts/arm-realview-pbx-a9.dts
@@ -70,13 +70,12 @@
70 * associativity as these may be erroneously set 70 * associativity as these may be erroneously set
71 * up by boot loader(s). 71 * up by boot loader(s).
72 */ 72 */
73 cache-size = <1048576>; // 1MB 73 cache-size = <131072>; // 128KB
74 cache-sets = <4096>; 74 cache-sets = <512>;
75 cache-line-size = <32>; 75 cache-line-size = <32>;
76 arm,parity-disable; 76 arm,parity-disable;
77 arm,tag-latency = <1>; 77 arm,tag-latency = <1 1 1>;
78 arm,data-latency = <1 1>; 78 arm,data-latency = <1 1 1>;
79 arm,dirty-latency = <1>;
80 }; 79 };
81 80
82 scu: scu@1f000000 { 81 scu: scu@1f000000 {
diff --git a/arch/arm/boot/dts/armada-388-clearfog.dts b/arch/arm/boot/dts/armada-388-clearfog.dts
index 2e0556af6e5e..d3e6bd805006 100644
--- a/arch/arm/boot/dts/armada-388-clearfog.dts
+++ b/arch/arm/boot/dts/armada-388-clearfog.dts
@@ -390,12 +390,12 @@
390 390
391 port@0 { 391 port@0 {
392 reg = <0>; 392 reg = <0>;
393 label = "lan1"; 393 label = "lan5";
394 }; 394 };
395 395
396 port@1 { 396 port@1 {
397 reg = <1>; 397 reg = <1>;
398 label = "lan2"; 398 label = "lan4";
399 }; 399 };
400 400
401 port@2 { 401 port@2 {
@@ -405,12 +405,12 @@
405 405
406 port@3 { 406 port@3 {
407 reg = <3>; 407 reg = <3>;
408 label = "lan4"; 408 label = "lan2";
409 }; 409 };
410 410
411 port@4 { 411 port@4 {
412 reg = <4>; 412 reg = <4>;
413 label = "lan5"; 413 label = "lan1";
414 }; 414 };
415 415
416 port@5 { 416 port@5 {
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index caf2707680c1..e9b47b2bbc33 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -2,6 +2,7 @@
2 2
3/ { 3/ {
4 memory { 4 memory {
5 device_type = "memory";
5 reg = <0 0x10000000>; 6 reg = <0 0x10000000>;
6 }; 7 };
7 8
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
index b98252232d20..445624a1a1de 100644
--- a/arch/arm/boot/dts/bcm283x.dtsi
+++ b/arch/arm/boot/dts/bcm283x.dtsi
@@ -2,7 +2,6 @@
2#include <dt-bindings/clock/bcm2835.h> 2#include <dt-bindings/clock/bcm2835.h>
3#include <dt-bindings/clock/bcm2835-aux.h> 3#include <dt-bindings/clock/bcm2835-aux.h>
4#include <dt-bindings/gpio/gpio.h> 4#include <dt-bindings/gpio/gpio.h>
5#include "skeleton.dtsi"
6 5
7/* This include file covers the common peripherals and configuration between 6/* This include file covers the common peripherals and configuration between
8 * bcm2835 and bcm2836 implementations, leaving the CPU configuration to 7 * bcm2835 and bcm2836 implementations, leaving the CPU configuration to
@@ -13,6 +12,8 @@
13 compatible = "brcm,bcm2835"; 12 compatible = "brcm,bcm2835";
14 model = "BCM2835"; 13 model = "BCM2835";
15 interrupt-parent = <&intc>; 14 interrupt-parent = <&intc>;
15 #address-cells = <1>;
16 #size-cells = <1>;
16 17
17 chosen { 18 chosen {
18 bootargs = "earlyprintk console=ttyAMA0"; 19 bootargs = "earlyprintk console=ttyAMA0";
diff --git a/arch/arm/boot/dts/exynos5410-odroidxu.dts b/arch/arm/boot/dts/exynos5410-odroidxu.dts
index d9499310a301..f6d135245a4b 100644
--- a/arch/arm/boot/dts/exynos5410-odroidxu.dts
+++ b/arch/arm/boot/dts/exynos5410-odroidxu.dts
@@ -447,14 +447,11 @@
447 samsung,dw-mshc-ciu-div = <3>; 447 samsung,dw-mshc-ciu-div = <3>;
448 samsung,dw-mshc-sdr-timing = <0 4>; 448 samsung,dw-mshc-sdr-timing = <0 4>;
449 samsung,dw-mshc-ddr-timing = <0 2>; 449 samsung,dw-mshc-ddr-timing = <0 2>;
450 samsung,dw-mshc-hs400-timing = <0 2>;
451 samsung,read-strobe-delay = <90>;
452 pinctrl-names = "default"; 450 pinctrl-names = "default";
453 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8 &sd0_cd>; 451 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8 &sd0_cd>;
454 bus-width = <8>; 452 bus-width = <8>;
455 cap-mmc-highspeed; 453 cap-mmc-highspeed;
456 mmc-hs200-1_8v; 454 mmc-hs200-1_8v;
457 mmc-hs400-1_8v;
458 vmmc-supply = <&ldo20_reg>; 455 vmmc-supply = <&ldo20_reg>;
459 vqmmc-supply = <&ldo11_reg>; 456 vqmmc-supply = <&ldo11_reg>;
460}; 457};
diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index b620ac884cfd..b13b0b2db881 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -243,7 +243,7 @@
243 clocks = <&clks IMX6QDL_CLK_SPDIF_GCLK>, <&clks IMX6QDL_CLK_OSC>, 243 clocks = <&clks IMX6QDL_CLK_SPDIF_GCLK>, <&clks IMX6QDL_CLK_OSC>,
244 <&clks IMX6QDL_CLK_SPDIF>, <&clks IMX6QDL_CLK_ASRC>, 244 <&clks IMX6QDL_CLK_SPDIF>, <&clks IMX6QDL_CLK_ASRC>,
245 <&clks IMX6QDL_CLK_DUMMY>, <&clks IMX6QDL_CLK_ESAI_EXTAL>, 245 <&clks IMX6QDL_CLK_DUMMY>, <&clks IMX6QDL_CLK_ESAI_EXTAL>,
246 <&clks IMX6QDL_CLK_IPG>, <&clks IMX6QDL_CLK_MLB>, 246 <&clks IMX6QDL_CLK_IPG>, <&clks IMX6QDL_CLK_DUMMY>,
247 <&clks IMX6QDL_CLK_DUMMY>, <&clks IMX6QDL_CLK_SPBA>; 247 <&clks IMX6QDL_CLK_DUMMY>, <&clks IMX6QDL_CLK_SPBA>;
248 clock-names = "core", "rxtx0", 248 clock-names = "core", "rxtx0",
249 "rxtx1", "rxtx2", 249 "rxtx1", "rxtx2",
diff --git a/arch/arm/boot/dts/imx6sx-sabreauto.dts b/arch/arm/boot/dts/imx6sx-sabreauto.dts
index 96ea936eeeb0..240a2864d044 100644
--- a/arch/arm/boot/dts/imx6sx-sabreauto.dts
+++ b/arch/arm/boot/dts/imx6sx-sabreauto.dts
@@ -64,7 +64,7 @@
64 cd-gpios = <&gpio7 11 GPIO_ACTIVE_LOW>; 64 cd-gpios = <&gpio7 11 GPIO_ACTIVE_LOW>;
65 no-1-8-v; 65 no-1-8-v;
66 keep-power-in-suspend; 66 keep-power-in-suspend;
67 enable-sdio-wakup; 67 wakeup-source;
68 status = "okay"; 68 status = "okay";
69}; 69};
70 70
diff --git a/arch/arm/boot/dts/imx7d-sdb.dts b/arch/arm/boot/dts/imx7d-sdb.dts
index 95ee268ed510..2f33c463cbce 100644
--- a/arch/arm/boot/dts/imx7d-sdb.dts
+++ b/arch/arm/boot/dts/imx7d-sdb.dts
@@ -131,7 +131,7 @@
131 ti,y-min = /bits/ 16 <0>; 131 ti,y-min = /bits/ 16 <0>;
132 ti,y-max = /bits/ 16 <0>; 132 ti,y-max = /bits/ 16 <0>;
133 ti,pressure-max = /bits/ 16 <0>; 133 ti,pressure-max = /bits/ 16 <0>;
134 ti,x-plat-ohms = /bits/ 16 <400>; 134 ti,x-plate-ohms = /bits/ 16 <400>;
135 wakeup-source; 135 wakeup-source;
136 }; 136 };
137}; 137};
diff --git a/arch/arm/boot/dts/integratorap.dts b/arch/arm/boot/dts/integratorap.dts
index cf06e32ee108..4b34b54e09a1 100644
--- a/arch/arm/boot/dts/integratorap.dts
+++ b/arch/arm/boot/dts/integratorap.dts
@@ -42,7 +42,7 @@
42 }; 42 };
43 43
44 syscon { 44 syscon {
45 compatible = "arm,integrator-ap-syscon"; 45 compatible = "arm,integrator-ap-syscon", "syscon";
46 reg = <0x11000000 0x100>; 46 reg = <0x11000000 0x100>;
47 interrupt-parent = <&pic>; 47 interrupt-parent = <&pic>;
48 /* These are the logical module IRQs */ 48 /* These are the logical module IRQs */
diff --git a/arch/arm/boot/dts/integratorcp.dts b/arch/arm/boot/dts/integratorcp.dts
index d43f15b4f79a..79430fbfec3b 100644
--- a/arch/arm/boot/dts/integratorcp.dts
+++ b/arch/arm/boot/dts/integratorcp.dts
@@ -94,7 +94,7 @@
94 }; 94 };
95 95
96 syscon { 96 syscon {
97 compatible = "arm,integrator-cp-syscon"; 97 compatible = "arm,integrator-cp-syscon", "syscon";
98 reg = <0xcb000000 0x100>; 98 reg = <0xcb000000 0x100>;
99 }; 99 };
100 100
diff --git a/arch/arm/boot/dts/keystone.dtsi b/arch/arm/boot/dts/keystone.dtsi
index 00cb314d5e4d..e23f46d15c80 100644
--- a/arch/arm/boot/dts/keystone.dtsi
+++ b/arch/arm/boot/dts/keystone.dtsi
@@ -70,14 +70,6 @@
70 cpu_on = <0x84000003>; 70 cpu_on = <0x84000003>;
71 }; 71 };
72 72
73 psci {
74 compatible = "arm,psci";
75 method = "smc";
76 cpu_suspend = <0x84000001>;
77 cpu_off = <0x84000002>;
78 cpu_on = <0x84000003>;
79 };
80
81 soc { 73 soc {
82 #address-cells = <1>; 74 #address-cells = <1>;
83 #size-cells = <1>; 75 #size-cells = <1>;
diff --git a/arch/arm/boot/dts/kirkwood-ib62x0.dts b/arch/arm/boot/dts/kirkwood-ib62x0.dts
index ef84d8699a76..5bf62897014c 100644
--- a/arch/arm/boot/dts/kirkwood-ib62x0.dts
+++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts
@@ -113,7 +113,7 @@
113 113
114 partition@e0000 { 114 partition@e0000 {
115 label = "u-boot environment"; 115 label = "u-boot environment";
116 reg = <0xe0000 0x100000>; 116 reg = <0xe0000 0x20000>;
117 }; 117 };
118 118
119 partition@100000 { 119 partition@100000 {
diff --git a/arch/arm/boot/dts/kirkwood-openrd.dtsi b/arch/arm/boot/dts/kirkwood-openrd.dtsi
index e4ecab112601..7175511a92da 100644
--- a/arch/arm/boot/dts/kirkwood-openrd.dtsi
+++ b/arch/arm/boot/dts/kirkwood-openrd.dtsi
@@ -116,6 +116,10 @@
116 }; 116 };
117}; 117};
118 118
119&pciec {
120 status = "okay";
121};
122
119&pcie0 { 123&pcie0 {
120 status = "okay"; 124 status = "okay";
121}; 125};
diff --git a/arch/arm/boot/dts/logicpd-som-lv.dtsi b/arch/arm/boot/dts/logicpd-som-lv.dtsi
index 365f39ff58bb..0ff1c2de95bf 100644
--- a/arch/arm/boot/dts/logicpd-som-lv.dtsi
+++ b/arch/arm/boot/dts/logicpd-som-lv.dtsi
@@ -35,10 +35,15 @@
35 ranges = <0 0 0x00000000 0x1000000>; /* CS0: 16MB for NAND */ 35 ranges = <0 0 0x00000000 0x1000000>; /* CS0: 16MB for NAND */
36 36
37 nand@0,0 { 37 nand@0,0 {
38 linux,mtd-name = "micron,mt29f4g16abbda3w"; 38 compatible = "ti,omap2-nand";
39 reg = <0 0 4>; /* CS0, offset 0, IO size 4 */ 39 reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
40 interrupt-parent = <&gpmc>;
41 interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
42 <1 IRQ_TYPE_NONE>; /* termcount */
43 linux,mtd-name = "micron,mt29f4g16abbda3w";
40 nand-bus-width = <16>; 44 nand-bus-width = <16>;
41 ti,nand-ecc-opt = "bch8"; 45 ti,nand-ecc-opt = "bch8";
46 rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
42 gpmc,sync-clk-ps = <0>; 47 gpmc,sync-clk-ps = <0>;
43 gpmc,cs-on-ns = <0>; 48 gpmc,cs-on-ns = <0>;
44 gpmc,cs-rd-off-ns = <44>; 49 gpmc,cs-rd-off-ns = <44>;
@@ -54,10 +59,6 @@
54 gpmc,wr-access-ns = <40>; 59 gpmc,wr-access-ns = <40>;
55 gpmc,wr-data-mux-bus-ns = <0>; 60 gpmc,wr-data-mux-bus-ns = <0>;
56 gpmc,device-width = <2>; 61 gpmc,device-width = <2>;
57
58 gpmc,page-burst-access-ns = <5>;
59 gpmc,cycle2cycle-delay-ns = <50>;
60
61 #address-cells = <1>; 62 #address-cells = <1>;
62 #size-cells = <1>; 63 #size-cells = <1>;
63 64
diff --git a/arch/arm/boot/dts/logicpd-torpedo-som.dtsi b/arch/arm/boot/dts/logicpd-torpedo-som.dtsi
index 5e9a13c0eaf7..1c2c74655416 100644
--- a/arch/arm/boot/dts/logicpd-torpedo-som.dtsi
+++ b/arch/arm/boot/dts/logicpd-torpedo-som.dtsi
@@ -46,6 +46,7 @@
46 linux,mtd-name = "micron,mt29f4g16abbda3w"; 46 linux,mtd-name = "micron,mt29f4g16abbda3w";
47 nand-bus-width = <16>; 47 nand-bus-width = <16>;
48 ti,nand-ecc-opt = "bch8"; 48 ti,nand-ecc-opt = "bch8";
49 rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
49 gpmc,sync-clk-ps = <0>; 50 gpmc,sync-clk-ps = <0>;
50 gpmc,cs-on-ns = <0>; 51 gpmc,cs-on-ns = <0>;
51 gpmc,cs-rd-off-ns = <44>; 52 gpmc,cs-rd-off-ns = <44>;
diff --git a/arch/arm/boot/dts/omap3-overo-base.dtsi b/arch/arm/boot/dts/omap3-overo-base.dtsi
index de256fa8da48..3e946cac55f3 100644
--- a/arch/arm/boot/dts/omap3-overo-base.dtsi
+++ b/arch/arm/boot/dts/omap3-overo-base.dtsi
@@ -223,7 +223,9 @@
223}; 223};
224 224
225&gpmc { 225&gpmc {
226 ranges = <0 0 0x00000000 0x20000000>; 226 ranges = <0 0 0x30000000 0x1000000>, /* CS0 */
227 <4 0 0x2b000000 0x1000000>, /* CS4 */
228 <5 0 0x2c000000 0x1000000>; /* CS5 */
227 229
228 nand@0,0 { 230 nand@0,0 {
229 compatible = "ti,omap2-nand"; 231 compatible = "ti,omap2-nand";
diff --git a/arch/arm/boot/dts/omap3-overo-chestnut43-common.dtsi b/arch/arm/boot/dts/omap3-overo-chestnut43-common.dtsi
index 7df27926ead2..4f4c6efbd518 100644
--- a/arch/arm/boot/dts/omap3-overo-chestnut43-common.dtsi
+++ b/arch/arm/boot/dts/omap3-overo-chestnut43-common.dtsi
@@ -55,8 +55,6 @@
55#include "omap-gpmc-smsc9221.dtsi" 55#include "omap-gpmc-smsc9221.dtsi"
56 56
57&gpmc { 57&gpmc {
58 ranges = <5 0 0x2c000000 0x1000000>; /* CS5 */
59
60 ethernet@gpmc { 58 ethernet@gpmc {
61 reg = <5 0 0xff>; 59 reg = <5 0 0xff>;
62 interrupt-parent = <&gpio6>; 60 interrupt-parent = <&gpio6>;
diff --git a/arch/arm/boot/dts/omap3-overo-tobi-common.dtsi b/arch/arm/boot/dts/omap3-overo-tobi-common.dtsi
index 9e24b6a1d07b..1b304e2f1bd2 100644
--- a/arch/arm/boot/dts/omap3-overo-tobi-common.dtsi
+++ b/arch/arm/boot/dts/omap3-overo-tobi-common.dtsi
@@ -27,8 +27,6 @@
27#include "omap-gpmc-smsc9221.dtsi" 27#include "omap-gpmc-smsc9221.dtsi"
28 28
29&gpmc { 29&gpmc {
30 ranges = <5 0 0x2c000000 0x1000000>; /* CS5 */
31
32 ethernet@gpmc { 30 ethernet@gpmc {
33 reg = <5 0 0xff>; 31 reg = <5 0 0xff>;
34 interrupt-parent = <&gpio6>; 32 interrupt-parent = <&gpio6>;
diff --git a/arch/arm/boot/dts/omap3-overo-tobiduo-common.dtsi b/arch/arm/boot/dts/omap3-overo-tobiduo-common.dtsi
index 334109e14613..82e98ee3023a 100644
--- a/arch/arm/boot/dts/omap3-overo-tobiduo-common.dtsi
+++ b/arch/arm/boot/dts/omap3-overo-tobiduo-common.dtsi
@@ -15,9 +15,6 @@
15#include "omap-gpmc-smsc9221.dtsi" 15#include "omap-gpmc-smsc9221.dtsi"
16 16
17&gpmc { 17&gpmc {
18 ranges = <4 0 0x2b000000 0x1000000>, /* CS4 */
19 <5 0 0x2c000000 0x1000000>; /* CS5 */
20
21 smsc1: ethernet@gpmc { 18 smsc1: ethernet@gpmc {
22 reg = <5 0 0xff>; 19 reg = <5 0 0xff>;
23 interrupt-parent = <&gpio6>; 20 interrupt-parent = <&gpio6>;
diff --git a/arch/arm/boot/dts/rk3066a.dtsi b/arch/arm/boot/dts/rk3066a.dtsi
index c0ba86c3a2ab..0d0dae3a1694 100644
--- a/arch/arm/boot/dts/rk3066a.dtsi
+++ b/arch/arm/boot/dts/rk3066a.dtsi
@@ -197,6 +197,8 @@
197 clock-names = "saradc", "apb_pclk"; 197 clock-names = "saradc", "apb_pclk";
198 interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; 198 interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
199 #io-channel-cells = <1>; 199 #io-channel-cells = <1>;
200 resets = <&cru SRST_SARADC>;
201 reset-names = "saradc-apb";
200 status = "disabled"; 202 status = "disabled";
201 }; 203 };
202 204
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index cd33f0170890..91c4b3c7a8d5 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -279,6 +279,8 @@
279 #io-channel-cells = <1>; 279 #io-channel-cells = <1>;
280 clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>; 280 clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
281 clock-names = "saradc", "apb_pclk"; 281 clock-names = "saradc", "apb_pclk";
282 resets = <&cru SRST_SARADC>;
283 reset-names = "saradc-apb";
282 status = "disabled"; 284 status = "disabled";
283 }; 285 };
284 286
diff --git a/arch/arm/boot/dts/rk3xxx.dtsi b/arch/arm/boot/dts/rk3xxx.dtsi
index 99bbcc2c9b89..e2cd683b4e4b 100644
--- a/arch/arm/boot/dts/rk3xxx.dtsi
+++ b/arch/arm/boot/dts/rk3xxx.dtsi
@@ -399,6 +399,8 @@
399 #io-channel-cells = <1>; 399 #io-channel-cells = <1>;
400 clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>; 400 clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
401 clock-names = "saradc", "apb_pclk"; 401 clock-names = "saradc", "apb_pclk";
402 resets = <&cru SRST_SARADC>;
403 reset-names = "saradc-apb";
402 status = "disabled"; 404 status = "disabled";
403 }; 405 };
404 406
diff --git a/arch/arm/boot/dts/stih407-family.dtsi b/arch/arm/boot/dts/stih407-family.dtsi
index 9f88086b8c24..29aad8783001 100644
--- a/arch/arm/boot/dts/stih407-family.dtsi
+++ b/arch/arm/boot/dts/stih407-family.dtsi
@@ -550,8 +550,9 @@
550 interrupt-names = "mmcirq"; 550 interrupt-names = "mmcirq";
551 pinctrl-names = "default"; 551 pinctrl-names = "default";
552 pinctrl-0 = <&pinctrl_mmc0>; 552 pinctrl-0 = <&pinctrl_mmc0>;
553 clock-names = "mmc"; 553 clock-names = "mmc", "icn";
554 clocks = <&clk_s_c0_flexgen CLK_MMC_0>; 554 clocks = <&clk_s_c0_flexgen CLK_MMC_0>,
555 <&clk_s_c0_flexgen CLK_RX_ICN_HVA>;
555 bus-width = <8>; 556 bus-width = <8>;
556 non-removable; 557 non-removable;
557 }; 558 };
@@ -565,8 +566,9 @@
565 interrupt-names = "mmcirq"; 566 interrupt-names = "mmcirq";
566 pinctrl-names = "default"; 567 pinctrl-names = "default";
567 pinctrl-0 = <&pinctrl_sd1>; 568 pinctrl-0 = <&pinctrl_sd1>;
568 clock-names = "mmc"; 569 clock-names = "mmc", "icn";
569 clocks = <&clk_s_c0_flexgen CLK_MMC_1>; 570 clocks = <&clk_s_c0_flexgen CLK_MMC_1>,
571 <&clk_s_c0_flexgen CLK_RX_ICN_HVA>;
570 resets = <&softreset STIH407_MMC1_SOFTRESET>; 572 resets = <&softreset STIH407_MMC1_SOFTRESET>;
571 bus-width = <4>; 573 bus-width = <4>;
572 }; 574 };
diff --git a/arch/arm/boot/dts/stih410.dtsi b/arch/arm/boot/dts/stih410.dtsi
index 18ed1ad10d32..40318869c733 100644
--- a/arch/arm/boot/dts/stih410.dtsi
+++ b/arch/arm/boot/dts/stih410.dtsi
@@ -41,7 +41,8 @@
41 compatible = "st,st-ohci-300x"; 41 compatible = "st,st-ohci-300x";
42 reg = <0x9a03c00 0x100>; 42 reg = <0x9a03c00 0x100>;
43 interrupts = <GIC_SPI 180 IRQ_TYPE_NONE>; 43 interrupts = <GIC_SPI 180 IRQ_TYPE_NONE>;
44 clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>; 44 clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>,
45 <&clk_s_c0_flexgen CLK_RX_ICN_DISP_0>;
45 resets = <&powerdown STIH407_USB2_PORT0_POWERDOWN>, 46 resets = <&powerdown STIH407_USB2_PORT0_POWERDOWN>,
46 <&softreset STIH407_USB2_PORT0_SOFTRESET>; 47 <&softreset STIH407_USB2_PORT0_SOFTRESET>;
47 reset-names = "power", "softreset"; 48 reset-names = "power", "softreset";
@@ -57,7 +58,8 @@
57 interrupts = <GIC_SPI 151 IRQ_TYPE_NONE>; 58 interrupts = <GIC_SPI 151 IRQ_TYPE_NONE>;
58 pinctrl-names = "default"; 59 pinctrl-names = "default";
59 pinctrl-0 = <&pinctrl_usb0>; 60 pinctrl-0 = <&pinctrl_usb0>;
60 clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>; 61 clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>,
62 <&clk_s_c0_flexgen CLK_RX_ICN_DISP_0>;
61 resets = <&powerdown STIH407_USB2_PORT0_POWERDOWN>, 63 resets = <&powerdown STIH407_USB2_PORT0_POWERDOWN>,
62 <&softreset STIH407_USB2_PORT0_SOFTRESET>; 64 <&softreset STIH407_USB2_PORT0_SOFTRESET>;
63 reset-names = "power", "softreset"; 65 reset-names = "power", "softreset";
@@ -71,7 +73,8 @@
71 compatible = "st,st-ohci-300x"; 73 compatible = "st,st-ohci-300x";
72 reg = <0x9a83c00 0x100>; 74 reg = <0x9a83c00 0x100>;
73 interrupts = <GIC_SPI 181 IRQ_TYPE_NONE>; 75 interrupts = <GIC_SPI 181 IRQ_TYPE_NONE>;
74 clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>; 76 clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>,
77 <&clk_s_c0_flexgen CLK_RX_ICN_DISP_0>;
75 resets = <&powerdown STIH407_USB2_PORT1_POWERDOWN>, 78 resets = <&powerdown STIH407_USB2_PORT1_POWERDOWN>,
76 <&softreset STIH407_USB2_PORT1_SOFTRESET>; 79 <&softreset STIH407_USB2_PORT1_SOFTRESET>;
77 reset-names = "power", "softreset"; 80 reset-names = "power", "softreset";
@@ -87,7 +90,8 @@
87 interrupts = <GIC_SPI 153 IRQ_TYPE_NONE>; 90 interrupts = <GIC_SPI 153 IRQ_TYPE_NONE>;
88 pinctrl-names = "default"; 91 pinctrl-names = "default";
89 pinctrl-0 = <&pinctrl_usb1>; 92 pinctrl-0 = <&pinctrl_usb1>;
90 clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>; 93 clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>,
94 <&clk_s_c0_flexgen CLK_RX_ICN_DISP_0>;
91 resets = <&powerdown STIH407_USB2_PORT1_POWERDOWN>, 95 resets = <&powerdown STIH407_USB2_PORT1_POWERDOWN>,
92 <&softreset STIH407_USB2_PORT1_SOFTRESET>; 96 <&softreset STIH407_USB2_PORT1_SOFTRESET>;
93 reset-names = "power", "softreset"; 97 reset-names = "power", "softreset";
diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
index e012890e0cf2..a17ba0243db3 100644
--- a/arch/arm/boot/dts/sun5i-a13.dtsi
+++ b/arch/arm/boot/dts/sun5i-a13.dtsi
@@ -84,7 +84,7 @@
84 trips { 84 trips {
85 cpu_alert0: cpu_alert0 { 85 cpu_alert0: cpu_alert0 {
86 /* milliCelsius */ 86 /* milliCelsius */
87 temperature = <850000>; 87 temperature = <85000>;
88 hysteresis = <2000>; 88 hysteresis = <2000>;
89 type = "passive"; 89 type = "passive";
90 }; 90 };
diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts
index 1dfc492cc004..1444fbd543e7 100644
--- a/arch/arm/boot/dts/tegra114-dalmore.dts
+++ b/arch/arm/boot/dts/tegra114-dalmore.dts
@@ -897,7 +897,7 @@
897 palmas: tps65913@58 { 897 palmas: tps65913@58 {
898 compatible = "ti,palmas"; 898 compatible = "ti,palmas";
899 reg = <0x58>; 899 reg = <0x58>;
900 interrupts = <0 86 IRQ_TYPE_LEVEL_LOW>; 900 interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
901 901
902 #interrupt-cells = <2>; 902 #interrupt-cells = <2>;
903 interrupt-controller; 903 interrupt-controller;
diff --git a/arch/arm/boot/dts/tegra114-roth.dts b/arch/arm/boot/dts/tegra114-roth.dts
index 70cf40996c3f..966a7fc044af 100644
--- a/arch/arm/boot/dts/tegra114-roth.dts
+++ b/arch/arm/boot/dts/tegra114-roth.dts
@@ -802,7 +802,7 @@
802 palmas: pmic@58 { 802 palmas: pmic@58 {
803 compatible = "ti,palmas"; 803 compatible = "ti,palmas";
804 reg = <0x58>; 804 reg = <0x58>;
805 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_LOW>; 805 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
806 806
807 #interrupt-cells = <2>; 807 #interrupt-cells = <2>;
808 interrupt-controller; 808 interrupt-controller;
diff --git a/arch/arm/boot/dts/tegra114-tn7.dts b/arch/arm/boot/dts/tegra114-tn7.dts
index 17dd14545862..a161fa1dfb61 100644
--- a/arch/arm/boot/dts/tegra114-tn7.dts
+++ b/arch/arm/boot/dts/tegra114-tn7.dts
@@ -63,7 +63,7 @@
63 palmas: pmic@58 { 63 palmas: pmic@58 {
64 compatible = "ti,palmas"; 64 compatible = "ti,palmas";
65 reg = <0x58>; 65 reg = <0x58>;
66 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_LOW>; 66 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
67 67
68 #interrupt-cells = <2>; 68 #interrupt-cells = <2>;
69 interrupt-controller; 69 interrupt-controller;
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index 0e97b4b871f9..6c7b06854fce 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -140,7 +140,7 @@ static struct locomo_dev_info locomo_devices[] = {
140 140
141static void locomo_handler(struct irq_desc *desc) 141static void locomo_handler(struct irq_desc *desc)
142{ 142{
143 struct locomo *lchip = irq_desc_get_chip_data(desc); 143 struct locomo *lchip = irq_desc_get_handler_data(desc);
144 int req, i; 144 int req, i;
145 145
146 /* Acknowledge the parent IRQ */ 146 /* Acknowledge the parent IRQ */
@@ -200,8 +200,7 @@ static void locomo_setup_irq(struct locomo *lchip)
200 * Install handler for IRQ_LOCOMO_HW. 200 * Install handler for IRQ_LOCOMO_HW.
201 */ 201 */
202 irq_set_irq_type(lchip->irq, IRQ_TYPE_EDGE_FALLING); 202 irq_set_irq_type(lchip->irq, IRQ_TYPE_EDGE_FALLING);
203 irq_set_chip_data(lchip->irq, lchip); 203 irq_set_chained_handler_and_data(lchip->irq, locomo_handler, lchip);
204 irq_set_chained_handler(lchip->irq, locomo_handler);
205 204
206 /* Install handlers for IRQ_LOCOMO_* */ 205 /* Install handlers for IRQ_LOCOMO_* */
207 for ( ; irq <= lchip->irq_base + 3; irq++) { 206 for ( ; irq <= lchip->irq_base + 3; irq++) {
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index fb0a0a4dfea4..2e076c492005 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -472,8 +472,8 @@ static int sa1111_setup_irq(struct sa1111 *sachip, unsigned irq_base)
472 * specifies that S0ReadyInt and S1ReadyInt should be '1'. 472 * specifies that S0ReadyInt and S1ReadyInt should be '1'.
473 */ 473 */
474 sa1111_writel(0, irqbase + SA1111_INTPOL0); 474 sa1111_writel(0, irqbase + SA1111_INTPOL0);
475 sa1111_writel(SA1111_IRQMASK_HI(IRQ_S0_READY_NINT) | 475 sa1111_writel(BIT(IRQ_S0_READY_NINT & 31) |
476 SA1111_IRQMASK_HI(IRQ_S1_READY_NINT), 476 BIT(IRQ_S1_READY_NINT & 31),
477 irqbase + SA1111_INTPOL1); 477 irqbase + SA1111_INTPOL1);
478 478
479 /* clear all IRQs */ 479 /* clear all IRQs */
@@ -754,7 +754,7 @@ static int __sa1111_probe(struct device *me, struct resource *mem, int irq)
754 if (sachip->irq != NO_IRQ) { 754 if (sachip->irq != NO_IRQ) {
755 ret = sa1111_setup_irq(sachip, pd->irq_base); 755 ret = sa1111_setup_irq(sachip, pd->irq_base);
756 if (ret) 756 if (ret)
757 goto err_unmap; 757 goto err_clk;
758 } 758 }
759 759
760#ifdef CONFIG_ARCH_SA1100 760#ifdef CONFIG_ARCH_SA1100
@@ -799,6 +799,8 @@ static int __sa1111_probe(struct device *me, struct resource *mem, int irq)
799 799
800 return 0; 800 return 0;
801 801
802 err_clk:
803 clk_disable(sachip->clk);
802 err_unmap: 804 err_unmap:
803 iounmap(sachip->base); 805 iounmap(sachip->base);
804 err_clk_unprep: 806 err_clk_unprep:
@@ -869,9 +871,9 @@ struct sa1111_save_data {
869 871
870#ifdef CONFIG_PM 872#ifdef CONFIG_PM
871 873
872static int sa1111_suspend(struct platform_device *dev, pm_message_t state) 874static int sa1111_suspend_noirq(struct device *dev)
873{ 875{
874 struct sa1111 *sachip = platform_get_drvdata(dev); 876 struct sa1111 *sachip = dev_get_drvdata(dev);
875 struct sa1111_save_data *save; 877 struct sa1111_save_data *save;
876 unsigned long flags; 878 unsigned long flags;
877 unsigned int val; 879 unsigned int val;
@@ -934,9 +936,9 @@ static int sa1111_suspend(struct platform_device *dev, pm_message_t state)
934 * restored by their respective drivers, and must be called 936 * restored by their respective drivers, and must be called
935 * via LDM after this function. 937 * via LDM after this function.
936 */ 938 */
937static int sa1111_resume(struct platform_device *dev) 939static int sa1111_resume_noirq(struct device *dev)
938{ 940{
939 struct sa1111 *sachip = platform_get_drvdata(dev); 941 struct sa1111 *sachip = dev_get_drvdata(dev);
940 struct sa1111_save_data *save; 942 struct sa1111_save_data *save;
941 unsigned long flags, id; 943 unsigned long flags, id;
942 void __iomem *base; 944 void __iomem *base;
@@ -952,7 +954,7 @@ static int sa1111_resume(struct platform_device *dev)
952 id = sa1111_readl(sachip->base + SA1111_SKID); 954 id = sa1111_readl(sachip->base + SA1111_SKID);
953 if ((id & SKID_ID_MASK) != SKID_SA1111_ID) { 955 if ((id & SKID_ID_MASK) != SKID_SA1111_ID) {
954 __sa1111_remove(sachip); 956 __sa1111_remove(sachip);
955 platform_set_drvdata(dev, NULL); 957 dev_set_drvdata(dev, NULL);
956 kfree(save); 958 kfree(save);
957 return 0; 959 return 0;
958 } 960 }
@@ -1003,8 +1005,8 @@ static int sa1111_resume(struct platform_device *dev)
1003} 1005}
1004 1006
1005#else 1007#else
1006#define sa1111_suspend NULL 1008#define sa1111_suspend_noirq NULL
1007#define sa1111_resume NULL 1009#define sa1111_resume_noirq NULL
1008#endif 1010#endif
1009 1011
1010static int sa1111_probe(struct platform_device *pdev) 1012static int sa1111_probe(struct platform_device *pdev)
@@ -1017,7 +1019,7 @@ static int sa1111_probe(struct platform_device *pdev)
1017 return -EINVAL; 1019 return -EINVAL;
1018 irq = platform_get_irq(pdev, 0); 1020 irq = platform_get_irq(pdev, 0);
1019 if (irq < 0) 1021 if (irq < 0)
1020 return -ENXIO; 1022 return irq;
1021 1023
1022 return __sa1111_probe(&pdev->dev, mem, irq); 1024 return __sa1111_probe(&pdev->dev, mem, irq);
1023} 1025}
@@ -1038,6 +1040,11 @@ static int sa1111_remove(struct platform_device *pdev)
1038 return 0; 1040 return 0;
1039} 1041}
1040 1042
1043static struct dev_pm_ops sa1111_pm_ops = {
1044 .suspend_noirq = sa1111_suspend_noirq,
1045 .resume_noirq = sa1111_resume_noirq,
1046};
1047
1041/* 1048/*
1042 * Not sure if this should be on the system bus or not yet. 1049 * Not sure if this should be on the system bus or not yet.
1043 * We really want some way to register a system device at 1050 * We really want some way to register a system device at
@@ -1050,10 +1057,9 @@ static int sa1111_remove(struct platform_device *pdev)
1050static struct platform_driver sa1111_device_driver = { 1057static struct platform_driver sa1111_device_driver = {
1051 .probe = sa1111_probe, 1058 .probe = sa1111_probe,
1052 .remove = sa1111_remove, 1059 .remove = sa1111_remove,
1053 .suspend = sa1111_suspend,
1054 .resume = sa1111_resume,
1055 .driver = { 1060 .driver = {
1056 .name = "sa1111", 1061 .name = "sa1111",
1062 .pm = &sa1111_pm_ops,
1057 }, 1063 },
1058}; 1064};
1059 1065
diff --git a/arch/arm/configs/aspeed_g4_defconfig b/arch/arm/configs/aspeed_g4_defconfig
index b6e54ee9bdbd..ca39c04fec6b 100644
--- a/arch/arm/configs/aspeed_g4_defconfig
+++ b/arch/arm/configs/aspeed_g4_defconfig
@@ -58,7 +58,7 @@ CONFIG_SERIAL_OF_PLATFORM=y
58# CONFIG_IOMMU_SUPPORT is not set 58# CONFIG_IOMMU_SUPPORT is not set
59CONFIG_FIRMWARE_MEMMAP=y 59CONFIG_FIRMWARE_MEMMAP=y
60CONFIG_FANOTIFY=y 60CONFIG_FANOTIFY=y
61CONFIG_PRINTK_TIME=1 61CONFIG_PRINTK_TIME=y
62CONFIG_DYNAMIC_DEBUG=y 62CONFIG_DYNAMIC_DEBUG=y
63CONFIG_STRIP_ASM_SYMS=y 63CONFIG_STRIP_ASM_SYMS=y
64CONFIG_PAGE_POISONING=y 64CONFIG_PAGE_POISONING=y
diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig
index 892605167357..4f366b0370e9 100644
--- a/arch/arm/configs/aspeed_g5_defconfig
+++ b/arch/arm/configs/aspeed_g5_defconfig
@@ -59,7 +59,7 @@ CONFIG_SERIAL_OF_PLATFORM=y
59# CONFIG_IOMMU_SUPPORT is not set 59# CONFIG_IOMMU_SUPPORT is not set
60CONFIG_FIRMWARE_MEMMAP=y 60CONFIG_FIRMWARE_MEMMAP=y
61CONFIG_FANOTIFY=y 61CONFIG_FANOTIFY=y
62CONFIG_PRINTK_TIME=1 62CONFIG_PRINTK_TIME=y
63CONFIG_DYNAMIC_DEBUG=y 63CONFIG_DYNAMIC_DEBUG=y
64CONFIG_STRIP_ASM_SYMS=y 64CONFIG_STRIP_ASM_SYMS=y
65CONFIG_PAGE_POISONING=y 65CONFIG_PAGE_POISONING=y
diff --git a/arch/arm/configs/keystone_defconfig b/arch/arm/configs/keystone_defconfig
index 71b42e66488a..78cd2f197e01 100644
--- a/arch/arm/configs/keystone_defconfig
+++ b/arch/arm/configs/keystone_defconfig
@@ -161,6 +161,7 @@ CONFIG_USB_MON=y
161CONFIG_USB_XHCI_HCD=y 161CONFIG_USB_XHCI_HCD=y
162CONFIG_USB_STORAGE=y 162CONFIG_USB_STORAGE=y
163CONFIG_USB_DWC3=y 163CONFIG_USB_DWC3=y
164CONFIG_NOP_USB_XCEIV=y
164CONFIG_KEYSTONE_USB_PHY=y 165CONFIG_KEYSTONE_USB_PHY=y
165CONFIG_NEW_LEDS=y 166CONFIG_NEW_LEDS=y
166CONFIG_LEDS_CLASS=y 167CONFIG_LEDS_CLASS=y
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 2c8665cd9dc5..ea3566fb92e2 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -781,7 +781,7 @@ CONFIG_MXS_DMA=y
781CONFIG_DMA_BCM2835=y 781CONFIG_DMA_BCM2835=y
782CONFIG_DMA_OMAP=y 782CONFIG_DMA_OMAP=y
783CONFIG_QCOM_BAM_DMA=y 783CONFIG_QCOM_BAM_DMA=y
784CONFIG_XILINX_VDMA=y 784CONFIG_XILINX_DMA=y
785CONFIG_DMA_SUN6I=y 785CONFIG_DMA_SUN6I=y
786CONFIG_STAGING=y 786CONFIG_STAGING=y
787CONFIG_SENSORS_ISL29018=y 787CONFIG_SENSORS_ISL29018=y
diff --git a/arch/arm/crypto/aes-ce-glue.c b/arch/arm/crypto/aes-ce-glue.c
index da3c0428507b..aef022a87c53 100644
--- a/arch/arm/crypto/aes-ce-glue.c
+++ b/arch/arm/crypto/aes-ce-glue.c
@@ -284,7 +284,7 @@ static int ctr_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst,
284 err = blkcipher_walk_done(desc, &walk, 284 err = blkcipher_walk_done(desc, &walk,
285 walk.nbytes % AES_BLOCK_SIZE); 285 walk.nbytes % AES_BLOCK_SIZE);
286 } 286 }
287 if (nbytes) { 287 if (walk.nbytes % AES_BLOCK_SIZE) {
288 u8 *tdst = walk.dst.virt.addr + blocks * AES_BLOCK_SIZE; 288 u8 *tdst = walk.dst.virt.addr + blocks * AES_BLOCK_SIZE;
289 u8 *tsrc = walk.src.virt.addr + blocks * AES_BLOCK_SIZE; 289 u8 *tsrc = walk.src.virt.addr + blocks * AES_BLOCK_SIZE;
290 u8 __aligned(8) tail[AES_BLOCK_SIZE]; 290 u8 __aligned(8) tail[AES_BLOCK_SIZE];
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index d009f7911ffc..bf02dbd9ccda 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -111,7 +111,7 @@ static inline dma_addr_t virt_to_dma(struct device *dev, void *addr)
111/* The ARM override for dma_max_pfn() */ 111/* The ARM override for dma_max_pfn() */
112static inline unsigned long dma_max_pfn(struct device *dev) 112static inline unsigned long dma_max_pfn(struct device *dev)
113{ 113{
114 return PHYS_PFN_OFFSET + dma_to_pfn(dev, *dev->dma_mask); 114 return dma_to_pfn(dev, *dev->dma_mask);
115} 115}
116#define dma_max_pfn(dev) dma_max_pfn(dev) 116#define dma_max_pfn(dev) dma_max_pfn(dev)
117 117
diff --git a/arch/arm/include/asm/pgtable-2level-hwdef.h b/arch/arm/include/asm/pgtable-2level-hwdef.h
index d0131ee6f6af..3f82e9da7cec 100644
--- a/arch/arm/include/asm/pgtable-2level-hwdef.h
+++ b/arch/arm/include/asm/pgtable-2level-hwdef.h
@@ -47,6 +47,7 @@
47#define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) 47#define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
48#define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE) 48#define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE)
49#define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) 49#define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
50#define PMD_SECT_CACHE_MASK (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
50#define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2)) 51#define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2))
51 52
52/* 53/*
diff --git a/arch/arm/include/asm/pgtable-3level-hwdef.h b/arch/arm/include/asm/pgtable-3level-hwdef.h
index f8f1cff62065..4cd664abfcd3 100644
--- a/arch/arm/include/asm/pgtable-3level-hwdef.h
+++ b/arch/arm/include/asm/pgtable-3level-hwdef.h
@@ -62,6 +62,7 @@
62#define PMD_SECT_WT (_AT(pmdval_t, 2) << 2) /* normal inner write-through */ 62#define PMD_SECT_WT (_AT(pmdval_t, 2) << 2) /* normal inner write-through */
63#define PMD_SECT_WB (_AT(pmdval_t, 3) << 2) /* normal inner write-back */ 63#define PMD_SECT_WB (_AT(pmdval_t, 3) << 2) /* normal inner write-back */
64#define PMD_SECT_WBWA (_AT(pmdval_t, 7) << 2) /* normal inner write-alloc */ 64#define PMD_SECT_WBWA (_AT(pmdval_t, 7) << 2) /* normal inner write-alloc */
65#define PMD_SECT_CACHE_MASK (_AT(pmdval_t, 7) << 2)
65 66
66/* 67/*
67 * + Level 3 descriptor (PTE) 68 * + Level 3 descriptor (PTE)
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
index 62a6f65029e6..a93c0f99acf7 100644
--- a/arch/arm/include/asm/uaccess.h
+++ b/arch/arm/include/asm/uaccess.h
@@ -480,7 +480,10 @@ arm_copy_from_user(void *to, const void __user *from, unsigned long n);
480static inline unsigned long __must_check 480static inline unsigned long __must_check
481__copy_from_user(void *to, const void __user *from, unsigned long n) 481__copy_from_user(void *to, const void __user *from, unsigned long n)
482{ 482{
483 unsigned int __ua_flags = uaccess_save_and_enable(); 483 unsigned int __ua_flags;
484
485 check_object_size(to, n, false);
486 __ua_flags = uaccess_save_and_enable();
484 n = arm_copy_from_user(to, from, n); 487 n = arm_copy_from_user(to, from, n);
485 uaccess_restore(__ua_flags); 488 uaccess_restore(__ua_flags);
486 return n; 489 return n;
@@ -495,11 +498,15 @@ static inline unsigned long __must_check
495__copy_to_user(void __user *to, const void *from, unsigned long n) 498__copy_to_user(void __user *to, const void *from, unsigned long n)
496{ 499{
497#ifndef CONFIG_UACCESS_WITH_MEMCPY 500#ifndef CONFIG_UACCESS_WITH_MEMCPY
498 unsigned int __ua_flags = uaccess_save_and_enable(); 501 unsigned int __ua_flags;
502
503 check_object_size(from, n, true);
504 __ua_flags = uaccess_save_and_enable();
499 n = arm_copy_to_user(to, from, n); 505 n = arm_copy_to_user(to, from, n);
500 uaccess_restore(__ua_flags); 506 uaccess_restore(__ua_flags);
501 return n; 507 return n;
502#else 508#else
509 check_object_size(from, n, true);
503 return arm_copy_to_user(to, from, n); 510 return arm_copy_to_user(to, from, n);
504#endif 511#endif
505} 512}
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
index 40ecd5f514a2..f676febbb270 100644
--- a/arch/arm/kernel/devtree.c
+++ b/arch/arm/kernel/devtree.c
@@ -88,6 +88,8 @@ void __init arm_dt_init_cpu_maps(void)
88 return; 88 return;
89 89
90 for_each_child_of_node(cpus, cpu) { 90 for_each_child_of_node(cpus, cpu) {
91 const __be32 *cell;
92 int prop_bytes;
91 u32 hwid; 93 u32 hwid;
92 94
93 if (of_node_cmp(cpu->type, "cpu")) 95 if (of_node_cmp(cpu->type, "cpu"))
@@ -99,7 +101,8 @@ void __init arm_dt_init_cpu_maps(void)
99 * properties is considered invalid to build the 101 * properties is considered invalid to build the
100 * cpu_logical_map. 102 * cpu_logical_map.
101 */ 103 */
102 if (of_property_read_u32(cpu, "reg", &hwid)) { 104 cell = of_get_property(cpu, "reg", &prop_bytes);
105 if (!cell || prop_bytes < sizeof(*cell)) {
103 pr_debug(" * %s missing reg property\n", 106 pr_debug(" * %s missing reg property\n",
104 cpu->full_name); 107 cpu->full_name);
105 of_node_put(cpu); 108 of_node_put(cpu);
@@ -107,10 +110,15 @@ void __init arm_dt_init_cpu_maps(void)
107 } 110 }
108 111
109 /* 112 /*
110 * 8 MSBs must be set to 0 in the DT since the reg property 113 * Bits n:24 must be set to 0 in the DT since the reg property
111 * defines the MPIDR[23:0]. 114 * defines the MPIDR[23:0].
112 */ 115 */
113 if (hwid & ~MPIDR_HWID_BITMASK) { 116 do {
117 hwid = be32_to_cpu(*cell++);
118 prop_bytes -= sizeof(*cell);
119 } while (!hwid && prop_bytes > 0);
120
121 if (prop_bytes || (hwid & ~MPIDR_HWID_BITMASK)) {
114 of_node_put(cpu); 122 of_node_put(cpu);
115 return; 123 return;
116 } 124 }
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index bc5f50799d75..9f157e7c51e7 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -295,6 +295,7 @@ __und_svc_fault:
295 bl __und_fault 295 bl __und_fault
296 296
297__und_svc_finish: 297__und_svc_finish:
298 get_thread_info tsk
298 ldr r5, [sp, #S_PSR] @ Get SVC cpsr 299 ldr r5, [sp, #S_PSR] @ Get SVC cpsr
299 svc_exit r5 @ return from exception 300 svc_exit r5 @ return from exception
300 UNWIND(.fnend ) 301 UNWIND(.fnend )
diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S
index 0b1e4a93d67e..15d073ae5da2 100644
--- a/arch/arm/kernel/hyp-stub.S
+++ b/arch/arm/kernel/hyp-stub.S
@@ -142,6 +142,19 @@ ARM_BE8(orr r7, r7, #(1 << 25)) @ HSCTLR.EE
142 and r7, #0x1f @ Preserve HPMN 142 and r7, #0x1f @ Preserve HPMN
143 mcr p15, 4, r7, c1, c1, 1 @ HDCR 143 mcr p15, 4, r7, c1, c1, 1 @ HDCR
144 144
145 @ Make sure NS-SVC is initialised appropriately
146 mrc p15, 0, r7, c1, c0, 0 @ SCTLR
147 orr r7, #(1 << 5) @ CP15 barriers enabled
148 bic r7, #(3 << 7) @ Clear SED/ITD for v8 (RES0 for v7)
149 bic r7, #(3 << 19) @ WXN and UWXN disabled
150 mcr p15, 0, r7, c1, c0, 0 @ SCTLR
151
152 mrc p15, 0, r7, c0, c0, 0 @ MIDR
153 mcr p15, 4, r7, c0, c0, 0 @ VPIDR
154
155 mrc p15, 0, r7, c0, c0, 5 @ MPIDR
156 mcr p15, 4, r7, c0, c0, 5 @ VMPIDR
157
145#if !defined(ZIMAGE) && defined(CONFIG_ARM_ARCH_TIMER) 158#if !defined(ZIMAGE) && defined(CONFIG_ARM_ARCH_TIMER)
146 @ make CNTP_* and CNTPCT accessible from PL1 159 @ make CNTP_* and CNTPCT accessible from PL1
147 mrc p15, 0, r7, c0, c1, 1 @ ID_PFR1 160 mrc p15, 0, r7, c0, c1, 1 @ ID_PFR1
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c
index 087acb569b63..5f221acd21ae 100644
--- a/arch/arm/kernel/sys_oabi-compat.c
+++ b/arch/arm/kernel/sys_oabi-compat.c
@@ -279,8 +279,12 @@ asmlinkage long sys_oabi_epoll_wait(int epfd,
279 mm_segment_t fs; 279 mm_segment_t fs;
280 long ret, err, i; 280 long ret, err, i;
281 281
282 if (maxevents <= 0 || maxevents > (INT_MAX/sizeof(struct epoll_event))) 282 if (maxevents <= 0 ||
283 maxevents > (INT_MAX/sizeof(*kbuf)) ||
284 maxevents > (INT_MAX/sizeof(*events)))
283 return -EINVAL; 285 return -EINVAL;
286 if (!access_ok(VERIFY_WRITE, events, sizeof(*events) * maxevents))
287 return -EFAULT;
284 kbuf = kmalloc(sizeof(*kbuf) * maxevents, GFP_KERNEL); 288 kbuf = kmalloc(sizeof(*kbuf) * maxevents, GFP_KERNEL);
285 if (!kbuf) 289 if (!kbuf)
286 return -ENOMEM; 290 return -ENOMEM;
@@ -317,6 +321,8 @@ asmlinkage long sys_oabi_semtimedop(int semid,
317 321
318 if (nsops < 1 || nsops > SEMOPM) 322 if (nsops < 1 || nsops > SEMOPM)
319 return -EINVAL; 323 return -EINVAL;
324 if (!access_ok(VERIFY_READ, tsops, sizeof(*tsops) * nsops))
325 return -EFAULT;
320 sops = kmalloc(sizeof(*sops) * nsops, GFP_KERNEL); 326 sops = kmalloc(sizeof(*sops) * nsops, GFP_KERNEL);
321 if (!sops) 327 if (!sops)
322 return -ENOMEM; 328 return -ENOMEM;
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index d94bb9093ead..c94b90d43772 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -158,8 +158,6 @@ void kvm_arch_destroy_vm(struct kvm *kvm)
158{ 158{
159 int i; 159 int i;
160 160
161 kvm_free_stage2_pgd(kvm);
162
163 for (i = 0; i < KVM_MAX_VCPUS; ++i) { 161 for (i = 0; i < KVM_MAX_VCPUS; ++i) {
164 if (kvm->vcpus[i]) { 162 if (kvm->vcpus[i]) {
165 kvm_arch_vcpu_free(kvm->vcpus[i]); 163 kvm_arch_vcpu_free(kvm->vcpus[i]);
@@ -1009,9 +1007,13 @@ long kvm_arch_vm_ioctl(struct file *filp,
1009 1007
1010 switch (ioctl) { 1008 switch (ioctl) {
1011 case KVM_CREATE_IRQCHIP: { 1009 case KVM_CREATE_IRQCHIP: {
1010 int ret;
1012 if (!vgic_present) 1011 if (!vgic_present)
1013 return -ENXIO; 1012 return -ENXIO;
1014 return kvm_vgic_create(kvm, KVM_DEV_TYPE_ARM_VGIC_V2); 1013 mutex_lock(&kvm->lock);
1014 ret = kvm_vgic_create(kvm, KVM_DEV_TYPE_ARM_VGIC_V2);
1015 mutex_unlock(&kvm->lock);
1016 return ret;
1015 } 1017 }
1016 case KVM_ARM_SET_DEVICE_ADDR: { 1018 case KVM_ARM_SET_DEVICE_ADDR: {
1017 struct kvm_arm_device_addr dev_addr; 1019 struct kvm_arm_device_addr dev_addr;
diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
index bda27b6b1aa2..e9a5c0e0c115 100644
--- a/arch/arm/kvm/mmu.c
+++ b/arch/arm/kvm/mmu.c
@@ -1309,7 +1309,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
1309 smp_rmb(); 1309 smp_rmb();
1310 1310
1311 pfn = gfn_to_pfn_prot(kvm, gfn, write_fault, &writable); 1311 pfn = gfn_to_pfn_prot(kvm, gfn, write_fault, &writable);
1312 if (is_error_pfn(pfn)) 1312 if (is_error_noslot_pfn(pfn))
1313 return -EFAULT; 1313 return -EFAULT;
1314 1314
1315 if (kvm_is_device_pfn(pfn)) { 1315 if (kvm_is_device_pfn(pfn)) {
@@ -1714,7 +1714,8 @@ int kvm_mmu_init(void)
1714 kern_hyp_va(PAGE_OFFSET), kern_hyp_va(~0UL)); 1714 kern_hyp_va(PAGE_OFFSET), kern_hyp_va(~0UL));
1715 1715
1716 if (hyp_idmap_start >= kern_hyp_va(PAGE_OFFSET) && 1716 if (hyp_idmap_start >= kern_hyp_va(PAGE_OFFSET) &&
1717 hyp_idmap_start < kern_hyp_va(~0UL)) { 1717 hyp_idmap_start < kern_hyp_va(~0UL) &&
1718 hyp_idmap_start != (unsigned long)__hyp_idmap_text_start) {
1718 /* 1719 /*
1719 * The idmap page is intersecting with the VA space, 1720 * The idmap page is intersecting with the VA space,
1720 * it is not safe to continue further. 1721 * it is not safe to continue further.
@@ -1893,6 +1894,7 @@ void kvm_arch_memslots_updated(struct kvm *kvm, struct kvm_memslots *slots)
1893 1894
1894void kvm_arch_flush_shadow_all(struct kvm *kvm) 1895void kvm_arch_flush_shadow_all(struct kvm *kvm)
1895{ 1896{
1897 kvm_free_stage2_pgd(kvm);
1896} 1898}
1897 1899
1898void kvm_arch_flush_shadow_memslot(struct kvm *kvm, 1900void kvm_arch_flush_shadow_memslot(struct kvm *kvm,
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index dc7c6edeab39..61284b9389cf 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -1,13 +1,13 @@
1menuconfig ARCH_CLPS711X 1menuconfig ARCH_CLPS711X
2 bool "Cirrus Logic EP721x/EP731x-based" 2 bool "Cirrus Logic EP721x/EP731x-based"
3 depends on ARCH_MULTI_V4T 3 depends on ARCH_MULTI_V4T
4 select ARCH_REQUIRE_GPIOLIB
5 select AUTO_ZRELADDR 4 select AUTO_ZRELADDR
6 select CLKSRC_OF 5 select CLKSRC_OF
7 select CLPS711X_TIMER 6 select CLPS711X_TIMER
8 select COMMON_CLK 7 select COMMON_CLK
9 select CPU_ARM720T 8 select CPU_ARM720T
10 select GENERIC_CLOCKEVENTS 9 select GENERIC_CLOCKEVENTS
10 select GPIOLIB
11 select MFD_SYSCON 11 select MFD_SYSCON
12 select OF_IRQ 12 select OF_IRQ
13 select USE_OF 13 select USE_OF
diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c
index 3750575c73c5..06332f626565 100644
--- a/arch/arm/mach-exynos/suspend.c
+++ b/arch/arm/mach-exynos/suspend.c
@@ -255,6 +255,12 @@ static int __init exynos_pmu_irq_init(struct device_node *node,
255 return -ENOMEM; 255 return -ENOMEM;
256 } 256 }
257 257
258 /*
259 * Clear the OF_POPULATED flag set in of_irq_init so that
260 * later the Exynos PMU platform device won't be skipped.
261 */
262 of_node_clear_flag(node, OF_POPULATED);
263
258 return 0; 264 return 0;
259} 265}
260 266
diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c
index fd8720532471..0df062d8b2c9 100644
--- a/arch/arm/mach-imx/gpc.c
+++ b/arch/arm/mach-imx/gpc.c
@@ -271,6 +271,12 @@ static int __init imx_gpc_init(struct device_node *node,
271 for (i = 0; i < IMR_NUM; i++) 271 for (i = 0; i < IMR_NUM; i++)
272 writel_relaxed(~0, gpc_base + GPC_IMR1 + i * 4); 272 writel_relaxed(~0, gpc_base + GPC_IMR1 + i * 4);
273 273
274 /*
275 * Clear the OF_POPULATED flag set in of_irq_init so that
276 * later the GPC power domain driver will not be skipped.
277 */
278 of_node_clear_flag(node, OF_POPULATED);
279
274 return 0; 280 return 0;
275} 281}
276IRQCHIP_DECLARE(imx_gpc, "fsl,imx6q-gpc", imx_gpc_init); 282IRQCHIP_DECLARE(imx_gpc, "fsl,imx6q-gpc", imx_gpc_init);
diff --git a/arch/arm/mach-imx/mach-imx6ul.c b/arch/arm/mach-imx/mach-imx6ul.c
index 5d9bfab279dd..6bb7d9cf1e38 100644
--- a/arch/arm/mach-imx/mach-imx6ul.c
+++ b/arch/arm/mach-imx/mach-imx6ul.c
@@ -64,6 +64,7 @@ static void __init imx6ul_init_machine(void)
64 if (parent == NULL) 64 if (parent == NULL)
65 pr_warn("failed to initialize soc device\n"); 65 pr_warn("failed to initialize soc device\n");
66 66
67 of_platform_default_populate(NULL, NULL, parent);
67 imx6ul_enet_init(); 68 imx6ul_enet_init();
68 imx_anatop_init(); 69 imx_anatop_init();
69 imx6ul_pm_init(); 70 imx6ul_pm_init();
diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c
index 58924b3844df..fe708e26d021 100644
--- a/arch/arm/mach-imx/pm-imx6.c
+++ b/arch/arm/mach-imx/pm-imx6.c
@@ -295,7 +295,7 @@ int imx6_set_lpm(enum mxc_cpu_pwr_mode mode)
295 val &= ~BM_CLPCR_SBYOS; 295 val &= ~BM_CLPCR_SBYOS;
296 if (cpu_is_imx6sl()) 296 if (cpu_is_imx6sl())
297 val |= BM_CLPCR_BYPASS_PMIC_READY; 297 val |= BM_CLPCR_BYPASS_PMIC_READY;
298 if (cpu_is_imx6sl() || cpu_is_imx6sx()) 298 if (cpu_is_imx6sl() || cpu_is_imx6sx() || cpu_is_imx6ul())
299 val |= BM_CLPCR_BYP_MMDC_CH0_LPM_HS; 299 val |= BM_CLPCR_BYP_MMDC_CH0_LPM_HS;
300 else 300 else
301 val |= BM_CLPCR_BYP_MMDC_CH1_LPM_HS; 301 val |= BM_CLPCR_BYP_MMDC_CH1_LPM_HS;
@@ -310,7 +310,7 @@ int imx6_set_lpm(enum mxc_cpu_pwr_mode mode)
310 val |= 0x3 << BP_CLPCR_STBY_COUNT; 310 val |= 0x3 << BP_CLPCR_STBY_COUNT;
311 val |= BM_CLPCR_VSTBY; 311 val |= BM_CLPCR_VSTBY;
312 val |= BM_CLPCR_SBYOS; 312 val |= BM_CLPCR_SBYOS;
313 if (cpu_is_imx6sl()) 313 if (cpu_is_imx6sl() || cpu_is_imx6sx())
314 val |= BM_CLPCR_BYPASS_PMIC_READY; 314 val |= BM_CLPCR_BYPASS_PMIC_READY;
315 if (cpu_is_imx6sl() || cpu_is_imx6sx() || cpu_is_imx6ul()) 315 if (cpu_is_imx6sl() || cpu_is_imx6sx() || cpu_is_imx6ul())
316 val |= BM_CLPCR_BYP_MMDC_CH0_LPM_HS; 316 val |= BM_CLPCR_BYP_MMDC_CH0_LPM_HS;
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index e53c6cfcab51..6c6497e80a7b 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -1,5 +1,4 @@
1ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ 1ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include
2 -I$(srctree)/arch/arm/plat-orion/include
3 2
4AFLAGS_coherency_ll.o := -Wa,-march=armv7-a 3AFLAGS_coherency_ll.o := -Wa,-march=armv7-a
5CFLAGS_pmsu.o := -march=armv7-a 4CFLAGS_pmsu.o := -march=armv7-a
diff --git a/arch/arm/mach-omap2/cm33xx.c b/arch/arm/mach-omap2/cm33xx.c
index c073fb57dd13..6f2d0aec0513 100644
--- a/arch/arm/mach-omap2/cm33xx.c
+++ b/arch/arm/mach-omap2/cm33xx.c
@@ -220,9 +220,6 @@ static int am33xx_cm_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs,
220{ 220{
221 int i = 0; 221 int i = 0;
222 222
223 if (!clkctrl_offs)
224 return 0;
225
226 omap_test_timeout(_is_module_ready(inst, clkctrl_offs), 223 omap_test_timeout(_is_module_ready(inst, clkctrl_offs),
227 MAX_MODULE_READY_TIME, i); 224 MAX_MODULE_READY_TIME, i);
228 225
@@ -246,9 +243,6 @@ static int am33xx_cm_wait_module_idle(u8 part, s16 inst, u16 clkctrl_offs,
246{ 243{
247 int i = 0; 244 int i = 0;
248 245
249 if (!clkctrl_offs)
250 return 0;
251
252 omap_test_timeout((_clkctrl_idlest(inst, clkctrl_offs) == 246 omap_test_timeout((_clkctrl_idlest(inst, clkctrl_offs) ==
253 CLKCTRL_IDLEST_DISABLED), 247 CLKCTRL_IDLEST_DISABLED),
254 MAX_MODULE_READY_TIME, i); 248 MAX_MODULE_READY_TIME, i);
diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c
index 2c0e07ed6b99..2ab27ade136a 100644
--- a/arch/arm/mach-omap2/cminst44xx.c
+++ b/arch/arm/mach-omap2/cminst44xx.c
@@ -278,9 +278,6 @@ static int omap4_cminst_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs,
278{ 278{
279 int i = 0; 279 int i = 0;
280 280
281 if (!clkctrl_offs)
282 return 0;
283
284 omap_test_timeout(_is_module_ready(part, inst, clkctrl_offs), 281 omap_test_timeout(_is_module_ready(part, inst, clkctrl_offs),
285 MAX_MODULE_READY_TIME, i); 282 MAX_MODULE_READY_TIME, i);
286 283
@@ -304,9 +301,6 @@ static int omap4_cminst_wait_module_idle(u8 part, s16 inst, u16 clkctrl_offs,
304{ 301{
305 int i = 0; 302 int i = 0;
306 303
307 if (!clkctrl_offs)
308 return 0;
309
310 omap_test_timeout((_clkctrl_idlest(part, inst, clkctrl_offs) == 304 omap_test_timeout((_clkctrl_idlest(part, inst, clkctrl_offs) ==
311 CLKCTRL_IDLEST_DISABLED), 305 CLKCTRL_IDLEST_DISABLED),
312 MAX_MODULE_DISABLE_TIME, i); 306 MAX_MODULE_DISABLE_TIME, i);
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 5b709383381c..1052b29697b8 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1053,6 +1053,10 @@ static int _omap4_wait_target_disable(struct omap_hwmod *oh)
1053 if (oh->flags & HWMOD_NO_IDLEST) 1053 if (oh->flags & HWMOD_NO_IDLEST)
1054 return 0; 1054 return 0;
1055 1055
1056 if (!oh->prcm.omap4.clkctrl_offs &&
1057 !(oh->prcm.omap4.flags & HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET))
1058 return 0;
1059
1056 return omap_cm_wait_module_idle(oh->clkdm->prcm_partition, 1060 return omap_cm_wait_module_idle(oh->clkdm->prcm_partition,
1057 oh->clkdm->cm_inst, 1061 oh->clkdm->cm_inst,
1058 oh->prcm.omap4.clkctrl_offs, 0); 1062 oh->prcm.omap4.clkctrl_offs, 0);
@@ -2971,6 +2975,10 @@ static int _omap4_wait_target_ready(struct omap_hwmod *oh)
2971 if (!_find_mpu_rt_port(oh)) 2975 if (!_find_mpu_rt_port(oh))
2972 return 0; 2976 return 0;
2973 2977
2978 if (!oh->prcm.omap4.clkctrl_offs &&
2979 !(oh->prcm.omap4.flags & HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET))
2980 return 0;
2981
2974 /* XXX check module SIDLEMODE, hardreset status */ 2982 /* XXX check module SIDLEMODE, hardreset status */
2975 2983
2976 return omap_cm_wait_module_ready(oh->clkdm->prcm_partition, 2984 return omap_cm_wait_module_ready(oh->clkdm->prcm_partition,
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h
index 4041bad79a9a..78904017f18c 100644
--- a/arch/arm/mach-omap2/omap_hwmod.h
+++ b/arch/arm/mach-omap2/omap_hwmod.h
@@ -443,8 +443,12 @@ struct omap_hwmod_omap2_prcm {
443 * HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT: Some IP blocks don't have a PRCM 443 * HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT: Some IP blocks don't have a PRCM
444 * module-level context loss register associated with them; this 444 * module-level context loss register associated with them; this
445 * flag bit should be set in those cases 445 * flag bit should be set in those cases
446 * HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET: Some IP blocks have a valid CLKCTRL
447 * offset of zero; this flag bit should be set in those cases to
448 * distinguish from hwmods that have no clkctrl offset.
446 */ 449 */
447#define HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT (1 << 0) 450#define HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT (1 << 0)
451#define HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET (1 << 1)
448 452
449/** 453/**
450 * struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data 454 * struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
index 55c5878577f4..e2d84aa7f595 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
@@ -29,6 +29,7 @@
29#define CLKCTRL(oh, clkctrl) ((oh).prcm.omap4.clkctrl_offs = (clkctrl)) 29#define CLKCTRL(oh, clkctrl) ((oh).prcm.omap4.clkctrl_offs = (clkctrl))
30#define RSTCTRL(oh, rstctrl) ((oh).prcm.omap4.rstctrl_offs = (rstctrl)) 30#define RSTCTRL(oh, rstctrl) ((oh).prcm.omap4.rstctrl_offs = (rstctrl))
31#define RSTST(oh, rstst) ((oh).prcm.omap4.rstst_offs = (rstst)) 31#define RSTST(oh, rstst) ((oh).prcm.omap4.rstst_offs = (rstst))
32#define PRCM_FLAGS(oh, flag) ((oh).prcm.omap4.flags = (flag))
32 33
33/* 34/*
34 * 'l3' class 35 * 'l3' class
@@ -1296,6 +1297,7 @@ static void omap_hwmod_am33xx_clkctrl(void)
1296 CLKCTRL(am33xx_i2c1_hwmod, AM33XX_CM_WKUP_I2C0_CLKCTRL_OFFSET); 1297 CLKCTRL(am33xx_i2c1_hwmod, AM33XX_CM_WKUP_I2C0_CLKCTRL_OFFSET);
1297 CLKCTRL(am33xx_wd_timer1_hwmod, AM33XX_CM_WKUP_WDT1_CLKCTRL_OFFSET); 1298 CLKCTRL(am33xx_wd_timer1_hwmod, AM33XX_CM_WKUP_WDT1_CLKCTRL_OFFSET);
1298 CLKCTRL(am33xx_rtc_hwmod, AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET); 1299 CLKCTRL(am33xx_rtc_hwmod, AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET);
1300 PRCM_FLAGS(am33xx_rtc_hwmod, HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET);
1299 CLKCTRL(am33xx_mmc2_hwmod, AM33XX_CM_PER_MMC2_CLKCTRL_OFFSET); 1301 CLKCTRL(am33xx_mmc2_hwmod, AM33XX_CM_PER_MMC2_CLKCTRL_OFFSET);
1300 CLKCTRL(am33xx_gpmc_hwmod, AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET); 1302 CLKCTRL(am33xx_gpmc_hwmod, AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET);
1301 CLKCTRL(am33xx_l4_ls_hwmod, AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET); 1303 CLKCTRL(am33xx_l4_ls_hwmod, AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET);
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index d72ee6185d5e..1cc4a6f3954e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -722,8 +722,20 @@ static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
722 * display serial interface controller 722 * display serial interface controller
723 */ 723 */
724 724
725static struct omap_hwmod_class_sysconfig omap3xxx_dsi_sysc = {
726 .rev_offs = 0x0000,
727 .sysc_offs = 0x0010,
728 .syss_offs = 0x0014,
729 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
730 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
731 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
732 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
733 .sysc_fields = &omap_hwmod_sysc_type1,
734};
735
725static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = { 736static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
726 .name = "dsi", 737 .name = "dsi",
738 .sysc = &omap3xxx_dsi_sysc,
727}; 739};
728 740
729static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = { 741static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
diff --git a/arch/arm/mach-oxnas/Kconfig b/arch/arm/mach-oxnas/Kconfig
index 567496bd250a..29100beb2e7f 100644
--- a/arch/arm/mach-oxnas/Kconfig
+++ b/arch/arm/mach-oxnas/Kconfig
@@ -11,11 +11,13 @@ if ARCH_OXNAS
11 11
12config MACH_OX810SE 12config MACH_OX810SE
13 bool "Support OX810SE Based Products" 13 bool "Support OX810SE Based Products"
14 select ARCH_HAS_RESET_CONTROLLER
14 select COMMON_CLK_OXNAS 15 select COMMON_CLK_OXNAS
15 select CPU_ARM926T 16 select CPU_ARM926T
16 select MFD_SYSCON 17 select MFD_SYSCON
17 select OXNAS_RPS_TIMER 18 select OXNAS_RPS_TIMER
18 select PINCTRL_OXNAS 19 select PINCTRL_OXNAS
20 select RESET_CONTROLLER
19 select RESET_OXNAS 21 select RESET_OXNAS
20 select VERSATILE_FPGA_IRQ 22 select VERSATILE_FPGA_IRQ
21 help 23 help
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index dc109dc3a622..10bfdb169366 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -13,6 +13,7 @@
13 */ 13 */
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/module.h> /* symbol_get ; symbol_put */
16#include <linux/init.h> 17#include <linux/init.h>
17#include <linux/platform_device.h> 18#include <linux/platform_device.h>
18#include <linux/major.h> 19#include <linux/major.h>
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c
index c410d84b243d..66070acaa888 100644
--- a/arch/arm/mach-pxa/idp.c
+++ b/arch/arm/mach-pxa/idp.c
@@ -83,7 +83,8 @@ static struct resource smc91x_resources[] = {
83}; 83};
84 84
85static struct smc91x_platdata smc91x_platdata = { 85static struct smc91x_platdata smc91x_platdata = {
86 .flags = SMC91X_USE_32BIT | SMC91X_USE_DMA | SMC91X_NOWAIT, 86 .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT |
87 SMC91X_USE_DMA | SMC91X_NOWAIT,
87}; 88};
88 89
89static struct platform_device smc91x_device = { 90static struct platform_device smc91x_device = {
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index 7245f3359564..d6159f8ef0c2 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -137,6 +137,18 @@ static struct pxa2xx_udc_mach_info udc_info __initdata = {
137 // no D+ pullup; lubbock can't connect/disconnect in software 137 // no D+ pullup; lubbock can't connect/disconnect in software
138}; 138};
139 139
140static void lubbock_init_pcmcia(void)
141{
142 struct clk *clk;
143
144 /* Add an alias for the SA1111 PCMCIA clock */
145 clk = clk_get_sys("pxa2xx-pcmcia", NULL);
146 if (!IS_ERR(clk)) {
147 clkdev_create(clk, NULL, "1800");
148 clk_put(clk);
149 }
150}
151
140static struct resource sa1111_resources[] = { 152static struct resource sa1111_resources[] = {
141 [0] = { 153 [0] = {
142 .start = 0x10000000, 154 .start = 0x10000000,
@@ -467,6 +479,8 @@ static void __init lubbock_init(void)
467 pxa_set_btuart_info(NULL); 479 pxa_set_btuart_info(NULL);
468 pxa_set_stuart_info(NULL); 480 pxa_set_stuart_info(NULL);
469 481
482 lubbock_init_pcmcia();
483
470 clk_add_alias("SA1111_CLK", NULL, "GPIO11_CLK", NULL); 484 clk_add_alias("SA1111_CLK", NULL, "GPIO11_CLK", NULL);
471 pxa_set_udc_info(&udc_info); 485 pxa_set_udc_info(&udc_info);
472 pxa_set_fb_info(NULL, &sharp_lm8v31); 486 pxa_set_fb_info(NULL, &sharp_lm8v31);
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 1080580b1343..2c150bfc0cd5 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -13,6 +13,7 @@
13 */ 13 */
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/module.h> /* symbol_get ; symbol_put */
16#include <linux/platform_device.h> 17#include <linux/platform_device.h>
17#include <linux/delay.h> 18#include <linux/delay.h>
18#include <linux/gpio_keys.h> 19#include <linux/gpio_keys.h>
diff --git a/arch/arm/mach-pxa/xcep.c b/arch/arm/mach-pxa/xcep.c
index 3f06cd90567a..056369ef250e 100644
--- a/arch/arm/mach-pxa/xcep.c
+++ b/arch/arm/mach-pxa/xcep.c
@@ -120,7 +120,8 @@ static struct resource smc91x_resources[] = {
120}; 120};
121 121
122static struct smc91x_platdata xcep_smc91x_info = { 122static struct smc91x_platdata xcep_smc91x_info = {
123 .flags = SMC91X_USE_32BIT | SMC91X_NOWAIT | SMC91X_USE_DMA, 123 .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT |
124 SMC91X_NOWAIT | SMC91X_USE_DMA,
124}; 125};
125 126
126static struct platform_device smc91x_device = { 127static struct platform_device smc91x_device = {
diff --git a/arch/arm/mach-realview/Makefile b/arch/arm/mach-realview/Makefile
index dae8d86ef4cc..404882130956 100644
--- a/arch/arm/mach-realview/Makefile
+++ b/arch/arm/mach-realview/Makefile
@@ -1,8 +1,7 @@
1# 1#
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ 4ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-versatile/include
5 -I$(srctree)/arch/arm/plat-versatile/include
6 5
7obj-y := core.o 6obj-y := core.o
8obj-$(CONFIG_REALVIEW_DT) += realview-dt.o 7obj-$(CONFIG_REALVIEW_DT) += realview-dt.o
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index baf174542e36..a0ead0ae23d6 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -93,7 +93,8 @@ static struct smsc911x_platform_config smsc911x_config = {
93}; 93};
94 94
95static struct smc91x_platdata smc91x_platdata = { 95static struct smc91x_platdata smc91x_platdata = {
96 .flags = SMC91X_USE_32BIT | SMC91X_NOWAIT, 96 .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT |
97 SMC91X_NOWAIT,
97}; 98};
98 99
99static struct platform_device realview_eth_device = { 100static struct platform_device realview_eth_device = {
diff --git a/arch/arm/mach-s5pv210/Makefile b/arch/arm/mach-s5pv210/Makefile
index 72b9e9671507..fa7fb716e388 100644
--- a/arch/arm/mach-s5pv210/Makefile
+++ b/arch/arm/mach-s5pv210/Makefile
@@ -5,7 +5,7 @@
5# 5#
6# Licensed under GPLv2 6# Licensed under GPLv2
7 7
8ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include 8ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/arch/arm/plat-samsung/include
9 9
10# Core 10# Core
11 11
diff --git a/arch/arm/mach-sa1100/clock.c b/arch/arm/mach-sa1100/clock.c
index cbf53bb9c814..0db46895c82a 100644
--- a/arch/arm/mach-sa1100/clock.c
+++ b/arch/arm/mach-sa1100/clock.c
@@ -125,6 +125,8 @@ static unsigned long clk_36864_get_rate(struct clk *clk)
125} 125}
126 126
127static struct clkops clk_36864_ops = { 127static struct clkops clk_36864_ops = {
128 .enable = clk_cpu_enable,
129 .disable = clk_cpu_disable,
128 .get_rate = clk_36864_get_rate, 130 .get_rate = clk_36864_get_rate,
129}; 131};
130 132
@@ -140,9 +142,8 @@ static struct clk_lookup sa11xx_clkregs[] = {
140 CLKDEV_INIT(NULL, "OSTIMER0", &clk_36864), 142 CLKDEV_INIT(NULL, "OSTIMER0", &clk_36864),
141}; 143};
142 144
143static int __init sa11xx_clk_init(void) 145int __init sa11xx_clk_init(void)
144{ 146{
145 clkdev_add_table(sa11xx_clkregs, ARRAY_SIZE(sa11xx_clkregs)); 147 clkdev_add_table(sa11xx_clkregs, ARRAY_SIZE(sa11xx_clkregs));
146 return 0; 148 return 0;
147} 149}
148core_initcall(sa11xx_clk_init);
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index 345e63f4eb71..3e09beddb6e8 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -34,6 +34,7 @@
34 34
35#include <mach/hardware.h> 35#include <mach/hardware.h>
36#include <mach/irqs.h> 36#include <mach/irqs.h>
37#include <mach/reset.h>
37 38
38#include "generic.h" 39#include "generic.h"
39#include <clocksource/pxa.h> 40#include <clocksource/pxa.h>
@@ -95,6 +96,8 @@ static void sa1100_power_off(void)
95 96
96void sa11x0_restart(enum reboot_mode mode, const char *cmd) 97void sa11x0_restart(enum reboot_mode mode, const char *cmd)
97{ 98{
99 clear_reset_status(RESET_STATUS_ALL);
100
98 if (mode == REBOOT_SOFT) { 101 if (mode == REBOOT_SOFT) {
99 /* Jump into ROM at address 0 */ 102 /* Jump into ROM at address 0 */
100 soft_restart(0); 103 soft_restart(0);
@@ -388,6 +391,7 @@ void __init sa1100_init_irq(void)
388 sa11x0_init_irq_nodt(IRQ_GPIO0_SC, irq_resource.start); 391 sa11x0_init_irq_nodt(IRQ_GPIO0_SC, irq_resource.start);
389 392
390 sa1100_init_gpio(); 393 sa1100_init_gpio();
394 sa11xx_clk_init();
391} 395}
392 396
393/* 397/*
diff --git a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h
index 0d92e119b36b..68199b603ff7 100644
--- a/arch/arm/mach-sa1100/generic.h
+++ b/arch/arm/mach-sa1100/generic.h
@@ -44,3 +44,5 @@ int sa11x0_pm_init(void);
44#else 44#else
45static inline int sa11x0_pm_init(void) { return 0; } 45static inline int sa11x0_pm_init(void) { return 0; }
46#endif 46#endif
47
48int sa11xx_clk_init(void);
diff --git a/arch/arm/mach-sa1100/pleb.c b/arch/arm/mach-sa1100/pleb.c
index 1525d7b5f1b7..88149f85bc49 100644
--- a/arch/arm/mach-sa1100/pleb.c
+++ b/arch/arm/mach-sa1100/pleb.c
@@ -45,7 +45,7 @@ static struct resource smc91x_resources[] = {
45}; 45};
46 46
47static struct smc91x_platdata smc91x_platdata = { 47static struct smc91x_platdata smc91x_platdata = {
48 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, 48 .flags = SMC91X_USE_16BIT | SMC91X_USE_8BIT | SMC91X_NOWAIT,
49}; 49};
50 50
51static struct platform_device smc91x_device = { 51static struct platform_device smc91x_device = {
diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c
index f3dba6f356e2..02e21bceb085 100644
--- a/arch/arm/mach-shmobile/platsmp.c
+++ b/arch/arm/mach-shmobile/platsmp.c
@@ -40,5 +40,8 @@ bool shmobile_smp_cpu_can_disable(unsigned int cpu)
40bool __init shmobile_smp_init_fallback_ops(void) 40bool __init shmobile_smp_init_fallback_ops(void)
41{ 41{
42 /* fallback on PSCI/smp_ops if no other DT based method is detected */ 42 /* fallback on PSCI/smp_ops if no other DT based method is detected */
43 if (!IS_ENABLED(CONFIG_SMP))
44 return false;
45
43 return platform_can_secondary_boot() ? true : false; 46 return platform_can_secondary_boot() ? true : false;
44} 47}
diff --git a/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c b/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c
index 62437b57813e..73e3adbc1330 100644
--- a/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c
@@ -41,39 +41,26 @@
41 41
42#define REGULATOR_IRQ_MASK BIT(2) /* IRQ2, active low */ 42#define REGULATOR_IRQ_MASK BIT(2) /* IRQ2, active low */
43 43
44static void __iomem *irqc; 44/* start of DA9210 System Control and Event Registers */
45
46static const u8 da9063_mask_regs[] = {
47 DA9063_REG_IRQ_MASK_A,
48 DA9063_REG_IRQ_MASK_B,
49 DA9063_REG_IRQ_MASK_C,
50 DA9063_REG_IRQ_MASK_D,
51};
52
53/* DA9210 System Control and Event Registers */
54#define DA9210_REG_MASK_A 0x54 45#define DA9210_REG_MASK_A 0x54
55#define DA9210_REG_MASK_B 0x55
56
57static const u8 da9210_mask_regs[] = {
58 DA9210_REG_MASK_A,
59 DA9210_REG_MASK_B,
60};
61
62static void da9xxx_mask_irqs(struct i2c_client *client, const u8 regs[],
63 unsigned int nregs)
64{
65 unsigned int i;
66 46
67 dev_info(&client->dev, "Masking %s interrupt sources\n", client->name); 47static void __iomem *irqc;
68 48
69 for (i = 0; i < nregs; i++) { 49/* first byte sets the memory pointer, following are consecutive reg values */
70 int error = i2c_smbus_write_byte_data(client, regs[i], ~0); 50static u8 da9063_irq_clr[] = { DA9063_REG_IRQ_MASK_A, 0xff, 0xff, 0xff, 0xff };
71 if (error) { 51static u8 da9210_irq_clr[] = { DA9210_REG_MASK_A, 0xff, 0xff };
72 dev_err(&client->dev, "i2c error %d\n", error); 52
73 return; 53static struct i2c_msg da9xxx_msgs[2] = {
74 } 54 {
75 } 55 .addr = 0x58,
76} 56 .len = ARRAY_SIZE(da9063_irq_clr),
57 .buf = da9063_irq_clr,
58 }, {
59 .addr = 0x68,
60 .len = ARRAY_SIZE(da9210_irq_clr),
61 .buf = da9210_irq_clr,
62 },
63};
77 64
78static int regulator_quirk_notify(struct notifier_block *nb, 65static int regulator_quirk_notify(struct notifier_block *nb,
79 unsigned long action, void *data) 66 unsigned long action, void *data)
@@ -93,12 +80,15 @@ static int regulator_quirk_notify(struct notifier_block *nb,
93 client = to_i2c_client(dev); 80 client = to_i2c_client(dev);
94 dev_dbg(dev, "Detected %s\n", client->name); 81 dev_dbg(dev, "Detected %s\n", client->name);
95 82
96 if ((client->addr == 0x58 && !strcmp(client->name, "da9063"))) 83 if ((client->addr == 0x58 && !strcmp(client->name, "da9063")) ||
97 da9xxx_mask_irqs(client, da9063_mask_regs, 84 (client->addr == 0x68 && !strcmp(client->name, "da9210"))) {
98 ARRAY_SIZE(da9063_mask_regs)); 85 int ret;
99 else if (client->addr == 0x68 && !strcmp(client->name, "da9210")) 86
100 da9xxx_mask_irqs(client, da9210_mask_regs, 87 dev_info(&client->dev, "clearing da9063/da9210 interrupts\n");
101 ARRAY_SIZE(da9210_mask_regs)); 88 ret = i2c_transfer(client->adapter, da9xxx_msgs, ARRAY_SIZE(da9xxx_msgs));
89 if (ret != ARRAY_SIZE(da9xxx_msgs))
90 dev_err(&client->dev, "i2c error %d\n", ret);
91 }
102 92
103 mon = ioread32(irqc + IRQC_MONITOR); 93 mon = ioread32(irqc + IRQC_MONITOR);
104 if (mon & REGULATOR_IRQ_MASK) 94 if (mon & REGULATOR_IRQ_MASK)
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 62f4d01941f7..30fe03f95c85 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -137,7 +137,7 @@ void __init init_default_cache_policy(unsigned long pmd)
137 137
138 initial_pmd_value = pmd; 138 initial_pmd_value = pmd;
139 139
140 pmd &= PMD_SECT_TEX(1) | PMD_SECT_BUFFERABLE | PMD_SECT_CACHEABLE; 140 pmd &= PMD_SECT_CACHE_MASK;
141 141
142 for (i = 0; i < ARRAY_SIZE(cache_policies); i++) 142 for (i = 0; i < ARRAY_SIZE(cache_policies); i++)
143 if (cache_policies[i].pmd == pmd) { 143 if (cache_policies[i].pmd == pmd) {
@@ -728,7 +728,8 @@ static void *__init late_alloc(unsigned long sz)
728{ 728{
729 void *ptr = (void *)__get_free_pages(PGALLOC_GFP, get_order(sz)); 729 void *ptr = (void *)__get_free_pages(PGALLOC_GFP, get_order(sz));
730 730
731 BUG_ON(!ptr); 731 if (!ptr || !pgtable_page_ctor(virt_to_page(ptr)))
732 BUG();
732 return ptr; 733 return ptr;
733} 734}
734 735
@@ -1155,10 +1156,19 @@ void __init sanity_check_meminfo(void)
1155{ 1156{
1156 phys_addr_t memblock_limit = 0; 1157 phys_addr_t memblock_limit = 0;
1157 int highmem = 0; 1158 int highmem = 0;
1158 phys_addr_t vmalloc_limit = __pa(vmalloc_min - 1) + 1; 1159 u64 vmalloc_limit;
1159 struct memblock_region *reg; 1160 struct memblock_region *reg;
1160 bool should_use_highmem = false; 1161 bool should_use_highmem = false;
1161 1162
1163 /*
1164 * Let's use our own (unoptimized) equivalent of __pa() that is
1165 * not affected by wrap-arounds when sizeof(phys_addr_t) == 4.
1166 * The result is used as the upper bound on physical memory address
1167 * and may itself be outside the valid range for which phys_addr_t
1168 * and therefore __pa() is defined.
1169 */
1170 vmalloc_limit = (u64)(uintptr_t)vmalloc_min - PAGE_OFFSET + PHYS_OFFSET;
1171
1162 for_each_memblock(memory, reg) { 1172 for_each_memblock(memory, reg) {
1163 phys_addr_t block_start = reg->base; 1173 phys_addr_t block_start = reg->base;
1164 phys_addr_t block_end = reg->base + reg->size; 1174 phys_addr_t block_end = reg->base + reg->size;
@@ -1183,10 +1193,11 @@ void __init sanity_check_meminfo(void)
1183 if (reg->size > size_limit) { 1193 if (reg->size > size_limit) {
1184 phys_addr_t overlap_size = reg->size - size_limit; 1194 phys_addr_t overlap_size = reg->size - size_limit;
1185 1195
1186 pr_notice("Truncating RAM at %pa-%pa to -%pa", 1196 pr_notice("Truncating RAM at %pa-%pa",
1187 &block_start, &block_end, &vmalloc_limit); 1197 &block_start, &block_end);
1188 memblock_remove(vmalloc_limit, overlap_size);
1189 block_end = vmalloc_limit; 1198 block_end = vmalloc_limit;
1199 pr_cont(" to -%pa", &block_end);
1200 memblock_remove(vmalloc_limit, overlap_size);
1190 should_use_highmem = true; 1201 should_use_highmem = true;
1191 } 1202 }
1192 } 1203 }
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index a7123b4e129d..d00d52c9de3e 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -16,6 +16,7 @@
16#include <asm/hwcap.h> 16#include <asm/hwcap.h>
17#include <asm/pgtable-hwdef.h> 17#include <asm/pgtable-hwdef.h>
18#include <asm/pgtable.h> 18#include <asm/pgtable.h>
19#include <asm/memory.h>
19 20
20#include "proc-macros.S" 21#include "proc-macros.S"
21 22
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index b0b82f5ea338..f193414d0f6f 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -50,7 +50,7 @@ DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu);
50static struct vcpu_info __percpu *xen_vcpu_info; 50static struct vcpu_info __percpu *xen_vcpu_info;
51 51
52/* Linux <-> Xen vCPU id mapping */ 52/* Linux <-> Xen vCPU id mapping */
53DEFINE_PER_CPU(int, xen_vcpu_id) = -1; 53DEFINE_PER_CPU(uint32_t, xen_vcpu_id);
54EXPORT_PER_CPU_SYMBOL(xen_vcpu_id); 54EXPORT_PER_CPU_SYMBOL(xen_vcpu_id);
55 55
56/* These are unused until we support booting "pre-ballooned" */ 56/* These are unused until we support booting "pre-ballooned" */
@@ -170,9 +170,6 @@ static int xen_starting_cpu(unsigned int cpu)
170 pr_info("Xen: initializing cpu%d\n", cpu); 170 pr_info("Xen: initializing cpu%d\n", cpu);
171 vcpup = per_cpu_ptr(xen_vcpu_info, cpu); 171 vcpup = per_cpu_ptr(xen_vcpu_info, cpu);
172 172
173 /* Direct vCPU id mapping for ARM guests. */
174 per_cpu(xen_vcpu_id, cpu) = cpu;
175
176 info.mfn = virt_to_gfn(vcpup); 173 info.mfn = virt_to_gfn(vcpup);
177 info.offset = xen_offset_in_page(vcpup); 174 info.offset = xen_offset_in_page(vcpup);
178 175
@@ -330,6 +327,7 @@ static int __init xen_guest_init(void)
330{ 327{
331 struct xen_add_to_physmap xatp; 328 struct xen_add_to_physmap xatp;
332 struct shared_info *shared_info_page = NULL; 329 struct shared_info *shared_info_page = NULL;
330 int cpu;
333 331
334 if (!xen_domain()) 332 if (!xen_domain())
335 return 0; 333 return 0;
@@ -380,7 +378,8 @@ static int __init xen_guest_init(void)
380 return -ENOMEM; 378 return -ENOMEM;
381 379
382 /* Direct vCPU id mapping for ARM guests. */ 380 /* Direct vCPU id mapping for ARM guests. */
383 per_cpu(xen_vcpu_id, 0) = 0; 381 for_each_possible_cpu(cpu)
382 per_cpu(xen_vcpu_id, cpu) = cpu;
384 383
385 xen_auto_xlat_grant_frames.count = gnttab_max_grant_frames(); 384 xen_auto_xlat_grant_frames.count = gnttab_max_grant_frames();
386 if (xen_xlate_map_ballooned_pages(&xen_auto_xlat_grant_frames.pfn, 385 if (xen_xlate_map_ballooned_pages(&xen_auto_xlat_grant_frames.pfn,