diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-25 05:51:53 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-25 05:51:53 -0400 |
commit | ff85f707ac49ad77b7cf8dcef38e7fcd468ca3d6 (patch) | |
tree | 886db57888058d507c6a14000cf4dd2b581311e1 /arch | |
parent | e9533ae539d5cc3d5fc501529d2df7b77e20449c (diff) | |
parent | bc465aa9d045feb0e13b4a8f32cc33c1943f62d6 (diff) |
Merge 4.0-rc5 into char-misc-next
We want those fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
139 files changed, 1285 insertions, 686 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 7f99cd652203..eb7bb511f853 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -150,6 +150,7 @@ machine-$(CONFIG_ARCH_BERLIN) += berlin | |||
150 | machine-$(CONFIG_ARCH_CLPS711X) += clps711x | 150 | machine-$(CONFIG_ARCH_CLPS711X) += clps711x |
151 | machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx | 151 | machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx |
152 | machine-$(CONFIG_ARCH_DAVINCI) += davinci | 152 | machine-$(CONFIG_ARCH_DAVINCI) += davinci |
153 | machine-$(CONFIG_ARCH_DIGICOLOR) += digicolor | ||
153 | machine-$(CONFIG_ARCH_DOVE) += dove | 154 | machine-$(CONFIG_ARCH_DOVE) += dove |
154 | machine-$(CONFIG_ARCH_EBSA110) += ebsa110 | 155 | machine-$(CONFIG_ARCH_EBSA110) += ebsa110 |
155 | machine-$(CONFIG_ARCH_EFM32) += efm32 | 156 | machine-$(CONFIG_ARCH_EFM32) += efm32 |
diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi index 2c6248d9a9ef..c3255e0c90aa 100644 --- a/arch/arm/boot/dts/am335x-bone-common.dtsi +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi | |||
@@ -301,3 +301,11 @@ | |||
301 | cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; | 301 | cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; |
302 | cd-inverted; | 302 | cd-inverted; |
303 | }; | 303 | }; |
304 | |||
305 | &aes { | ||
306 | status = "okay"; | ||
307 | }; | ||
308 | |||
309 | &sham { | ||
310 | status = "okay"; | ||
311 | }; | ||
diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts index 83d40f7655e5..6b8493720424 100644 --- a/arch/arm/boot/dts/am335x-bone.dts +++ b/arch/arm/boot/dts/am335x-bone.dts | |||
@@ -24,11 +24,3 @@ | |||
24 | &mmc1 { | 24 | &mmc1 { |
25 | vmmc-supply = <&ldo3_reg>; | 25 | vmmc-supply = <&ldo3_reg>; |
26 | }; | 26 | }; |
27 | |||
28 | &sham { | ||
29 | status = "okay"; | ||
30 | }; | ||
31 | |||
32 | &aes { | ||
33 | status = "okay"; | ||
34 | }; | ||
diff --git a/arch/arm/boot/dts/am335x-lxm.dts b/arch/arm/boot/dts/am335x-lxm.dts index 7266a00aab2e..5c5667a3624d 100644 --- a/arch/arm/boot/dts/am335x-lxm.dts +++ b/arch/arm/boot/dts/am335x-lxm.dts | |||
@@ -328,6 +328,10 @@ | |||
328 | dual_emac_res_vlan = <3>; | 328 | dual_emac_res_vlan = <3>; |
329 | }; | 329 | }; |
330 | 330 | ||
331 | &phy_sel { | ||
332 | rmii-clock-ext; | ||
333 | }; | ||
334 | |||
331 | &mac { | 335 | &mac { |
332 | pinctrl-names = "default", "sleep"; | 336 | pinctrl-names = "default", "sleep"; |
333 | pinctrl-0 = <&cpsw_default>; | 337 | pinctrl-0 = <&cpsw_default>; |
diff --git a/arch/arm/boot/dts/am33xx-clocks.dtsi b/arch/arm/boot/dts/am33xx-clocks.dtsi index 712edce7d6fb..071b56aa0c7e 100644 --- a/arch/arm/boot/dts/am33xx-clocks.dtsi +++ b/arch/arm/boot/dts/am33xx-clocks.dtsi | |||
@@ -99,7 +99,7 @@ | |||
99 | ehrpwm0_tbclk: ehrpwm0_tbclk@44e10664 { | 99 | ehrpwm0_tbclk: ehrpwm0_tbclk@44e10664 { |
100 | #clock-cells = <0>; | 100 | #clock-cells = <0>; |
101 | compatible = "ti,gate-clock"; | 101 | compatible = "ti,gate-clock"; |
102 | clocks = <&dpll_per_m2_ck>; | 102 | clocks = <&l4ls_gclk>; |
103 | ti,bit-shift = <0>; | 103 | ti,bit-shift = <0>; |
104 | reg = <0x0664>; | 104 | reg = <0x0664>; |
105 | }; | 105 | }; |
@@ -107,7 +107,7 @@ | |||
107 | ehrpwm1_tbclk: ehrpwm1_tbclk@44e10664 { | 107 | ehrpwm1_tbclk: ehrpwm1_tbclk@44e10664 { |
108 | #clock-cells = <0>; | 108 | #clock-cells = <0>; |
109 | compatible = "ti,gate-clock"; | 109 | compatible = "ti,gate-clock"; |
110 | clocks = <&dpll_per_m2_ck>; | 110 | clocks = <&l4ls_gclk>; |
111 | ti,bit-shift = <1>; | 111 | ti,bit-shift = <1>; |
112 | reg = <0x0664>; | 112 | reg = <0x0664>; |
113 | }; | 113 | }; |
@@ -115,7 +115,7 @@ | |||
115 | ehrpwm2_tbclk: ehrpwm2_tbclk@44e10664 { | 115 | ehrpwm2_tbclk: ehrpwm2_tbclk@44e10664 { |
116 | #clock-cells = <0>; | 116 | #clock-cells = <0>; |
117 | compatible = "ti,gate-clock"; | 117 | compatible = "ti,gate-clock"; |
118 | clocks = <&dpll_per_m2_ck>; | 118 | clocks = <&l4ls_gclk>; |
119 | ti,bit-shift = <2>; | 119 | ti,bit-shift = <2>; |
120 | reg = <0x0664>; | 120 | reg = <0x0664>; |
121 | }; | 121 | }; |
diff --git a/arch/arm/boot/dts/am43xx-clocks.dtsi b/arch/arm/boot/dts/am43xx-clocks.dtsi index c7dc9dab93a4..cfb49686ab6a 100644 --- a/arch/arm/boot/dts/am43xx-clocks.dtsi +++ b/arch/arm/boot/dts/am43xx-clocks.dtsi | |||
@@ -107,7 +107,7 @@ | |||
107 | ehrpwm0_tbclk: ehrpwm0_tbclk { | 107 | ehrpwm0_tbclk: ehrpwm0_tbclk { |
108 | #clock-cells = <0>; | 108 | #clock-cells = <0>; |
109 | compatible = "ti,gate-clock"; | 109 | compatible = "ti,gate-clock"; |
110 | clocks = <&dpll_per_m2_ck>; | 110 | clocks = <&l4ls_gclk>; |
111 | ti,bit-shift = <0>; | 111 | ti,bit-shift = <0>; |
112 | reg = <0x0664>; | 112 | reg = <0x0664>; |
113 | }; | 113 | }; |
@@ -115,7 +115,7 @@ | |||
115 | ehrpwm1_tbclk: ehrpwm1_tbclk { | 115 | ehrpwm1_tbclk: ehrpwm1_tbclk { |
116 | #clock-cells = <0>; | 116 | #clock-cells = <0>; |
117 | compatible = "ti,gate-clock"; | 117 | compatible = "ti,gate-clock"; |
118 | clocks = <&dpll_per_m2_ck>; | 118 | clocks = <&l4ls_gclk>; |
119 | ti,bit-shift = <1>; | 119 | ti,bit-shift = <1>; |
120 | reg = <0x0664>; | 120 | reg = <0x0664>; |
121 | }; | 121 | }; |
@@ -123,7 +123,7 @@ | |||
123 | ehrpwm2_tbclk: ehrpwm2_tbclk { | 123 | ehrpwm2_tbclk: ehrpwm2_tbclk { |
124 | #clock-cells = <0>; | 124 | #clock-cells = <0>; |
125 | compatible = "ti,gate-clock"; | 125 | compatible = "ti,gate-clock"; |
126 | clocks = <&dpll_per_m2_ck>; | 126 | clocks = <&l4ls_gclk>; |
127 | ti,bit-shift = <2>; | 127 | ti,bit-shift = <2>; |
128 | reg = <0x0664>; | 128 | reg = <0x0664>; |
129 | }; | 129 | }; |
@@ -131,7 +131,7 @@ | |||
131 | ehrpwm3_tbclk: ehrpwm3_tbclk { | 131 | ehrpwm3_tbclk: ehrpwm3_tbclk { |
132 | #clock-cells = <0>; | 132 | #clock-cells = <0>; |
133 | compatible = "ti,gate-clock"; | 133 | compatible = "ti,gate-clock"; |
134 | clocks = <&dpll_per_m2_ck>; | 134 | clocks = <&l4ls_gclk>; |
135 | ti,bit-shift = <4>; | 135 | ti,bit-shift = <4>; |
136 | reg = <0x0664>; | 136 | reg = <0x0664>; |
137 | }; | 137 | }; |
@@ -139,7 +139,7 @@ | |||
139 | ehrpwm4_tbclk: ehrpwm4_tbclk { | 139 | ehrpwm4_tbclk: ehrpwm4_tbclk { |
140 | #clock-cells = <0>; | 140 | #clock-cells = <0>; |
141 | compatible = "ti,gate-clock"; | 141 | compatible = "ti,gate-clock"; |
142 | clocks = <&dpll_per_m2_ck>; | 142 | clocks = <&l4ls_gclk>; |
143 | ti,bit-shift = <5>; | 143 | ti,bit-shift = <5>; |
144 | reg = <0x0664>; | 144 | reg = <0x0664>; |
145 | }; | 145 | }; |
@@ -147,7 +147,7 @@ | |||
147 | ehrpwm5_tbclk: ehrpwm5_tbclk { | 147 | ehrpwm5_tbclk: ehrpwm5_tbclk { |
148 | #clock-cells = <0>; | 148 | #clock-cells = <0>; |
149 | compatible = "ti,gate-clock"; | 149 | compatible = "ti,gate-clock"; |
150 | clocks = <&dpll_per_m2_ck>; | 150 | clocks = <&l4ls_gclk>; |
151 | ti,bit-shift = <6>; | 151 | ti,bit-shift = <6>; |
152 | reg = <0x0664>; | 152 | reg = <0x0664>; |
153 | }; | 153 | }; |
diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi index fff0ee69aab4..e7f0a4ae271c 100644 --- a/arch/arm/boot/dts/at91sam9260.dtsi +++ b/arch/arm/boot/dts/at91sam9260.dtsi | |||
@@ -494,12 +494,12 @@ | |||
494 | 494 | ||
495 | pinctrl_usart3_rts: usart3_rts-0 { | 495 | pinctrl_usart3_rts: usart3_rts-0 { |
496 | atmel,pins = | 496 | atmel,pins = |
497 | <AT91_PIOB 8 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC8 periph B */ | 497 | <AT91_PIOC 8 AT91_PERIPH_B AT91_PINCTRL_NONE>; |
498 | }; | 498 | }; |
499 | 499 | ||
500 | pinctrl_usart3_cts: usart3_cts-0 { | 500 | pinctrl_usart3_cts: usart3_cts-0 { |
501 | atmel,pins = | 501 | atmel,pins = |
502 | <AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC10 periph B */ | 502 | <AT91_PIOC 10 AT91_PERIPH_B AT91_PINCTRL_NONE>; |
503 | }; | 503 | }; |
504 | }; | 504 | }; |
505 | 505 | ||
@@ -853,7 +853,7 @@ | |||
853 | }; | 853 | }; |
854 | 854 | ||
855 | usb1: gadget@fffa4000 { | 855 | usb1: gadget@fffa4000 { |
856 | compatible = "atmel,at91rm9200-udc"; | 856 | compatible = "atmel,at91sam9260-udc"; |
857 | reg = <0xfffa4000 0x4000>; | 857 | reg = <0xfffa4000 0x4000>; |
858 | interrupts = <10 IRQ_TYPE_LEVEL_HIGH 2>; | 858 | interrupts = <10 IRQ_TYPE_LEVEL_HIGH 2>; |
859 | clocks = <&udc_clk>, <&udpck>; | 859 | clocks = <&udc_clk>, <&udpck>; |
@@ -976,7 +976,6 @@ | |||
976 | atmel,watchdog-type = "hardware"; | 976 | atmel,watchdog-type = "hardware"; |
977 | atmel,reset-type = "all"; | 977 | atmel,reset-type = "all"; |
978 | atmel,dbg-halt; | 978 | atmel,dbg-halt; |
979 | atmel,idle-halt; | ||
980 | status = "disabled"; | 979 | status = "disabled"; |
981 | }; | 980 | }; |
982 | 981 | ||
diff --git a/arch/arm/boot/dts/at91sam9261.dtsi b/arch/arm/boot/dts/at91sam9261.dtsi index e247b0b5fdab..d55fdf2487ef 100644 --- a/arch/arm/boot/dts/at91sam9261.dtsi +++ b/arch/arm/boot/dts/at91sam9261.dtsi | |||
@@ -124,11 +124,12 @@ | |||
124 | }; | 124 | }; |
125 | 125 | ||
126 | usb1: gadget@fffa4000 { | 126 | usb1: gadget@fffa4000 { |
127 | compatible = "atmel,at91rm9200-udc"; | 127 | compatible = "atmel,at91sam9261-udc"; |
128 | reg = <0xfffa4000 0x4000>; | 128 | reg = <0xfffa4000 0x4000>; |
129 | interrupts = <10 IRQ_TYPE_LEVEL_HIGH 2>; | 129 | interrupts = <10 IRQ_TYPE_LEVEL_HIGH 2>; |
130 | clocks = <&usb>, <&udc_clk>, <&udpck>; | 130 | clocks = <&udc_clk>, <&udpck>; |
131 | clock-names = "usb_clk", "udc_clk", "udpck"; | 131 | clock-names = "pclk", "hclk"; |
132 | atmel,matrix = <&matrix>; | ||
132 | status = "disabled"; | 133 | status = "disabled"; |
133 | }; | 134 | }; |
134 | 135 | ||
@@ -262,7 +263,7 @@ | |||
262 | }; | 263 | }; |
263 | 264 | ||
264 | matrix: matrix@ffffee00 { | 265 | matrix: matrix@ffffee00 { |
265 | compatible = "atmel,at91sam9260-bus-matrix"; | 266 | compatible = "atmel,at91sam9260-bus-matrix", "syscon"; |
266 | reg = <0xffffee00 0x200>; | 267 | reg = <0xffffee00 0x200>; |
267 | }; | 268 | }; |
268 | 269 | ||
diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi index 1f67bb4c144e..fce301c4e9d6 100644 --- a/arch/arm/boot/dts/at91sam9263.dtsi +++ b/arch/arm/boot/dts/at91sam9263.dtsi | |||
@@ -69,7 +69,7 @@ | |||
69 | 69 | ||
70 | sram1: sram@00500000 { | 70 | sram1: sram@00500000 { |
71 | compatible = "mmio-sram"; | 71 | compatible = "mmio-sram"; |
72 | reg = <0x00300000 0x4000>; | 72 | reg = <0x00500000 0x4000>; |
73 | }; | 73 | }; |
74 | 74 | ||
75 | ahb { | 75 | ahb { |
@@ -856,7 +856,7 @@ | |||
856 | }; | 856 | }; |
857 | 857 | ||
858 | usb1: gadget@fff78000 { | 858 | usb1: gadget@fff78000 { |
859 | compatible = "atmel,at91rm9200-udc"; | 859 | compatible = "atmel,at91sam9263-udc"; |
860 | reg = <0xfff78000 0x4000>; | 860 | reg = <0xfff78000 0x4000>; |
861 | interrupts = <24 IRQ_TYPE_LEVEL_HIGH 2>; | 861 | interrupts = <24 IRQ_TYPE_LEVEL_HIGH 2>; |
862 | clocks = <&udc_clk>, <&udpck>; | 862 | clocks = <&udc_clk>, <&udpck>; |
@@ -905,7 +905,6 @@ | |||
905 | atmel,watchdog-type = "hardware"; | 905 | atmel,watchdog-type = "hardware"; |
906 | atmel,reset-type = "all"; | 906 | atmel,reset-type = "all"; |
907 | atmel,dbg-halt; | 907 | atmel,dbg-halt; |
908 | atmel,idle-halt; | ||
909 | status = "disabled"; | 908 | status = "disabled"; |
910 | }; | 909 | }; |
911 | 910 | ||
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi index ee80aa9c0759..488af63d5174 100644 --- a/arch/arm/boot/dts/at91sam9g45.dtsi +++ b/arch/arm/boot/dts/at91sam9g45.dtsi | |||
@@ -1116,7 +1116,6 @@ | |||
1116 | atmel,watchdog-type = "hardware"; | 1116 | atmel,watchdog-type = "hardware"; |
1117 | atmel,reset-type = "all"; | 1117 | atmel,reset-type = "all"; |
1118 | atmel,dbg-halt; | 1118 | atmel,dbg-halt; |
1119 | atmel,idle-halt; | ||
1120 | status = "disabled"; | 1119 | status = "disabled"; |
1121 | }; | 1120 | }; |
1122 | 1121 | ||
@@ -1301,7 +1300,7 @@ | |||
1301 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; | 1300 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; |
1302 | reg = <0x00800000 0x100000>; | 1301 | reg = <0x00800000 0x100000>; |
1303 | interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>; | 1302 | interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>; |
1304 | clocks = <&usb>, <&uhphs_clk>, <&uhphs_clk>, <&uhpck>; | 1303 | clocks = <&utmi>, <&uhphs_clk>, <&uhphs_clk>, <&uhpck>; |
1305 | clock-names = "usb_clk", "ehci_clk", "hclk", "uhpck"; | 1304 | clock-names = "usb_clk", "ehci_clk", "hclk", "uhpck"; |
1306 | status = "disabled"; | 1305 | status = "disabled"; |
1307 | }; | 1306 | }; |
diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi index c2666a7cb5b1..0c53a375ba99 100644 --- a/arch/arm/boot/dts/at91sam9n12.dtsi +++ b/arch/arm/boot/dts/at91sam9n12.dtsi | |||
@@ -894,7 +894,6 @@ | |||
894 | atmel,watchdog-type = "hardware"; | 894 | atmel,watchdog-type = "hardware"; |
895 | atmel,reset-type = "all"; | 895 | atmel,reset-type = "all"; |
896 | atmel,dbg-halt; | 896 | atmel,dbg-halt; |
897 | atmel,idle-halt; | ||
898 | status = "disabled"; | 897 | status = "disabled"; |
899 | }; | 898 | }; |
900 | 899 | ||
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi index 818dabdd8c0e..d221179d0f1a 100644 --- a/arch/arm/boot/dts/at91sam9x5.dtsi +++ b/arch/arm/boot/dts/at91sam9x5.dtsi | |||
@@ -1066,7 +1066,7 @@ | |||
1066 | reg = <0x00500000 0x80000 | 1066 | reg = <0x00500000 0x80000 |
1067 | 0xf803c000 0x400>; | 1067 | 0xf803c000 0x400>; |
1068 | interrupts = <23 IRQ_TYPE_LEVEL_HIGH 0>; | 1068 | interrupts = <23 IRQ_TYPE_LEVEL_HIGH 0>; |
1069 | clocks = <&usb>, <&udphs_clk>; | 1069 | clocks = <&utmi>, <&udphs_clk>; |
1070 | clock-names = "hclk", "pclk"; | 1070 | clock-names = "hclk", "pclk"; |
1071 | status = "disabled"; | 1071 | status = "disabled"; |
1072 | 1072 | ||
@@ -1130,7 +1130,6 @@ | |||
1130 | atmel,watchdog-type = "hardware"; | 1130 | atmel,watchdog-type = "hardware"; |
1131 | atmel,reset-type = "all"; | 1131 | atmel,reset-type = "all"; |
1132 | atmel,dbg-halt; | 1132 | atmel,dbg-halt; |
1133 | atmel,idle-halt; | ||
1134 | status = "disabled"; | 1133 | status = "disabled"; |
1135 | }; | 1134 | }; |
1136 | 1135 | ||
@@ -1186,7 +1185,7 @@ | |||
1186 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; | 1185 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; |
1187 | reg = <0x00700000 0x100000>; | 1186 | reg = <0x00700000 0x100000>; |
1188 | interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>; | 1187 | interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>; |
1189 | clocks = <&usb>, <&uhphs_clk>, <&uhpck>; | 1188 | clocks = <&utmi>, <&uhphs_clk>, <&uhpck>; |
1190 | clock-names = "usb_clk", "ehci_clk", "uhpck"; | 1189 | clock-names = "usb_clk", "ehci_clk", "uhpck"; |
1191 | status = "disabled"; | 1190 | status = "disabled"; |
1192 | }; | 1191 | }; |
diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts index 3290a96ba586..7563d7ce01bb 100644 --- a/arch/arm/boot/dts/dra7-evm.dts +++ b/arch/arm/boot/dts/dra7-evm.dts | |||
@@ -263,17 +263,15 @@ | |||
263 | 263 | ||
264 | dcan1_pins_default: dcan1_pins_default { | 264 | dcan1_pins_default: dcan1_pins_default { |
265 | pinctrl-single,pins = < | 265 | pinctrl-single,pins = < |
266 | 0x3d0 (PIN_OUTPUT | MUX_MODE0) /* dcan1_tx */ | 266 | 0x3d0 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* dcan1_tx */ |
267 | 0x3d4 (MUX_MODE15) /* dcan1_rx.off */ | 267 | 0x418 (PULL_UP | MUX_MODE1) /* wakeup0.dcan1_rx */ |
268 | 0x418 (PULL_DIS | MUX_MODE1) /* wakeup0.dcan1_rx */ | ||
269 | >; | 268 | >; |
270 | }; | 269 | }; |
271 | 270 | ||
272 | dcan1_pins_sleep: dcan1_pins_sleep { | 271 | dcan1_pins_sleep: dcan1_pins_sleep { |
273 | pinctrl-single,pins = < | 272 | pinctrl-single,pins = < |
274 | 0x3d0 (MUX_MODE15) /* dcan1_tx.off */ | 273 | 0x3d0 (MUX_MODE15 | PULL_UP) /* dcan1_tx.off */ |
275 | 0x3d4 (MUX_MODE15) /* dcan1_rx.off */ | 274 | 0x418 (MUX_MODE15 | PULL_UP) /* wakeup0.off */ |
276 | 0x418 (MUX_MODE15) /* wakeup0.off */ | ||
277 | >; | 275 | >; |
278 | }; | 276 | }; |
279 | }; | 277 | }; |
diff --git a/arch/arm/boot/dts/dra72-evm.dts b/arch/arm/boot/dts/dra72-evm.dts index e0264d0bf7b9..40ed539ce474 100644 --- a/arch/arm/boot/dts/dra72-evm.dts +++ b/arch/arm/boot/dts/dra72-evm.dts | |||
@@ -119,17 +119,15 @@ | |||
119 | 119 | ||
120 | dcan1_pins_default: dcan1_pins_default { | 120 | dcan1_pins_default: dcan1_pins_default { |
121 | pinctrl-single,pins = < | 121 | pinctrl-single,pins = < |
122 | 0x3d0 (PIN_OUTPUT | MUX_MODE0) /* dcan1_tx */ | 122 | 0x3d0 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* dcan1_tx */ |
123 | 0x3d4 (MUX_MODE15) /* dcan1_rx.off */ | 123 | 0x418 (PULL_UP | MUX_MODE1) /* wakeup0.dcan1_rx */ |
124 | 0x418 (PULL_DIS | MUX_MODE1) /* wakeup0.dcan1_rx */ | ||
125 | >; | 124 | >; |
126 | }; | 125 | }; |
127 | 126 | ||
128 | dcan1_pins_sleep: dcan1_pins_sleep { | 127 | dcan1_pins_sleep: dcan1_pins_sleep { |
129 | pinctrl-single,pins = < | 128 | pinctrl-single,pins = < |
130 | 0x3d0 (MUX_MODE15) /* dcan1_tx.off */ | 129 | 0x3d0 (MUX_MODE15 | PULL_UP) /* dcan1_tx.off */ |
131 | 0x3d4 (MUX_MODE15) /* dcan1_rx.off */ | 130 | 0x418 (MUX_MODE15 | PULL_UP) /* wakeup0.off */ |
132 | 0x418 (MUX_MODE15) /* wakeup0.off */ | ||
133 | >; | 131 | >; |
134 | }; | 132 | }; |
135 | 133 | ||
diff --git a/arch/arm/boot/dts/dra7xx-clocks.dtsi b/arch/arm/boot/dts/dra7xx-clocks.dtsi index 4bdcbd61ce47..99b09a44e269 100644 --- a/arch/arm/boot/dts/dra7xx-clocks.dtsi +++ b/arch/arm/boot/dts/dra7xx-clocks.dtsi | |||
@@ -243,10 +243,18 @@ | |||
243 | ti,invert-autoidle-bit; | 243 | ti,invert-autoidle-bit; |
244 | }; | 244 | }; |
245 | 245 | ||
246 | dpll_core_byp_mux: dpll_core_byp_mux { | ||
247 | #clock-cells = <0>; | ||
248 | compatible = "ti,mux-clock"; | ||
249 | clocks = <&sys_clkin1>, <&dpll_abe_m3x2_ck>; | ||
250 | ti,bit-shift = <23>; | ||
251 | reg = <0x012c>; | ||
252 | }; | ||
253 | |||
246 | dpll_core_ck: dpll_core_ck { | 254 | dpll_core_ck: dpll_core_ck { |
247 | #clock-cells = <0>; | 255 | #clock-cells = <0>; |
248 | compatible = "ti,omap4-dpll-core-clock"; | 256 | compatible = "ti,omap4-dpll-core-clock"; |
249 | clocks = <&sys_clkin1>, <&dpll_abe_m3x2_ck>; | 257 | clocks = <&sys_clkin1>, <&dpll_core_byp_mux>; |
250 | reg = <0x0120>, <0x0124>, <0x012c>, <0x0128>; | 258 | reg = <0x0120>, <0x0124>, <0x012c>, <0x0128>; |
251 | }; | 259 | }; |
252 | 260 | ||
@@ -309,10 +317,18 @@ | |||
309 | clock-div = <1>; | 317 | clock-div = <1>; |
310 | }; | 318 | }; |
311 | 319 | ||
320 | dpll_dsp_byp_mux: dpll_dsp_byp_mux { | ||
321 | #clock-cells = <0>; | ||
322 | compatible = "ti,mux-clock"; | ||
323 | clocks = <&sys_clkin1>, <&dsp_dpll_hs_clk_div>; | ||
324 | ti,bit-shift = <23>; | ||
325 | reg = <0x0240>; | ||
326 | }; | ||
327 | |||
312 | dpll_dsp_ck: dpll_dsp_ck { | 328 | dpll_dsp_ck: dpll_dsp_ck { |
313 | #clock-cells = <0>; | 329 | #clock-cells = <0>; |
314 | compatible = "ti,omap4-dpll-clock"; | 330 | compatible = "ti,omap4-dpll-clock"; |
315 | clocks = <&sys_clkin1>, <&dsp_dpll_hs_clk_div>; | 331 | clocks = <&sys_clkin1>, <&dpll_dsp_byp_mux>; |
316 | reg = <0x0234>, <0x0238>, <0x0240>, <0x023c>; | 332 | reg = <0x0234>, <0x0238>, <0x0240>, <0x023c>; |
317 | }; | 333 | }; |
318 | 334 | ||
@@ -335,10 +351,18 @@ | |||
335 | clock-div = <1>; | 351 | clock-div = <1>; |
336 | }; | 352 | }; |
337 | 353 | ||
354 | dpll_iva_byp_mux: dpll_iva_byp_mux { | ||
355 | #clock-cells = <0>; | ||
356 | compatible = "ti,mux-clock"; | ||
357 | clocks = <&sys_clkin1>, <&iva_dpll_hs_clk_div>; | ||
358 | ti,bit-shift = <23>; | ||
359 | reg = <0x01ac>; | ||
360 | }; | ||
361 | |||
338 | dpll_iva_ck: dpll_iva_ck { | 362 | dpll_iva_ck: dpll_iva_ck { |
339 | #clock-cells = <0>; | 363 | #clock-cells = <0>; |
340 | compatible = "ti,omap4-dpll-clock"; | 364 | compatible = "ti,omap4-dpll-clock"; |
341 | clocks = <&sys_clkin1>, <&iva_dpll_hs_clk_div>; | 365 | clocks = <&sys_clkin1>, <&dpll_iva_byp_mux>; |
342 | reg = <0x01a0>, <0x01a4>, <0x01ac>, <0x01a8>; | 366 | reg = <0x01a0>, <0x01a4>, <0x01ac>, <0x01a8>; |
343 | }; | 367 | }; |
344 | 368 | ||
@@ -361,10 +385,18 @@ | |||
361 | clock-div = <1>; | 385 | clock-div = <1>; |
362 | }; | 386 | }; |
363 | 387 | ||
388 | dpll_gpu_byp_mux: dpll_gpu_byp_mux { | ||
389 | #clock-cells = <0>; | ||
390 | compatible = "ti,mux-clock"; | ||
391 | clocks = <&sys_clkin1>, <&dpll_abe_m3x2_ck>; | ||
392 | ti,bit-shift = <23>; | ||
393 | reg = <0x02e4>; | ||
394 | }; | ||
395 | |||
364 | dpll_gpu_ck: dpll_gpu_ck { | 396 | dpll_gpu_ck: dpll_gpu_ck { |
365 | #clock-cells = <0>; | 397 | #clock-cells = <0>; |
366 | compatible = "ti,omap4-dpll-clock"; | 398 | compatible = "ti,omap4-dpll-clock"; |
367 | clocks = <&sys_clkin1>, <&dpll_abe_m3x2_ck>; | 399 | clocks = <&sys_clkin1>, <&dpll_gpu_byp_mux>; |
368 | reg = <0x02d8>, <0x02dc>, <0x02e4>, <0x02e0>; | 400 | reg = <0x02d8>, <0x02dc>, <0x02e4>, <0x02e0>; |
369 | }; | 401 | }; |
370 | 402 | ||
@@ -398,10 +430,18 @@ | |||
398 | clock-div = <1>; | 430 | clock-div = <1>; |
399 | }; | 431 | }; |
400 | 432 | ||
433 | dpll_ddr_byp_mux: dpll_ddr_byp_mux { | ||
434 | #clock-cells = <0>; | ||
435 | compatible = "ti,mux-clock"; | ||
436 | clocks = <&sys_clkin1>, <&dpll_abe_m3x2_ck>; | ||
437 | ti,bit-shift = <23>; | ||
438 | reg = <0x021c>; | ||
439 | }; | ||
440 | |||
401 | dpll_ddr_ck: dpll_ddr_ck { | 441 | dpll_ddr_ck: dpll_ddr_ck { |
402 | #clock-cells = <0>; | 442 | #clock-cells = <0>; |
403 | compatible = "ti,omap4-dpll-clock"; | 443 | compatible = "ti,omap4-dpll-clock"; |
404 | clocks = <&sys_clkin1>, <&dpll_abe_m3x2_ck>; | 444 | clocks = <&sys_clkin1>, <&dpll_ddr_byp_mux>; |
405 | reg = <0x0210>, <0x0214>, <0x021c>, <0x0218>; | 445 | reg = <0x0210>, <0x0214>, <0x021c>, <0x0218>; |
406 | }; | 446 | }; |
407 | 447 | ||
@@ -416,10 +456,18 @@ | |||
416 | ti,invert-autoidle-bit; | 456 | ti,invert-autoidle-bit; |
417 | }; | 457 | }; |
418 | 458 | ||
459 | dpll_gmac_byp_mux: dpll_gmac_byp_mux { | ||
460 | #clock-cells = <0>; | ||
461 | compatible = "ti,mux-clock"; | ||
462 | clocks = <&sys_clkin1>, <&dpll_abe_m3x2_ck>; | ||
463 | ti,bit-shift = <23>; | ||
464 | reg = <0x02b4>; | ||
465 | }; | ||
466 | |||
419 | dpll_gmac_ck: dpll_gmac_ck { | 467 | dpll_gmac_ck: dpll_gmac_ck { |
420 | #clock-cells = <0>; | 468 | #clock-cells = <0>; |
421 | compatible = "ti,omap4-dpll-clock"; | 469 | compatible = "ti,omap4-dpll-clock"; |
422 | clocks = <&sys_clkin1>, <&dpll_abe_m3x2_ck>; | 470 | clocks = <&sys_clkin1>, <&dpll_gmac_byp_mux>; |
423 | reg = <0x02a8>, <0x02ac>, <0x02b4>, <0x02b0>; | 471 | reg = <0x02a8>, <0x02ac>, <0x02b4>, <0x02b0>; |
424 | }; | 472 | }; |
425 | 473 | ||
@@ -482,10 +530,18 @@ | |||
482 | clock-div = <1>; | 530 | clock-div = <1>; |
483 | }; | 531 | }; |
484 | 532 | ||
533 | dpll_eve_byp_mux: dpll_eve_byp_mux { | ||
534 | #clock-cells = <0>; | ||
535 | compatible = "ti,mux-clock"; | ||
536 | clocks = <&sys_clkin1>, <&eve_dpll_hs_clk_div>; | ||
537 | ti,bit-shift = <23>; | ||
538 | reg = <0x0290>; | ||
539 | }; | ||
540 | |||
485 | dpll_eve_ck: dpll_eve_ck { | 541 | dpll_eve_ck: dpll_eve_ck { |
486 | #clock-cells = <0>; | 542 | #clock-cells = <0>; |
487 | compatible = "ti,omap4-dpll-clock"; | 543 | compatible = "ti,omap4-dpll-clock"; |
488 | clocks = <&sys_clkin1>, <&eve_dpll_hs_clk_div>; | 544 | clocks = <&sys_clkin1>, <&dpll_eve_byp_mux>; |
489 | reg = <0x0284>, <0x0288>, <0x0290>, <0x028c>; | 545 | reg = <0x0284>, <0x0288>, <0x0290>, <0x028c>; |
490 | }; | 546 | }; |
491 | 547 | ||
@@ -1249,10 +1305,18 @@ | |||
1249 | clock-div = <1>; | 1305 | clock-div = <1>; |
1250 | }; | 1306 | }; |
1251 | 1307 | ||
1308 | dpll_per_byp_mux: dpll_per_byp_mux { | ||
1309 | #clock-cells = <0>; | ||
1310 | compatible = "ti,mux-clock"; | ||
1311 | clocks = <&sys_clkin1>, <&per_dpll_hs_clk_div>; | ||
1312 | ti,bit-shift = <23>; | ||
1313 | reg = <0x014c>; | ||
1314 | }; | ||
1315 | |||
1252 | dpll_per_ck: dpll_per_ck { | 1316 | dpll_per_ck: dpll_per_ck { |
1253 | #clock-cells = <0>; | 1317 | #clock-cells = <0>; |
1254 | compatible = "ti,omap4-dpll-clock"; | 1318 | compatible = "ti,omap4-dpll-clock"; |
1255 | clocks = <&sys_clkin1>, <&per_dpll_hs_clk_div>; | 1319 | clocks = <&sys_clkin1>, <&dpll_per_byp_mux>; |
1256 | reg = <0x0140>, <0x0144>, <0x014c>, <0x0148>; | 1320 | reg = <0x0140>, <0x0144>, <0x014c>, <0x0148>; |
1257 | }; | 1321 | }; |
1258 | 1322 | ||
@@ -1275,10 +1339,18 @@ | |||
1275 | clock-div = <1>; | 1339 | clock-div = <1>; |
1276 | }; | 1340 | }; |
1277 | 1341 | ||
1342 | dpll_usb_byp_mux: dpll_usb_byp_mux { | ||
1343 | #clock-cells = <0>; | ||
1344 | compatible = "ti,mux-clock"; | ||
1345 | clocks = <&sys_clkin1>, <&usb_dpll_hs_clk_div>; | ||
1346 | ti,bit-shift = <23>; | ||
1347 | reg = <0x018c>; | ||
1348 | }; | ||
1349 | |||
1278 | dpll_usb_ck: dpll_usb_ck { | 1350 | dpll_usb_ck: dpll_usb_ck { |
1279 | #clock-cells = <0>; | 1351 | #clock-cells = <0>; |
1280 | compatible = "ti,omap4-dpll-j-type-clock"; | 1352 | compatible = "ti,omap4-dpll-j-type-clock"; |
1281 | clocks = <&sys_clkin1>, <&usb_dpll_hs_clk_div>; | 1353 | clocks = <&sys_clkin1>, <&dpll_usb_byp_mux>; |
1282 | reg = <0x0180>, <0x0184>, <0x018c>, <0x0188>; | 1354 | reg = <0x0180>, <0x0184>, <0x018c>, <0x0188>; |
1283 | }; | 1355 | }; |
1284 | 1356 | ||
diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi index 277b48b0b6f9..ac6b0ae42caf 100644 --- a/arch/arm/boot/dts/exynos3250.dtsi +++ b/arch/arm/boot/dts/exynos3250.dtsi | |||
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include "skeleton.dtsi" | 20 | #include "skeleton.dtsi" |
21 | #include "exynos4-cpu-thermal.dtsi" | ||
21 | #include <dt-bindings/clock/exynos3250.h> | 22 | #include <dt-bindings/clock/exynos3250.h> |
22 | 23 | ||
23 | / { | 24 | / { |
@@ -193,6 +194,7 @@ | |||
193 | interrupts = <0 216 0>; | 194 | interrupts = <0 216 0>; |
194 | clocks = <&cmu CLK_TMU_APBIF>; | 195 | clocks = <&cmu CLK_TMU_APBIF>; |
195 | clock-names = "tmu_apbif"; | 196 | clock-names = "tmu_apbif"; |
197 | #include "exynos4412-tmu-sensor-conf.dtsi" | ||
196 | status = "disabled"; | 198 | status = "disabled"; |
197 | }; | 199 | }; |
198 | 200 | ||
diff --git a/arch/arm/boot/dts/exynos4-cpu-thermal.dtsi b/arch/arm/boot/dts/exynos4-cpu-thermal.dtsi new file mode 100644 index 000000000000..735cb2f10817 --- /dev/null +++ b/arch/arm/boot/dts/exynos4-cpu-thermal.dtsi | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * Device tree sources for Exynos4 thermal zone | ||
3 | * | ||
4 | * Copyright (c) 2014 Lukasz Majewski <l.majewski@samsung.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #include <dt-bindings/thermal/thermal.h> | ||
13 | |||
14 | / { | ||
15 | thermal-zones { | ||
16 | cpu_thermal: cpu-thermal { | ||
17 | thermal-sensors = <&tmu 0>; | ||
18 | polling-delay-passive = <0>; | ||
19 | polling-delay = <0>; | ||
20 | trips { | ||
21 | cpu_alert0: cpu-alert-0 { | ||
22 | temperature = <70000>; /* millicelsius */ | ||
23 | hysteresis = <10000>; /* millicelsius */ | ||
24 | type = "active"; | ||
25 | }; | ||
26 | cpu_alert1: cpu-alert-1 { | ||
27 | temperature = <95000>; /* millicelsius */ | ||
28 | hysteresis = <10000>; /* millicelsius */ | ||
29 | type = "active"; | ||
30 | }; | ||
31 | cpu_alert2: cpu-alert-2 { | ||
32 | temperature = <110000>; /* millicelsius */ | ||
33 | hysteresis = <10000>; /* millicelsius */ | ||
34 | type = "active"; | ||
35 | }; | ||
36 | cpu_crit0: cpu-crit-0 { | ||
37 | temperature = <120000>; /* millicelsius */ | ||
38 | hysteresis = <0>; /* millicelsius */ | ||
39 | type = "critical"; | ||
40 | }; | ||
41 | }; | ||
42 | cooling-maps { | ||
43 | map0 { | ||
44 | trip = <&cpu_alert0>; | ||
45 | }; | ||
46 | map1 { | ||
47 | trip = <&cpu_alert1>; | ||
48 | }; | ||
49 | }; | ||
50 | }; | ||
51 | }; | ||
52 | }; | ||
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index 76173cacd450..77ea547768f4 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi | |||
@@ -38,6 +38,7 @@ | |||
38 | i2c5 = &i2c_5; | 38 | i2c5 = &i2c_5; |
39 | i2c6 = &i2c_6; | 39 | i2c6 = &i2c_6; |
40 | i2c7 = &i2c_7; | 40 | i2c7 = &i2c_7; |
41 | i2c8 = &i2c_8; | ||
41 | csis0 = &csis_0; | 42 | csis0 = &csis_0; |
42 | csis1 = &csis_1; | 43 | csis1 = &csis_1; |
43 | fimc0 = &fimc_0; | 44 | fimc0 = &fimc_0; |
@@ -104,6 +105,7 @@ | |||
104 | compatible = "samsung,exynos4210-pd"; | 105 | compatible = "samsung,exynos4210-pd"; |
105 | reg = <0x10023C20 0x20>; | 106 | reg = <0x10023C20 0x20>; |
106 | #power-domain-cells = <0>; | 107 | #power-domain-cells = <0>; |
108 | power-domains = <&pd_lcd0>; | ||
107 | }; | 109 | }; |
108 | 110 | ||
109 | pd_cam: cam-power-domain@10023C00 { | 111 | pd_cam: cam-power-domain@10023C00 { |
@@ -554,6 +556,22 @@ | |||
554 | status = "disabled"; | 556 | status = "disabled"; |
555 | }; | 557 | }; |
556 | 558 | ||
559 | i2c_8: i2c@138E0000 { | ||
560 | #address-cells = <1>; | ||
561 | #size-cells = <0>; | ||
562 | compatible = "samsung,s3c2440-hdmiphy-i2c"; | ||
563 | reg = <0x138E0000 0x100>; | ||
564 | interrupts = <0 93 0>; | ||
565 | clocks = <&clock CLK_I2C_HDMI>; | ||
566 | clock-names = "i2c"; | ||
567 | status = "disabled"; | ||
568 | |||
569 | hdmi_i2c_phy: hdmiphy@38 { | ||
570 | compatible = "exynos4210-hdmiphy"; | ||
571 | reg = <0x38>; | ||
572 | }; | ||
573 | }; | ||
574 | |||
557 | spi_0: spi@13920000 { | 575 | spi_0: spi@13920000 { |
558 | compatible = "samsung,exynos4210-spi"; | 576 | compatible = "samsung,exynos4210-spi"; |
559 | reg = <0x13920000 0x100>; | 577 | reg = <0x13920000 0x100>; |
@@ -663,6 +681,33 @@ | |||
663 | status = "disabled"; | 681 | status = "disabled"; |
664 | }; | 682 | }; |
665 | 683 | ||
684 | tmu: tmu@100C0000 { | ||
685 | #include "exynos4412-tmu-sensor-conf.dtsi" | ||
686 | }; | ||
687 | |||
688 | hdmi: hdmi@12D00000 { | ||
689 | compatible = "samsung,exynos4210-hdmi"; | ||
690 | reg = <0x12D00000 0x70000>; | ||
691 | interrupts = <0 92 0>; | ||
692 | clock-names = "hdmi", "sclk_hdmi", "sclk_pixel", "sclk_hdmiphy", | ||
693 | "mout_hdmi"; | ||
694 | clocks = <&clock CLK_HDMI>, <&clock CLK_SCLK_HDMI>, | ||
695 | <&clock CLK_SCLK_PIXEL>, <&clock CLK_SCLK_HDMIPHY>, | ||
696 | <&clock CLK_MOUT_HDMI>; | ||
697 | phy = <&hdmi_i2c_phy>; | ||
698 | power-domains = <&pd_tv>; | ||
699 | samsung,syscon-phandle = <&pmu_system_controller>; | ||
700 | status = "disabled"; | ||
701 | }; | ||
702 | |||
703 | mixer: mixer@12C10000 { | ||
704 | compatible = "samsung,exynos4210-mixer"; | ||
705 | interrupts = <0 91 0>; | ||
706 | reg = <0x12C10000 0x2100>, <0x12c00000 0x300>; | ||
707 | power-domains = <&pd_tv>; | ||
708 | status = "disabled"; | ||
709 | }; | ||
710 | |||
666 | ppmu_dmc0: ppmu_dmc0@106a0000 { | 711 | ppmu_dmc0: ppmu_dmc0@106a0000 { |
667 | compatible = "samsung,exynos-ppmu"; | 712 | compatible = "samsung,exynos-ppmu"; |
668 | reg = <0x106a0000 0x2000>; | 713 | reg = <0x106a0000 0x2000>; |
diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts index 3d6652a4b6cb..32c5fd8f6269 100644 --- a/arch/arm/boot/dts/exynos4210-trats.dts +++ b/arch/arm/boot/dts/exynos4210-trats.dts | |||
@@ -426,6 +426,25 @@ | |||
426 | status = "okay"; | 426 | status = "okay"; |
427 | }; | 427 | }; |
428 | 428 | ||
429 | tmu@100C0000 { | ||
430 | status = "okay"; | ||
431 | }; | ||
432 | |||
433 | thermal-zones { | ||
434 | cpu_thermal: cpu-thermal { | ||
435 | cooling-maps { | ||
436 | map0 { | ||
437 | /* Corresponds to 800MHz at freq_table */ | ||
438 | cooling-device = <&cpu0 2 2>; | ||
439 | }; | ||
440 | map1 { | ||
441 | /* Corresponds to 200MHz at freq_table */ | ||
442 | cooling-device = <&cpu0 4 4>; | ||
443 | }; | ||
444 | }; | ||
445 | }; | ||
446 | }; | ||
447 | |||
429 | camera { | 448 | camera { |
430 | pinctrl-names = "default"; | 449 | pinctrl-names = "default"; |
431 | pinctrl-0 = <>; | 450 | pinctrl-0 = <>; |
diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts b/arch/arm/boot/dts/exynos4210-universal_c210.dts index b57e6b82ea20..d4f2b11319dd 100644 --- a/arch/arm/boot/dts/exynos4210-universal_c210.dts +++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts | |||
@@ -505,6 +505,63 @@ | |||
505 | assigned-clock-rates = <0>, <160000000>; | 505 | assigned-clock-rates = <0>, <160000000>; |
506 | }; | 506 | }; |
507 | }; | 507 | }; |
508 | |||
509 | hdmi_en: voltage-regulator-hdmi-5v { | ||
510 | compatible = "regulator-fixed"; | ||
511 | regulator-name = "HDMI_5V"; | ||
512 | regulator-min-microvolt = <5000000>; | ||
513 | regulator-max-microvolt = <5000000>; | ||
514 | gpio = <&gpe0 1 0>; | ||
515 | enable-active-high; | ||
516 | }; | ||
517 | |||
518 | hdmi_ddc: i2c-ddc { | ||
519 | compatible = "i2c-gpio"; | ||
520 | gpios = <&gpe4 2 0 &gpe4 3 0>; | ||
521 | i2c-gpio,delay-us = <100>; | ||
522 | #address-cells = <1>; | ||
523 | #size-cells = <0>; | ||
524 | |||
525 | pinctrl-0 = <&i2c_ddc_bus>; | ||
526 | pinctrl-names = "default"; | ||
527 | status = "okay"; | ||
528 | }; | ||
529 | |||
530 | mixer@12C10000 { | ||
531 | status = "okay"; | ||
532 | }; | ||
533 | |||
534 | hdmi@12D00000 { | ||
535 | hpd-gpio = <&gpx3 7 0>; | ||
536 | pinctrl-names = "default"; | ||
537 | pinctrl-0 = <&hdmi_hpd>; | ||
538 | hdmi-en-supply = <&hdmi_en>; | ||
539 | vdd-supply = <&ldo3_reg>; | ||
540 | vdd_osc-supply = <&ldo4_reg>; | ||
541 | vdd_pll-supply = <&ldo3_reg>; | ||
542 | ddc = <&hdmi_ddc>; | ||
543 | status = "okay"; | ||
544 | }; | ||
545 | |||
546 | i2c@138E0000 { | ||
547 | status = "okay"; | ||
548 | }; | ||
549 | }; | ||
550 | |||
551 | &pinctrl_1 { | ||
552 | hdmi_hpd: hdmi-hpd { | ||
553 | samsung,pins = "gpx3-7"; | ||
554 | samsung,pin-pud = <0>; | ||
555 | }; | ||
556 | }; | ||
557 | |||
558 | &pinctrl_0 { | ||
559 | i2c_ddc_bus: i2c-ddc-bus { | ||
560 | samsung,pins = "gpe4-2", "gpe4-3"; | ||
561 | samsung,pin-function = <2>; | ||
562 | samsung,pin-pud = <3>; | ||
563 | samsung,pin-drv = <0>; | ||
564 | }; | ||
508 | }; | 565 | }; |
509 | 566 | ||
510 | &mdma1 { | 567 | &mdma1 { |
diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi index 67c832c9dcf1..be89f83f70e7 100644 --- a/arch/arm/boot/dts/exynos4210.dtsi +++ b/arch/arm/boot/dts/exynos4210.dtsi | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include "exynos4.dtsi" | 22 | #include "exynos4.dtsi" |
23 | #include "exynos4210-pinctrl.dtsi" | 23 | #include "exynos4210-pinctrl.dtsi" |
24 | #include "exynos4-cpu-thermal.dtsi" | ||
24 | 25 | ||
25 | / { | 26 | / { |
26 | compatible = "samsung,exynos4210", "samsung,exynos4"; | 27 | compatible = "samsung,exynos4210", "samsung,exynos4"; |
@@ -35,10 +36,13 @@ | |||
35 | #address-cells = <1>; | 36 | #address-cells = <1>; |
36 | #size-cells = <0>; | 37 | #size-cells = <0>; |
37 | 38 | ||
38 | cpu@900 { | 39 | cpu0: cpu@900 { |
39 | device_type = "cpu"; | 40 | device_type = "cpu"; |
40 | compatible = "arm,cortex-a9"; | 41 | compatible = "arm,cortex-a9"; |
41 | reg = <0x900>; | 42 | reg = <0x900>; |
43 | cooling-min-level = <4>; | ||
44 | cooling-max-level = <2>; | ||
45 | #cooling-cells = <2>; /* min followed by max */ | ||
42 | }; | 46 | }; |
43 | 47 | ||
44 | cpu@901 { | 48 | cpu@901 { |
@@ -153,16 +157,38 @@ | |||
153 | reg = <0x03860000 0x1000>; | 157 | reg = <0x03860000 0x1000>; |
154 | }; | 158 | }; |
155 | 159 | ||
156 | tmu@100C0000 { | 160 | tmu: tmu@100C0000 { |
157 | compatible = "samsung,exynos4210-tmu"; | 161 | compatible = "samsung,exynos4210-tmu"; |
158 | interrupt-parent = <&combiner>; | 162 | interrupt-parent = <&combiner>; |
159 | reg = <0x100C0000 0x100>; | 163 | reg = <0x100C0000 0x100>; |
160 | interrupts = <2 4>; | 164 | interrupts = <2 4>; |
161 | clocks = <&clock CLK_TMU_APBIF>; | 165 | clocks = <&clock CLK_TMU_APBIF>; |
162 | clock-names = "tmu_apbif"; | 166 | clock-names = "tmu_apbif"; |
167 | samsung,tmu_gain = <15>; | ||
168 | samsung,tmu_reference_voltage = <7>; | ||
163 | status = "disabled"; | 169 | status = "disabled"; |
164 | }; | 170 | }; |
165 | 171 | ||
172 | thermal-zones { | ||
173 | cpu_thermal: cpu-thermal { | ||
174 | polling-delay-passive = <0>; | ||
175 | polling-delay = <0>; | ||
176 | thermal-sensors = <&tmu 0>; | ||
177 | |||
178 | trips { | ||
179 | cpu_alert0: cpu-alert-0 { | ||
180 | temperature = <85000>; /* millicelsius */ | ||
181 | }; | ||
182 | cpu_alert1: cpu-alert-1 { | ||
183 | temperature = <100000>; /* millicelsius */ | ||
184 | }; | ||
185 | cpu_alert2: cpu-alert-2 { | ||
186 | temperature = <110000>; /* millicelsius */ | ||
187 | }; | ||
188 | }; | ||
189 | }; | ||
190 | }; | ||
191 | |||
166 | g2d@12800000 { | 192 | g2d@12800000 { |
167 | compatible = "samsung,s5pv210-g2d"; | 193 | compatible = "samsung,s5pv210-g2d"; |
168 | reg = <0x12800000 0x1000>; | 194 | reg = <0x12800000 0x1000>; |
@@ -203,6 +229,14 @@ | |||
203 | }; | 229 | }; |
204 | }; | 230 | }; |
205 | 231 | ||
232 | mixer: mixer@12C10000 { | ||
233 | clock-names = "mixer", "hdmi", "sclk_hdmi", "vp", "mout_mixer", | ||
234 | "sclk_mixer"; | ||
235 | clocks = <&clock CLK_MIXER>, <&clock CLK_HDMI>, | ||
236 | <&clock CLK_SCLK_HDMI>, <&clock CLK_VP>, | ||
237 | <&clock CLK_MOUT_MIXER>, <&clock CLK_SCLK_MIXER>; | ||
238 | }; | ||
239 | |||
206 | ppmu_lcd1: ppmu_lcd1@12240000 { | 240 | ppmu_lcd1: ppmu_lcd1@12240000 { |
207 | compatible = "samsung,exynos-ppmu"; | 241 | compatible = "samsung,exynos-ppmu"; |
208 | reg = <0x12240000 0x2000>; | 242 | reg = <0x12240000 0x2000>; |
diff --git a/arch/arm/boot/dts/exynos4212.dtsi b/arch/arm/boot/dts/exynos4212.dtsi index dd0a43ec56da..5be03288f1ee 100644 --- a/arch/arm/boot/dts/exynos4212.dtsi +++ b/arch/arm/boot/dts/exynos4212.dtsi | |||
@@ -26,10 +26,13 @@ | |||
26 | #address-cells = <1>; | 26 | #address-cells = <1>; |
27 | #size-cells = <0>; | 27 | #size-cells = <0>; |
28 | 28 | ||
29 | cpu@A00 { | 29 | cpu0: cpu@A00 { |
30 | device_type = "cpu"; | 30 | device_type = "cpu"; |
31 | compatible = "arm,cortex-a9"; | 31 | compatible = "arm,cortex-a9"; |
32 | reg = <0xA00>; | 32 | reg = <0xA00>; |
33 | cooling-min-level = <13>; | ||
34 | cooling-max-level = <7>; | ||
35 | #cooling-cells = <2>; /* min followed by max */ | ||
33 | }; | 36 | }; |
34 | 37 | ||
35 | cpu@A01 { | 38 | cpu@A01 { |
diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi index de80b5bba204..adb4f6a97a1d 100644 --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi | |||
@@ -249,6 +249,20 @@ | |||
249 | regulator-always-on; | 249 | regulator-always-on; |
250 | }; | 250 | }; |
251 | 251 | ||
252 | ldo8_reg: ldo@8 { | ||
253 | regulator-compatible = "LDO8"; | ||
254 | regulator-name = "VDD10_HDMI_1.0V"; | ||
255 | regulator-min-microvolt = <1000000>; | ||
256 | regulator-max-microvolt = <1000000>; | ||
257 | }; | ||
258 | |||
259 | ldo10_reg: ldo@10 { | ||
260 | regulator-compatible = "LDO10"; | ||
261 | regulator-name = "VDDQ_MIPIHSI_1.8V"; | ||
262 | regulator-min-microvolt = <1800000>; | ||
263 | regulator-max-microvolt = <1800000>; | ||
264 | }; | ||
265 | |||
252 | ldo11_reg: LDO11 { | 266 | ldo11_reg: LDO11 { |
253 | regulator-name = "VDD18_ABB1_1.8V"; | 267 | regulator-name = "VDD18_ABB1_1.8V"; |
254 | regulator-min-microvolt = <1800000>; | 268 | regulator-min-microvolt = <1800000>; |
@@ -411,6 +425,51 @@ | |||
411 | ehci: ehci@12580000 { | 425 | ehci: ehci@12580000 { |
412 | status = "okay"; | 426 | status = "okay"; |
413 | }; | 427 | }; |
428 | |||
429 | tmu@100C0000 { | ||
430 | vtmu-supply = <&ldo10_reg>; | ||
431 | status = "okay"; | ||
432 | }; | ||
433 | |||
434 | thermal-zones { | ||
435 | cpu_thermal: cpu-thermal { | ||
436 | cooling-maps { | ||
437 | map0 { | ||
438 | /* Corresponds to 800MHz at freq_table */ | ||
439 | cooling-device = <&cpu0 7 7>; | ||
440 | }; | ||
441 | map1 { | ||
442 | /* Corresponds to 200MHz at freq_table */ | ||
443 | cooling-device = <&cpu0 13 13>; | ||
444 | }; | ||
445 | }; | ||
446 | }; | ||
447 | }; | ||
448 | |||
449 | mixer: mixer@12C10000 { | ||
450 | status = "okay"; | ||
451 | }; | ||
452 | |||
453 | hdmi@12D00000 { | ||
454 | hpd-gpio = <&gpx3 7 0>; | ||
455 | pinctrl-names = "default"; | ||
456 | pinctrl-0 = <&hdmi_hpd>; | ||
457 | vdd-supply = <&ldo8_reg>; | ||
458 | vdd_osc-supply = <&ldo10_reg>; | ||
459 | vdd_pll-supply = <&ldo8_reg>; | ||
460 | ddc = <&hdmi_ddc>; | ||
461 | status = "okay"; | ||
462 | }; | ||
463 | |||
464 | hdmi_ddc: i2c@13880000 { | ||
465 | status = "okay"; | ||
466 | pinctrl-names = "default"; | ||
467 | pinctrl-0 = <&i2c2_bus>; | ||
468 | }; | ||
469 | |||
470 | i2c@138E0000 { | ||
471 | status = "okay"; | ||
472 | }; | ||
414 | }; | 473 | }; |
415 | 474 | ||
416 | &pinctrl_1 { | 475 | &pinctrl_1 { |
@@ -425,4 +484,9 @@ | |||
425 | samsung,pin-pud = <0>; | 484 | samsung,pin-pud = <0>; |
426 | samsung,pin-drv = <0>; | 485 | samsung,pin-drv = <0>; |
427 | }; | 486 | }; |
487 | |||
488 | hdmi_hpd: hdmi-hpd { | ||
489 | samsung,pins = "gpx3-7"; | ||
490 | samsung,pin-pud = <1>; | ||
491 | }; | ||
428 | }; | 492 | }; |
diff --git a/arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi b/arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi new file mode 100644 index 000000000000..e3f7934d19d0 --- /dev/null +++ b/arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * Device tree sources for Exynos4412 TMU sensor configuration | ||
3 | * | ||
4 | * Copyright (c) 2014 Lukasz Majewski <l.majewski@samsung.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #include <dt-bindings/thermal/thermal_exynos.h> | ||
13 | |||
14 | #thermal-sensor-cells = <0>; | ||
15 | samsung,tmu_gain = <8>; | ||
16 | samsung,tmu_reference_voltage = <16>; | ||
17 | samsung,tmu_noise_cancel_mode = <4>; | ||
18 | samsung,tmu_efuse_value = <55>; | ||
19 | samsung,tmu_min_efuse_value = <40>; | ||
20 | samsung,tmu_max_efuse_value = <100>; | ||
21 | samsung,tmu_first_point_trim = <25>; | ||
22 | samsung,tmu_second_point_trim = <85>; | ||
23 | samsung,tmu_default_temp_offset = <50>; | ||
24 | samsung,tmu_cal_type = <TYPE_ONE_POINT_TRIMMING>; | ||
diff --git a/arch/arm/boot/dts/exynos4412-trats2.dts b/arch/arm/boot/dts/exynos4412-trats2.dts index 21f748083586..173ffa479ad3 100644 --- a/arch/arm/boot/dts/exynos4412-trats2.dts +++ b/arch/arm/boot/dts/exynos4412-trats2.dts | |||
@@ -927,6 +927,21 @@ | |||
927 | pulldown-ohm = <100000>; /* 100K */ | 927 | pulldown-ohm = <100000>; /* 100K */ |
928 | io-channels = <&adc 2>; /* Battery temperature */ | 928 | io-channels = <&adc 2>; /* Battery temperature */ |
929 | }; | 929 | }; |
930 | |||
931 | thermal-zones { | ||
932 | cpu_thermal: cpu-thermal { | ||
933 | cooling-maps { | ||
934 | map0 { | ||
935 | /* Corresponds to 800MHz at freq_table */ | ||
936 | cooling-device = <&cpu0 7 7>; | ||
937 | }; | ||
938 | map1 { | ||
939 | /* Corresponds to 200MHz at freq_table */ | ||
940 | cooling-device = <&cpu0 13 13>; | ||
941 | }; | ||
942 | }; | ||
943 | }; | ||
944 | }; | ||
930 | }; | 945 | }; |
931 | 946 | ||
932 | &pmu_system_controller { | 947 | &pmu_system_controller { |
diff --git a/arch/arm/boot/dts/exynos4412.dtsi b/arch/arm/boot/dts/exynos4412.dtsi index 0f6ec93bb1d8..68ad43b391ae 100644 --- a/arch/arm/boot/dts/exynos4412.dtsi +++ b/arch/arm/boot/dts/exynos4412.dtsi | |||
@@ -26,10 +26,13 @@ | |||
26 | #address-cells = <1>; | 26 | #address-cells = <1>; |
27 | #size-cells = <0>; | 27 | #size-cells = <0>; |
28 | 28 | ||
29 | cpu@A00 { | 29 | cpu0: cpu@A00 { |
30 | device_type = "cpu"; | 30 | device_type = "cpu"; |
31 | compatible = "arm,cortex-a9"; | 31 | compatible = "arm,cortex-a9"; |
32 | reg = <0xA00>; | 32 | reg = <0xA00>; |
33 | cooling-min-level = <13>; | ||
34 | cooling-max-level = <7>; | ||
35 | #cooling-cells = <2>; /* min followed by max */ | ||
33 | }; | 36 | }; |
34 | 37 | ||
35 | cpu@A01 { | 38 | cpu@A01 { |
diff --git a/arch/arm/boot/dts/exynos4x12.dtsi b/arch/arm/boot/dts/exynos4x12.dtsi index f5e0ae780d6c..6a6abe14fd9b 100644 --- a/arch/arm/boot/dts/exynos4x12.dtsi +++ b/arch/arm/boot/dts/exynos4x12.dtsi | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include "exynos4.dtsi" | 20 | #include "exynos4.dtsi" |
21 | #include "exynos4x12-pinctrl.dtsi" | 21 | #include "exynos4x12-pinctrl.dtsi" |
22 | #include "exynos4-cpu-thermal.dtsi" | ||
22 | 23 | ||
23 | / { | 24 | / { |
24 | aliases { | 25 | aliases { |
@@ -297,4 +298,15 @@ | |||
297 | clock-names = "tmu_apbif"; | 298 | clock-names = "tmu_apbif"; |
298 | status = "disabled"; | 299 | status = "disabled"; |
299 | }; | 300 | }; |
301 | |||
302 | hdmi: hdmi@12D00000 { | ||
303 | compatible = "samsung,exynos4212-hdmi"; | ||
304 | }; | ||
305 | |||
306 | mixer: mixer@12C10000 { | ||
307 | compatible = "samsung,exynos4212-mixer"; | ||
308 | clock-names = "mixer", "hdmi", "sclk_hdmi", "vp"; | ||
309 | clocks = <&clock CLK_MIXER>, <&clock CLK_HDMI>, | ||
310 | <&clock CLK_SCLK_HDMI>, <&clock CLK_VP>; | ||
311 | }; | ||
300 | }; | 312 | }; |
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 9bb1b0b738f5..adbde1adad95 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <dt-bindings/clock/exynos5250.h> | 20 | #include <dt-bindings/clock/exynos5250.h> |
21 | #include "exynos5.dtsi" | 21 | #include "exynos5.dtsi" |
22 | #include "exynos5250-pinctrl.dtsi" | 22 | #include "exynos5250-pinctrl.dtsi" |
23 | 23 | #include "exynos4-cpu-thermal.dtsi" | |
24 | #include <dt-bindings/clock/exynos-audss-clk.h> | 24 | #include <dt-bindings/clock/exynos-audss-clk.h> |
25 | 25 | ||
26 | / { | 26 | / { |
@@ -58,11 +58,14 @@ | |||
58 | #address-cells = <1>; | 58 | #address-cells = <1>; |
59 | #size-cells = <0>; | 59 | #size-cells = <0>; |
60 | 60 | ||
61 | cpu@0 { | 61 | cpu0: cpu@0 { |
62 | device_type = "cpu"; | 62 | device_type = "cpu"; |
63 | compatible = "arm,cortex-a15"; | 63 | compatible = "arm,cortex-a15"; |
64 | reg = <0>; | 64 | reg = <0>; |
65 | clock-frequency = <1700000000>; | 65 | clock-frequency = <1700000000>; |
66 | cooling-min-level = <15>; | ||
67 | cooling-max-level = <9>; | ||
68 | #cooling-cells = <2>; /* min followed by max */ | ||
66 | }; | 69 | }; |
67 | cpu@1 { | 70 | cpu@1 { |
68 | device_type = "cpu"; | 71 | device_type = "cpu"; |
@@ -102,6 +105,12 @@ | |||
102 | #power-domain-cells = <0>; | 105 | #power-domain-cells = <0>; |
103 | }; | 106 | }; |
104 | 107 | ||
108 | pd_disp1: disp1-power-domain@100440A0 { | ||
109 | compatible = "samsung,exynos4210-pd"; | ||
110 | reg = <0x100440A0 0x20>; | ||
111 | #power-domain-cells = <0>; | ||
112 | }; | ||
113 | |||
105 | clock: clock-controller@10010000 { | 114 | clock: clock-controller@10010000 { |
106 | compatible = "samsung,exynos5250-clock"; | 115 | compatible = "samsung,exynos5250-clock"; |
107 | reg = <0x10010000 0x30000>; | 116 | reg = <0x10010000 0x30000>; |
@@ -235,12 +244,32 @@ | |||
235 | status = "disabled"; | 244 | status = "disabled"; |
236 | }; | 245 | }; |
237 | 246 | ||
238 | tmu@10060000 { | 247 | tmu: tmu@10060000 { |
239 | compatible = "samsung,exynos5250-tmu"; | 248 | compatible = "samsung,exynos5250-tmu"; |
240 | reg = <0x10060000 0x100>; | 249 | reg = <0x10060000 0x100>; |
241 | interrupts = <0 65 0>; | 250 | interrupts = <0 65 0>; |
242 | clocks = <&clock CLK_TMU>; | 251 | clocks = <&clock CLK_TMU>; |
243 | clock-names = "tmu_apbif"; | 252 | clock-names = "tmu_apbif"; |
253 | #include "exynos4412-tmu-sensor-conf.dtsi" | ||
254 | }; | ||
255 | |||
256 | thermal-zones { | ||
257 | cpu_thermal: cpu-thermal { | ||
258 | polling-delay-passive = <0>; | ||
259 | polling-delay = <0>; | ||
260 | thermal-sensors = <&tmu 0>; | ||
261 | |||
262 | cooling-maps { | ||
263 | map0 { | ||
264 | /* Corresponds to 800MHz at freq_table */ | ||
265 | cooling-device = <&cpu0 9 9>; | ||
266 | }; | ||
267 | map1 { | ||
268 | /* Corresponds to 200MHz at freq_table */ | ||
269 | cooling-device = <&cpu0 15 15>; | ||
270 | }; | ||
271 | }; | ||
272 | }; | ||
244 | }; | 273 | }; |
245 | 274 | ||
246 | serial@12C00000 { | 275 | serial@12C00000 { |
@@ -719,6 +748,7 @@ | |||
719 | hdmi: hdmi { | 748 | hdmi: hdmi { |
720 | compatible = "samsung,exynos4212-hdmi"; | 749 | compatible = "samsung,exynos4212-hdmi"; |
721 | reg = <0x14530000 0x70000>; | 750 | reg = <0x14530000 0x70000>; |
751 | power-domains = <&pd_disp1>; | ||
722 | interrupts = <0 95 0>; | 752 | interrupts = <0 95 0>; |
723 | clocks = <&clock CLK_HDMI>, <&clock CLK_SCLK_HDMI>, | 753 | clocks = <&clock CLK_HDMI>, <&clock CLK_SCLK_HDMI>, |
724 | <&clock CLK_SCLK_PIXEL>, <&clock CLK_SCLK_HDMIPHY>, | 754 | <&clock CLK_SCLK_PIXEL>, <&clock CLK_SCLK_HDMIPHY>, |
@@ -731,9 +761,11 @@ | |||
731 | mixer { | 761 | mixer { |
732 | compatible = "samsung,exynos5250-mixer"; | 762 | compatible = "samsung,exynos5250-mixer"; |
733 | reg = <0x14450000 0x10000>; | 763 | reg = <0x14450000 0x10000>; |
764 | power-domains = <&pd_disp1>; | ||
734 | interrupts = <0 94 0>; | 765 | interrupts = <0 94 0>; |
735 | clocks = <&clock CLK_MIXER>, <&clock CLK_SCLK_HDMI>; | 766 | clocks = <&clock CLK_MIXER>, <&clock CLK_HDMI>, |
736 | clock-names = "mixer", "sclk_hdmi"; | 767 | <&clock CLK_SCLK_HDMI>; |
768 | clock-names = "mixer", "hdmi", "sclk_hdmi"; | ||
737 | }; | 769 | }; |
738 | 770 | ||
739 | dp_phy: video-phy@10040720 { | 771 | dp_phy: video-phy@10040720 { |
@@ -743,6 +775,7 @@ | |||
743 | }; | 775 | }; |
744 | 776 | ||
745 | dp: dp-controller@145B0000 { | 777 | dp: dp-controller@145B0000 { |
778 | power-domains = <&pd_disp1>; | ||
746 | clocks = <&clock CLK_DP>; | 779 | clocks = <&clock CLK_DP>; |
747 | clock-names = "dp"; | 780 | clock-names = "dp"; |
748 | phys = <&dp_phy>; | 781 | phys = <&dp_phy>; |
@@ -750,6 +783,7 @@ | |||
750 | }; | 783 | }; |
751 | 784 | ||
752 | fimd: fimd@14400000 { | 785 | fimd: fimd@14400000 { |
786 | power-domains = <&pd_disp1>; | ||
753 | clocks = <&clock CLK_SCLK_FIMD1>, <&clock CLK_FIMD1>; | 787 | clocks = <&clock CLK_SCLK_FIMD1>, <&clock CLK_FIMD1>; |
754 | clock-names = "sclk_fimd", "fimd"; | 788 | clock-names = "sclk_fimd", "fimd"; |
755 | }; | 789 | }; |
diff --git a/arch/arm/boot/dts/exynos5420-trip-points.dtsi b/arch/arm/boot/dts/exynos5420-trip-points.dtsi new file mode 100644 index 000000000000..5d31fc140823 --- /dev/null +++ b/arch/arm/boot/dts/exynos5420-trip-points.dtsi | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Device tree sources for default Exynos5420 thermal zone definition | ||
3 | * | ||
4 | * Copyright (c) 2014 Lukasz Majewski <l.majewski@samsung.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | polling-delay-passive = <0>; | ||
13 | polling-delay = <0>; | ||
14 | trips { | ||
15 | cpu-alert-0 { | ||
16 | temperature = <85000>; /* millicelsius */ | ||
17 | hysteresis = <10000>; /* millicelsius */ | ||
18 | type = "active"; | ||
19 | }; | ||
20 | cpu-alert-1 { | ||
21 | temperature = <103000>; /* millicelsius */ | ||
22 | hysteresis = <10000>; /* millicelsius */ | ||
23 | type = "active"; | ||
24 | }; | ||
25 | cpu-alert-2 { | ||
26 | temperature = <110000>; /* millicelsius */ | ||
27 | hysteresis = <10000>; /* millicelsius */ | ||
28 | type = "active"; | ||
29 | }; | ||
30 | cpu-crit-0 { | ||
31 | temperature = <1200000>; /* millicelsius */ | ||
32 | hysteresis = <0>; /* millicelsius */ | ||
33 | type = "critical"; | ||
34 | }; | ||
35 | }; | ||
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index 9dc2e9773b30..c0e98cf3514f 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi | |||
@@ -740,8 +740,9 @@ | |||
740 | compatible = "samsung,exynos5420-mixer"; | 740 | compatible = "samsung,exynos5420-mixer"; |
741 | reg = <0x14450000 0x10000>; | 741 | reg = <0x14450000 0x10000>; |
742 | interrupts = <0 94 0>; | 742 | interrupts = <0 94 0>; |
743 | clocks = <&clock CLK_MIXER>, <&clock CLK_SCLK_HDMI>; | 743 | clocks = <&clock CLK_MIXER>, <&clock CLK_HDMI>, |
744 | clock-names = "mixer", "sclk_hdmi"; | 744 | <&clock CLK_SCLK_HDMI>; |
745 | clock-names = "mixer", "hdmi", "sclk_hdmi"; | ||
745 | power-domains = <&disp_pd>; | 746 | power-domains = <&disp_pd>; |
746 | }; | 747 | }; |
747 | 748 | ||
@@ -782,6 +783,7 @@ | |||
782 | interrupts = <0 65 0>; | 783 | interrupts = <0 65 0>; |
783 | clocks = <&clock CLK_TMU>; | 784 | clocks = <&clock CLK_TMU>; |
784 | clock-names = "tmu_apbif"; | 785 | clock-names = "tmu_apbif"; |
786 | #include "exynos4412-tmu-sensor-conf.dtsi" | ||
785 | }; | 787 | }; |
786 | 788 | ||
787 | tmu_cpu1: tmu@10064000 { | 789 | tmu_cpu1: tmu@10064000 { |
@@ -790,6 +792,7 @@ | |||
790 | interrupts = <0 183 0>; | 792 | interrupts = <0 183 0>; |
791 | clocks = <&clock CLK_TMU>; | 793 | clocks = <&clock CLK_TMU>; |
792 | clock-names = "tmu_apbif"; | 794 | clock-names = "tmu_apbif"; |
795 | #include "exynos4412-tmu-sensor-conf.dtsi" | ||
793 | }; | 796 | }; |
794 | 797 | ||
795 | tmu_cpu2: tmu@10068000 { | 798 | tmu_cpu2: tmu@10068000 { |
@@ -798,6 +801,7 @@ | |||
798 | interrupts = <0 184 0>; | 801 | interrupts = <0 184 0>; |
799 | clocks = <&clock CLK_TMU>, <&clock CLK_TMU>; | 802 | clocks = <&clock CLK_TMU>, <&clock CLK_TMU>; |
800 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; | 803 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; |
804 | #include "exynos4412-tmu-sensor-conf.dtsi" | ||
801 | }; | 805 | }; |
802 | 806 | ||
803 | tmu_cpu3: tmu@1006c000 { | 807 | tmu_cpu3: tmu@1006c000 { |
@@ -806,6 +810,7 @@ | |||
806 | interrupts = <0 185 0>; | 810 | interrupts = <0 185 0>; |
807 | clocks = <&clock CLK_TMU>, <&clock CLK_TMU_GPU>; | 811 | clocks = <&clock CLK_TMU>, <&clock CLK_TMU_GPU>; |
808 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; | 812 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; |
813 | #include "exynos4412-tmu-sensor-conf.dtsi" | ||
809 | }; | 814 | }; |
810 | 815 | ||
811 | tmu_gpu: tmu@100a0000 { | 816 | tmu_gpu: tmu@100a0000 { |
@@ -814,6 +819,30 @@ | |||
814 | interrupts = <0 215 0>; | 819 | interrupts = <0 215 0>; |
815 | clocks = <&clock CLK_TMU_GPU>, <&clock CLK_TMU>; | 820 | clocks = <&clock CLK_TMU_GPU>, <&clock CLK_TMU>; |
816 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; | 821 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; |
822 | #include "exynos4412-tmu-sensor-conf.dtsi" | ||
823 | }; | ||
824 | |||
825 | thermal-zones { | ||
826 | cpu0_thermal: cpu0-thermal { | ||
827 | thermal-sensors = <&tmu_cpu0>; | ||
828 | #include "exynos5420-trip-points.dtsi" | ||
829 | }; | ||
830 | cpu1_thermal: cpu1-thermal { | ||
831 | thermal-sensors = <&tmu_cpu1>; | ||
832 | #include "exynos5420-trip-points.dtsi" | ||
833 | }; | ||
834 | cpu2_thermal: cpu2-thermal { | ||
835 | thermal-sensors = <&tmu_cpu2>; | ||
836 | #include "exynos5420-trip-points.dtsi" | ||
837 | }; | ||
838 | cpu3_thermal: cpu3-thermal { | ||
839 | thermal-sensors = <&tmu_cpu3>; | ||
840 | #include "exynos5420-trip-points.dtsi" | ||
841 | }; | ||
842 | gpu_thermal: gpu-thermal { | ||
843 | thermal-sensors = <&tmu_gpu>; | ||
844 | #include "exynos5420-trip-points.dtsi" | ||
845 | }; | ||
817 | }; | 846 | }; |
818 | 847 | ||
819 | watchdog: watchdog@101D0000 { | 848 | watchdog: watchdog@101D0000 { |
diff --git a/arch/arm/boot/dts/exynos5440-tmu-sensor-conf.dtsi b/arch/arm/boot/dts/exynos5440-tmu-sensor-conf.dtsi new file mode 100644 index 000000000000..7b2fba0ae92b --- /dev/null +++ b/arch/arm/boot/dts/exynos5440-tmu-sensor-conf.dtsi | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * Device tree sources for Exynos5440 TMU sensor configuration | ||
3 | * | ||
4 | * Copyright (c) 2014 Lukasz Majewski <l.majewski@samsung.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #include <dt-bindings/thermal/thermal_exynos.h> | ||
13 | |||
14 | #thermal-sensor-cells = <0>; | ||
15 | samsung,tmu_gain = <5>; | ||
16 | samsung,tmu_reference_voltage = <16>; | ||
17 | samsung,tmu_noise_cancel_mode = <4>; | ||
18 | samsung,tmu_efuse_value = <0x5d2d>; | ||
19 | samsung,tmu_min_efuse_value = <16>; | ||
20 | samsung,tmu_max_efuse_value = <76>; | ||
21 | samsung,tmu_first_point_trim = <25>; | ||
22 | samsung,tmu_second_point_trim = <70>; | ||
23 | samsung,tmu_default_temp_offset = <25>; | ||
24 | samsung,tmu_cal_type = <TYPE_ONE_POINT_TRIMMING>; | ||
diff --git a/arch/arm/boot/dts/exynos5440-trip-points.dtsi b/arch/arm/boot/dts/exynos5440-trip-points.dtsi new file mode 100644 index 000000000000..48adfa8f4300 --- /dev/null +++ b/arch/arm/boot/dts/exynos5440-trip-points.dtsi | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Device tree sources for default Exynos5440 thermal zone definition | ||
3 | * | ||
4 | * Copyright (c) 2014 Lukasz Majewski <l.majewski@samsung.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | polling-delay-passive = <0>; | ||
13 | polling-delay = <0>; | ||
14 | trips { | ||
15 | cpu-alert-0 { | ||
16 | temperature = <100000>; /* millicelsius */ | ||
17 | hysteresis = <0>; /* millicelsius */ | ||
18 | type = "active"; | ||
19 | }; | ||
20 | cpu-crit-0 { | ||
21 | temperature = <1050000>; /* millicelsius */ | ||
22 | hysteresis = <0>; /* millicelsius */ | ||
23 | type = "critical"; | ||
24 | }; | ||
25 | }; | ||
diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi index 8f3373cd7b87..59d9416b3b03 100644 --- a/arch/arm/boot/dts/exynos5440.dtsi +++ b/arch/arm/boot/dts/exynos5440.dtsi | |||
@@ -219,6 +219,7 @@ | |||
219 | interrupts = <0 58 0>; | 219 | interrupts = <0 58 0>; |
220 | clocks = <&clock CLK_B_125>; | 220 | clocks = <&clock CLK_B_125>; |
221 | clock-names = "tmu_apbif"; | 221 | clock-names = "tmu_apbif"; |
222 | #include "exynos5440-tmu-sensor-conf.dtsi" | ||
222 | }; | 223 | }; |
223 | 224 | ||
224 | tmuctrl_1: tmuctrl@16011C { | 225 | tmuctrl_1: tmuctrl@16011C { |
@@ -227,6 +228,7 @@ | |||
227 | interrupts = <0 58 0>; | 228 | interrupts = <0 58 0>; |
228 | clocks = <&clock CLK_B_125>; | 229 | clocks = <&clock CLK_B_125>; |
229 | clock-names = "tmu_apbif"; | 230 | clock-names = "tmu_apbif"; |
231 | #include "exynos5440-tmu-sensor-conf.dtsi" | ||
230 | }; | 232 | }; |
231 | 233 | ||
232 | tmuctrl_2: tmuctrl@160120 { | 234 | tmuctrl_2: tmuctrl@160120 { |
@@ -235,6 +237,22 @@ | |||
235 | interrupts = <0 58 0>; | 237 | interrupts = <0 58 0>; |
236 | clocks = <&clock CLK_B_125>; | 238 | clocks = <&clock CLK_B_125>; |
237 | clock-names = "tmu_apbif"; | 239 | clock-names = "tmu_apbif"; |
240 | #include "exynos5440-tmu-sensor-conf.dtsi" | ||
241 | }; | ||
242 | |||
243 | thermal-zones { | ||
244 | cpu0_thermal: cpu0-thermal { | ||
245 | thermal-sensors = <&tmuctrl_0>; | ||
246 | #include "exynos5440-trip-points.dtsi" | ||
247 | }; | ||
248 | cpu1_thermal: cpu1-thermal { | ||
249 | thermal-sensors = <&tmuctrl_1>; | ||
250 | #include "exynos5440-trip-points.dtsi" | ||
251 | }; | ||
252 | cpu2_thermal: cpu2-thermal { | ||
253 | thermal-sensors = <&tmuctrl_2>; | ||
254 | #include "exynos5440-trip-points.dtsi" | ||
255 | }; | ||
238 | }; | 256 | }; |
239 | 257 | ||
240 | sata@210000 { | 258 | sata@210000 { |
diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi index f1cd2147421d..a626e6dd8022 100644 --- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi | |||
@@ -35,6 +35,7 @@ | |||
35 | regulator-max-microvolt = <5000000>; | 35 | regulator-max-microvolt = <5000000>; |
36 | gpio = <&gpio3 22 0>; | 36 | gpio = <&gpio3 22 0>; |
37 | enable-active-high; | 37 | enable-active-high; |
38 | vin-supply = <&swbst_reg>; | ||
38 | }; | 39 | }; |
39 | 40 | ||
40 | reg_usb_h1_vbus: regulator@1 { | 41 | reg_usb_h1_vbus: regulator@1 { |
@@ -45,6 +46,7 @@ | |||
45 | regulator-max-microvolt = <5000000>; | 46 | regulator-max-microvolt = <5000000>; |
46 | gpio = <&gpio1 29 0>; | 47 | gpio = <&gpio1 29 0>; |
47 | enable-active-high; | 48 | enable-active-high; |
49 | vin-supply = <&swbst_reg>; | ||
48 | }; | 50 | }; |
49 | 51 | ||
50 | reg_audio: regulator@2 { | 52 | reg_audio: regulator@2 { |
diff --git a/arch/arm/boot/dts/imx6sl-evk.dts b/arch/arm/boot/dts/imx6sl-evk.dts index fda4932faefd..945887d3fdb3 100644 --- a/arch/arm/boot/dts/imx6sl-evk.dts +++ b/arch/arm/boot/dts/imx6sl-evk.dts | |||
@@ -52,6 +52,7 @@ | |||
52 | regulator-max-microvolt = <5000000>; | 52 | regulator-max-microvolt = <5000000>; |
53 | gpio = <&gpio4 0 0>; | 53 | gpio = <&gpio4 0 0>; |
54 | enable-active-high; | 54 | enable-active-high; |
55 | vin-supply = <&swbst_reg>; | ||
55 | }; | 56 | }; |
56 | 57 | ||
57 | reg_usb_otg2_vbus: regulator@1 { | 58 | reg_usb_otg2_vbus: regulator@1 { |
@@ -62,6 +63,7 @@ | |||
62 | regulator-max-microvolt = <5000000>; | 63 | regulator-max-microvolt = <5000000>; |
63 | gpio = <&gpio4 2 0>; | 64 | gpio = <&gpio4 2 0>; |
64 | enable-active-high; | 65 | enable-active-high; |
66 | vin-supply = <&swbst_reg>; | ||
65 | }; | 67 | }; |
66 | 68 | ||
67 | reg_aud3v: regulator@2 { | 69 | reg_aud3v: regulator@2 { |
diff --git a/arch/arm/boot/dts/omap5-core-thermal.dtsi b/arch/arm/boot/dts/omap5-core-thermal.dtsi index 19212ac6eef0..de8a3d456cf7 100644 --- a/arch/arm/boot/dts/omap5-core-thermal.dtsi +++ b/arch/arm/boot/dts/omap5-core-thermal.dtsi | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | core_thermal: core_thermal { | 14 | core_thermal: core_thermal { |
15 | polling-delay-passive = <250>; /* milliseconds */ | 15 | polling-delay-passive = <250>; /* milliseconds */ |
16 | polling-delay = <1000>; /* milliseconds */ | 16 | polling-delay = <500>; /* milliseconds */ |
17 | 17 | ||
18 | /* sensor ID */ | 18 | /* sensor ID */ |
19 | thermal-sensors = <&bandgap 2>; | 19 | thermal-sensors = <&bandgap 2>; |
diff --git a/arch/arm/boot/dts/omap5-gpu-thermal.dtsi b/arch/arm/boot/dts/omap5-gpu-thermal.dtsi index 1b87aca88b77..bc3090f2e84b 100644 --- a/arch/arm/boot/dts/omap5-gpu-thermal.dtsi +++ b/arch/arm/boot/dts/omap5-gpu-thermal.dtsi | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | gpu_thermal: gpu_thermal { | 14 | gpu_thermal: gpu_thermal { |
15 | polling-delay-passive = <250>; /* milliseconds */ | 15 | polling-delay-passive = <250>; /* milliseconds */ |
16 | polling-delay = <1000>; /* milliseconds */ | 16 | polling-delay = <500>; /* milliseconds */ |
17 | 17 | ||
18 | /* sensor ID */ | 18 | /* sensor ID */ |
19 | thermal-sensors = <&bandgap 1>; | 19 | thermal-sensors = <&bandgap 1>; |
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi index ddff674bd05e..4a485b63a141 100644 --- a/arch/arm/boot/dts/omap5.dtsi +++ b/arch/arm/boot/dts/omap5.dtsi | |||
@@ -1079,4 +1079,8 @@ | |||
1079 | }; | 1079 | }; |
1080 | }; | 1080 | }; |
1081 | 1081 | ||
1082 | &cpu_thermal { | ||
1083 | polling-delay = <500>; /* milliseconds */ | ||
1084 | }; | ||
1085 | |||
1082 | /include/ "omap54xx-clocks.dtsi" | 1086 | /include/ "omap54xx-clocks.dtsi" |
diff --git a/arch/arm/boot/dts/omap54xx-clocks.dtsi b/arch/arm/boot/dts/omap54xx-clocks.dtsi index 58c27466f012..83b425fb3ac2 100644 --- a/arch/arm/boot/dts/omap54xx-clocks.dtsi +++ b/arch/arm/boot/dts/omap54xx-clocks.dtsi | |||
@@ -167,10 +167,18 @@ | |||
167 | ti,index-starts-at-one; | 167 | ti,index-starts-at-one; |
168 | }; | 168 | }; |
169 | 169 | ||
170 | dpll_core_byp_mux: dpll_core_byp_mux { | ||
171 | #clock-cells = <0>; | ||
172 | compatible = "ti,mux-clock"; | ||
173 | clocks = <&sys_clkin>, <&dpll_abe_m3x2_ck>; | ||
174 | ti,bit-shift = <23>; | ||
175 | reg = <0x012c>; | ||
176 | }; | ||
177 | |||
170 | dpll_core_ck: dpll_core_ck { | 178 | dpll_core_ck: dpll_core_ck { |
171 | #clock-cells = <0>; | 179 | #clock-cells = <0>; |
172 | compatible = "ti,omap4-dpll-core-clock"; | 180 | compatible = "ti,omap4-dpll-core-clock"; |
173 | clocks = <&sys_clkin>, <&dpll_abe_m3x2_ck>; | 181 | clocks = <&sys_clkin>, <&dpll_core_byp_mux>; |
174 | reg = <0x0120>, <0x0124>, <0x012c>, <0x0128>; | 182 | reg = <0x0120>, <0x0124>, <0x012c>, <0x0128>; |
175 | }; | 183 | }; |
176 | 184 | ||
@@ -294,10 +302,18 @@ | |||
294 | clock-div = <1>; | 302 | clock-div = <1>; |
295 | }; | 303 | }; |
296 | 304 | ||
305 | dpll_iva_byp_mux: dpll_iva_byp_mux { | ||
306 | #clock-cells = <0>; | ||
307 | compatible = "ti,mux-clock"; | ||
308 | clocks = <&sys_clkin>, <&iva_dpll_hs_clk_div>; | ||
309 | ti,bit-shift = <23>; | ||
310 | reg = <0x01ac>; | ||
311 | }; | ||
312 | |||
297 | dpll_iva_ck: dpll_iva_ck { | 313 | dpll_iva_ck: dpll_iva_ck { |
298 | #clock-cells = <0>; | 314 | #clock-cells = <0>; |
299 | compatible = "ti,omap4-dpll-clock"; | 315 | compatible = "ti,omap4-dpll-clock"; |
300 | clocks = <&sys_clkin>, <&iva_dpll_hs_clk_div>; | 316 | clocks = <&sys_clkin>, <&dpll_iva_byp_mux>; |
301 | reg = <0x01a0>, <0x01a4>, <0x01ac>, <0x01a8>; | 317 | reg = <0x01a0>, <0x01a4>, <0x01ac>, <0x01a8>; |
302 | }; | 318 | }; |
303 | 319 | ||
@@ -599,10 +615,19 @@ | |||
599 | }; | 615 | }; |
600 | }; | 616 | }; |
601 | &cm_core_clocks { | 617 | &cm_core_clocks { |
618 | |||
619 | dpll_per_byp_mux: dpll_per_byp_mux { | ||
620 | #clock-cells = <0>; | ||
621 | compatible = "ti,mux-clock"; | ||
622 | clocks = <&sys_clkin>, <&per_dpll_hs_clk_div>; | ||
623 | ti,bit-shift = <23>; | ||
624 | reg = <0x014c>; | ||
625 | }; | ||
626 | |||
602 | dpll_per_ck: dpll_per_ck { | 627 | dpll_per_ck: dpll_per_ck { |
603 | #clock-cells = <0>; | 628 | #clock-cells = <0>; |
604 | compatible = "ti,omap4-dpll-clock"; | 629 | compatible = "ti,omap4-dpll-clock"; |
605 | clocks = <&sys_clkin>, <&per_dpll_hs_clk_div>; | 630 | clocks = <&sys_clkin>, <&dpll_per_byp_mux>; |
606 | reg = <0x0140>, <0x0144>, <0x014c>, <0x0148>; | 631 | reg = <0x0140>, <0x0144>, <0x014c>, <0x0148>; |
607 | }; | 632 | }; |
608 | 633 | ||
@@ -714,10 +739,18 @@ | |||
714 | ti,index-starts-at-one; | 739 | ti,index-starts-at-one; |
715 | }; | 740 | }; |
716 | 741 | ||
742 | dpll_usb_byp_mux: dpll_usb_byp_mux { | ||
743 | #clock-cells = <0>; | ||
744 | compatible = "ti,mux-clock"; | ||
745 | clocks = <&sys_clkin>, <&usb_dpll_hs_clk_div>; | ||
746 | ti,bit-shift = <23>; | ||
747 | reg = <0x018c>; | ||
748 | }; | ||
749 | |||
717 | dpll_usb_ck: dpll_usb_ck { | 750 | dpll_usb_ck: dpll_usb_ck { |
718 | #clock-cells = <0>; | 751 | #clock-cells = <0>; |
719 | compatible = "ti,omap4-dpll-j-type-clock"; | 752 | compatible = "ti,omap4-dpll-j-type-clock"; |
720 | clocks = <&sys_clkin>, <&usb_dpll_hs_clk_div>; | 753 | clocks = <&sys_clkin>, <&dpll_usb_byp_mux>; |
721 | reg = <0x0180>, <0x0184>, <0x018c>, <0x0188>; | 754 | reg = <0x0180>, <0x0184>, <0x018c>, <0x0188>; |
722 | }; | 755 | }; |
723 | 756 | ||
diff --git a/arch/arm/boot/dts/sama5d3.dtsi b/arch/arm/boot/dts/sama5d3.dtsi index 261311bdf65b..367af53c1b84 100644 --- a/arch/arm/boot/dts/sama5d3.dtsi +++ b/arch/arm/boot/dts/sama5d3.dtsi | |||
@@ -1248,7 +1248,6 @@ | |||
1248 | atmel,watchdog-type = "hardware"; | 1248 | atmel,watchdog-type = "hardware"; |
1249 | atmel,reset-type = "all"; | 1249 | atmel,reset-type = "all"; |
1250 | atmel,dbg-halt; | 1250 | atmel,dbg-halt; |
1251 | atmel,idle-halt; | ||
1252 | status = "disabled"; | 1251 | status = "disabled"; |
1253 | }; | 1252 | }; |
1254 | 1253 | ||
@@ -1416,7 +1415,7 @@ | |||
1416 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; | 1415 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; |
1417 | reg = <0x00700000 0x100000>; | 1416 | reg = <0x00700000 0x100000>; |
1418 | interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>; | 1417 | interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>; |
1419 | clocks = <&usb>, <&uhphs_clk>, <&uhpck>; | 1418 | clocks = <&utmi>, <&uhphs_clk>, <&uhpck>; |
1420 | clock-names = "usb_clk", "ehci_clk", "uhpck"; | 1419 | clock-names = "usb_clk", "ehci_clk", "uhpck"; |
1421 | status = "disabled"; | 1420 | status = "disabled"; |
1422 | }; | 1421 | }; |
diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi index d986b41b9654..4303874889c6 100644 --- a/arch/arm/boot/dts/sama5d4.dtsi +++ b/arch/arm/boot/dts/sama5d4.dtsi | |||
@@ -66,6 +66,7 @@ | |||
66 | gpio4 = &pioE; | 66 | gpio4 = &pioE; |
67 | tcb0 = &tcb0; | 67 | tcb0 = &tcb0; |
68 | tcb1 = &tcb1; | 68 | tcb1 = &tcb1; |
69 | i2c0 = &i2c0; | ||
69 | i2c2 = &i2c2; | 70 | i2c2 = &i2c2; |
70 | }; | 71 | }; |
71 | cpus { | 72 | cpus { |
@@ -259,7 +260,7 @@ | |||
259 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; | 260 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; |
260 | reg = <0x00600000 0x100000>; | 261 | reg = <0x00600000 0x100000>; |
261 | interrupts = <46 IRQ_TYPE_LEVEL_HIGH 2>; | 262 | interrupts = <46 IRQ_TYPE_LEVEL_HIGH 2>; |
262 | clocks = <&usb>, <&uhphs_clk>, <&uhpck>; | 263 | clocks = <&utmi>, <&uhphs_clk>, <&uhpck>; |
263 | clock-names = "usb_clk", "ehci_clk", "uhpck"; | 264 | clock-names = "usb_clk", "ehci_clk", "uhpck"; |
264 | status = "disabled"; | 265 | status = "disabled"; |
265 | }; | 266 | }; |
@@ -461,8 +462,8 @@ | |||
461 | 462 | ||
462 | lcdck: lcdck { | 463 | lcdck: lcdck { |
463 | #clock-cells = <0>; | 464 | #clock-cells = <0>; |
464 | reg = <4>; | 465 | reg = <3>; |
465 | clocks = <&smd>; | 466 | clocks = <&mck>; |
466 | }; | 467 | }; |
467 | 468 | ||
468 | smdck: smdck { | 469 | smdck: smdck { |
@@ -770,7 +771,7 @@ | |||
770 | reg = <50>; | 771 | reg = <50>; |
771 | }; | 772 | }; |
772 | 773 | ||
773 | lcd_clk: lcd_clk { | 774 | lcdc_clk: lcdc_clk { |
774 | #clock-cells = <0>; | 775 | #clock-cells = <0>; |
775 | reg = <51>; | 776 | reg = <51>; |
776 | }; | 777 | }; |
diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi index 252c3d1bda50..9d8760956752 100644 --- a/arch/arm/boot/dts/socfpga.dtsi +++ b/arch/arm/boot/dts/socfpga.dtsi | |||
@@ -713,6 +713,9 @@ | |||
713 | reg-shift = <2>; | 713 | reg-shift = <2>; |
714 | reg-io-width = <4>; | 714 | reg-io-width = <4>; |
715 | clocks = <&l4_sp_clk>; | 715 | clocks = <&l4_sp_clk>; |
716 | dmas = <&pdma 28>, | ||
717 | <&pdma 29>; | ||
718 | dma-names = "tx", "rx"; | ||
716 | }; | 719 | }; |
717 | 720 | ||
718 | uart1: serial1@ffc03000 { | 721 | uart1: serial1@ffc03000 { |
@@ -722,6 +725,9 @@ | |||
722 | reg-shift = <2>; | 725 | reg-shift = <2>; |
723 | reg-io-width = <4>; | 726 | reg-io-width = <4>; |
724 | clocks = <&l4_sp_clk>; | 727 | clocks = <&l4_sp_clk>; |
728 | dmas = <&pdma 30>, | ||
729 | <&pdma 31>; | ||
730 | dma-names = "tx", "rx"; | ||
725 | }; | 731 | }; |
726 | 732 | ||
727 | rst: rstmgr@ffd05000 { | 733 | rst: rstmgr@ffd05000 { |
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig index f2670f638e97..811e72bbe642 100644 --- a/arch/arm/configs/at91_dt_defconfig +++ b/arch/arm/configs/at91_dt_defconfig | |||
@@ -70,6 +70,7 @@ CONFIG_SCSI=y | |||
70 | CONFIG_BLK_DEV_SD=y | 70 | CONFIG_BLK_DEV_SD=y |
71 | # CONFIG_SCSI_LOWLEVEL is not set | 71 | # CONFIG_SCSI_LOWLEVEL is not set |
72 | CONFIG_NETDEVICES=y | 72 | CONFIG_NETDEVICES=y |
73 | CONFIG_ARM_AT91_ETHER=y | ||
73 | CONFIG_MACB=y | 74 | CONFIG_MACB=y |
74 | # CONFIG_NET_VENDOR_BROADCOM is not set | 75 | # CONFIG_NET_VENDOR_BROADCOM is not set |
75 | CONFIG_DM9000=y | 76 | CONFIG_DM9000=y |
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index b7e6b6fba5e0..06075b6d2463 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig | |||
@@ -99,7 +99,7 @@ CONFIG_PCI_RCAR_GEN2=y | |||
99 | CONFIG_PCI_RCAR_GEN2_PCIE=y | 99 | CONFIG_PCI_RCAR_GEN2_PCIE=y |
100 | CONFIG_PCIEPORTBUS=y | 100 | CONFIG_PCIEPORTBUS=y |
101 | CONFIG_SMP=y | 101 | CONFIG_SMP=y |
102 | CONFIG_NR_CPUS=8 | 102 | CONFIG_NR_CPUS=16 |
103 | CONFIG_HIGHPTE=y | 103 | CONFIG_HIGHPTE=y |
104 | CONFIG_CMA=y | 104 | CONFIG_CMA=y |
105 | CONFIG_ARM_APPENDED_DTB=y | 105 | CONFIG_ARM_APPENDED_DTB=y |
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index a097cffa1231..8e108599e1af 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig | |||
@@ -377,6 +377,7 @@ CONFIG_PWM_TWL=m | |||
377 | CONFIG_PWM_TWL_LED=m | 377 | CONFIG_PWM_TWL_LED=m |
378 | CONFIG_OMAP_USB2=m | 378 | CONFIG_OMAP_USB2=m |
379 | CONFIG_TI_PIPE3=y | 379 | CONFIG_TI_PIPE3=y |
380 | CONFIG_TWL4030_USB=m | ||
380 | CONFIG_EXT2_FS=y | 381 | CONFIG_EXT2_FS=y |
381 | CONFIG_EXT3_FS=y | 382 | CONFIG_EXT3_FS=y |
382 | # CONFIG_EXT3_FS_XATTR is not set | 383 | # CONFIG_EXT3_FS_XATTR is not set |
diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig index 41d856effe6c..510c747c65b4 100644 --- a/arch/arm/configs/sama5_defconfig +++ b/arch/arm/configs/sama5_defconfig | |||
@@ -3,8 +3,6 @@ | |||
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_IRQ_DOMAIN_DEBUG=y | 4 | CONFIG_IRQ_DOMAIN_DEBUG=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_SYSFS_DEPRECATED=y | ||
7 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
8 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
9 | CONFIG_EMBEDDED=y | 7 | CONFIG_EMBEDDED=y |
10 | CONFIG_SLAB=y | 8 | CONFIG_SLAB=y |
diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig index 38840a812924..8f6a5702b696 100644 --- a/arch/arm/configs/sunxi_defconfig +++ b/arch/arm/configs/sunxi_defconfig | |||
@@ -4,6 +4,7 @@ CONFIG_BLK_DEV_INITRD=y | |||
4 | CONFIG_PERF_EVENTS=y | 4 | CONFIG_PERF_EVENTS=y |
5 | CONFIG_ARCH_SUNXI=y | 5 | CONFIG_ARCH_SUNXI=y |
6 | CONFIG_SMP=y | 6 | CONFIG_SMP=y |
7 | CONFIG_NR_CPUS=8 | ||
7 | CONFIG_AEABI=y | 8 | CONFIG_AEABI=y |
8 | CONFIG_HIGHMEM=y | 9 | CONFIG_HIGHMEM=y |
9 | CONFIG_HIGHPTE=y | 10 | CONFIG_HIGHPTE=y |
diff --git a/arch/arm/configs/vexpress_defconfig b/arch/arm/configs/vexpress_defconfig index f489fdaa19b8..37fe607a4ede 100644 --- a/arch/arm/configs/vexpress_defconfig +++ b/arch/arm/configs/vexpress_defconfig | |||
@@ -118,8 +118,8 @@ CONFIG_HID_ZEROPLUS=y | |||
118 | CONFIG_USB=y | 118 | CONFIG_USB=y |
119 | CONFIG_USB_ANNOUNCE_NEW_DEVICES=y | 119 | CONFIG_USB_ANNOUNCE_NEW_DEVICES=y |
120 | CONFIG_USB_MON=y | 120 | CONFIG_USB_MON=y |
121 | CONFIG_USB_ISP1760_HCD=y | ||
122 | CONFIG_USB_STORAGE=y | 121 | CONFIG_USB_STORAGE=y |
122 | CONFIG_USB_ISP1760=y | ||
123 | CONFIG_MMC=y | 123 | CONFIG_MMC=y |
124 | CONFIG_MMC_ARMMMCI=y | 124 | CONFIG_MMC_ARMMMCI=y |
125 | CONFIG_NEW_LEDS=y | 125 | CONFIG_NEW_LEDS=y |
diff --git a/arch/arm/crypto/aesbs-core.S_shipped b/arch/arm/crypto/aesbs-core.S_shipped index 71e5fc7cfb18..1d1800f71c5b 100644 --- a/arch/arm/crypto/aesbs-core.S_shipped +++ b/arch/arm/crypto/aesbs-core.S_shipped | |||
@@ -58,14 +58,18 @@ | |||
58 | # define VFP_ABI_FRAME 0 | 58 | # define VFP_ABI_FRAME 0 |
59 | # define BSAES_ASM_EXTENDED_KEY | 59 | # define BSAES_ASM_EXTENDED_KEY |
60 | # define XTS_CHAIN_TWEAK | 60 | # define XTS_CHAIN_TWEAK |
61 | # define __ARM_ARCH__ 7 | 61 | # define __ARM_ARCH__ __LINUX_ARM_ARCH__ |
62 | # define __ARM_MAX_ARCH__ 7 | ||
62 | #endif | 63 | #endif |
63 | 64 | ||
64 | #ifdef __thumb__ | 65 | #ifdef __thumb__ |
65 | # define adrl adr | 66 | # define adrl adr |
66 | #endif | 67 | #endif |
67 | 68 | ||
68 | #if __ARM_ARCH__>=7 | 69 | #if __ARM_MAX_ARCH__>=7 |
70 | .arch armv7-a | ||
71 | .fpu neon | ||
72 | |||
69 | .text | 73 | .text |
70 | .syntax unified @ ARMv7-capable assembler is expected to handle this | 74 | .syntax unified @ ARMv7-capable assembler is expected to handle this |
71 | #ifdef __thumb2__ | 75 | #ifdef __thumb2__ |
@@ -74,8 +78,6 @@ | |||
74 | .code 32 | 78 | .code 32 |
75 | #endif | 79 | #endif |
76 | 80 | ||
77 | .fpu neon | ||
78 | |||
79 | .type _bsaes_decrypt8,%function | 81 | .type _bsaes_decrypt8,%function |
80 | .align 4 | 82 | .align 4 |
81 | _bsaes_decrypt8: | 83 | _bsaes_decrypt8: |
@@ -2095,9 +2097,11 @@ bsaes_xts_decrypt: | |||
2095 | vld1.8 {q8}, [r0] @ initial tweak | 2097 | vld1.8 {q8}, [r0] @ initial tweak |
2096 | adr r2, .Lxts_magic | 2098 | adr r2, .Lxts_magic |
2097 | 2099 | ||
2100 | #ifndef XTS_CHAIN_TWEAK | ||
2098 | tst r9, #0xf @ if not multiple of 16 | 2101 | tst r9, #0xf @ if not multiple of 16 |
2099 | it ne @ Thumb2 thing, sanity check in ARM | 2102 | it ne @ Thumb2 thing, sanity check in ARM |
2100 | subne r9, #0x10 @ subtract another 16 bytes | 2103 | subne r9, #0x10 @ subtract another 16 bytes |
2104 | #endif | ||
2101 | subs r9, #0x80 | 2105 | subs r9, #0x80 |
2102 | 2106 | ||
2103 | blo .Lxts_dec_short | 2107 | blo .Lxts_dec_short |
diff --git a/arch/arm/crypto/bsaes-armv7.pl b/arch/arm/crypto/bsaes-armv7.pl index be068db960ee..a4d3856e7d24 100644 --- a/arch/arm/crypto/bsaes-armv7.pl +++ b/arch/arm/crypto/bsaes-armv7.pl | |||
@@ -701,14 +701,18 @@ $code.=<<___; | |||
701 | # define VFP_ABI_FRAME 0 | 701 | # define VFP_ABI_FRAME 0 |
702 | # define BSAES_ASM_EXTENDED_KEY | 702 | # define BSAES_ASM_EXTENDED_KEY |
703 | # define XTS_CHAIN_TWEAK | 703 | # define XTS_CHAIN_TWEAK |
704 | # define __ARM_ARCH__ 7 | 704 | # define __ARM_ARCH__ __LINUX_ARM_ARCH__ |
705 | # define __ARM_MAX_ARCH__ 7 | ||
705 | #endif | 706 | #endif |
706 | 707 | ||
707 | #ifdef __thumb__ | 708 | #ifdef __thumb__ |
708 | # define adrl adr | 709 | # define adrl adr |
709 | #endif | 710 | #endif |
710 | 711 | ||
711 | #if __ARM_ARCH__>=7 | 712 | #if __ARM_MAX_ARCH__>=7 |
713 | .arch armv7-a | ||
714 | .fpu neon | ||
715 | |||
712 | .text | 716 | .text |
713 | .syntax unified @ ARMv7-capable assembler is expected to handle this | 717 | .syntax unified @ ARMv7-capable assembler is expected to handle this |
714 | #ifdef __thumb2__ | 718 | #ifdef __thumb2__ |
@@ -717,8 +721,6 @@ $code.=<<___; | |||
717 | .code 32 | 721 | .code 32 |
718 | #endif | 722 | #endif |
719 | 723 | ||
720 | .fpu neon | ||
721 | |||
722 | .type _bsaes_decrypt8,%function | 724 | .type _bsaes_decrypt8,%function |
723 | .align 4 | 725 | .align 4 |
724 | _bsaes_decrypt8: | 726 | _bsaes_decrypt8: |
@@ -2076,9 +2078,11 @@ bsaes_xts_decrypt: | |||
2076 | vld1.8 {@XMM[8]}, [r0] @ initial tweak | 2078 | vld1.8 {@XMM[8]}, [r0] @ initial tweak |
2077 | adr $magic, .Lxts_magic | 2079 | adr $magic, .Lxts_magic |
2078 | 2080 | ||
2081 | #ifndef XTS_CHAIN_TWEAK | ||
2079 | tst $len, #0xf @ if not multiple of 16 | 2082 | tst $len, #0xf @ if not multiple of 16 |
2080 | it ne @ Thumb2 thing, sanity check in ARM | 2083 | it ne @ Thumb2 thing, sanity check in ARM |
2081 | subne $len, #0x10 @ subtract another 16 bytes | 2084 | subne $len, #0x10 @ subtract another 16 bytes |
2085 | #endif | ||
2082 | subs $len, #0x80 | 2086 | subs $len, #0x80 |
2083 | 2087 | ||
2084 | blo .Lxts_dec_short | 2088 | blo .Lxts_dec_short |
diff --git a/arch/arm/include/asm/kvm_mmu.h b/arch/arm/include/asm/kvm_mmu.h index bf0fe99e8ca9..4cf48c3aca13 100644 --- a/arch/arm/include/asm/kvm_mmu.h +++ b/arch/arm/include/asm/kvm_mmu.h | |||
@@ -149,29 +149,28 @@ static inline bool kvm_s2pmd_readonly(pmd_t *pmd) | |||
149 | (__boundary - 1 < (end) - 1)? __boundary: (end); \ | 149 | (__boundary - 1 < (end) - 1)? __boundary: (end); \ |
150 | }) | 150 | }) |
151 | 151 | ||
152 | #define kvm_pgd_index(addr) pgd_index(addr) | ||
153 | |||
152 | static inline bool kvm_page_empty(void *ptr) | 154 | static inline bool kvm_page_empty(void *ptr) |
153 | { | 155 | { |
154 | struct page *ptr_page = virt_to_page(ptr); | 156 | struct page *ptr_page = virt_to_page(ptr); |
155 | return page_count(ptr_page) == 1; | 157 | return page_count(ptr_page) == 1; |
156 | } | 158 | } |
157 | 159 | ||
158 | |||
159 | #define kvm_pte_table_empty(kvm, ptep) kvm_page_empty(ptep) | 160 | #define kvm_pte_table_empty(kvm, ptep) kvm_page_empty(ptep) |
160 | #define kvm_pmd_table_empty(kvm, pmdp) kvm_page_empty(pmdp) | 161 | #define kvm_pmd_table_empty(kvm, pmdp) kvm_page_empty(pmdp) |
161 | #define kvm_pud_table_empty(kvm, pudp) (0) | 162 | #define kvm_pud_table_empty(kvm, pudp) (0) |
162 | 163 | ||
163 | #define KVM_PREALLOC_LEVEL 0 | 164 | #define KVM_PREALLOC_LEVEL 0 |
164 | 165 | ||
165 | static inline int kvm_prealloc_hwpgd(struct kvm *kvm, pgd_t *pgd) | 166 | static inline void *kvm_get_hwpgd(struct kvm *kvm) |
166 | { | 167 | { |
167 | return 0; | 168 | return kvm->arch.pgd; |
168 | } | 169 | } |
169 | 170 | ||
170 | static inline void kvm_free_hwpgd(struct kvm *kvm) { } | 171 | static inline unsigned int kvm_get_hwpgd_size(void) |
171 | |||
172 | static inline void *kvm_get_hwpgd(struct kvm *kvm) | ||
173 | { | 172 | { |
174 | return kvm->arch.pgd; | 173 | return PTRS_PER_S2_PGD * sizeof(pgd_t); |
175 | } | 174 | } |
176 | 175 | ||
177 | struct kvm; | 176 | struct kvm; |
diff --git a/arch/arm/include/debug/at91.S b/arch/arm/include/debug/at91.S index 80a6501b4d50..c3c45e628e33 100644 --- a/arch/arm/include/debug/at91.S +++ b/arch/arm/include/debug/at91.S | |||
@@ -18,8 +18,11 @@ | |||
18 | #define AT91_DBGU 0xfc00c000 /* SAMA5D4_BASE_USART3 */ | 18 | #define AT91_DBGU 0xfc00c000 /* SAMA5D4_BASE_USART3 */ |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | /* Keep in sync with mach-at91/include/mach/hardware.h */ | 21 | #ifdef CONFIG_MMU |
22 | #define AT91_IO_P2V(x) ((x) - 0x01000000) | 22 | #define AT91_IO_P2V(x) ((x) - 0x01000000) |
23 | #else | ||
24 | #define AT91_IO_P2V(x) (x) | ||
25 | #endif | ||
23 | 26 | ||
24 | #define AT91_DBGU_SR (0x14) /* Status Register */ | 27 | #define AT91_DBGU_SR (0x14) /* Status Register */ |
25 | #define AT91_DBGU_THR (0x1c) /* Transmitter Holding Register */ | 28 | #define AT91_DBGU_THR (0x1c) /* Transmitter Holding Register */ |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index e55408e96559..1d60bebea4b8 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -246,12 +246,9 @@ static int __get_cpu_architecture(void) | |||
246 | if (cpu_arch) | 246 | if (cpu_arch) |
247 | cpu_arch += CPU_ARCH_ARMv3; | 247 | cpu_arch += CPU_ARCH_ARMv3; |
248 | } else if ((read_cpuid_id() & 0x000f0000) == 0x000f0000) { | 248 | } else if ((read_cpuid_id() & 0x000f0000) == 0x000f0000) { |
249 | unsigned int mmfr0; | ||
250 | |||
251 | /* Revised CPUID format. Read the Memory Model Feature | 249 | /* Revised CPUID format. Read the Memory Model Feature |
252 | * Register 0 and check for VMSAv7 or PMSAv7 */ | 250 | * Register 0 and check for VMSAv7 or PMSAv7 */ |
253 | asm("mrc p15, 0, %0, c0, c1, 4" | 251 | unsigned int mmfr0 = read_cpuid_ext(CPUID_EXT_MMFR0); |
254 | : "=r" (mmfr0)); | ||
255 | if ((mmfr0 & 0x0000000f) >= 0x00000003 || | 252 | if ((mmfr0 & 0x0000000f) >= 0x00000003 || |
256 | (mmfr0 & 0x000000f0) >= 0x00000030) | 253 | (mmfr0 & 0x000000f0) >= 0x00000030) |
257 | cpu_arch = CPU_ARCH_ARMv7; | 254 | cpu_arch = CPU_ARCH_ARMv7; |
diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c index 3e6859bc3e11..5656d79c5a44 100644 --- a/arch/arm/kvm/mmu.c +++ b/arch/arm/kvm/mmu.c | |||
@@ -290,7 +290,7 @@ static void unmap_range(struct kvm *kvm, pgd_t *pgdp, | |||
290 | phys_addr_t addr = start, end = start + size; | 290 | phys_addr_t addr = start, end = start + size; |
291 | phys_addr_t next; | 291 | phys_addr_t next; |
292 | 292 | ||
293 | pgd = pgdp + pgd_index(addr); | 293 | pgd = pgdp + kvm_pgd_index(addr); |
294 | do { | 294 | do { |
295 | next = kvm_pgd_addr_end(addr, end); | 295 | next = kvm_pgd_addr_end(addr, end); |
296 | if (!pgd_none(*pgd)) | 296 | if (!pgd_none(*pgd)) |
@@ -355,7 +355,7 @@ static void stage2_flush_memslot(struct kvm *kvm, | |||
355 | phys_addr_t next; | 355 | phys_addr_t next; |
356 | pgd_t *pgd; | 356 | pgd_t *pgd; |
357 | 357 | ||
358 | pgd = kvm->arch.pgd + pgd_index(addr); | 358 | pgd = kvm->arch.pgd + kvm_pgd_index(addr); |
359 | do { | 359 | do { |
360 | next = kvm_pgd_addr_end(addr, end); | 360 | next = kvm_pgd_addr_end(addr, end); |
361 | stage2_flush_puds(kvm, pgd, addr, next); | 361 | stage2_flush_puds(kvm, pgd, addr, next); |
@@ -632,6 +632,20 @@ int create_hyp_io_mappings(void *from, void *to, phys_addr_t phys_addr) | |||
632 | __phys_to_pfn(phys_addr), PAGE_HYP_DEVICE); | 632 | __phys_to_pfn(phys_addr), PAGE_HYP_DEVICE); |
633 | } | 633 | } |
634 | 634 | ||
635 | /* Free the HW pgd, one page at a time */ | ||
636 | static void kvm_free_hwpgd(void *hwpgd) | ||
637 | { | ||
638 | free_pages_exact(hwpgd, kvm_get_hwpgd_size()); | ||
639 | } | ||
640 | |||
641 | /* Allocate the HW PGD, making sure that each page gets its own refcount */ | ||
642 | static void *kvm_alloc_hwpgd(void) | ||
643 | { | ||
644 | unsigned int size = kvm_get_hwpgd_size(); | ||
645 | |||
646 | return alloc_pages_exact(size, GFP_KERNEL | __GFP_ZERO); | ||
647 | } | ||
648 | |||
635 | /** | 649 | /** |
636 | * kvm_alloc_stage2_pgd - allocate level-1 table for stage-2 translation. | 650 | * kvm_alloc_stage2_pgd - allocate level-1 table for stage-2 translation. |
637 | * @kvm: The KVM struct pointer for the VM. | 651 | * @kvm: The KVM struct pointer for the VM. |
@@ -645,15 +659,31 @@ int create_hyp_io_mappings(void *from, void *to, phys_addr_t phys_addr) | |||
645 | */ | 659 | */ |
646 | int kvm_alloc_stage2_pgd(struct kvm *kvm) | 660 | int kvm_alloc_stage2_pgd(struct kvm *kvm) |
647 | { | 661 | { |
648 | int ret; | ||
649 | pgd_t *pgd; | 662 | pgd_t *pgd; |
663 | void *hwpgd; | ||
650 | 664 | ||
651 | if (kvm->arch.pgd != NULL) { | 665 | if (kvm->arch.pgd != NULL) { |
652 | kvm_err("kvm_arch already initialized?\n"); | 666 | kvm_err("kvm_arch already initialized?\n"); |
653 | return -EINVAL; | 667 | return -EINVAL; |
654 | } | 668 | } |
655 | 669 | ||
670 | hwpgd = kvm_alloc_hwpgd(); | ||
671 | if (!hwpgd) | ||
672 | return -ENOMEM; | ||
673 | |||
674 | /* When the kernel uses more levels of page tables than the | ||
675 | * guest, we allocate a fake PGD and pre-populate it to point | ||
676 | * to the next-level page table, which will be the real | ||
677 | * initial page table pointed to by the VTTBR. | ||
678 | * | ||
679 | * When KVM_PREALLOC_LEVEL==2, we allocate a single page for | ||
680 | * the PMD and the kernel will use folded pud. | ||
681 | * When KVM_PREALLOC_LEVEL==1, we allocate 2 consecutive PUD | ||
682 | * pages. | ||
683 | */ | ||
656 | if (KVM_PREALLOC_LEVEL > 0) { | 684 | if (KVM_PREALLOC_LEVEL > 0) { |
685 | int i; | ||
686 | |||
657 | /* | 687 | /* |
658 | * Allocate fake pgd for the page table manipulation macros to | 688 | * Allocate fake pgd for the page table manipulation macros to |
659 | * work. This is not used by the hardware and we have no | 689 | * work. This is not used by the hardware and we have no |
@@ -661,30 +691,32 @@ int kvm_alloc_stage2_pgd(struct kvm *kvm) | |||
661 | */ | 691 | */ |
662 | pgd = (pgd_t *)kmalloc(PTRS_PER_S2_PGD * sizeof(pgd_t), | 692 | pgd = (pgd_t *)kmalloc(PTRS_PER_S2_PGD * sizeof(pgd_t), |
663 | GFP_KERNEL | __GFP_ZERO); | 693 | GFP_KERNEL | __GFP_ZERO); |
694 | |||
695 | if (!pgd) { | ||
696 | kvm_free_hwpgd(hwpgd); | ||
697 | return -ENOMEM; | ||
698 | } | ||
699 | |||
700 | /* Plug the HW PGD into the fake one. */ | ||
701 | for (i = 0; i < PTRS_PER_S2_PGD; i++) { | ||
702 | if (KVM_PREALLOC_LEVEL == 1) | ||
703 | pgd_populate(NULL, pgd + i, | ||
704 | (pud_t *)hwpgd + i * PTRS_PER_PUD); | ||
705 | else if (KVM_PREALLOC_LEVEL == 2) | ||
706 | pud_populate(NULL, pud_offset(pgd, 0) + i, | ||
707 | (pmd_t *)hwpgd + i * PTRS_PER_PMD); | ||
708 | } | ||
664 | } else { | 709 | } else { |
665 | /* | 710 | /* |
666 | * Allocate actual first-level Stage-2 page table used by the | 711 | * Allocate actual first-level Stage-2 page table used by the |
667 | * hardware for Stage-2 page table walks. | 712 | * hardware for Stage-2 page table walks. |
668 | */ | 713 | */ |
669 | pgd = (pgd_t *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, S2_PGD_ORDER); | 714 | pgd = (pgd_t *)hwpgd; |
670 | } | 715 | } |
671 | 716 | ||
672 | if (!pgd) | ||
673 | return -ENOMEM; | ||
674 | |||
675 | ret = kvm_prealloc_hwpgd(kvm, pgd); | ||
676 | if (ret) | ||
677 | goto out_err; | ||
678 | |||
679 | kvm_clean_pgd(pgd); | 717 | kvm_clean_pgd(pgd); |
680 | kvm->arch.pgd = pgd; | 718 | kvm->arch.pgd = pgd; |
681 | return 0; | 719 | return 0; |
682 | out_err: | ||
683 | if (KVM_PREALLOC_LEVEL > 0) | ||
684 | kfree(pgd); | ||
685 | else | ||
686 | free_pages((unsigned long)pgd, S2_PGD_ORDER); | ||
687 | return ret; | ||
688 | } | 720 | } |
689 | 721 | ||
690 | /** | 722 | /** |
@@ -785,11 +817,10 @@ void kvm_free_stage2_pgd(struct kvm *kvm) | |||
785 | return; | 817 | return; |
786 | 818 | ||
787 | unmap_stage2_range(kvm, 0, KVM_PHYS_SIZE); | 819 | unmap_stage2_range(kvm, 0, KVM_PHYS_SIZE); |
788 | kvm_free_hwpgd(kvm); | 820 | kvm_free_hwpgd(kvm_get_hwpgd(kvm)); |
789 | if (KVM_PREALLOC_LEVEL > 0) | 821 | if (KVM_PREALLOC_LEVEL > 0) |
790 | kfree(kvm->arch.pgd); | 822 | kfree(kvm->arch.pgd); |
791 | else | 823 | |
792 | free_pages((unsigned long)kvm->arch.pgd, S2_PGD_ORDER); | ||
793 | kvm->arch.pgd = NULL; | 824 | kvm->arch.pgd = NULL; |
794 | } | 825 | } |
795 | 826 | ||
@@ -799,7 +830,7 @@ static pud_t *stage2_get_pud(struct kvm *kvm, struct kvm_mmu_memory_cache *cache | |||
799 | pgd_t *pgd; | 830 | pgd_t *pgd; |
800 | pud_t *pud; | 831 | pud_t *pud; |
801 | 832 | ||
802 | pgd = kvm->arch.pgd + pgd_index(addr); | 833 | pgd = kvm->arch.pgd + kvm_pgd_index(addr); |
803 | if (WARN_ON(pgd_none(*pgd))) { | 834 | if (WARN_ON(pgd_none(*pgd))) { |
804 | if (!cache) | 835 | if (!cache) |
805 | return NULL; | 836 | return NULL; |
@@ -1089,7 +1120,7 @@ static void stage2_wp_range(struct kvm *kvm, phys_addr_t addr, phys_addr_t end) | |||
1089 | pgd_t *pgd; | 1120 | pgd_t *pgd; |
1090 | phys_addr_t next; | 1121 | phys_addr_t next; |
1091 | 1122 | ||
1092 | pgd = kvm->arch.pgd + pgd_index(addr); | 1123 | pgd = kvm->arch.pgd + kvm_pgd_index(addr); |
1093 | do { | 1124 | do { |
1094 | /* | 1125 | /* |
1095 | * Release kvm_mmu_lock periodically if the memory region is | 1126 | * Release kvm_mmu_lock periodically if the memory region is |
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 5e34fb143309..aa4116e9452f 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
@@ -270,37 +270,35 @@ static void __init at91_pm_sram_init(void) | |||
270 | phys_addr_t sram_pbase; | 270 | phys_addr_t sram_pbase; |
271 | unsigned long sram_base; | 271 | unsigned long sram_base; |
272 | struct device_node *node; | 272 | struct device_node *node; |
273 | struct platform_device *pdev; | 273 | struct platform_device *pdev = NULL; |
274 | 274 | ||
275 | node = of_find_compatible_node(NULL, NULL, "mmio-sram"); | 275 | for_each_compatible_node(node, NULL, "mmio-sram") { |
276 | if (!node) { | 276 | pdev = of_find_device_by_node(node); |
277 | pr_warn("%s: failed to find sram node!\n", __func__); | 277 | if (pdev) { |
278 | return; | 278 | of_node_put(node); |
279 | break; | ||
280 | } | ||
279 | } | 281 | } |
280 | 282 | ||
281 | pdev = of_find_device_by_node(node); | ||
282 | if (!pdev) { | 283 | if (!pdev) { |
283 | pr_warn("%s: failed to find sram device!\n", __func__); | 284 | pr_warn("%s: failed to find sram device!\n", __func__); |
284 | goto put_node; | 285 | return; |
285 | } | 286 | } |
286 | 287 | ||
287 | sram_pool = dev_get_gen_pool(&pdev->dev); | 288 | sram_pool = dev_get_gen_pool(&pdev->dev); |
288 | if (!sram_pool) { | 289 | if (!sram_pool) { |
289 | pr_warn("%s: sram pool unavailable!\n", __func__); | 290 | pr_warn("%s: sram pool unavailable!\n", __func__); |
290 | goto put_node; | 291 | return; |
291 | } | 292 | } |
292 | 293 | ||
293 | sram_base = gen_pool_alloc(sram_pool, at91_slow_clock_sz); | 294 | sram_base = gen_pool_alloc(sram_pool, at91_slow_clock_sz); |
294 | if (!sram_base) { | 295 | if (!sram_base) { |
295 | pr_warn("%s: unable to alloc ocram!\n", __func__); | 296 | pr_warn("%s: unable to alloc ocram!\n", __func__); |
296 | goto put_node; | 297 | return; |
297 | } | 298 | } |
298 | 299 | ||
299 | sram_pbase = gen_pool_virt_to_phys(sram_pool, sram_base); | 300 | sram_pbase = gen_pool_virt_to_phys(sram_pool, sram_base); |
300 | slow_clock = __arm_ioremap_exec(sram_pbase, at91_slow_clock_sz, false); | 301 | slow_clock = __arm_ioremap_exec(sram_pbase, at91_slow_clock_sz, false); |
301 | |||
302 | put_node: | ||
303 | of_node_put(node); | ||
304 | } | 302 | } |
305 | #endif | 303 | #endif |
306 | 304 | ||
diff --git a/arch/arm/mach-at91/pm.h b/arch/arm/mach-at91/pm.h index d2c89963af2d..86c0aa819d25 100644 --- a/arch/arm/mach-at91/pm.h +++ b/arch/arm/mach-at91/pm.h | |||
@@ -44,7 +44,7 @@ static inline void at91rm9200_standby(void) | |||
44 | " mcr p15, 0, %0, c7, c0, 4\n\t" | 44 | " mcr p15, 0, %0, c7, c0, 4\n\t" |
45 | " str %5, [%1, %2]" | 45 | " str %5, [%1, %2]" |
46 | : | 46 | : |
47 | : "r" (0), "r" (AT91_BASE_SYS), "r" (AT91RM9200_SDRAMC_LPR), | 47 | : "r" (0), "r" (at91_ramc_base[0]), "r" (AT91RM9200_SDRAMC_LPR), |
48 | "r" (1), "r" (AT91RM9200_SDRAMC_SRR), | 48 | "r" (1), "r" (AT91RM9200_SDRAMC_SRR), |
49 | "r" (lpr)); | 49 | "r" (lpr)); |
50 | } | 50 | } |
diff --git a/arch/arm/mach-at91/pm_slowclock.S b/arch/arm/mach-at91/pm_slowclock.S index 556151e85ec4..931f0e302c03 100644 --- a/arch/arm/mach-at91/pm_slowclock.S +++ b/arch/arm/mach-at91/pm_slowclock.S | |||
@@ -25,11 +25,6 @@ | |||
25 | */ | 25 | */ |
26 | #undef SLOWDOWN_MASTER_CLOCK | 26 | #undef SLOWDOWN_MASTER_CLOCK |
27 | 27 | ||
28 | #define MCKRDY_TIMEOUT 1000 | ||
29 | #define MOSCRDY_TIMEOUT 1000 | ||
30 | #define PLLALOCK_TIMEOUT 1000 | ||
31 | #define PLLBLOCK_TIMEOUT 1000 | ||
32 | |||
33 | pmc .req r0 | 28 | pmc .req r0 |
34 | sdramc .req r1 | 29 | sdramc .req r1 |
35 | ramc1 .req r2 | 30 | ramc1 .req r2 |
@@ -41,60 +36,42 @@ tmp2 .req r5 | |||
41 | * Wait until master clock is ready (after switching master clock source) | 36 | * Wait until master clock is ready (after switching master clock source) |
42 | */ | 37 | */ |
43 | .macro wait_mckrdy | 38 | .macro wait_mckrdy |
44 | mov tmp2, #MCKRDY_TIMEOUT | 39 | 1: ldr tmp1, [pmc, #AT91_PMC_SR] |
45 | 1: sub tmp2, tmp2, #1 | ||
46 | cmp tmp2, #0 | ||
47 | beq 2f | ||
48 | ldr tmp1, [pmc, #AT91_PMC_SR] | ||
49 | tst tmp1, #AT91_PMC_MCKRDY | 40 | tst tmp1, #AT91_PMC_MCKRDY |
50 | beq 1b | 41 | beq 1b |
51 | 2: | ||
52 | .endm | 42 | .endm |
53 | 43 | ||
54 | /* | 44 | /* |
55 | * Wait until master oscillator has stabilized. | 45 | * Wait until master oscillator has stabilized. |
56 | */ | 46 | */ |
57 | .macro wait_moscrdy | 47 | .macro wait_moscrdy |
58 | mov tmp2, #MOSCRDY_TIMEOUT | 48 | 1: ldr tmp1, [pmc, #AT91_PMC_SR] |
59 | 1: sub tmp2, tmp2, #1 | ||
60 | cmp tmp2, #0 | ||
61 | beq 2f | ||
62 | ldr tmp1, [pmc, #AT91_PMC_SR] | ||
63 | tst tmp1, #AT91_PMC_MOSCS | 49 | tst tmp1, #AT91_PMC_MOSCS |
64 | beq 1b | 50 | beq 1b |
65 | 2: | ||
66 | .endm | 51 | .endm |
67 | 52 | ||
68 | /* | 53 | /* |
69 | * Wait until PLLA has locked. | 54 | * Wait until PLLA has locked. |
70 | */ | 55 | */ |
71 | .macro wait_pllalock | 56 | .macro wait_pllalock |
72 | mov tmp2, #PLLALOCK_TIMEOUT | 57 | 1: ldr tmp1, [pmc, #AT91_PMC_SR] |
73 | 1: sub tmp2, tmp2, #1 | ||
74 | cmp tmp2, #0 | ||
75 | beq 2f | ||
76 | ldr tmp1, [pmc, #AT91_PMC_SR] | ||
77 | tst tmp1, #AT91_PMC_LOCKA | 58 | tst tmp1, #AT91_PMC_LOCKA |
78 | beq 1b | 59 | beq 1b |
79 | 2: | ||
80 | .endm | 60 | .endm |
81 | 61 | ||
82 | /* | 62 | /* |
83 | * Wait until PLLB has locked. | 63 | * Wait until PLLB has locked. |
84 | */ | 64 | */ |
85 | .macro wait_pllblock | 65 | .macro wait_pllblock |
86 | mov tmp2, #PLLBLOCK_TIMEOUT | 66 | 1: ldr tmp1, [pmc, #AT91_PMC_SR] |
87 | 1: sub tmp2, tmp2, #1 | ||
88 | cmp tmp2, #0 | ||
89 | beq 2f | ||
90 | ldr tmp1, [pmc, #AT91_PMC_SR] | ||
91 | tst tmp1, #AT91_PMC_LOCKB | 67 | tst tmp1, #AT91_PMC_LOCKB |
92 | beq 1b | 68 | beq 1b |
93 | 2: | ||
94 | .endm | 69 | .endm |
95 | 70 | ||
96 | .text | 71 | .text |
97 | 72 | ||
73 | .arm | ||
74 | |||
98 | /* void at91_slow_clock(void __iomem *pmc, void __iomem *sdramc, | 75 | /* void at91_slow_clock(void __iomem *pmc, void __iomem *sdramc, |
99 | * void __iomem *ramc1, int memctrl) | 76 | * void __iomem *ramc1, int memctrl) |
100 | */ | 77 | */ |
@@ -134,6 +111,16 @@ ddr_sr_enable: | |||
134 | cmp memctrl, #AT91_MEMCTRL_DDRSDR | 111 | cmp memctrl, #AT91_MEMCTRL_DDRSDR |
135 | bne sdr_sr_enable | 112 | bne sdr_sr_enable |
136 | 113 | ||
114 | /* LPDDR1 --> force DDR2 mode during self-refresh */ | ||
115 | ldr tmp1, [sdramc, #AT91_DDRSDRC_MDR] | ||
116 | str tmp1, .saved_sam9_mdr | ||
117 | bic tmp1, tmp1, #~AT91_DDRSDRC_MD | ||
118 | cmp tmp1, #AT91_DDRSDRC_MD_LOW_POWER_DDR | ||
119 | ldreq tmp1, [sdramc, #AT91_DDRSDRC_MDR] | ||
120 | biceq tmp1, tmp1, #AT91_DDRSDRC_MD | ||
121 | orreq tmp1, tmp1, #AT91_DDRSDRC_MD_DDR2 | ||
122 | streq tmp1, [sdramc, #AT91_DDRSDRC_MDR] | ||
123 | |||
137 | /* prepare for DDRAM self-refresh mode */ | 124 | /* prepare for DDRAM self-refresh mode */ |
138 | ldr tmp1, [sdramc, #AT91_DDRSDRC_LPR] | 125 | ldr tmp1, [sdramc, #AT91_DDRSDRC_LPR] |
139 | str tmp1, .saved_sam9_lpr | 126 | str tmp1, .saved_sam9_lpr |
@@ -142,14 +129,26 @@ ddr_sr_enable: | |||
142 | 129 | ||
143 | /* figure out if we use the second ram controller */ | 130 | /* figure out if we use the second ram controller */ |
144 | cmp ramc1, #0 | 131 | cmp ramc1, #0 |
145 | ldrne tmp2, [ramc1, #AT91_DDRSDRC_LPR] | 132 | beq ddr_no_2nd_ctrl |
146 | strne tmp2, .saved_sam9_lpr1 | 133 | |
147 | bicne tmp2, #AT91_DDRSDRC_LPCB | 134 | ldr tmp2, [ramc1, #AT91_DDRSDRC_MDR] |
148 | orrne tmp2, #AT91_DDRSDRC_LPCB_SELF_REFRESH | 135 | str tmp2, .saved_sam9_mdr1 |
136 | bic tmp2, tmp2, #~AT91_DDRSDRC_MD | ||
137 | cmp tmp2, #AT91_DDRSDRC_MD_LOW_POWER_DDR | ||
138 | ldreq tmp2, [ramc1, #AT91_DDRSDRC_MDR] | ||
139 | biceq tmp2, tmp2, #AT91_DDRSDRC_MD | ||
140 | orreq tmp2, tmp2, #AT91_DDRSDRC_MD_DDR2 | ||
141 | streq tmp2, [ramc1, #AT91_DDRSDRC_MDR] | ||
142 | |||
143 | ldr tmp2, [ramc1, #AT91_DDRSDRC_LPR] | ||
144 | str tmp2, .saved_sam9_lpr1 | ||
145 | bic tmp2, #AT91_DDRSDRC_LPCB | ||
146 | orr tmp2, #AT91_DDRSDRC_LPCB_SELF_REFRESH | ||
149 | 147 | ||
150 | /* Enable DDRAM self-refresh mode */ | 148 | /* Enable DDRAM self-refresh mode */ |
149 | str tmp2, [ramc1, #AT91_DDRSDRC_LPR] | ||
150 | ddr_no_2nd_ctrl: | ||
151 | str tmp1, [sdramc, #AT91_DDRSDRC_LPR] | 151 | str tmp1, [sdramc, #AT91_DDRSDRC_LPR] |
152 | strne tmp2, [ramc1, #AT91_DDRSDRC_LPR] | ||
153 | 152 | ||
154 | b sdr_sr_done | 153 | b sdr_sr_done |
155 | 154 | ||
@@ -208,6 +207,7 @@ sdr_sr_done: | |||
208 | /* Turn off the main oscillator */ | 207 | /* Turn off the main oscillator */ |
209 | ldr tmp1, [pmc, #AT91_CKGR_MOR] | 208 | ldr tmp1, [pmc, #AT91_CKGR_MOR] |
210 | bic tmp1, tmp1, #AT91_PMC_MOSCEN | 209 | bic tmp1, tmp1, #AT91_PMC_MOSCEN |
210 | orr tmp1, tmp1, #AT91_PMC_KEY | ||
211 | str tmp1, [pmc, #AT91_CKGR_MOR] | 211 | str tmp1, [pmc, #AT91_CKGR_MOR] |
212 | 212 | ||
213 | /* Wait for interrupt */ | 213 | /* Wait for interrupt */ |
@@ -216,6 +216,7 @@ sdr_sr_done: | |||
216 | /* Turn on the main oscillator */ | 216 | /* Turn on the main oscillator */ |
217 | ldr tmp1, [pmc, #AT91_CKGR_MOR] | 217 | ldr tmp1, [pmc, #AT91_CKGR_MOR] |
218 | orr tmp1, tmp1, #AT91_PMC_MOSCEN | 218 | orr tmp1, tmp1, #AT91_PMC_MOSCEN |
219 | orr tmp1, tmp1, #AT91_PMC_KEY | ||
219 | str tmp1, [pmc, #AT91_CKGR_MOR] | 220 | str tmp1, [pmc, #AT91_CKGR_MOR] |
220 | 221 | ||
221 | wait_moscrdy | 222 | wait_moscrdy |
@@ -280,12 +281,17 @@ sdr_sr_done: | |||
280 | */ | 281 | */ |
281 | cmp memctrl, #AT91_MEMCTRL_DDRSDR | 282 | cmp memctrl, #AT91_MEMCTRL_DDRSDR |
282 | bne sdr_en_restore | 283 | bne sdr_en_restore |
284 | /* Restore MDR in case of LPDDR1 */ | ||
285 | ldr tmp1, .saved_sam9_mdr | ||
286 | str tmp1, [sdramc, #AT91_DDRSDRC_MDR] | ||
283 | /* Restore LPR on AT91 with DDRAM */ | 287 | /* Restore LPR on AT91 with DDRAM */ |
284 | ldr tmp1, .saved_sam9_lpr | 288 | ldr tmp1, .saved_sam9_lpr |
285 | str tmp1, [sdramc, #AT91_DDRSDRC_LPR] | 289 | str tmp1, [sdramc, #AT91_DDRSDRC_LPR] |
286 | 290 | ||
287 | /* if we use the second ram controller */ | 291 | /* if we use the second ram controller */ |
288 | cmp ramc1, #0 | 292 | cmp ramc1, #0 |
293 | ldrne tmp2, .saved_sam9_mdr1 | ||
294 | strne tmp2, [ramc1, #AT91_DDRSDRC_MDR] | ||
289 | ldrne tmp2, .saved_sam9_lpr1 | 295 | ldrne tmp2, .saved_sam9_lpr1 |
290 | strne tmp2, [ramc1, #AT91_DDRSDRC_LPR] | 296 | strne tmp2, [ramc1, #AT91_DDRSDRC_LPR] |
291 | 297 | ||
@@ -319,5 +325,11 @@ ram_restored: | |||
319 | .saved_sam9_lpr1: | 325 | .saved_sam9_lpr1: |
320 | .word 0 | 326 | .word 0 |
321 | 327 | ||
328 | .saved_sam9_mdr: | ||
329 | .word 0 | ||
330 | |||
331 | .saved_sam9_mdr1: | ||
332 | .word 0 | ||
333 | |||
322 | ENTRY(at91_slow_clock_sz) | 334 | ENTRY(at91_slow_clock_sz) |
323 | .word .-at91_slow_clock | 335 | .word .-at91_slow_clock |
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 3f32c47a6d74..d2e9f12d12f1 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c | |||
@@ -126,8 +126,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) | |||
126 | */ | 126 | */ |
127 | void exynos_cpu_power_down(int cpu) | 127 | void exynos_cpu_power_down(int cpu) |
128 | { | 128 | { |
129 | if (cpu == 0 && (of_machine_is_compatible("samsung,exynos5420") || | 129 | if (cpu == 0 && (soc_is_exynos5420() || soc_is_exynos5800())) { |
130 | of_machine_is_compatible("samsung,exynos5800"))) { | ||
131 | /* | 130 | /* |
132 | * Bypass power down for CPU0 during suspend. Check for | 131 | * Bypass power down for CPU0 during suspend. Check for |
133 | * the SYS_PWR_REG value to decide if we are suspending | 132 | * the SYS_PWR_REG value to decide if we are suspending |
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c index 20f267121b3e..37266a826437 100644 --- a/arch/arm/mach-exynos/pm_domains.c +++ b/arch/arm/mach-exynos/pm_domains.c | |||
@@ -161,6 +161,34 @@ no_clk: | |||
161 | of_genpd_add_provider_simple(np, &pd->pd); | 161 | of_genpd_add_provider_simple(np, &pd->pd); |
162 | } | 162 | } |
163 | 163 | ||
164 | /* Assign the child power domains to their parents */ | ||
165 | for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") { | ||
166 | struct generic_pm_domain *child_domain, *parent_domain; | ||
167 | struct of_phandle_args args; | ||
168 | |||
169 | args.np = np; | ||
170 | args.args_count = 0; | ||
171 | child_domain = of_genpd_get_from_provider(&args); | ||
172 | if (!child_domain) | ||
173 | continue; | ||
174 | |||
175 | if (of_parse_phandle_with_args(np, "power-domains", | ||
176 | "#power-domain-cells", 0, &args) != 0) | ||
177 | continue; | ||
178 | |||
179 | parent_domain = of_genpd_get_from_provider(&args); | ||
180 | if (!parent_domain) | ||
181 | continue; | ||
182 | |||
183 | if (pm_genpd_add_subdomain(parent_domain, child_domain)) | ||
184 | pr_warn("%s failed to add subdomain: %s\n", | ||
185 | parent_domain->name, child_domain->name); | ||
186 | else | ||
187 | pr_info("%s has as child subdomain: %s.\n", | ||
188 | parent_domain->name, child_domain->name); | ||
189 | of_node_put(np); | ||
190 | } | ||
191 | |||
164 | return 0; | 192 | return 0; |
165 | } | 193 | } |
166 | arch_initcall(exynos4_pm_init_power_domain); | 194 | arch_initcall(exynos4_pm_init_power_domain); |
diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index 52e2b1a2fddb..318d127df147 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c | |||
@@ -87,8 +87,8 @@ static unsigned int exynos_pmu_spare3; | |||
87 | static u32 exynos_irqwake_intmask = 0xffffffff; | 87 | static u32 exynos_irqwake_intmask = 0xffffffff; |
88 | 88 | ||
89 | static const struct exynos_wkup_irq exynos3250_wkup_irq[] = { | 89 | static const struct exynos_wkup_irq exynos3250_wkup_irq[] = { |
90 | { 73, BIT(1) }, /* RTC alarm */ | 90 | { 105, BIT(1) }, /* RTC alarm */ |
91 | { 74, BIT(2) }, /* RTC tick */ | 91 | { 106, BIT(2) }, /* RTC tick */ |
92 | { /* sentinel */ }, | 92 | { /* sentinel */ }, |
93 | }; | 93 | }; |
94 | 94 | ||
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 4ad6e473cf83..9de3412af406 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -211,8 +211,9 @@ static void __init imx6q_1588_init(void) | |||
211 | * set bit IOMUXC_GPR1[21]. Or the PTP clock must be from pad | 211 | * set bit IOMUXC_GPR1[21]. Or the PTP clock must be from pad |
212 | * (external OSC), and we need to clear the bit. | 212 | * (external OSC), and we need to clear the bit. |
213 | */ | 213 | */ |
214 | clksel = ptp_clk == enet_ref ? IMX6Q_GPR1_ENET_CLK_SEL_ANATOP : | 214 | clksel = clk_is_match(ptp_clk, enet_ref) ? |
215 | IMX6Q_GPR1_ENET_CLK_SEL_PAD; | 215 | IMX6Q_GPR1_ENET_CLK_SEL_ANATOP : |
216 | IMX6Q_GPR1_ENET_CLK_SEL_PAD; | ||
216 | gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr"); | 217 | gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr"); |
217 | if (!IS_ERR(gpr)) | 218 | if (!IS_ERR(gpr)) |
218 | regmap_update_bits(gpr, IOMUXC_GPR1, | 219 | regmap_update_bits(gpr, IOMUXC_GPR1, |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 92afb723dcfc..355b08936871 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -1692,16 +1692,15 @@ static int _deassert_hardreset(struct omap_hwmod *oh, const char *name) | |||
1692 | if (ret == -EBUSY) | 1692 | if (ret == -EBUSY) |
1693 | pr_warn("omap_hwmod: %s: failed to hardreset\n", oh->name); | 1693 | pr_warn("omap_hwmod: %s: failed to hardreset\n", oh->name); |
1694 | 1694 | ||
1695 | if (!ret) { | 1695 | if (oh->clkdm) { |
1696 | /* | 1696 | /* |
1697 | * Set the clockdomain to HW_AUTO, assuming that the | 1697 | * Set the clockdomain to HW_AUTO, assuming that the |
1698 | * previous state was HW_AUTO. | 1698 | * previous state was HW_AUTO. |
1699 | */ | 1699 | */ |
1700 | if (oh->clkdm && hwsup) | 1700 | if (hwsup) |
1701 | clkdm_allow_idle(oh->clkdm); | 1701 | clkdm_allow_idle(oh->clkdm); |
1702 | } else { | 1702 | |
1703 | if (oh->clkdm) | 1703 | clkdm_hwmod_disable(oh->clkdm, oh); |
1704 | clkdm_hwmod_disable(oh->clkdm, oh); | ||
1705 | } | 1704 | } |
1706 | 1705 | ||
1707 | return ret; | 1706 | return ret; |
@@ -2698,6 +2697,7 @@ static int __init _register(struct omap_hwmod *oh) | |||
2698 | INIT_LIST_HEAD(&oh->master_ports); | 2697 | INIT_LIST_HEAD(&oh->master_ports); |
2699 | INIT_LIST_HEAD(&oh->slave_ports); | 2698 | INIT_LIST_HEAD(&oh->slave_ports); |
2700 | spin_lock_init(&oh->_lock); | 2699 | spin_lock_init(&oh->_lock); |
2700 | lockdep_set_class(&oh->_lock, &oh->hwmod_key); | ||
2701 | 2701 | ||
2702 | oh->_state = _HWMOD_STATE_REGISTERED; | 2702 | oh->_state = _HWMOD_STATE_REGISTERED; |
2703 | 2703 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h index 9d4bec6ee742..9611c91d9b82 100644 --- a/arch/arm/mach-omap2/omap_hwmod.h +++ b/arch/arm/mach-omap2/omap_hwmod.h | |||
@@ -674,6 +674,7 @@ struct omap_hwmod { | |||
674 | u32 _sysc_cache; | 674 | u32 _sysc_cache; |
675 | void __iomem *_mpu_rt_va; | 675 | void __iomem *_mpu_rt_va; |
676 | spinlock_t _lock; | 676 | spinlock_t _lock; |
677 | struct lock_class_key hwmod_key; /* unique lock class */ | ||
677 | struct list_head node; | 678 | struct list_head node; |
678 | struct omap_hwmod_ocp_if *_mpu_port; | 679 | struct omap_hwmod_ocp_if *_mpu_port; |
679 | unsigned int (*xlate_irq)(unsigned int); | 680 | unsigned int (*xlate_irq)(unsigned int); |
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c index e8692e7675b8..16fe7a1b7a35 100644 --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c | |||
@@ -1466,55 +1466,18 @@ static struct omap_hwmod dra7xx_ocp2scp3_hwmod = { | |||
1466 | * | 1466 | * |
1467 | */ | 1467 | */ |
1468 | 1468 | ||
1469 | static struct omap_hwmod_class dra7xx_pcie_hwmod_class = { | 1469 | static struct omap_hwmod_class dra7xx_pciess_hwmod_class = { |
1470 | .name = "pcie", | 1470 | .name = "pcie", |
1471 | }; | 1471 | }; |
1472 | 1472 | ||
1473 | /* pcie1 */ | 1473 | /* pcie1 */ |
1474 | static struct omap_hwmod dra7xx_pcie1_hwmod = { | 1474 | static struct omap_hwmod dra7xx_pciess1_hwmod = { |
1475 | .name = "pcie1", | 1475 | .name = "pcie1", |
1476 | .class = &dra7xx_pcie_hwmod_class, | 1476 | .class = &dra7xx_pciess_hwmod_class, |
1477 | .clkdm_name = "pcie_clkdm", | 1477 | .clkdm_name = "pcie_clkdm", |
1478 | .main_clk = "l4_root_clk_div", | 1478 | .main_clk = "l4_root_clk_div", |
1479 | .prcm = { | 1479 | .prcm = { |
1480 | .omap4 = { | 1480 | .omap4 = { |
1481 | .clkctrl_offs = DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET, | ||
1482 | .modulemode = MODULEMODE_SWCTRL, | ||
1483 | }, | ||
1484 | }, | ||
1485 | }; | ||
1486 | |||
1487 | /* pcie2 */ | ||
1488 | static struct omap_hwmod dra7xx_pcie2_hwmod = { | ||
1489 | .name = "pcie2", | ||
1490 | .class = &dra7xx_pcie_hwmod_class, | ||
1491 | .clkdm_name = "pcie_clkdm", | ||
1492 | .main_clk = "l4_root_clk_div", | ||
1493 | .prcm = { | ||
1494 | .omap4 = { | ||
1495 | .clkctrl_offs = DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET, | ||
1496 | .modulemode = MODULEMODE_SWCTRL, | ||
1497 | }, | ||
1498 | }, | ||
1499 | }; | ||
1500 | |||
1501 | /* | ||
1502 | * 'PCIE PHY' class | ||
1503 | * | ||
1504 | */ | ||
1505 | |||
1506 | static struct omap_hwmod_class dra7xx_pcie_phy_hwmod_class = { | ||
1507 | .name = "pcie-phy", | ||
1508 | }; | ||
1509 | |||
1510 | /* pcie1 phy */ | ||
1511 | static struct omap_hwmod dra7xx_pcie1_phy_hwmod = { | ||
1512 | .name = "pcie1-phy", | ||
1513 | .class = &dra7xx_pcie_phy_hwmod_class, | ||
1514 | .clkdm_name = "l3init_clkdm", | ||
1515 | .main_clk = "l4_root_clk_div", | ||
1516 | .prcm = { | ||
1517 | .omap4 = { | ||
1518 | .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET, | 1481 | .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET, |
1519 | .context_offs = DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET, | 1482 | .context_offs = DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET, |
1520 | .modulemode = MODULEMODE_SWCTRL, | 1483 | .modulemode = MODULEMODE_SWCTRL, |
@@ -1522,11 +1485,11 @@ static struct omap_hwmod dra7xx_pcie1_phy_hwmod = { | |||
1522 | }, | 1485 | }, |
1523 | }; | 1486 | }; |
1524 | 1487 | ||
1525 | /* pcie2 phy */ | 1488 | /* pcie2 */ |
1526 | static struct omap_hwmod dra7xx_pcie2_phy_hwmod = { | 1489 | static struct omap_hwmod dra7xx_pciess2_hwmod = { |
1527 | .name = "pcie2-phy", | 1490 | .name = "pcie2", |
1528 | .class = &dra7xx_pcie_phy_hwmod_class, | 1491 | .class = &dra7xx_pciess_hwmod_class, |
1529 | .clkdm_name = "l3init_clkdm", | 1492 | .clkdm_name = "pcie_clkdm", |
1530 | .main_clk = "l4_root_clk_div", | 1493 | .main_clk = "l4_root_clk_div", |
1531 | .prcm = { | 1494 | .prcm = { |
1532 | .omap4 = { | 1495 | .omap4 = { |
@@ -2877,50 +2840,34 @@ static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp3 = { | |||
2877 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2840 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2878 | }; | 2841 | }; |
2879 | 2842 | ||
2880 | /* l3_main_1 -> pcie1 */ | 2843 | /* l3_main_1 -> pciess1 */ |
2881 | static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pcie1 = { | 2844 | static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess1 = { |
2882 | .master = &dra7xx_l3_main_1_hwmod, | 2845 | .master = &dra7xx_l3_main_1_hwmod, |
2883 | .slave = &dra7xx_pcie1_hwmod, | 2846 | .slave = &dra7xx_pciess1_hwmod, |
2884 | .clk = "l3_iclk_div", | 2847 | .clk = "l3_iclk_div", |
2885 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2848 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2886 | }; | 2849 | }; |
2887 | 2850 | ||
2888 | /* l4_cfg -> pcie1 */ | 2851 | /* l4_cfg -> pciess1 */ |
2889 | static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie1 = { | 2852 | static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess1 = { |
2890 | .master = &dra7xx_l4_cfg_hwmod, | 2853 | .master = &dra7xx_l4_cfg_hwmod, |
2891 | .slave = &dra7xx_pcie1_hwmod, | 2854 | .slave = &dra7xx_pciess1_hwmod, |
2892 | .clk = "l4_root_clk_div", | 2855 | .clk = "l4_root_clk_div", |
2893 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2856 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2894 | }; | 2857 | }; |
2895 | 2858 | ||
2896 | /* l3_main_1 -> pcie2 */ | 2859 | /* l3_main_1 -> pciess2 */ |
2897 | static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pcie2 = { | 2860 | static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess2 = { |
2898 | .master = &dra7xx_l3_main_1_hwmod, | 2861 | .master = &dra7xx_l3_main_1_hwmod, |
2899 | .slave = &dra7xx_pcie2_hwmod, | 2862 | .slave = &dra7xx_pciess2_hwmod, |
2900 | .clk = "l3_iclk_div", | 2863 | .clk = "l3_iclk_div", |
2901 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2864 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2902 | }; | 2865 | }; |
2903 | 2866 | ||
2904 | /* l4_cfg -> pcie2 */ | 2867 | /* l4_cfg -> pciess2 */ |
2905 | static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie2 = { | 2868 | static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess2 = { |
2906 | .master = &dra7xx_l4_cfg_hwmod, | ||
2907 | .slave = &dra7xx_pcie2_hwmod, | ||
2908 | .clk = "l4_root_clk_div", | ||
2909 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2910 | }; | ||
2911 | |||
2912 | /* l4_cfg -> pcie1 phy */ | ||
2913 | static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie1_phy = { | ||
2914 | .master = &dra7xx_l4_cfg_hwmod, | ||
2915 | .slave = &dra7xx_pcie1_phy_hwmod, | ||
2916 | .clk = "l4_root_clk_div", | ||
2917 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2918 | }; | ||
2919 | |||
2920 | /* l4_cfg -> pcie2 phy */ | ||
2921 | static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie2_phy = { | ||
2922 | .master = &dra7xx_l4_cfg_hwmod, | 2869 | .master = &dra7xx_l4_cfg_hwmod, |
2923 | .slave = &dra7xx_pcie2_phy_hwmod, | 2870 | .slave = &dra7xx_pciess2_hwmod, |
2924 | .clk = "l4_root_clk_div", | 2871 | .clk = "l4_root_clk_div", |
2925 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2872 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2926 | }; | 2873 | }; |
@@ -3327,12 +3274,10 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { | |||
3327 | &dra7xx_l4_cfg__mpu, | 3274 | &dra7xx_l4_cfg__mpu, |
3328 | &dra7xx_l4_cfg__ocp2scp1, | 3275 | &dra7xx_l4_cfg__ocp2scp1, |
3329 | &dra7xx_l4_cfg__ocp2scp3, | 3276 | &dra7xx_l4_cfg__ocp2scp3, |
3330 | &dra7xx_l3_main_1__pcie1, | 3277 | &dra7xx_l3_main_1__pciess1, |
3331 | &dra7xx_l4_cfg__pcie1, | 3278 | &dra7xx_l4_cfg__pciess1, |
3332 | &dra7xx_l3_main_1__pcie2, | 3279 | &dra7xx_l3_main_1__pciess2, |
3333 | &dra7xx_l4_cfg__pcie2, | 3280 | &dra7xx_l4_cfg__pciess2, |
3334 | &dra7xx_l4_cfg__pcie1_phy, | ||
3335 | &dra7xx_l4_cfg__pcie2_phy, | ||
3336 | &dra7xx_l3_main_1__qspi, | 3281 | &dra7xx_l3_main_1__qspi, |
3337 | &dra7xx_l4_per3__rtcss, | 3282 | &dra7xx_l4_per3__rtcss, |
3338 | &dra7xx_l4_cfg__sata, | 3283 | &dra7xx_l4_cfg__sata, |
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 190fa43e7479..e642b079e9f3 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c | |||
@@ -173,6 +173,7 @@ static void __init omap3_igep0030_rev_g_legacy_init(void) | |||
173 | 173 | ||
174 | static void __init omap3_evm_legacy_init(void) | 174 | static void __init omap3_evm_legacy_init(void) |
175 | { | 175 | { |
176 | hsmmc2_internal_input_clk(); | ||
176 | legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 149); | 177 | legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 149); |
177 | } | 178 | } |
178 | 179 | ||
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c index a08a617a6c11..d6d6bc39e05c 100644 --- a/arch/arm/mach-omap2/prm44xx.c +++ b/arch/arm/mach-omap2/prm44xx.c | |||
@@ -252,10 +252,10 @@ static void omap44xx_prm_save_and_clear_irqen(u32 *saved_mask) | |||
252 | { | 252 | { |
253 | saved_mask[0] = | 253 | saved_mask[0] = |
254 | omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST, | 254 | omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST, |
255 | OMAP4_PRM_IRQSTATUS_MPU_OFFSET); | 255 | OMAP4_PRM_IRQENABLE_MPU_OFFSET); |
256 | saved_mask[1] = | 256 | saved_mask[1] = |
257 | omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST, | 257 | omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST, |
258 | OMAP4_PRM_IRQSTATUS_MPU_2_OFFSET); | 258 | OMAP4_PRM_IRQENABLE_MPU_2_OFFSET); |
259 | 259 | ||
260 | omap4_prm_write_inst_reg(0, OMAP4430_PRM_OCP_SOCKET_INST, | 260 | omap4_prm_write_inst_reg(0, OMAP4430_PRM_OCP_SOCKET_INST, |
261 | OMAP4_PRM_IRQENABLE_MPU_OFFSET); | 261 | OMAP4_PRM_IRQENABLE_MPU_OFFSET); |
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c index 7d8eab857a93..f6d02e4cbcda 100644 --- a/arch/arm/mach-pxa/idp.c +++ b/arch/arm/mach-pxa/idp.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/platform_data/video-pxafb.h> | 36 | #include <linux/platform_data/video-pxafb.h> |
37 | #include <mach/bitfield.h> | 37 | #include <mach/bitfield.h> |
38 | #include <linux/platform_data/mmc-pxamci.h> | 38 | #include <linux/platform_data/mmc-pxamci.h> |
39 | #include <linux/smc91x.h> | ||
39 | 40 | ||
40 | #include "generic.h" | 41 | #include "generic.h" |
41 | #include "devices.h" | 42 | #include "devices.h" |
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index 28da319d389f..eaee2c20b189 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c | |||
@@ -195,7 +195,7 @@ static struct resource smc91x_resources[] = { | |||
195 | }; | 195 | }; |
196 | 196 | ||
197 | struct smc91x_platdata smc91x_platdata = { | 197 | struct smc91x_platdata smc91x_platdata = { |
198 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT; | 198 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, |
199 | }; | 199 | }; |
200 | 200 | ||
201 | static struct platform_device smc91x_device = { | 201 | static struct platform_device smc91x_device = { |
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c index 7b0cd3172354..af868d258e66 100644 --- a/arch/arm/mach-sa1100/neponset.c +++ b/arch/arm/mach-sa1100/neponset.c | |||
@@ -268,8 +268,8 @@ static int neponset_probe(struct platform_device *dev) | |||
268 | .id = 0, | 268 | .id = 0, |
269 | .res = smc91x_resources, | 269 | .res = smc91x_resources, |
270 | .num_res = ARRAY_SIZE(smc91x_resources), | 270 | .num_res = ARRAY_SIZE(smc91x_resources), |
271 | .data = &smc91c_platdata, | 271 | .data = &smc91x_platdata, |
272 | .size_data = sizeof(smc91c_platdata), | 272 | .size_data = sizeof(smc91x_platdata), |
273 | }; | 273 | }; |
274 | int ret, irq; | 274 | int ret, irq; |
275 | 275 | ||
diff --git a/arch/arm/mach-sa1100/pleb.c b/arch/arm/mach-sa1100/pleb.c index 696fd0fe4806..1525d7b5f1b7 100644 --- a/arch/arm/mach-sa1100/pleb.c +++ b/arch/arm/mach-sa1100/pleb.c | |||
@@ -54,7 +54,7 @@ static struct platform_device smc91x_device = { | |||
54 | .num_resources = ARRAY_SIZE(smc91x_resources), | 54 | .num_resources = ARRAY_SIZE(smc91x_resources), |
55 | .resource = smc91x_resources, | 55 | .resource = smc91x_resources, |
56 | .dev = { | 56 | .dev = { |
57 | .platform_data = &smc91c_platdata, | 57 | .platform_data = &smc91x_platdata, |
58 | }, | 58 | }, |
59 | }; | 59 | }; |
60 | 60 | ||
diff --git a/arch/arm/mach-socfpga/core.h b/arch/arm/mach-socfpga/core.h index 483cb467bf65..a0f3b1cd497c 100644 --- a/arch/arm/mach-socfpga/core.h +++ b/arch/arm/mach-socfpga/core.h | |||
@@ -45,6 +45,6 @@ extern char secondary_trampoline, secondary_trampoline_end; | |||
45 | 45 | ||
46 | extern unsigned long socfpga_cpu1start_addr; | 46 | extern unsigned long socfpga_cpu1start_addr; |
47 | 47 | ||
48 | #define SOCFPGA_SCU_VIRT_BASE 0xfffec000 | 48 | #define SOCFPGA_SCU_VIRT_BASE 0xfee00000 |
49 | 49 | ||
50 | #endif | 50 | #endif |
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c index 383d61e138af..f5e597c207b9 100644 --- a/arch/arm/mach-socfpga/socfpga.c +++ b/arch/arm/mach-socfpga/socfpga.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/hardware/cache-l2x0.h> | 23 | #include <asm/hardware/cache-l2x0.h> |
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
26 | #include <asm/cacheflush.h> | ||
26 | 27 | ||
27 | #include "core.h" | 28 | #include "core.h" |
28 | 29 | ||
@@ -73,6 +74,10 @@ void __init socfpga_sysmgr_init(void) | |||
73 | (u32 *) &socfpga_cpu1start_addr)) | 74 | (u32 *) &socfpga_cpu1start_addr)) |
74 | pr_err("SMP: Need cpu1-start-addr in device tree.\n"); | 75 | pr_err("SMP: Need cpu1-start-addr in device tree.\n"); |
75 | 76 | ||
77 | /* Ensure that socfpga_cpu1start_addr is visible to other CPUs */ | ||
78 | smp_wmb(); | ||
79 | sync_cache_w(&socfpga_cpu1start_addr); | ||
80 | |||
76 | sys_manager_base_addr = of_iomap(np, 0); | 81 | sys_manager_base_addr = of_iomap(np, 0); |
77 | 82 | ||
78 | np = of_find_compatible_node(NULL, NULL, "altr,rst-mgr"); | 83 | np = of_find_compatible_node(NULL, NULL, "altr,rst-mgr"); |
diff --git a/arch/arm/mach-sti/board-dt.c b/arch/arm/mach-sti/board-dt.c index b067390cef4e..b373acade338 100644 --- a/arch/arm/mach-sti/board-dt.c +++ b/arch/arm/mach-sti/board-dt.c | |||
@@ -18,6 +18,7 @@ static const char *stih41x_dt_match[] __initdata = { | |||
18 | "st,stih415", | 18 | "st,stih415", |
19 | "st,stih416", | 19 | "st,stih416", |
20 | "st,stih407", | 20 | "st,stih407", |
21 | "st,stih410", | ||
21 | "st,stih418", | 22 | "st,stih418", |
22 | NULL | 23 | NULL |
23 | }; | 24 | }; |
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index c6c7696b8db9..8f15f70622a6 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -1131,23 +1131,22 @@ static void __init l2c310_of_parse(const struct device_node *np, | |||
1131 | } | 1131 | } |
1132 | 1132 | ||
1133 | ret = l2x0_cache_size_of_parse(np, aux_val, aux_mask, &assoc, SZ_512K); | 1133 | ret = l2x0_cache_size_of_parse(np, aux_val, aux_mask, &assoc, SZ_512K); |
1134 | if (ret) | 1134 | if (!ret) { |
1135 | return; | 1135 | switch (assoc) { |
1136 | 1136 | case 16: | |
1137 | switch (assoc) { | 1137 | *aux_val &= ~L2X0_AUX_CTRL_ASSOC_MASK; |
1138 | case 16: | 1138 | *aux_val |= L310_AUX_CTRL_ASSOCIATIVITY_16; |
1139 | *aux_val &= ~L2X0_AUX_CTRL_ASSOC_MASK; | 1139 | *aux_mask &= ~L2X0_AUX_CTRL_ASSOC_MASK; |
1140 | *aux_val |= L310_AUX_CTRL_ASSOCIATIVITY_16; | 1140 | break; |
1141 | *aux_mask &= ~L2X0_AUX_CTRL_ASSOC_MASK; | 1141 | case 8: |
1142 | break; | 1142 | *aux_val &= ~L2X0_AUX_CTRL_ASSOC_MASK; |
1143 | case 8: | 1143 | *aux_mask &= ~L2X0_AUX_CTRL_ASSOC_MASK; |
1144 | *aux_val &= ~L2X0_AUX_CTRL_ASSOC_MASK; | 1144 | break; |
1145 | *aux_mask &= ~L2X0_AUX_CTRL_ASSOC_MASK; | 1145 | default: |
1146 | break; | 1146 | pr_err("L2C-310 OF cache associativity %d invalid, only 8 or 16 permitted\n", |
1147 | default: | 1147 | assoc); |
1148 | pr_err("L2C-310 OF cache associativity %d invalid, only 8 or 16 permitted\n", | 1148 | break; |
1149 | assoc); | 1149 | } |
1150 | break; | ||
1151 | } | 1150 | } |
1152 | 1151 | ||
1153 | prefetch = l2x0_saved_regs.prefetch_ctrl; | 1152 | prefetch = l2x0_saved_regs.prefetch_ctrl; |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 170a116d1b29..c27447653903 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -171,7 +171,7 @@ static int __dma_supported(struct device *dev, u64 mask, bool warn) | |||
171 | */ | 171 | */ |
172 | if (sizeof(mask) != sizeof(dma_addr_t) && | 172 | if (sizeof(mask) != sizeof(dma_addr_t) && |
173 | mask > (dma_addr_t)~0 && | 173 | mask > (dma_addr_t)~0 && |
174 | dma_to_pfn(dev, ~0) < max_pfn) { | 174 | dma_to_pfn(dev, ~0) < max_pfn - 1) { |
175 | if (warn) { | 175 | if (warn) { |
176 | dev_warn(dev, "Coherent DMA mask %#llx is larger than dma_addr_t allows\n", | 176 | dev_warn(dev, "Coherent DMA mask %#llx is larger than dma_addr_t allows\n", |
177 | mask); | 177 | mask); |
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index a982dc3190df..6333d9c17875 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
@@ -552,6 +552,7 @@ do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
552 | 552 | ||
553 | pr_alert("Unhandled fault: %s (0x%03x) at 0x%08lx\n", | 553 | pr_alert("Unhandled fault: %s (0x%03x) at 0x%08lx\n", |
554 | inf->name, fsr, addr); | 554 | inf->name, fsr, addr); |
555 | show_pte(current->mm, addr); | ||
555 | 556 | ||
556 | info.si_signo = inf->sig; | 557 | info.si_signo = inf->sig; |
557 | info.si_errno = 0; | 558 | info.si_errno = 0; |
diff --git a/arch/arm/mm/pageattr.c b/arch/arm/mm/pageattr.c index 004e35cdcfff..cf30daff8932 100644 --- a/arch/arm/mm/pageattr.c +++ b/arch/arm/mm/pageattr.c | |||
@@ -49,7 +49,10 @@ static int change_memory_common(unsigned long addr, int numpages, | |||
49 | WARN_ON_ONCE(1); | 49 | WARN_ON_ONCE(1); |
50 | } | 50 | } |
51 | 51 | ||
52 | if (!is_module_address(start) || !is_module_address(end - 1)) | 52 | if (start < MODULES_VADDR || start >= MODULES_END) |
53 | return -EINVAL; | ||
54 | |||
55 | if (end < MODULES_VADDR || start >= MODULES_END) | ||
53 | return -EINVAL; | 56 | return -EINVAL; |
54 | 57 | ||
55 | data.set_mask = set_mask; | 58 | data.set_mask = set_mask; |
diff --git a/arch/arm64/boot/dts/apm/apm-storm.dtsi b/arch/arm64/boot/dts/apm/apm-storm.dtsi index f1ad9c2ab2e9..a857794432d6 100644 --- a/arch/arm64/boot/dts/apm/apm-storm.dtsi +++ b/arch/arm64/boot/dts/apm/apm-storm.dtsi | |||
@@ -622,7 +622,7 @@ | |||
622 | }; | 622 | }; |
623 | 623 | ||
624 | sgenet0: ethernet@1f210000 { | 624 | sgenet0: ethernet@1f210000 { |
625 | compatible = "apm,xgene-enet"; | 625 | compatible = "apm,xgene1-sgenet"; |
626 | status = "disabled"; | 626 | status = "disabled"; |
627 | reg = <0x0 0x1f210000 0x0 0xd100>, | 627 | reg = <0x0 0x1f210000 0x0 0xd100>, |
628 | <0x0 0x1f200000 0x0 0Xc300>, | 628 | <0x0 0x1f200000 0x0 0Xc300>, |
@@ -636,7 +636,7 @@ | |||
636 | }; | 636 | }; |
637 | 637 | ||
638 | xgenet: ethernet@1f610000 { | 638 | xgenet: ethernet@1f610000 { |
639 | compatible = "apm,xgene-enet"; | 639 | compatible = "apm,xgene1-xgenet"; |
640 | status = "disabled"; | 640 | status = "disabled"; |
641 | reg = <0x0 0x1f610000 0x0 0xd100>, | 641 | reg = <0x0 0x1f610000 0x0 0xd100>, |
642 | <0x0 0x1f600000 0x0 0Xc300>, | 642 | <0x0 0x1f600000 0x0 0Xc300>, |
diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h index 94674eb7e7bb..54bb4ba97441 100644 --- a/arch/arm64/include/asm/kvm_arm.h +++ b/arch/arm64/include/asm/kvm_arm.h | |||
@@ -129,6 +129,9 @@ | |||
129 | * 40 bits wide (T0SZ = 24). Systems with a PARange smaller than 40 bits are | 129 | * 40 bits wide (T0SZ = 24). Systems with a PARange smaller than 40 bits are |
130 | * not known to exist and will break with this configuration. | 130 | * not known to exist and will break with this configuration. |
131 | * | 131 | * |
132 | * VTCR_EL2.PS is extracted from ID_AA64MMFR0_EL1.PARange at boot time | ||
133 | * (see hyp-init.S). | ||
134 | * | ||
132 | * Note that when using 4K pages, we concatenate two first level page tables | 135 | * Note that when using 4K pages, we concatenate two first level page tables |
133 | * together. | 136 | * together. |
134 | * | 137 | * |
@@ -138,7 +141,6 @@ | |||
138 | #ifdef CONFIG_ARM64_64K_PAGES | 141 | #ifdef CONFIG_ARM64_64K_PAGES |
139 | /* | 142 | /* |
140 | * Stage2 translation configuration: | 143 | * Stage2 translation configuration: |
141 | * 40bits output (PS = 2) | ||
142 | * 40bits input (T0SZ = 24) | 144 | * 40bits input (T0SZ = 24) |
143 | * 64kB pages (TG0 = 1) | 145 | * 64kB pages (TG0 = 1) |
144 | * 2 level page tables (SL = 1) | 146 | * 2 level page tables (SL = 1) |
@@ -150,7 +152,6 @@ | |||
150 | #else | 152 | #else |
151 | /* | 153 | /* |
152 | * Stage2 translation configuration: | 154 | * Stage2 translation configuration: |
153 | * 40bits output (PS = 2) | ||
154 | * 40bits input (T0SZ = 24) | 155 | * 40bits input (T0SZ = 24) |
155 | * 4kB pages (TG0 = 0) | 156 | * 4kB pages (TG0 = 0) |
156 | * 3 level page tables (SL = 1) | 157 | * 3 level page tables (SL = 1) |
diff --git a/arch/arm64/include/asm/kvm_mmu.h b/arch/arm64/include/asm/kvm_mmu.h index 6458b5373142..bbfb600fa822 100644 --- a/arch/arm64/include/asm/kvm_mmu.h +++ b/arch/arm64/include/asm/kvm_mmu.h | |||
@@ -158,6 +158,8 @@ static inline bool kvm_s2pmd_readonly(pmd_t *pmd) | |||
158 | #define PTRS_PER_S2_PGD (1 << PTRS_PER_S2_PGD_SHIFT) | 158 | #define PTRS_PER_S2_PGD (1 << PTRS_PER_S2_PGD_SHIFT) |
159 | #define S2_PGD_ORDER get_order(PTRS_PER_S2_PGD * sizeof(pgd_t)) | 159 | #define S2_PGD_ORDER get_order(PTRS_PER_S2_PGD * sizeof(pgd_t)) |
160 | 160 | ||
161 | #define kvm_pgd_index(addr) (((addr) >> PGDIR_SHIFT) & (PTRS_PER_S2_PGD - 1)) | ||
162 | |||
161 | /* | 163 | /* |
162 | * If we are concatenating first level stage-2 page tables, we would have less | 164 | * If we are concatenating first level stage-2 page tables, we would have less |
163 | * than or equal to 16 pointers in the fake PGD, because that's what the | 165 | * than or equal to 16 pointers in the fake PGD, because that's what the |
@@ -171,43 +173,6 @@ static inline bool kvm_s2pmd_readonly(pmd_t *pmd) | |||
171 | #define KVM_PREALLOC_LEVEL (0) | 173 | #define KVM_PREALLOC_LEVEL (0) |
172 | #endif | 174 | #endif |
173 | 175 | ||
174 | /** | ||
175 | * kvm_prealloc_hwpgd - allocate inital table for VTTBR | ||
176 | * @kvm: The KVM struct pointer for the VM. | ||
177 | * @pgd: The kernel pseudo pgd | ||
178 | * | ||
179 | * When the kernel uses more levels of page tables than the guest, we allocate | ||
180 | * a fake PGD and pre-populate it to point to the next-level page table, which | ||
181 | * will be the real initial page table pointed to by the VTTBR. | ||
182 | * | ||
183 | * When KVM_PREALLOC_LEVEL==2, we allocate a single page for the PMD and | ||
184 | * the kernel will use folded pud. When KVM_PREALLOC_LEVEL==1, we | ||
185 | * allocate 2 consecutive PUD pages. | ||
186 | */ | ||
187 | static inline int kvm_prealloc_hwpgd(struct kvm *kvm, pgd_t *pgd) | ||
188 | { | ||
189 | unsigned int i; | ||
190 | unsigned long hwpgd; | ||
191 | |||
192 | if (KVM_PREALLOC_LEVEL == 0) | ||
193 | return 0; | ||
194 | |||
195 | hwpgd = __get_free_pages(GFP_KERNEL | __GFP_ZERO, PTRS_PER_S2_PGD_SHIFT); | ||
196 | if (!hwpgd) | ||
197 | return -ENOMEM; | ||
198 | |||
199 | for (i = 0; i < PTRS_PER_S2_PGD; i++) { | ||
200 | if (KVM_PREALLOC_LEVEL == 1) | ||
201 | pgd_populate(NULL, pgd + i, | ||
202 | (pud_t *)hwpgd + i * PTRS_PER_PUD); | ||
203 | else if (KVM_PREALLOC_LEVEL == 2) | ||
204 | pud_populate(NULL, pud_offset(pgd, 0) + i, | ||
205 | (pmd_t *)hwpgd + i * PTRS_PER_PMD); | ||
206 | } | ||
207 | |||
208 | return 0; | ||
209 | } | ||
210 | |||
211 | static inline void *kvm_get_hwpgd(struct kvm *kvm) | 176 | static inline void *kvm_get_hwpgd(struct kvm *kvm) |
212 | { | 177 | { |
213 | pgd_t *pgd = kvm->arch.pgd; | 178 | pgd_t *pgd = kvm->arch.pgd; |
@@ -224,12 +189,11 @@ static inline void *kvm_get_hwpgd(struct kvm *kvm) | |||
224 | return pmd_offset(pud, 0); | 189 | return pmd_offset(pud, 0); |
225 | } | 190 | } |
226 | 191 | ||
227 | static inline void kvm_free_hwpgd(struct kvm *kvm) | 192 | static inline unsigned int kvm_get_hwpgd_size(void) |
228 | { | 193 | { |
229 | if (KVM_PREALLOC_LEVEL > 0) { | 194 | if (KVM_PREALLOC_LEVEL > 0) |
230 | unsigned long hwpgd = (unsigned long)kvm_get_hwpgd(kvm); | 195 | return PTRS_PER_S2_PGD * PAGE_SIZE; |
231 | free_pages(hwpgd, PTRS_PER_S2_PGD_SHIFT); | 196 | return PTRS_PER_S2_PGD * sizeof(pgd_t); |
232 | } | ||
233 | } | 197 | } |
234 | 198 | ||
235 | static inline bool kvm_page_empty(void *ptr) | 199 | static inline bool kvm_page_empty(void *ptr) |
diff --git a/arch/arm64/include/asm/proc-fns.h b/arch/arm64/include/asm/proc-fns.h index 9a8fd84f8fb2..941c375616e2 100644 --- a/arch/arm64/include/asm/proc-fns.h +++ b/arch/arm64/include/asm/proc-fns.h | |||
@@ -39,7 +39,11 @@ extern u64 cpu_do_resume(phys_addr_t ptr, u64 idmap_ttbr); | |||
39 | 39 | ||
40 | #include <asm/memory.h> | 40 | #include <asm/memory.h> |
41 | 41 | ||
42 | #define cpu_switch_mm(pgd,mm) cpu_do_switch_mm(virt_to_phys(pgd),mm) | 42 | #define cpu_switch_mm(pgd,mm) \ |
43 | do { \ | ||
44 | BUG_ON(pgd == swapper_pg_dir); \ | ||
45 | cpu_do_switch_mm(virt_to_phys(pgd),mm); \ | ||
46 | } while (0) | ||
43 | 47 | ||
44 | #define cpu_get_pgd() \ | 48 | #define cpu_get_pgd() \ |
45 | ({ \ | 49 | ({ \ |
diff --git a/arch/arm64/include/asm/tlb.h b/arch/arm64/include/asm/tlb.h index c028fe37456f..53d9c354219f 100644 --- a/arch/arm64/include/asm/tlb.h +++ b/arch/arm64/include/asm/tlb.h | |||
@@ -48,6 +48,7 @@ static inline void tlb_flush(struct mmu_gather *tlb) | |||
48 | static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, | 48 | static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, |
49 | unsigned long addr) | 49 | unsigned long addr) |
50 | { | 50 | { |
51 | __flush_tlb_pgtable(tlb->mm, addr); | ||
51 | pgtable_page_dtor(pte); | 52 | pgtable_page_dtor(pte); |
52 | tlb_remove_entry(tlb, pte); | 53 | tlb_remove_entry(tlb, pte); |
53 | } | 54 | } |
@@ -56,6 +57,7 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, | |||
56 | static inline void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmdp, | 57 | static inline void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmdp, |
57 | unsigned long addr) | 58 | unsigned long addr) |
58 | { | 59 | { |
60 | __flush_tlb_pgtable(tlb->mm, addr); | ||
59 | tlb_remove_entry(tlb, virt_to_page(pmdp)); | 61 | tlb_remove_entry(tlb, virt_to_page(pmdp)); |
60 | } | 62 | } |
61 | #endif | 63 | #endif |
@@ -64,6 +66,7 @@ static inline void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmdp, | |||
64 | static inline void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pudp, | 66 | static inline void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pudp, |
65 | unsigned long addr) | 67 | unsigned long addr) |
66 | { | 68 | { |
69 | __flush_tlb_pgtable(tlb->mm, addr); | ||
67 | tlb_remove_entry(tlb, virt_to_page(pudp)); | 70 | tlb_remove_entry(tlb, virt_to_page(pudp)); |
68 | } | 71 | } |
69 | #endif | 72 | #endif |
diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h index 4abe9b945f77..c3bb05b98616 100644 --- a/arch/arm64/include/asm/tlbflush.h +++ b/arch/arm64/include/asm/tlbflush.h | |||
@@ -144,6 +144,19 @@ static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end | |||
144 | } | 144 | } |
145 | 145 | ||
146 | /* | 146 | /* |
147 | * Used to invalidate the TLB (walk caches) corresponding to intermediate page | ||
148 | * table levels (pgd/pud/pmd). | ||
149 | */ | ||
150 | static inline void __flush_tlb_pgtable(struct mm_struct *mm, | ||
151 | unsigned long uaddr) | ||
152 | { | ||
153 | unsigned long addr = uaddr >> 12 | ((unsigned long)ASID(mm) << 48); | ||
154 | |||
155 | dsb(ishst); | ||
156 | asm("tlbi vae1is, %0" : : "r" (addr)); | ||
157 | dsb(ish); | ||
158 | } | ||
159 | /* | ||
147 | * On AArch64, the cache coherency is handled via the set_pte_at() function. | 160 | * On AArch64, the cache coherency is handled via the set_pte_at() function. |
148 | */ | 161 | */ |
149 | static inline void update_mmu_cache(struct vm_area_struct *vma, | 162 | static inline void update_mmu_cache(struct vm_area_struct *vma, |
diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index b42c7b480e1e..ab21e0d58278 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c | |||
@@ -337,7 +337,11 @@ core_initcall(arm64_dmi_init); | |||
337 | 337 | ||
338 | static void efi_set_pgd(struct mm_struct *mm) | 338 | static void efi_set_pgd(struct mm_struct *mm) |
339 | { | 339 | { |
340 | cpu_switch_mm(mm->pgd, mm); | 340 | if (mm == &init_mm) |
341 | cpu_set_reserved_ttbr0(); | ||
342 | else | ||
343 | cpu_switch_mm(mm->pgd, mm); | ||
344 | |||
341 | flush_tlb_all(); | 345 | flush_tlb_all(); |
342 | if (icache_is_aivivt()) | 346 | if (icache_is_aivivt()) |
343 | __flush_icache_all(); | 347 | __flush_icache_all(); |
@@ -354,3 +358,12 @@ void efi_virtmap_unload(void) | |||
354 | efi_set_pgd(current->active_mm); | 358 | efi_set_pgd(current->active_mm); |
355 | preempt_enable(); | 359 | preempt_enable(); |
356 | } | 360 | } |
361 | |||
362 | /* | ||
363 | * UpdateCapsule() depends on the system being shutdown via | ||
364 | * ResetSystem(). | ||
365 | */ | ||
366 | bool efi_poweroff_required(void) | ||
367 | { | ||
368 | return efi_enabled(EFI_RUNTIME_SERVICES); | ||
369 | } | ||
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index 8ce88e08c030..07f930540f4a 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S | |||
@@ -585,8 +585,8 @@ ENDPROC(set_cpu_boot_mode_flag) | |||
585 | * zeroing of .bss would clobber it. | 585 | * zeroing of .bss would clobber it. |
586 | */ | 586 | */ |
587 | .pushsection .data..cacheline_aligned | 587 | .pushsection .data..cacheline_aligned |
588 | ENTRY(__boot_cpu_mode) | ||
589 | .align L1_CACHE_SHIFT | 588 | .align L1_CACHE_SHIFT |
589 | ENTRY(__boot_cpu_mode) | ||
590 | .long BOOT_CPU_MODE_EL2 | 590 | .long BOOT_CPU_MODE_EL2 |
591 | .long 0 | 591 | .long 0 |
592 | .popsection | 592 | .popsection |
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index fde9923af859..c6b1f3b96f45 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <stdarg.h> | 21 | #include <stdarg.h> |
22 | 22 | ||
23 | #include <linux/compat.h> | 23 | #include <linux/compat.h> |
24 | #include <linux/efi.h> | ||
24 | #include <linux/export.h> | 25 | #include <linux/export.h> |
25 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
26 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
@@ -150,6 +151,13 @@ void machine_restart(char *cmd) | |||
150 | local_irq_disable(); | 151 | local_irq_disable(); |
151 | smp_send_stop(); | 152 | smp_send_stop(); |
152 | 153 | ||
154 | /* | ||
155 | * UpdateCapsule() depends on the system being reset via | ||
156 | * ResetSystem(). | ||
157 | */ | ||
158 | if (efi_enabled(EFI_RUNTIME_SERVICES)) | ||
159 | efi_reboot(reboot_mode, NULL); | ||
160 | |||
153 | /* Now call the architecture specific reboot code. */ | 161 | /* Now call the architecture specific reboot code. */ |
154 | if (arm_pm_restart) | 162 | if (arm_pm_restart) |
155 | arm_pm_restart(reboot_mode, cmd); | 163 | arm_pm_restart(reboot_mode, cmd); |
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index 58e0c2bdde04..ef7d112f5ce0 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c | |||
@@ -51,7 +51,7 @@ static int __init early_coherent_pool(char *p) | |||
51 | } | 51 | } |
52 | early_param("coherent_pool", early_coherent_pool); | 52 | early_param("coherent_pool", early_coherent_pool); |
53 | 53 | ||
54 | static void *__alloc_from_pool(size_t size, struct page **ret_page) | 54 | static void *__alloc_from_pool(size_t size, struct page **ret_page, gfp_t flags) |
55 | { | 55 | { |
56 | unsigned long val; | 56 | unsigned long val; |
57 | void *ptr = NULL; | 57 | void *ptr = NULL; |
@@ -67,6 +67,8 @@ static void *__alloc_from_pool(size_t size, struct page **ret_page) | |||
67 | 67 | ||
68 | *ret_page = phys_to_page(phys); | 68 | *ret_page = phys_to_page(phys); |
69 | ptr = (void *)val; | 69 | ptr = (void *)val; |
70 | if (flags & __GFP_ZERO) | ||
71 | memset(ptr, 0, size); | ||
70 | } | 72 | } |
71 | 73 | ||
72 | return ptr; | 74 | return ptr; |
@@ -101,6 +103,7 @@ static void *__dma_alloc_coherent(struct device *dev, size_t size, | |||
101 | flags |= GFP_DMA; | 103 | flags |= GFP_DMA; |
102 | if (IS_ENABLED(CONFIG_DMA_CMA) && (flags & __GFP_WAIT)) { | 104 | if (IS_ENABLED(CONFIG_DMA_CMA) && (flags & __GFP_WAIT)) { |
103 | struct page *page; | 105 | struct page *page; |
106 | void *addr; | ||
104 | 107 | ||
105 | size = PAGE_ALIGN(size); | 108 | size = PAGE_ALIGN(size); |
106 | page = dma_alloc_from_contiguous(dev, size >> PAGE_SHIFT, | 109 | page = dma_alloc_from_contiguous(dev, size >> PAGE_SHIFT, |
@@ -109,7 +112,10 @@ static void *__dma_alloc_coherent(struct device *dev, size_t size, | |||
109 | return NULL; | 112 | return NULL; |
110 | 113 | ||
111 | *dma_handle = phys_to_dma(dev, page_to_phys(page)); | 114 | *dma_handle = phys_to_dma(dev, page_to_phys(page)); |
112 | return page_address(page); | 115 | addr = page_address(page); |
116 | if (flags & __GFP_ZERO) | ||
117 | memset(addr, 0, size); | ||
118 | return addr; | ||
113 | } else { | 119 | } else { |
114 | return swiotlb_alloc_coherent(dev, size, dma_handle, flags); | 120 | return swiotlb_alloc_coherent(dev, size, dma_handle, flags); |
115 | } | 121 | } |
@@ -146,7 +152,7 @@ static void *__dma_alloc(struct device *dev, size_t size, | |||
146 | 152 | ||
147 | if (!coherent && !(flags & __GFP_WAIT)) { | 153 | if (!coherent && !(flags & __GFP_WAIT)) { |
148 | struct page *page = NULL; | 154 | struct page *page = NULL; |
149 | void *addr = __alloc_from_pool(size, &page); | 155 | void *addr = __alloc_from_pool(size, &page, flags); |
150 | 156 | ||
151 | if (addr) | 157 | if (addr) |
152 | *dma_handle = phys_to_dma(dev, page_to_phys(page)); | 158 | *dma_handle = phys_to_dma(dev, page_to_phys(page)); |
diff --git a/arch/c6x/include/asm/pgtable.h b/arch/c6x/include/asm/pgtable.h index 78d4483ba40c..ec4db6df5e0d 100644 --- a/arch/c6x/include/asm/pgtable.h +++ b/arch/c6x/include/asm/pgtable.h | |||
@@ -67,6 +67,11 @@ extern unsigned long empty_zero_page; | |||
67 | */ | 67 | */ |
68 | #define pgtable_cache_init() do { } while (0) | 68 | #define pgtable_cache_init() do { } while (0) |
69 | 69 | ||
70 | /* | ||
71 | * c6x is !MMU, so define the simpliest implementation | ||
72 | */ | ||
73 | #define pgprot_writecombine pgprot_noncached | ||
74 | |||
70 | #include <asm-generic/pgtable.h> | 75 | #include <asm-generic/pgtable.h> |
71 | 76 | ||
72 | #endif /* _ASM_C6X_PGTABLE_H */ | 77 | #endif /* _ASM_C6X_PGTABLE_H */ |
diff --git a/arch/microblaze/kernel/entry.S b/arch/microblaze/kernel/entry.S index 0536bc021cc6..ef548510b951 100644 --- a/arch/microblaze/kernel/entry.S +++ b/arch/microblaze/kernel/entry.S | |||
@@ -348,8 +348,9 @@ C_ENTRY(_user_exception): | |||
348 | * The LP register should point to the location where the called function | 348 | * The LP register should point to the location where the called function |
349 | * should return. [note that MAKE_SYS_CALL uses label 1] */ | 349 | * should return. [note that MAKE_SYS_CALL uses label 1] */ |
350 | /* See if the system call number is valid */ | 350 | /* See if the system call number is valid */ |
351 | blti r12, 5f | ||
351 | addi r11, r12, -__NR_syscalls; | 352 | addi r11, r12, -__NR_syscalls; |
352 | bgei r11,5f; | 353 | bgei r11, 5f; |
353 | /* Figure out which function to use for this system call. */ | 354 | /* Figure out which function to use for this system call. */ |
354 | /* Note Microblaze barrel shift is optional, so don't rely on it */ | 355 | /* Note Microblaze barrel shift is optional, so don't rely on it */ |
355 | add r12, r12, r12; /* convert num -> ptr */ | 356 | add r12, r12, r12; /* convert num -> ptr */ |
@@ -375,7 +376,7 @@ C_ENTRY(_user_exception): | |||
375 | 376 | ||
376 | /* The syscall number is invalid, return an error. */ | 377 | /* The syscall number is invalid, return an error. */ |
377 | 5: | 378 | 5: |
378 | rtsd r15, 8; /* looks like a normal subroutine return */ | 379 | braid ret_from_trap |
379 | addi r3, r0, -ENOSYS; | 380 | addi r3, r0, -ENOSYS; |
380 | 381 | ||
381 | /* Entry point used to return from a syscall/trap */ | 382 | /* Entry point used to return from a syscall/trap */ |
@@ -411,7 +412,7 @@ C_ENTRY(ret_from_trap): | |||
411 | bri 1b | 412 | bri 1b |
412 | 413 | ||
413 | /* Maybe handle a signal */ | 414 | /* Maybe handle a signal */ |
414 | 5: | 415 | 5: |
415 | andi r11, r19, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME; | 416 | andi r11, r19, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME; |
416 | beqi r11, 4f; /* Signals to handle, handle them */ | 417 | beqi r11, 4f; /* Signals to handle, handle them */ |
417 | 418 | ||
diff --git a/arch/nios2/include/asm/ptrace.h b/arch/nios2/include/asm/ptrace.h index 20fb1cf2dab6..642462144872 100644 --- a/arch/nios2/include/asm/ptrace.h +++ b/arch/nios2/include/asm/ptrace.h | |||
@@ -15,7 +15,54 @@ | |||
15 | 15 | ||
16 | #include <uapi/asm/ptrace.h> | 16 | #include <uapi/asm/ptrace.h> |
17 | 17 | ||
18 | /* This struct defines the way the registers are stored on the | ||
19 | stack during a system call. */ | ||
20 | |||
18 | #ifndef __ASSEMBLY__ | 21 | #ifndef __ASSEMBLY__ |
22 | struct pt_regs { | ||
23 | unsigned long r8; /* r8-r15 Caller-saved GP registers */ | ||
24 | unsigned long r9; | ||
25 | unsigned long r10; | ||
26 | unsigned long r11; | ||
27 | unsigned long r12; | ||
28 | unsigned long r13; | ||
29 | unsigned long r14; | ||
30 | unsigned long r15; | ||
31 | unsigned long r1; /* Assembler temporary */ | ||
32 | unsigned long r2; /* Retval LS 32bits */ | ||
33 | unsigned long r3; /* Retval MS 32bits */ | ||
34 | unsigned long r4; /* r4-r7 Register arguments */ | ||
35 | unsigned long r5; | ||
36 | unsigned long r6; | ||
37 | unsigned long r7; | ||
38 | unsigned long orig_r2; /* Copy of r2 ?? */ | ||
39 | unsigned long ra; /* Return address */ | ||
40 | unsigned long fp; /* Frame pointer */ | ||
41 | unsigned long sp; /* Stack pointer */ | ||
42 | unsigned long gp; /* Global pointer */ | ||
43 | unsigned long estatus; | ||
44 | unsigned long ea; /* Exception return address (pc) */ | ||
45 | unsigned long orig_r7; | ||
46 | }; | ||
47 | |||
48 | /* | ||
49 | * This is the extended stack used by signal handlers and the context | ||
50 | * switcher: it's pushed after the normal "struct pt_regs". | ||
51 | */ | ||
52 | struct switch_stack { | ||
53 | unsigned long r16; /* r16-r23 Callee-saved GP registers */ | ||
54 | unsigned long r17; | ||
55 | unsigned long r18; | ||
56 | unsigned long r19; | ||
57 | unsigned long r20; | ||
58 | unsigned long r21; | ||
59 | unsigned long r22; | ||
60 | unsigned long r23; | ||
61 | unsigned long fp; | ||
62 | unsigned long gp; | ||
63 | unsigned long ra; | ||
64 | }; | ||
65 | |||
19 | #define user_mode(regs) (((regs)->estatus & ESTATUS_EU)) | 66 | #define user_mode(regs) (((regs)->estatus & ESTATUS_EU)) |
20 | 67 | ||
21 | #define instruction_pointer(regs) ((regs)->ra) | 68 | #define instruction_pointer(regs) ((regs)->ra) |
diff --git a/arch/nios2/include/asm/ucontext.h b/arch/nios2/include/asm/ucontext.h deleted file mode 100644 index 2c87614b0f6e..000000000000 --- a/arch/nios2/include/asm/ucontext.h +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Tobias Klauser <tklauser@distanz.ch> | ||
3 | * Copyright (C) 2004 Microtronix Datacom Ltd | ||
4 | * | ||
5 | * This file is subject to the terms and conditions of the GNU General Public | ||
6 | * License. See the file "COPYING" in the main directory of this archive | ||
7 | * for more details. | ||
8 | */ | ||
9 | |||
10 | #ifndef _ASM_NIOS2_UCONTEXT_H | ||
11 | #define _ASM_NIOS2_UCONTEXT_H | ||
12 | |||
13 | typedef int greg_t; | ||
14 | #define NGREG 32 | ||
15 | typedef greg_t gregset_t[NGREG]; | ||
16 | |||
17 | struct mcontext { | ||
18 | int version; | ||
19 | gregset_t gregs; | ||
20 | }; | ||
21 | |||
22 | #define MCONTEXT_VERSION 2 | ||
23 | |||
24 | struct ucontext { | ||
25 | unsigned long uc_flags; | ||
26 | struct ucontext *uc_link; | ||
27 | stack_t uc_stack; | ||
28 | struct mcontext uc_mcontext; | ||
29 | sigset_t uc_sigmask; /* mask last for extensibility */ | ||
30 | }; | ||
31 | |||
32 | #endif | ||
diff --git a/arch/nios2/include/uapi/asm/Kbuild b/arch/nios2/include/uapi/asm/Kbuild index 4f07ca3f8d10..e0bb972a50d7 100644 --- a/arch/nios2/include/uapi/asm/Kbuild +++ b/arch/nios2/include/uapi/asm/Kbuild | |||
@@ -1,4 +1,5 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | 1 | include include/uapi/asm-generic/Kbuild.asm |
2 | 2 | ||
3 | header-y += elf.h | 3 | header-y += elf.h |
4 | header-y += ucontext.h | 4 | |
5 | generic-y += ucontext.h | ||
diff --git a/arch/nios2/include/uapi/asm/elf.h b/arch/nios2/include/uapi/asm/elf.h index a5b91ae5cf56..6f06d3b2949e 100644 --- a/arch/nios2/include/uapi/asm/elf.h +++ b/arch/nios2/include/uapi/asm/elf.h | |||
@@ -50,9 +50,7 @@ | |||
50 | 50 | ||
51 | typedef unsigned long elf_greg_t; | 51 | typedef unsigned long elf_greg_t; |
52 | 52 | ||
53 | #define ELF_NGREG \ | 53 | #define ELF_NGREG 49 |
54 | ((sizeof(struct pt_regs) + sizeof(struct switch_stack)) / \ | ||
55 | sizeof(elf_greg_t)) | ||
56 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | 54 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; |
57 | 55 | ||
58 | typedef unsigned long elf_fpregset_t; | 56 | typedef unsigned long elf_fpregset_t; |
diff --git a/arch/nios2/include/uapi/asm/ptrace.h b/arch/nios2/include/uapi/asm/ptrace.h index e83a7c9d1c36..71a330597adf 100644 --- a/arch/nios2/include/uapi/asm/ptrace.h +++ b/arch/nios2/include/uapi/asm/ptrace.h | |||
@@ -67,53 +67,9 @@ | |||
67 | 67 | ||
68 | #define NUM_PTRACE_REG (PTR_TLBMISC + 1) | 68 | #define NUM_PTRACE_REG (PTR_TLBMISC + 1) |
69 | 69 | ||
70 | /* this struct defines the way the registers are stored on the | 70 | /* User structures for general purpose registers. */ |
71 | stack during a system call. | 71 | struct user_pt_regs { |
72 | 72 | __u32 regs[49]; | |
73 | There is a fake_regs in setup.c that has to match pt_regs.*/ | ||
74 | |||
75 | struct pt_regs { | ||
76 | unsigned long r8; /* r8-r15 Caller-saved GP registers */ | ||
77 | unsigned long r9; | ||
78 | unsigned long r10; | ||
79 | unsigned long r11; | ||
80 | unsigned long r12; | ||
81 | unsigned long r13; | ||
82 | unsigned long r14; | ||
83 | unsigned long r15; | ||
84 | unsigned long r1; /* Assembler temporary */ | ||
85 | unsigned long r2; /* Retval LS 32bits */ | ||
86 | unsigned long r3; /* Retval MS 32bits */ | ||
87 | unsigned long r4; /* r4-r7 Register arguments */ | ||
88 | unsigned long r5; | ||
89 | unsigned long r6; | ||
90 | unsigned long r7; | ||
91 | unsigned long orig_r2; /* Copy of r2 ?? */ | ||
92 | unsigned long ra; /* Return address */ | ||
93 | unsigned long fp; /* Frame pointer */ | ||
94 | unsigned long sp; /* Stack pointer */ | ||
95 | unsigned long gp; /* Global pointer */ | ||
96 | unsigned long estatus; | ||
97 | unsigned long ea; /* Exception return address (pc) */ | ||
98 | unsigned long orig_r7; | ||
99 | }; | ||
100 | |||
101 | /* | ||
102 | * This is the extended stack used by signal handlers and the context | ||
103 | * switcher: it's pushed after the normal "struct pt_regs". | ||
104 | */ | ||
105 | struct switch_stack { | ||
106 | unsigned long r16; /* r16-r23 Callee-saved GP registers */ | ||
107 | unsigned long r17; | ||
108 | unsigned long r18; | ||
109 | unsigned long r19; | ||
110 | unsigned long r20; | ||
111 | unsigned long r21; | ||
112 | unsigned long r22; | ||
113 | unsigned long r23; | ||
114 | unsigned long fp; | ||
115 | unsigned long gp; | ||
116 | unsigned long ra; | ||
117 | }; | 73 | }; |
118 | 74 | ||
119 | #endif /* __ASSEMBLY__ */ | 75 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/nios2/include/uapi/asm/sigcontext.h b/arch/nios2/include/uapi/asm/sigcontext.h index 7b8bb41867d4..b67944a50927 100644 --- a/arch/nios2/include/uapi/asm/sigcontext.h +++ b/arch/nios2/include/uapi/asm/sigcontext.h | |||
@@ -15,14 +15,16 @@ | |||
15 | * details. | 15 | * details. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef _ASM_NIOS2_SIGCONTEXT_H | 18 | #ifndef _UAPI__ASM_SIGCONTEXT_H |
19 | #define _ASM_NIOS2_SIGCONTEXT_H | 19 | #define _UAPI__ASM_SIGCONTEXT_H |
20 | 20 | ||
21 | #include <asm/ptrace.h> | 21 | #include <linux/types.h> |
22 | |||
23 | #define MCONTEXT_VERSION 2 | ||
22 | 24 | ||
23 | struct sigcontext { | 25 | struct sigcontext { |
24 | struct pt_regs regs; | 26 | int version; |
25 | unsigned long sc_mask; /* old sigmask */ | 27 | unsigned long gregs[32]; |
26 | }; | 28 | }; |
27 | 29 | ||
28 | #endif | 30 | #endif |
diff --git a/arch/nios2/kernel/signal.c b/arch/nios2/kernel/signal.c index 2d0ea25be171..dda41e4fe707 100644 --- a/arch/nios2/kernel/signal.c +++ b/arch/nios2/kernel/signal.c | |||
@@ -39,7 +39,7 @@ static inline int rt_restore_ucontext(struct pt_regs *regs, | |||
39 | struct ucontext *uc, int *pr2) | 39 | struct ucontext *uc, int *pr2) |
40 | { | 40 | { |
41 | int temp; | 41 | int temp; |
42 | greg_t *gregs = uc->uc_mcontext.gregs; | 42 | unsigned long *gregs = uc->uc_mcontext.gregs; |
43 | int err; | 43 | int err; |
44 | 44 | ||
45 | /* Always make any pending restarted system calls return -EINTR */ | 45 | /* Always make any pending restarted system calls return -EINTR */ |
@@ -127,7 +127,7 @@ badframe: | |||
127 | static inline int rt_setup_ucontext(struct ucontext *uc, struct pt_regs *regs) | 127 | static inline int rt_setup_ucontext(struct ucontext *uc, struct pt_regs *regs) |
128 | { | 128 | { |
129 | struct switch_stack *sw = (struct switch_stack *)regs - 1; | 129 | struct switch_stack *sw = (struct switch_stack *)regs - 1; |
130 | greg_t *gregs = uc->uc_mcontext.gregs; | 130 | unsigned long *gregs = uc->uc_mcontext.gregs; |
131 | int err = 0; | 131 | int err = 0; |
132 | 132 | ||
133 | err |= __put_user(MCONTEXT_VERSION, &uc->uc_mcontext.version); | 133 | err |= __put_user(MCONTEXT_VERSION, &uc->uc_mcontext.version); |
diff --git a/arch/nios2/mm/fault.c b/arch/nios2/mm/fault.c index 0d231adfe576..0c9b6afe69e9 100644 --- a/arch/nios2/mm/fault.c +++ b/arch/nios2/mm/fault.c | |||
@@ -126,7 +126,6 @@ good_area: | |||
126 | break; | 126 | break; |
127 | } | 127 | } |
128 | 128 | ||
129 | survive: | ||
130 | /* | 129 | /* |
131 | * If for any reason at all we couldn't handle the fault, | 130 | * If for any reason at all we couldn't handle the fault, |
132 | * make sure we exit gracefully rather than endlessly redo | 131 | * make sure we exit gracefully rather than endlessly redo |
@@ -220,11 +219,6 @@ no_context: | |||
220 | */ | 219 | */ |
221 | out_of_memory: | 220 | out_of_memory: |
222 | up_read(&mm->mmap_sem); | 221 | up_read(&mm->mmap_sem); |
223 | if (is_global_init(tsk)) { | ||
224 | yield(); | ||
225 | down_read(&mm->mmap_sem); | ||
226 | goto survive; | ||
227 | } | ||
228 | if (!user_mode(regs)) | 222 | if (!user_mode(regs)) |
229 | goto no_context; | 223 | goto no_context; |
230 | pagefault_out_of_memory(); | 224 | pagefault_out_of_memory(); |
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index d84559e31f32..f407bbf5ee94 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h | |||
@@ -515,15 +515,15 @@ struct s390_io_adapter { | |||
515 | #define S390_ARCH_FAC_MASK_SIZE_U64 \ | 515 | #define S390_ARCH_FAC_MASK_SIZE_U64 \ |
516 | (S390_ARCH_FAC_MASK_SIZE_BYTE / sizeof(u64)) | 516 | (S390_ARCH_FAC_MASK_SIZE_BYTE / sizeof(u64)) |
517 | 517 | ||
518 | struct s390_model_fac { | 518 | struct kvm_s390_fac { |
519 | /* facilities used in SIE context */ | 519 | /* facility list requested by guest */ |
520 | __u64 sie[S390_ARCH_FAC_LIST_SIZE_U64]; | 520 | __u64 list[S390_ARCH_FAC_LIST_SIZE_U64]; |
521 | /* subset enabled by kvm */ | 521 | /* facility mask supported by kvm & hosting machine */ |
522 | __u64 kvm[S390_ARCH_FAC_LIST_SIZE_U64]; | 522 | __u64 mask[S390_ARCH_FAC_LIST_SIZE_U64]; |
523 | }; | 523 | }; |
524 | 524 | ||
525 | struct kvm_s390_cpu_model { | 525 | struct kvm_s390_cpu_model { |
526 | struct s390_model_fac *fac; | 526 | struct kvm_s390_fac *fac; |
527 | struct cpuid cpu_id; | 527 | struct cpuid cpu_id; |
528 | unsigned short ibc; | 528 | unsigned short ibc; |
529 | }; | 529 | }; |
diff --git a/arch/s390/include/asm/mmu_context.h b/arch/s390/include/asm/mmu_context.h index f49b71954654..8fb3802f8fad 100644 --- a/arch/s390/include/asm/mmu_context.h +++ b/arch/s390/include/asm/mmu_context.h | |||
@@ -62,6 +62,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
62 | { | 62 | { |
63 | int cpu = smp_processor_id(); | 63 | int cpu = smp_processor_id(); |
64 | 64 | ||
65 | S390_lowcore.user_asce = next->context.asce_bits | __pa(next->pgd); | ||
65 | if (prev == next) | 66 | if (prev == next) |
66 | return; | 67 | return; |
67 | if (MACHINE_HAS_TLB_LC) | 68 | if (MACHINE_HAS_TLB_LC) |
@@ -73,7 +74,6 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
73 | atomic_dec(&prev->context.attach_count); | 74 | atomic_dec(&prev->context.attach_count); |
74 | if (MACHINE_HAS_TLB_LC) | 75 | if (MACHINE_HAS_TLB_LC) |
75 | cpumask_clear_cpu(cpu, &prev->context.cpu_attach_mask); | 76 | cpumask_clear_cpu(cpu, &prev->context.cpu_attach_mask); |
76 | S390_lowcore.user_asce = next->context.asce_bits | __pa(next->pgd); | ||
77 | } | 77 | } |
78 | 78 | ||
79 | #define finish_arch_post_lock_switch finish_arch_post_lock_switch | 79 | #define finish_arch_post_lock_switch finish_arch_post_lock_switch |
diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm/page.h index 7b2ac6e44166..53eacbd4f09b 100644 --- a/arch/s390/include/asm/page.h +++ b/arch/s390/include/asm/page.h | |||
@@ -37,16 +37,7 @@ static inline void storage_key_init_range(unsigned long start, unsigned long end | |||
37 | #endif | 37 | #endif |
38 | } | 38 | } |
39 | 39 | ||
40 | static inline void clear_page(void *page) | 40 | #define clear_page(page) memset((page), 0, PAGE_SIZE) |
41 | { | ||
42 | register unsigned long reg1 asm ("1") = 0; | ||
43 | register void *reg2 asm ("2") = page; | ||
44 | register unsigned long reg3 asm ("3") = 4096; | ||
45 | asm volatile( | ||
46 | " mvcl 2,0" | ||
47 | : "+d" (reg2), "+d" (reg3) : "d" (reg1) | ||
48 | : "memory", "cc"); | ||
49 | } | ||
50 | 41 | ||
51 | /* | 42 | /* |
52 | * copy_page uses the mvcl instruction with 0xb0 padding byte in order to | 43 | * copy_page uses the mvcl instruction with 0xb0 padding byte in order to |
diff --git a/arch/s390/kernel/jump_label.c b/arch/s390/kernel/jump_label.c index cb2d51e779df..830066f936c8 100644 --- a/arch/s390/kernel/jump_label.c +++ b/arch/s390/kernel/jump_label.c | |||
@@ -36,16 +36,20 @@ static void jump_label_make_branch(struct jump_entry *entry, struct insn *insn) | |||
36 | insn->offset = (entry->target - entry->code) >> 1; | 36 | insn->offset = (entry->target - entry->code) >> 1; |
37 | } | 37 | } |
38 | 38 | ||
39 | static void jump_label_bug(struct jump_entry *entry, struct insn *insn) | 39 | static void jump_label_bug(struct jump_entry *entry, struct insn *expected, |
40 | struct insn *new) | ||
40 | { | 41 | { |
41 | unsigned char *ipc = (unsigned char *)entry->code; | 42 | unsigned char *ipc = (unsigned char *)entry->code; |
42 | unsigned char *ipe = (unsigned char *)insn; | 43 | unsigned char *ipe = (unsigned char *)expected; |
44 | unsigned char *ipn = (unsigned char *)new; | ||
43 | 45 | ||
44 | pr_emerg("Jump label code mismatch at %pS [%p]\n", ipc, ipc); | 46 | pr_emerg("Jump label code mismatch at %pS [%p]\n", ipc, ipc); |
45 | pr_emerg("Found: %02x %02x %02x %02x %02x %02x\n", | 47 | pr_emerg("Found: %02x %02x %02x %02x %02x %02x\n", |
46 | ipc[0], ipc[1], ipc[2], ipc[3], ipc[4], ipc[5]); | 48 | ipc[0], ipc[1], ipc[2], ipc[3], ipc[4], ipc[5]); |
47 | pr_emerg("Expected: %02x %02x %02x %02x %02x %02x\n", | 49 | pr_emerg("Expected: %02x %02x %02x %02x %02x %02x\n", |
48 | ipe[0], ipe[1], ipe[2], ipe[3], ipe[4], ipe[5]); | 50 | ipe[0], ipe[1], ipe[2], ipe[3], ipe[4], ipe[5]); |
51 | pr_emerg("New: %02x %02x %02x %02x %02x %02x\n", | ||
52 | ipn[0], ipn[1], ipn[2], ipn[3], ipn[4], ipn[5]); | ||
49 | panic("Corrupted kernel text"); | 53 | panic("Corrupted kernel text"); |
50 | } | 54 | } |
51 | 55 | ||
@@ -69,10 +73,10 @@ static void __jump_label_transform(struct jump_entry *entry, | |||
69 | } | 73 | } |
70 | if (init) { | 74 | if (init) { |
71 | if (memcmp((void *)entry->code, &orignop, sizeof(orignop))) | 75 | if (memcmp((void *)entry->code, &orignop, sizeof(orignop))) |
72 | jump_label_bug(entry, &old); | 76 | jump_label_bug(entry, &orignop, &new); |
73 | } else { | 77 | } else { |
74 | if (memcmp((void *)entry->code, &old, sizeof(old))) | 78 | if (memcmp((void *)entry->code, &old, sizeof(old))) |
75 | jump_label_bug(entry, &old); | 79 | jump_label_bug(entry, &old, &new); |
76 | } | 80 | } |
77 | probe_kernel_write((void *)entry->code, &new, sizeof(new)); | 81 | probe_kernel_write((void *)entry->code, &new, sizeof(new)); |
78 | } | 82 | } |
diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c index 36154a2f1814..2ca95862e336 100644 --- a/arch/s390/kernel/module.c +++ b/arch/s390/kernel/module.c | |||
@@ -436,6 +436,7 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
436 | const Elf_Shdr *sechdrs, | 436 | const Elf_Shdr *sechdrs, |
437 | struct module *me) | 437 | struct module *me) |
438 | { | 438 | { |
439 | jump_label_apply_nops(me); | ||
439 | vfree(me->arch.syminfo); | 440 | vfree(me->arch.syminfo); |
440 | me->arch.syminfo = NULL; | 441 | me->arch.syminfo = NULL; |
441 | return 0; | 442 | return 0; |
diff --git a/arch/s390/kernel/processor.c b/arch/s390/kernel/processor.c index 26108232fcaa..dc488e13b7e3 100644 --- a/arch/s390/kernel/processor.c +++ b/arch/s390/kernel/processor.c | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | static DEFINE_PER_CPU(struct cpuid, cpu_id); | 19 | static DEFINE_PER_CPU(struct cpuid, cpu_id); |
20 | 20 | ||
21 | void cpu_relax(void) | 21 | void notrace cpu_relax(void) |
22 | { | 22 | { |
23 | if (!smp_cpu_mtid && MACHINE_HAS_DIAG44) | 23 | if (!smp_cpu_mtid && MACHINE_HAS_DIAG44) |
24 | asm volatile("diag 0,0,0x44"); | 24 | asm volatile("diag 0,0,0x44"); |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 0c3623927563..19e17bd7aec0 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -165,7 +165,6 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) | |||
165 | case KVM_CAP_ONE_REG: | 165 | case KVM_CAP_ONE_REG: |
166 | case KVM_CAP_ENABLE_CAP: | 166 | case KVM_CAP_ENABLE_CAP: |
167 | case KVM_CAP_S390_CSS_SUPPORT: | 167 | case KVM_CAP_S390_CSS_SUPPORT: |
168 | case KVM_CAP_IRQFD: | ||
169 | case KVM_CAP_IOEVENTFD: | 168 | case KVM_CAP_IOEVENTFD: |
170 | case KVM_CAP_DEVICE_CTRL: | 169 | case KVM_CAP_DEVICE_CTRL: |
171 | case KVM_CAP_ENABLE_CAP_VM: | 170 | case KVM_CAP_ENABLE_CAP_VM: |
@@ -522,7 +521,7 @@ static int kvm_s390_set_processor(struct kvm *kvm, struct kvm_device_attr *attr) | |||
522 | memcpy(&kvm->arch.model.cpu_id, &proc->cpuid, | 521 | memcpy(&kvm->arch.model.cpu_id, &proc->cpuid, |
523 | sizeof(struct cpuid)); | 522 | sizeof(struct cpuid)); |
524 | kvm->arch.model.ibc = proc->ibc; | 523 | kvm->arch.model.ibc = proc->ibc; |
525 | memcpy(kvm->arch.model.fac->kvm, proc->fac_list, | 524 | memcpy(kvm->arch.model.fac->list, proc->fac_list, |
526 | S390_ARCH_FAC_LIST_SIZE_BYTE); | 525 | S390_ARCH_FAC_LIST_SIZE_BYTE); |
527 | } else | 526 | } else |
528 | ret = -EFAULT; | 527 | ret = -EFAULT; |
@@ -556,7 +555,7 @@ static int kvm_s390_get_processor(struct kvm *kvm, struct kvm_device_attr *attr) | |||
556 | } | 555 | } |
557 | memcpy(&proc->cpuid, &kvm->arch.model.cpu_id, sizeof(struct cpuid)); | 556 | memcpy(&proc->cpuid, &kvm->arch.model.cpu_id, sizeof(struct cpuid)); |
558 | proc->ibc = kvm->arch.model.ibc; | 557 | proc->ibc = kvm->arch.model.ibc; |
559 | memcpy(&proc->fac_list, kvm->arch.model.fac->kvm, S390_ARCH_FAC_LIST_SIZE_BYTE); | 558 | memcpy(&proc->fac_list, kvm->arch.model.fac->list, S390_ARCH_FAC_LIST_SIZE_BYTE); |
560 | if (copy_to_user((void __user *)attr->addr, proc, sizeof(*proc))) | 559 | if (copy_to_user((void __user *)attr->addr, proc, sizeof(*proc))) |
561 | ret = -EFAULT; | 560 | ret = -EFAULT; |
562 | kfree(proc); | 561 | kfree(proc); |
@@ -576,10 +575,10 @@ static int kvm_s390_get_machine(struct kvm *kvm, struct kvm_device_attr *attr) | |||
576 | } | 575 | } |
577 | get_cpu_id((struct cpuid *) &mach->cpuid); | 576 | get_cpu_id((struct cpuid *) &mach->cpuid); |
578 | mach->ibc = sclp_get_ibc(); | 577 | mach->ibc = sclp_get_ibc(); |
579 | memcpy(&mach->fac_mask, kvm_s390_fac_list_mask, | 578 | memcpy(&mach->fac_mask, kvm->arch.model.fac->mask, |
580 | kvm_s390_fac_list_mask_size() * sizeof(u64)); | 579 | S390_ARCH_FAC_LIST_SIZE_BYTE); |
581 | memcpy((unsigned long *)&mach->fac_list, S390_lowcore.stfle_fac_list, | 580 | memcpy((unsigned long *)&mach->fac_list, S390_lowcore.stfle_fac_list, |
582 | S390_ARCH_FAC_LIST_SIZE_U64); | 581 | S390_ARCH_FAC_LIST_SIZE_BYTE); |
583 | if (copy_to_user((void __user *)attr->addr, mach, sizeof(*mach))) | 582 | if (copy_to_user((void __user *)attr->addr, mach, sizeof(*mach))) |
584 | ret = -EFAULT; | 583 | ret = -EFAULT; |
585 | kfree(mach); | 584 | kfree(mach); |
@@ -778,15 +777,18 @@ long kvm_arch_vm_ioctl(struct file *filp, | |||
778 | static int kvm_s390_query_ap_config(u8 *config) | 777 | static int kvm_s390_query_ap_config(u8 *config) |
779 | { | 778 | { |
780 | u32 fcn_code = 0x04000000UL; | 779 | u32 fcn_code = 0x04000000UL; |
781 | u32 cc; | 780 | u32 cc = 0; |
782 | 781 | ||
782 | memset(config, 0, 128); | ||
783 | asm volatile( | 783 | asm volatile( |
784 | "lgr 0,%1\n" | 784 | "lgr 0,%1\n" |
785 | "lgr 2,%2\n" | 785 | "lgr 2,%2\n" |
786 | ".long 0xb2af0000\n" /* PQAP(QCI) */ | 786 | ".long 0xb2af0000\n" /* PQAP(QCI) */ |
787 | "ipm %0\n" | 787 | "0: ipm %0\n" |
788 | "srl %0,28\n" | 788 | "srl %0,28\n" |
789 | : "=r" (cc) | 789 | "1:\n" |
790 | EX_TABLE(0b, 1b) | ||
791 | : "+r" (cc) | ||
790 | : "r" (fcn_code), "r" (config) | 792 | : "r" (fcn_code), "r" (config) |
791 | : "cc", "0", "2", "memory" | 793 | : "cc", "0", "2", "memory" |
792 | ); | 794 | ); |
@@ -839,9 +841,13 @@ static int kvm_s390_crypto_init(struct kvm *kvm) | |||
839 | 841 | ||
840 | kvm_s390_set_crycb_format(kvm); | 842 | kvm_s390_set_crycb_format(kvm); |
841 | 843 | ||
842 | /* Disable AES/DEA protected key functions by default */ | 844 | /* Enable AES/DEA protected key functions by default */ |
843 | kvm->arch.crypto.aes_kw = 0; | 845 | kvm->arch.crypto.aes_kw = 1; |
844 | kvm->arch.crypto.dea_kw = 0; | 846 | kvm->arch.crypto.dea_kw = 1; |
847 | get_random_bytes(kvm->arch.crypto.crycb->aes_wrapping_key_mask, | ||
848 | sizeof(kvm->arch.crypto.crycb->aes_wrapping_key_mask)); | ||
849 | get_random_bytes(kvm->arch.crypto.crycb->dea_wrapping_key_mask, | ||
850 | sizeof(kvm->arch.crypto.crycb->dea_wrapping_key_mask)); | ||
845 | 851 | ||
846 | return 0; | 852 | return 0; |
847 | } | 853 | } |
@@ -886,40 +892,29 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type) | |||
886 | /* | 892 | /* |
887 | * The architectural maximum amount of facilities is 16 kbit. To store | 893 | * The architectural maximum amount of facilities is 16 kbit. To store |
888 | * this amount, 2 kbyte of memory is required. Thus we need a full | 894 | * this amount, 2 kbyte of memory is required. Thus we need a full |
889 | * page to hold the active copy (arch.model.fac->sie) and the current | 895 | * page to hold the guest facility list (arch.model.fac->list) and the |
890 | * facilities set (arch.model.fac->kvm). Its address size has to be | 896 | * facility mask (arch.model.fac->mask). Its address size has to be |
891 | * 31 bits and word aligned. | 897 | * 31 bits and word aligned. |
892 | */ | 898 | */ |
893 | kvm->arch.model.fac = | 899 | kvm->arch.model.fac = |
894 | (struct s390_model_fac *) get_zeroed_page(GFP_KERNEL | GFP_DMA); | 900 | (struct kvm_s390_fac *) get_zeroed_page(GFP_KERNEL | GFP_DMA); |
895 | if (!kvm->arch.model.fac) | 901 | if (!kvm->arch.model.fac) |
896 | goto out_nofac; | 902 | goto out_nofac; |
897 | 903 | ||
898 | memcpy(kvm->arch.model.fac->kvm, S390_lowcore.stfle_fac_list, | 904 | /* Populate the facility mask initially. */ |
899 | S390_ARCH_FAC_LIST_SIZE_U64); | 905 | memcpy(kvm->arch.model.fac->mask, S390_lowcore.stfle_fac_list, |
900 | 906 | S390_ARCH_FAC_LIST_SIZE_BYTE); | |
901 | /* | ||
902 | * If this KVM host runs *not* in a LPAR, relax the facility bits | ||
903 | * of the kvm facility mask by all missing facilities. This will allow | ||
904 | * to determine the right CPU model by means of the remaining facilities. | ||
905 | * Live guest migration must prohibit the migration of KVMs running in | ||
906 | * a LPAR to non LPAR hosts. | ||
907 | */ | ||
908 | if (!MACHINE_IS_LPAR) | ||
909 | for (i = 0; i < kvm_s390_fac_list_mask_size(); i++) | ||
910 | kvm_s390_fac_list_mask[i] &= kvm->arch.model.fac->kvm[i]; | ||
911 | |||
912 | /* | ||
913 | * Apply the kvm facility mask to limit the kvm supported/tolerated | ||
914 | * facility list. | ||
915 | */ | ||
916 | for (i = 0; i < S390_ARCH_FAC_LIST_SIZE_U64; i++) { | 907 | for (i = 0; i < S390_ARCH_FAC_LIST_SIZE_U64; i++) { |
917 | if (i < kvm_s390_fac_list_mask_size()) | 908 | if (i < kvm_s390_fac_list_mask_size()) |
918 | kvm->arch.model.fac->kvm[i] &= kvm_s390_fac_list_mask[i]; | 909 | kvm->arch.model.fac->mask[i] &= kvm_s390_fac_list_mask[i]; |
919 | else | 910 | else |
920 | kvm->arch.model.fac->kvm[i] = 0UL; | 911 | kvm->arch.model.fac->mask[i] = 0UL; |
921 | } | 912 | } |
922 | 913 | ||
914 | /* Populate the facility list initially. */ | ||
915 | memcpy(kvm->arch.model.fac->list, kvm->arch.model.fac->mask, | ||
916 | S390_ARCH_FAC_LIST_SIZE_BYTE); | ||
917 | |||
923 | kvm_s390_get_cpu_id(&kvm->arch.model.cpu_id); | 918 | kvm_s390_get_cpu_id(&kvm->arch.model.cpu_id); |
924 | kvm->arch.model.ibc = sclp_get_ibc() & 0x0fff; | 919 | kvm->arch.model.ibc = sclp_get_ibc() & 0x0fff; |
925 | 920 | ||
@@ -1165,8 +1160,6 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) | |||
1165 | 1160 | ||
1166 | mutex_lock(&vcpu->kvm->lock); | 1161 | mutex_lock(&vcpu->kvm->lock); |
1167 | vcpu->arch.cpu_id = vcpu->kvm->arch.model.cpu_id; | 1162 | vcpu->arch.cpu_id = vcpu->kvm->arch.model.cpu_id; |
1168 | memcpy(vcpu->kvm->arch.model.fac->sie, vcpu->kvm->arch.model.fac->kvm, | ||
1169 | S390_ARCH_FAC_LIST_SIZE_BYTE); | ||
1170 | vcpu->arch.sie_block->ibc = vcpu->kvm->arch.model.ibc; | 1163 | vcpu->arch.sie_block->ibc = vcpu->kvm->arch.model.ibc; |
1171 | mutex_unlock(&vcpu->kvm->lock); | 1164 | mutex_unlock(&vcpu->kvm->lock); |
1172 | 1165 | ||
@@ -1212,7 +1205,7 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, | |||
1212 | vcpu->arch.sie_block->scaol = (__u32)(__u64)kvm->arch.sca; | 1205 | vcpu->arch.sie_block->scaol = (__u32)(__u64)kvm->arch.sca; |
1213 | set_bit(63 - id, (unsigned long *) &kvm->arch.sca->mcn); | 1206 | set_bit(63 - id, (unsigned long *) &kvm->arch.sca->mcn); |
1214 | } | 1207 | } |
1215 | vcpu->arch.sie_block->fac = (int) (long) kvm->arch.model.fac->sie; | 1208 | vcpu->arch.sie_block->fac = (int) (long) kvm->arch.model.fac->list; |
1216 | 1209 | ||
1217 | spin_lock_init(&vcpu->arch.local_int.lock); | 1210 | spin_lock_init(&vcpu->arch.local_int.lock); |
1218 | vcpu->arch.local_int.float_int = &kvm->arch.float_int; | 1211 | vcpu->arch.local_int.float_int = &kvm->arch.float_int; |
diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h index 985c2114d7ef..c34109aa552d 100644 --- a/arch/s390/kvm/kvm-s390.h +++ b/arch/s390/kvm/kvm-s390.h | |||
@@ -128,7 +128,8 @@ static inline void kvm_s390_set_psw_cc(struct kvm_vcpu *vcpu, unsigned long cc) | |||
128 | /* test availability of facility in a kvm intance */ | 128 | /* test availability of facility in a kvm intance */ |
129 | static inline int test_kvm_facility(struct kvm *kvm, unsigned long nr) | 129 | static inline int test_kvm_facility(struct kvm *kvm, unsigned long nr) |
130 | { | 130 | { |
131 | return __test_facility(nr, kvm->arch.model.fac->kvm); | 131 | return __test_facility(nr, kvm->arch.model.fac->mask) && |
132 | __test_facility(nr, kvm->arch.model.fac->list); | ||
132 | } | 133 | } |
133 | 134 | ||
134 | /* are cpu states controlled by user space */ | 135 | /* are cpu states controlled by user space */ |
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index bdd9b5b17e03..351116939ea2 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c | |||
@@ -348,7 +348,7 @@ static int handle_stfl(struct kvm_vcpu *vcpu) | |||
348 | * We need to shift the lower 32 facility bits (bit 0-31) from a u64 | 348 | * We need to shift the lower 32 facility bits (bit 0-31) from a u64 |
349 | * into a u32 memory representation. They will remain bits 0-31. | 349 | * into a u32 memory representation. They will remain bits 0-31. |
350 | */ | 350 | */ |
351 | fac = *vcpu->kvm->arch.model.fac->sie >> 32; | 351 | fac = *vcpu->kvm->arch.model.fac->list >> 32; |
352 | rc = write_guest_lc(vcpu, offsetof(struct _lowcore, stfl_fac_list), | 352 | rc = write_guest_lc(vcpu, offsetof(struct _lowcore, stfl_fac_list), |
353 | &fac, sizeof(fac)); | 353 | &fac, sizeof(fac)); |
354 | if (rc) | 354 | if (rc) |
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index 753a56731951..f0b85443e060 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c | |||
@@ -287,7 +287,7 @@ void __iomem *pci_iomap_range(struct pci_dev *pdev, | |||
287 | addr = ZPCI_IOMAP_ADDR_BASE | ((u64) idx << 48); | 287 | addr = ZPCI_IOMAP_ADDR_BASE | ((u64) idx << 48); |
288 | return (void __iomem *) addr + offset; | 288 | return (void __iomem *) addr + offset; |
289 | } | 289 | } |
290 | EXPORT_SYMBOL_GPL(pci_iomap_range); | 290 | EXPORT_SYMBOL(pci_iomap_range); |
291 | 291 | ||
292 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) | 292 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) |
293 | { | 293 | { |
@@ -309,7 +309,7 @@ void pci_iounmap(struct pci_dev *pdev, void __iomem *addr) | |||
309 | } | 309 | } |
310 | spin_unlock(&zpci_iomap_lock); | 310 | spin_unlock(&zpci_iomap_lock); |
311 | } | 311 | } |
312 | EXPORT_SYMBOL_GPL(pci_iounmap); | 312 | EXPORT_SYMBOL(pci_iounmap); |
313 | 313 | ||
314 | static int pci_read(struct pci_bus *bus, unsigned int devfn, int where, | 314 | static int pci_read(struct pci_bus *bus, unsigned int devfn, int where, |
315 | int size, u32 *val) | 315 | int size, u32 *val) |
@@ -483,9 +483,8 @@ void arch_teardown_msi_irqs(struct pci_dev *pdev) | |||
483 | airq_iv_free_bit(zpci_aisb_iv, zdev->aisb); | 483 | airq_iv_free_bit(zpci_aisb_iv, zdev->aisb); |
484 | } | 484 | } |
485 | 485 | ||
486 | static void zpci_map_resources(struct zpci_dev *zdev) | 486 | static void zpci_map_resources(struct pci_dev *pdev) |
487 | { | 487 | { |
488 | struct pci_dev *pdev = zdev->pdev; | ||
489 | resource_size_t len; | 488 | resource_size_t len; |
490 | int i; | 489 | int i; |
491 | 490 | ||
@@ -499,9 +498,8 @@ static void zpci_map_resources(struct zpci_dev *zdev) | |||
499 | } | 498 | } |
500 | } | 499 | } |
501 | 500 | ||
502 | static void zpci_unmap_resources(struct zpci_dev *zdev) | 501 | static void zpci_unmap_resources(struct pci_dev *pdev) |
503 | { | 502 | { |
504 | struct pci_dev *pdev = zdev->pdev; | ||
505 | resource_size_t len; | 503 | resource_size_t len; |
506 | int i; | 504 | int i; |
507 | 505 | ||
@@ -651,7 +649,7 @@ int pcibios_add_device(struct pci_dev *pdev) | |||
651 | 649 | ||
652 | zdev->pdev = pdev; | 650 | zdev->pdev = pdev; |
653 | pdev->dev.groups = zpci_attr_groups; | 651 | pdev->dev.groups = zpci_attr_groups; |
654 | zpci_map_resources(zdev); | 652 | zpci_map_resources(pdev); |
655 | 653 | ||
656 | for (i = 0; i < PCI_BAR_COUNT; i++) { | 654 | for (i = 0; i < PCI_BAR_COUNT; i++) { |
657 | res = &pdev->resource[i]; | 655 | res = &pdev->resource[i]; |
@@ -663,6 +661,11 @@ int pcibios_add_device(struct pci_dev *pdev) | |||
663 | return 0; | 661 | return 0; |
664 | } | 662 | } |
665 | 663 | ||
664 | void pcibios_release_device(struct pci_dev *pdev) | ||
665 | { | ||
666 | zpci_unmap_resources(pdev); | ||
667 | } | ||
668 | |||
666 | int pcibios_enable_device(struct pci_dev *pdev, int mask) | 669 | int pcibios_enable_device(struct pci_dev *pdev, int mask) |
667 | { | 670 | { |
668 | struct zpci_dev *zdev = get_zdev(pdev); | 671 | struct zpci_dev *zdev = get_zdev(pdev); |
@@ -670,7 +673,6 @@ int pcibios_enable_device(struct pci_dev *pdev, int mask) | |||
670 | zdev->pdev = pdev; | 673 | zdev->pdev = pdev; |
671 | zpci_debug_init_device(zdev); | 674 | zpci_debug_init_device(zdev); |
672 | zpci_fmb_enable_device(zdev); | 675 | zpci_fmb_enable_device(zdev); |
673 | zpci_map_resources(zdev); | ||
674 | 676 | ||
675 | return pci_enable_resources(pdev, mask); | 677 | return pci_enable_resources(pdev, mask); |
676 | } | 678 | } |
@@ -679,7 +681,6 @@ void pcibios_disable_device(struct pci_dev *pdev) | |||
679 | { | 681 | { |
680 | struct zpci_dev *zdev = get_zdev(pdev); | 682 | struct zpci_dev *zdev = get_zdev(pdev); |
681 | 683 | ||
682 | zpci_unmap_resources(zdev); | ||
683 | zpci_fmb_disable_device(zdev); | 684 | zpci_fmb_disable_device(zdev); |
684 | zpci_debug_exit_device(zdev); | 685 | zpci_debug_exit_device(zdev); |
685 | zdev->pdev = NULL; | 686 | zdev->pdev = NULL; |
@@ -688,7 +689,8 @@ void pcibios_disable_device(struct pci_dev *pdev) | |||
688 | #ifdef CONFIG_HIBERNATE_CALLBACKS | 689 | #ifdef CONFIG_HIBERNATE_CALLBACKS |
689 | static int zpci_restore(struct device *dev) | 690 | static int zpci_restore(struct device *dev) |
690 | { | 691 | { |
691 | struct zpci_dev *zdev = get_zdev(to_pci_dev(dev)); | 692 | struct pci_dev *pdev = to_pci_dev(dev); |
693 | struct zpci_dev *zdev = get_zdev(pdev); | ||
692 | int ret = 0; | 694 | int ret = 0; |
693 | 695 | ||
694 | if (zdev->state != ZPCI_FN_STATE_ONLINE) | 696 | if (zdev->state != ZPCI_FN_STATE_ONLINE) |
@@ -698,7 +700,7 @@ static int zpci_restore(struct device *dev) | |||
698 | if (ret) | 700 | if (ret) |
699 | goto out; | 701 | goto out; |
700 | 702 | ||
701 | zpci_map_resources(zdev); | 703 | zpci_map_resources(pdev); |
702 | zpci_register_ioat(zdev, 0, zdev->start_dma + PAGE_OFFSET, | 704 | zpci_register_ioat(zdev, 0, zdev->start_dma + PAGE_OFFSET, |
703 | zdev->start_dma + zdev->iommu_size - 1, | 705 | zdev->start_dma + zdev->iommu_size - 1, |
704 | (u64) zdev->dma_table); | 706 | (u64) zdev->dma_table); |
@@ -709,12 +711,14 @@ out: | |||
709 | 711 | ||
710 | static int zpci_freeze(struct device *dev) | 712 | static int zpci_freeze(struct device *dev) |
711 | { | 713 | { |
712 | struct zpci_dev *zdev = get_zdev(to_pci_dev(dev)); | 714 | struct pci_dev *pdev = to_pci_dev(dev); |
715 | struct zpci_dev *zdev = get_zdev(pdev); | ||
713 | 716 | ||
714 | if (zdev->state != ZPCI_FN_STATE_ONLINE) | 717 | if (zdev->state != ZPCI_FN_STATE_ONLINE) |
715 | return 0; | 718 | return 0; |
716 | 719 | ||
717 | zpci_unregister_ioat(zdev, 0); | 720 | zpci_unregister_ioat(zdev, 0); |
721 | zpci_unmap_resources(pdev); | ||
718 | return clp_disable_fh(zdev); | 722 | return clp_disable_fh(zdev); |
719 | } | 723 | } |
720 | 724 | ||
diff --git a/arch/s390/pci/pci_mmio.c b/arch/s390/pci/pci_mmio.c index 8aa271b3d1ad..b1bb2b72302c 100644 --- a/arch/s390/pci/pci_mmio.c +++ b/arch/s390/pci/pci_mmio.c | |||
@@ -64,8 +64,7 @@ SYSCALL_DEFINE3(s390_pci_mmio_write, unsigned long, mmio_addr, | |||
64 | if (copy_from_user(buf, user_buffer, length)) | 64 | if (copy_from_user(buf, user_buffer, length)) |
65 | goto out; | 65 | goto out; |
66 | 66 | ||
67 | memcpy_toio(io_addr, buf, length); | 67 | ret = zpci_memcpy_toio(io_addr, buf, length); |
68 | ret = 0; | ||
69 | out: | 68 | out: |
70 | if (buf != local_buf) | 69 | if (buf != local_buf) |
71 | kfree(buf); | 70 | kfree(buf); |
@@ -98,16 +97,16 @@ SYSCALL_DEFINE3(s390_pci_mmio_read, unsigned long, mmio_addr, | |||
98 | goto out; | 97 | goto out; |
99 | io_addr = (void __iomem *)((pfn << PAGE_SHIFT) | (mmio_addr & ~PAGE_MASK)); | 98 | io_addr = (void __iomem *)((pfn << PAGE_SHIFT) | (mmio_addr & ~PAGE_MASK)); |
100 | 99 | ||
101 | ret = -EFAULT; | 100 | if ((unsigned long) io_addr < ZPCI_IOMAP_ADDR_BASE) { |
102 | if ((unsigned long) io_addr < ZPCI_IOMAP_ADDR_BASE) | 101 | ret = -EFAULT; |
103 | goto out; | 102 | goto out; |
104 | 103 | } | |
105 | memcpy_fromio(buf, io_addr, length); | 104 | ret = zpci_memcpy_fromio(buf, io_addr, length); |
106 | 105 | if (ret) | |
107 | if (copy_to_user(user_buffer, buf, length)) | ||
108 | goto out; | 106 | goto out; |
107 | if (copy_to_user(user_buffer, buf, length)) | ||
108 | ret = -EFAULT; | ||
109 | 109 | ||
110 | ret = 0; | ||
111 | out: | 110 | out: |
112 | if (buf != local_buf) | 111 | if (buf != local_buf) |
113 | kfree(buf); | 112 | kfree(buf); |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 96ac69c5eba0..efb00ec75805 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -86,6 +86,9 @@ config ARCH_DEFCONFIG | |||
86 | default "arch/sparc/configs/sparc32_defconfig" if SPARC32 | 86 | default "arch/sparc/configs/sparc32_defconfig" if SPARC32 |
87 | default "arch/sparc/configs/sparc64_defconfig" if SPARC64 | 87 | default "arch/sparc/configs/sparc64_defconfig" if SPARC64 |
88 | 88 | ||
89 | config ARCH_PROC_KCORE_TEXT | ||
90 | def_bool y | ||
91 | |||
89 | config IOMMU_HELPER | 92 | config IOMMU_HELPER |
90 | bool | 93 | bool |
91 | default y if SPARC64 | 94 | default y if SPARC64 |
diff --git a/arch/sparc/include/asm/io_64.h b/arch/sparc/include/asm/io_64.h index 9b672be70dda..50d4840d9aeb 100644 --- a/arch/sparc/include/asm/io_64.h +++ b/arch/sparc/include/asm/io_64.h | |||
@@ -407,16 +407,16 @@ static inline void iounmap(volatile void __iomem *addr) | |||
407 | { | 407 | { |
408 | } | 408 | } |
409 | 409 | ||
410 | #define ioread8(X) readb(X) | 410 | #define ioread8 readb |
411 | #define ioread16(X) readw(X) | 411 | #define ioread16 readw |
412 | #define ioread16be(X) __raw_readw(X) | 412 | #define ioread16be __raw_readw |
413 | #define ioread32(X) readl(X) | 413 | #define ioread32 readl |
414 | #define ioread32be(X) __raw_readl(X) | 414 | #define ioread32be __raw_readl |
415 | #define iowrite8(val,X) writeb(val,X) | 415 | #define iowrite8 writeb |
416 | #define iowrite16(val,X) writew(val,X) | 416 | #define iowrite16 writew |
417 | #define iowrite16be(val,X) __raw_writew(val,X) | 417 | #define iowrite16be __raw_writew |
418 | #define iowrite32(val,X) writel(val,X) | 418 | #define iowrite32 writel |
419 | #define iowrite32be(val,X) __raw_writel(val,X) | 419 | #define iowrite32be __raw_writel |
420 | 420 | ||
421 | /* Create a virtual mapping cookie for an IO port range */ | 421 | /* Create a virtual mapping cookie for an IO port range */ |
422 | void __iomem *ioport_map(unsigned long port, unsigned int nr); | 422 | void __iomem *ioport_map(unsigned long port, unsigned int nr); |
diff --git a/arch/sparc/include/asm/starfire.h b/arch/sparc/include/asm/starfire.h index c100dc27a0a9..176fa0ad19f1 100644 --- a/arch/sparc/include/asm/starfire.h +++ b/arch/sparc/include/asm/starfire.h | |||
@@ -12,7 +12,6 @@ | |||
12 | extern int this_is_starfire; | 12 | extern int this_is_starfire; |
13 | 13 | ||
14 | void check_if_starfire(void); | 14 | void check_if_starfire(void); |
15 | int starfire_hard_smp_processor_id(void); | ||
16 | void starfire_hookup(int); | 15 | void starfire_hookup(int); |
17 | unsigned int starfire_translate(unsigned long imap, unsigned int upaid); | 16 | unsigned int starfire_translate(unsigned long imap, unsigned int upaid); |
18 | 17 | ||
diff --git a/arch/sparc/kernel/entry.h b/arch/sparc/kernel/entry.h index 88d322b67fac..07cc49e541f4 100644 --- a/arch/sparc/kernel/entry.h +++ b/arch/sparc/kernel/entry.h | |||
@@ -98,11 +98,7 @@ void sun4v_do_mna(struct pt_regs *regs, | |||
98 | void do_privop(struct pt_regs *regs); | 98 | void do_privop(struct pt_regs *regs); |
99 | void do_privact(struct pt_regs *regs); | 99 | void do_privact(struct pt_regs *regs); |
100 | void do_cee(struct pt_regs *regs); | 100 | void do_cee(struct pt_regs *regs); |
101 | void do_cee_tl1(struct pt_regs *regs); | ||
102 | void do_dae_tl1(struct pt_regs *regs); | ||
103 | void do_iae_tl1(struct pt_regs *regs); | ||
104 | void do_div0_tl1(struct pt_regs *regs); | 101 | void do_div0_tl1(struct pt_regs *regs); |
105 | void do_fpdis_tl1(struct pt_regs *regs); | ||
106 | void do_fpieee_tl1(struct pt_regs *regs); | 102 | void do_fpieee_tl1(struct pt_regs *regs); |
107 | void do_fpother_tl1(struct pt_regs *regs); | 103 | void do_fpother_tl1(struct pt_regs *regs); |
108 | void do_ill_tl1(struct pt_regs *regs); | 104 | void do_ill_tl1(struct pt_regs *regs); |
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index da6f1a7fc4db..61139d9924ca 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c | |||
@@ -1406,11 +1406,32 @@ void __irq_entry smp_receive_signal_client(int irq, struct pt_regs *regs) | |||
1406 | scheduler_ipi(); | 1406 | scheduler_ipi(); |
1407 | } | 1407 | } |
1408 | 1408 | ||
1409 | /* This is a nop because we capture all other cpus | 1409 | static void stop_this_cpu(void *dummy) |
1410 | * anyways when making the PROM active. | 1410 | { |
1411 | */ | 1411 | prom_stopself(); |
1412 | } | ||
1413 | |||
1412 | void smp_send_stop(void) | 1414 | void smp_send_stop(void) |
1413 | { | 1415 | { |
1416 | int cpu; | ||
1417 | |||
1418 | if (tlb_type == hypervisor) { | ||
1419 | for_each_online_cpu(cpu) { | ||
1420 | if (cpu == smp_processor_id()) | ||
1421 | continue; | ||
1422 | #ifdef CONFIG_SUN_LDOMS | ||
1423 | if (ldom_domaining_enabled) { | ||
1424 | unsigned long hv_err; | ||
1425 | hv_err = sun4v_cpu_stop(cpu); | ||
1426 | if (hv_err) | ||
1427 | printk(KERN_ERR "sun4v_cpu_stop() " | ||
1428 | "failed err=%lu\n", hv_err); | ||
1429 | } else | ||
1430 | #endif | ||
1431 | prom_stopcpu_cpuid(cpu); | ||
1432 | } | ||
1433 | } else | ||
1434 | smp_call_function(stop_this_cpu, NULL, 0); | ||
1414 | } | 1435 | } |
1415 | 1436 | ||
1416 | /** | 1437 | /** |
diff --git a/arch/sparc/kernel/starfire.c b/arch/sparc/kernel/starfire.c index 82281a566bb8..167fdfd9c837 100644 --- a/arch/sparc/kernel/starfire.c +++ b/arch/sparc/kernel/starfire.c | |||
@@ -28,11 +28,6 @@ void check_if_starfire(void) | |||
28 | this_is_starfire = 1; | 28 | this_is_starfire = 1; |
29 | } | 29 | } |
30 | 30 | ||
31 | int starfire_hard_smp_processor_id(void) | ||
32 | { | ||
33 | return upa_readl(0x1fff40000d0UL); | ||
34 | } | ||
35 | |||
36 | /* | 31 | /* |
37 | * Each Starfire board has 32 registers which perform translation | 32 | * Each Starfire board has 32 registers which perform translation |
38 | * and delivery of traditional interrupt packets into the extended | 33 | * and delivery of traditional interrupt packets into the extended |
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c index c85403d0496c..30e7ddb27a3a 100644 --- a/arch/sparc/kernel/sys_sparc_64.c +++ b/arch/sparc/kernel/sys_sparc_64.c | |||
@@ -333,7 +333,7 @@ SYSCALL_DEFINE6(sparc_ipc, unsigned int, call, int, first, unsigned long, second | |||
333 | long err; | 333 | long err; |
334 | 334 | ||
335 | /* No need for backward compatibility. We can start fresh... */ | 335 | /* No need for backward compatibility. We can start fresh... */ |
336 | if (call <= SEMCTL) { | 336 | if (call <= SEMTIMEDOP) { |
337 | switch (call) { | 337 | switch (call) { |
338 | case SEMOP: | 338 | case SEMOP: |
339 | err = sys_semtimedop(first, ptr, | 339 | err = sys_semtimedop(first, ptr, |
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c index a27651e866e7..0e699745d643 100644 --- a/arch/sparc/kernel/traps_64.c +++ b/arch/sparc/kernel/traps_64.c | |||
@@ -2427,6 +2427,8 @@ void __noreturn die_if_kernel(char *str, struct pt_regs *regs) | |||
2427 | } | 2427 | } |
2428 | user_instruction_dump ((unsigned int __user *) regs->tpc); | 2428 | user_instruction_dump ((unsigned int __user *) regs->tpc); |
2429 | } | 2429 | } |
2430 | if (panic_on_oops) | ||
2431 | panic("Fatal exception"); | ||
2430 | if (regs->tstate & TSTATE_PRIV) | 2432 | if (regs->tstate & TSTATE_PRIV) |
2431 | do_exit(SIGKILL); | 2433 | do_exit(SIGKILL); |
2432 | do_exit(SIGSEGV); | 2434 | do_exit(SIGSEGV); |
@@ -2564,27 +2566,6 @@ void do_cee(struct pt_regs *regs) | |||
2564 | die_if_kernel("TL0: Cache Error Exception", regs); | 2566 | die_if_kernel("TL0: Cache Error Exception", regs); |
2565 | } | 2567 | } |
2566 | 2568 | ||
2567 | void do_cee_tl1(struct pt_regs *regs) | ||
2568 | { | ||
2569 | exception_enter(); | ||
2570 | dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); | ||
2571 | die_if_kernel("TL1: Cache Error Exception", regs); | ||
2572 | } | ||
2573 | |||
2574 | void do_dae_tl1(struct pt_regs *regs) | ||
2575 | { | ||
2576 | exception_enter(); | ||
2577 | dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); | ||
2578 | die_if_kernel("TL1: Data Access Exception", regs); | ||
2579 | } | ||
2580 | |||
2581 | void do_iae_tl1(struct pt_regs *regs) | ||
2582 | { | ||
2583 | exception_enter(); | ||
2584 | dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); | ||
2585 | die_if_kernel("TL1: Instruction Access Exception", regs); | ||
2586 | } | ||
2587 | |||
2588 | void do_div0_tl1(struct pt_regs *regs) | 2569 | void do_div0_tl1(struct pt_regs *regs) |
2589 | { | 2570 | { |
2590 | exception_enter(); | 2571 | exception_enter(); |
@@ -2592,13 +2573,6 @@ void do_div0_tl1(struct pt_regs *regs) | |||
2592 | die_if_kernel("TL1: DIV0 Exception", regs); | 2573 | die_if_kernel("TL1: DIV0 Exception", regs); |
2593 | } | 2574 | } |
2594 | 2575 | ||
2595 | void do_fpdis_tl1(struct pt_regs *regs) | ||
2596 | { | ||
2597 | exception_enter(); | ||
2598 | dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); | ||
2599 | die_if_kernel("TL1: FPU Disabled", regs); | ||
2600 | } | ||
2601 | |||
2602 | void do_fpieee_tl1(struct pt_regs *regs) | 2576 | void do_fpieee_tl1(struct pt_regs *regs) |
2603 | { | 2577 | { |
2604 | exception_enter(); | 2578 | exception_enter(); |
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index 3ea267c53320..4ca0d6ba5ec8 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
@@ -2820,7 +2820,7 @@ static int __init report_memory(void) | |||
2820 | 2820 | ||
2821 | return 0; | 2821 | return 0; |
2822 | } | 2822 | } |
2823 | device_initcall(report_memory); | 2823 | arch_initcall(report_memory); |
2824 | 2824 | ||
2825 | #ifdef CONFIG_SMP | 2825 | #ifdef CONFIG_SMP |
2826 | #define do_flush_tlb_kernel_range smp_flush_tlb_kernel_range | 2826 | #define do_flush_tlb_kernel_range smp_flush_tlb_kernel_range |
diff --git a/arch/x86/boot/compressed/aslr.c b/arch/x86/boot/compressed/aslr.c index 7083c16cccba..bb1376381985 100644 --- a/arch/x86/boot/compressed/aslr.c +++ b/arch/x86/boot/compressed/aslr.c | |||
@@ -14,13 +14,6 @@ | |||
14 | static const char build_str[] = UTS_RELEASE " (" LINUX_COMPILE_BY "@" | 14 | static const char build_str[] = UTS_RELEASE " (" LINUX_COMPILE_BY "@" |
15 | LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION; | 15 | LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION; |
16 | 16 | ||
17 | struct kaslr_setup_data { | ||
18 | __u64 next; | ||
19 | __u32 type; | ||
20 | __u32 len; | ||
21 | __u8 data[1]; | ||
22 | } kaslr_setup_data; | ||
23 | |||
24 | #define I8254_PORT_CONTROL 0x43 | 17 | #define I8254_PORT_CONTROL 0x43 |
25 | #define I8254_PORT_COUNTER0 0x40 | 18 | #define I8254_PORT_COUNTER0 0x40 |
26 | #define I8254_CMD_READBACK 0xC0 | 19 | #define I8254_CMD_READBACK 0xC0 |
@@ -302,29 +295,7 @@ static unsigned long find_random_addr(unsigned long minimum, | |||
302 | return slots_fetch_random(); | 295 | return slots_fetch_random(); |
303 | } | 296 | } |
304 | 297 | ||
305 | static void add_kaslr_setup_data(struct boot_params *params, __u8 enabled) | 298 | unsigned char *choose_kernel_location(unsigned char *input, |
306 | { | ||
307 | struct setup_data *data; | ||
308 | |||
309 | kaslr_setup_data.type = SETUP_KASLR; | ||
310 | kaslr_setup_data.len = 1; | ||
311 | kaslr_setup_data.next = 0; | ||
312 | kaslr_setup_data.data[0] = enabled; | ||
313 | |||
314 | data = (struct setup_data *)(unsigned long)params->hdr.setup_data; | ||
315 | |||
316 | while (data && data->next) | ||
317 | data = (struct setup_data *)(unsigned long)data->next; | ||
318 | |||
319 | if (data) | ||
320 | data->next = (unsigned long)&kaslr_setup_data; | ||
321 | else | ||
322 | params->hdr.setup_data = (unsigned long)&kaslr_setup_data; | ||
323 | |||
324 | } | ||
325 | |||
326 | unsigned char *choose_kernel_location(struct boot_params *params, | ||
327 | unsigned char *input, | ||
328 | unsigned long input_size, | 299 | unsigned long input_size, |
329 | unsigned char *output, | 300 | unsigned char *output, |
330 | unsigned long output_size) | 301 | unsigned long output_size) |
@@ -335,17 +306,14 @@ unsigned char *choose_kernel_location(struct boot_params *params, | |||
335 | #ifdef CONFIG_HIBERNATION | 306 | #ifdef CONFIG_HIBERNATION |
336 | if (!cmdline_find_option_bool("kaslr")) { | 307 | if (!cmdline_find_option_bool("kaslr")) { |
337 | debug_putstr("KASLR disabled by default...\n"); | 308 | debug_putstr("KASLR disabled by default...\n"); |
338 | add_kaslr_setup_data(params, 0); | ||
339 | goto out; | 309 | goto out; |
340 | } | 310 | } |
341 | #else | 311 | #else |
342 | if (cmdline_find_option_bool("nokaslr")) { | 312 | if (cmdline_find_option_bool("nokaslr")) { |
343 | debug_putstr("KASLR disabled by cmdline...\n"); | 313 | debug_putstr("KASLR disabled by cmdline...\n"); |
344 | add_kaslr_setup_data(params, 0); | ||
345 | goto out; | 314 | goto out; |
346 | } | 315 | } |
347 | #endif | 316 | #endif |
348 | add_kaslr_setup_data(params, 1); | ||
349 | 317 | ||
350 | /* Record the various known unsafe memory ranges. */ | 318 | /* Record the various known unsafe memory ranges. */ |
351 | mem_avoid_init((unsigned long)input, input_size, | 319 | mem_avoid_init((unsigned long)input, input_size, |
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index 5903089c818f..a950864a64da 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c | |||
@@ -401,8 +401,7 @@ asmlinkage __visible void *decompress_kernel(void *rmode, memptr heap, | |||
401 | * the entire decompressed kernel plus relocation table, or the | 401 | * the entire decompressed kernel plus relocation table, or the |
402 | * entire decompressed kernel plus .bss and .brk sections. | 402 | * entire decompressed kernel plus .bss and .brk sections. |
403 | */ | 403 | */ |
404 | output = choose_kernel_location(real_mode, input_data, input_len, | 404 | output = choose_kernel_location(input_data, input_len, output, |
405 | output, | ||
406 | output_len > run_size ? output_len | 405 | output_len > run_size ? output_len |
407 | : run_size); | 406 | : run_size); |
408 | 407 | ||
diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h index ee3576b2666b..04477d68403f 100644 --- a/arch/x86/boot/compressed/misc.h +++ b/arch/x86/boot/compressed/misc.h | |||
@@ -57,8 +57,7 @@ int cmdline_find_option_bool(const char *option); | |||
57 | 57 | ||
58 | #if CONFIG_RANDOMIZE_BASE | 58 | #if CONFIG_RANDOMIZE_BASE |
59 | /* aslr.c */ | 59 | /* aslr.c */ |
60 | unsigned char *choose_kernel_location(struct boot_params *params, | 60 | unsigned char *choose_kernel_location(unsigned char *input, |
61 | unsigned char *input, | ||
62 | unsigned long input_size, | 61 | unsigned long input_size, |
63 | unsigned char *output, | 62 | unsigned char *output, |
64 | unsigned long output_size); | 63 | unsigned long output_size); |
@@ -66,8 +65,7 @@ unsigned char *choose_kernel_location(struct boot_params *params, | |||
66 | bool has_cpuflag(int flag); | 65 | bool has_cpuflag(int flag); |
67 | #else | 66 | #else |
68 | static inline | 67 | static inline |
69 | unsigned char *choose_kernel_location(struct boot_params *params, | 68 | unsigned char *choose_kernel_location(unsigned char *input, |
70 | unsigned char *input, | ||
71 | unsigned long input_size, | 69 | unsigned long input_size, |
72 | unsigned char *output, | 70 | unsigned char *output, |
73 | unsigned long output_size) | 71 | unsigned long output_size) |
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index 947c6bf52c33..54f60ab41c63 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c | |||
@@ -1155,7 +1155,7 @@ static int __driver_rfc4106_decrypt(struct aead_request *req) | |||
1155 | src = kmalloc(req->cryptlen + req->assoclen, GFP_ATOMIC); | 1155 | src = kmalloc(req->cryptlen + req->assoclen, GFP_ATOMIC); |
1156 | if (!src) | 1156 | if (!src) |
1157 | return -ENOMEM; | 1157 | return -ENOMEM; |
1158 | assoc = (src + req->cryptlen + auth_tag_len); | 1158 | assoc = (src + req->cryptlen); |
1159 | scatterwalk_map_and_copy(src, req->src, 0, req->cryptlen, 0); | 1159 | scatterwalk_map_and_copy(src, req->src, 0, req->cryptlen, 0); |
1160 | scatterwalk_map_and_copy(assoc, req->assoc, 0, | 1160 | scatterwalk_map_and_copy(assoc, req->assoc, 0, |
1161 | req->assoclen, 0); | 1161 | req->assoclen, 0); |
@@ -1180,7 +1180,7 @@ static int __driver_rfc4106_decrypt(struct aead_request *req) | |||
1180 | scatterwalk_done(&src_sg_walk, 0, 0); | 1180 | scatterwalk_done(&src_sg_walk, 0, 0); |
1181 | scatterwalk_done(&assoc_sg_walk, 0, 0); | 1181 | scatterwalk_done(&assoc_sg_walk, 0, 0); |
1182 | } else { | 1182 | } else { |
1183 | scatterwalk_map_and_copy(dst, req->dst, 0, req->cryptlen, 1); | 1183 | scatterwalk_map_and_copy(dst, req->dst, 0, tempCipherLen, 1); |
1184 | kfree(src); | 1184 | kfree(src); |
1185 | } | 1185 | } |
1186 | return retval; | 1186 | return retval; |
diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h index 0dbc08282291..72ba21a8b5fc 100644 --- a/arch/x86/include/asm/fpu-internal.h +++ b/arch/x86/include/asm/fpu-internal.h | |||
@@ -370,7 +370,7 @@ static inline void drop_fpu(struct task_struct *tsk) | |||
370 | preempt_disable(); | 370 | preempt_disable(); |
371 | tsk->thread.fpu_counter = 0; | 371 | tsk->thread.fpu_counter = 0; |
372 | __drop_fpu(tsk); | 372 | __drop_fpu(tsk); |
373 | clear_used_math(); | 373 | clear_stopped_child_used_math(tsk); |
374 | preempt_enable(); | 374 | preempt_enable(); |
375 | } | 375 | } |
376 | 376 | ||
diff --git a/arch/x86/include/asm/page_types.h b/arch/x86/include/asm/page_types.h index 95e11f79f123..f97fbe3abb67 100644 --- a/arch/x86/include/asm/page_types.h +++ b/arch/x86/include/asm/page_types.h | |||
@@ -51,8 +51,6 @@ extern int devmem_is_allowed(unsigned long pagenr); | |||
51 | extern unsigned long max_low_pfn_mapped; | 51 | extern unsigned long max_low_pfn_mapped; |
52 | extern unsigned long max_pfn_mapped; | 52 | extern unsigned long max_pfn_mapped; |
53 | 53 | ||
54 | extern bool kaslr_enabled; | ||
55 | |||
56 | static inline phys_addr_t get_max_mapped(void) | 54 | static inline phys_addr_t get_max_mapped(void) |
57 | { | 55 | { |
58 | return (phys_addr_t)max_pfn_mapped << PAGE_SHIFT; | 56 | return (phys_addr_t)max_pfn_mapped << PAGE_SHIFT; |
diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h index fa1195dae425..164e3f8d3c3d 100644 --- a/arch/x86/include/asm/pci_x86.h +++ b/arch/x86/include/asm/pci_x86.h | |||
@@ -93,6 +93,8 @@ extern raw_spinlock_t pci_config_lock; | |||
93 | extern int (*pcibios_enable_irq)(struct pci_dev *dev); | 93 | extern int (*pcibios_enable_irq)(struct pci_dev *dev); |
94 | extern void (*pcibios_disable_irq)(struct pci_dev *dev); | 94 | extern void (*pcibios_disable_irq)(struct pci_dev *dev); |
95 | 95 | ||
96 | extern bool mp_should_keep_irq(struct device *dev); | ||
97 | |||
96 | struct pci_raw_ops { | 98 | struct pci_raw_ops { |
97 | int (*read)(unsigned int domain, unsigned int bus, unsigned int devfn, | 99 | int (*read)(unsigned int domain, unsigned int bus, unsigned int devfn, |
98 | int reg, int len, u32 *val); | 100 | int reg, int len, u32 *val); |
diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h index 44e6dd7e36a2..225b0988043a 100644 --- a/arch/x86/include/uapi/asm/bootparam.h +++ b/arch/x86/include/uapi/asm/bootparam.h | |||
@@ -7,7 +7,6 @@ | |||
7 | #define SETUP_DTB 2 | 7 | #define SETUP_DTB 2 |
8 | #define SETUP_PCI 3 | 8 | #define SETUP_PCI 3 |
9 | #define SETUP_EFI 4 | 9 | #define SETUP_EFI 4 |
10 | #define SETUP_KASLR 5 | ||
11 | 10 | ||
12 | /* ram_size flags */ | 11 | /* ram_size flags */ |
13 | #define RAMDISK_IMAGE_START_MASK 0x07FF | 12 | #define RAMDISK_IMAGE_START_MASK 0x07FF |
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 3d525c6124f6..803b684676ff 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -1338,6 +1338,26 @@ static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d) | |||
1338 | } | 1338 | } |
1339 | 1339 | ||
1340 | /* | 1340 | /* |
1341 | * ACPI offers an alternative platform interface model that removes | ||
1342 | * ACPI hardware requirements for platforms that do not implement | ||
1343 | * the PC Architecture. | ||
1344 | * | ||
1345 | * We initialize the Hardware-reduced ACPI model here: | ||
1346 | */ | ||
1347 | static void __init acpi_reduced_hw_init(void) | ||
1348 | { | ||
1349 | if (acpi_gbl_reduced_hardware) { | ||
1350 | /* | ||
1351 | * Override x86_init functions and bypass legacy pic | ||
1352 | * in Hardware-reduced ACPI mode | ||
1353 | */ | ||
1354 | x86_init.timers.timer_init = x86_init_noop; | ||
1355 | x86_init.irqs.pre_vector_init = x86_init_noop; | ||
1356 | legacy_pic = &null_legacy_pic; | ||
1357 | } | ||
1358 | } | ||
1359 | |||
1360 | /* | ||
1341 | * If your system is blacklisted here, but you find that acpi=force | 1361 | * If your system is blacklisted here, but you find that acpi=force |
1342 | * works for you, please contact linux-acpi@vger.kernel.org | 1362 | * works for you, please contact linux-acpi@vger.kernel.org |
1343 | */ | 1363 | */ |
@@ -1536,6 +1556,11 @@ int __init early_acpi_boot_init(void) | |||
1536 | */ | 1556 | */ |
1537 | early_acpi_process_madt(); | 1557 | early_acpi_process_madt(); |
1538 | 1558 | ||
1559 | /* | ||
1560 | * Hardware-reduced ACPI mode initialization: | ||
1561 | */ | ||
1562 | acpi_reduced_hw_init(); | ||
1563 | |||
1539 | return 0; | 1564 | return 0; |
1540 | } | 1565 | } |
1541 | 1566 | ||
diff --git a/arch/x86/kernel/apic/apic_numachip.c b/arch/x86/kernel/apic/apic_numachip.c index c2fd21fed002..017149cded07 100644 --- a/arch/x86/kernel/apic/apic_numachip.c +++ b/arch/x86/kernel/apic/apic_numachip.c | |||
@@ -37,10 +37,12 @@ static const struct apic apic_numachip; | |||
37 | static unsigned int get_apic_id(unsigned long x) | 37 | static unsigned int get_apic_id(unsigned long x) |
38 | { | 38 | { |
39 | unsigned long value; | 39 | unsigned long value; |
40 | unsigned int id; | 40 | unsigned int id = (x >> 24) & 0xff; |
41 | 41 | ||
42 | rdmsrl(MSR_FAM10H_NODE_ID, value); | 42 | if (static_cpu_has_safe(X86_FEATURE_NODEID_MSR)) { |
43 | id = ((x >> 24) & 0xffU) | ((value << 2) & 0xff00U); | 43 | rdmsrl(MSR_FAM10H_NODE_ID, value); |
44 | id |= (value << 2) & 0xff00; | ||
45 | } | ||
44 | 46 | ||
45 | return id; | 47 | return id; |
46 | } | 48 | } |
@@ -155,10 +157,18 @@ static int __init numachip_probe(void) | |||
155 | 157 | ||
156 | static void fixup_cpu_id(struct cpuinfo_x86 *c, int node) | 158 | static void fixup_cpu_id(struct cpuinfo_x86 *c, int node) |
157 | { | 159 | { |
158 | if (c->phys_proc_id != node) { | 160 | u64 val; |
159 | c->phys_proc_id = node; | 161 | u32 nodes = 1; |
160 | per_cpu(cpu_llc_id, smp_processor_id()) = node; | 162 | |
163 | this_cpu_write(cpu_llc_id, node); | ||
164 | |||
165 | /* Account for nodes per socket in multi-core-module processors */ | ||
166 | if (static_cpu_has_safe(X86_FEATURE_NODEID_MSR)) { | ||
167 | rdmsrl(MSR_FAM10H_NODE_ID, val); | ||
168 | nodes = ((val >> 3) & 7) + 1; | ||
161 | } | 169 | } |
170 | |||
171 | c->phys_proc_id = node / nodes; | ||
162 | } | 172 | } |
163 | 173 | ||
164 | static int __init numachip_system_init(void) | 174 | static int __init numachip_system_init(void) |
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c index 9bbb9b35c144..d1ac80b72c72 100644 --- a/arch/x86/kernel/module.c +++ b/arch/x86/kernel/module.c | |||
@@ -47,13 +47,21 @@ do { \ | |||
47 | 47 | ||
48 | #ifdef CONFIG_RANDOMIZE_BASE | 48 | #ifdef CONFIG_RANDOMIZE_BASE |
49 | static unsigned long module_load_offset; | 49 | static unsigned long module_load_offset; |
50 | static int randomize_modules = 1; | ||
50 | 51 | ||
51 | /* Mutex protects the module_load_offset. */ | 52 | /* Mutex protects the module_load_offset. */ |
52 | static DEFINE_MUTEX(module_kaslr_mutex); | 53 | static DEFINE_MUTEX(module_kaslr_mutex); |
53 | 54 | ||
55 | static int __init parse_nokaslr(char *p) | ||
56 | { | ||
57 | randomize_modules = 0; | ||
58 | return 0; | ||
59 | } | ||
60 | early_param("nokaslr", parse_nokaslr); | ||
61 | |||
54 | static unsigned long int get_module_load_offset(void) | 62 | static unsigned long int get_module_load_offset(void) |
55 | { | 63 | { |
56 | if (kaslr_enabled) { | 64 | if (randomize_modules) { |
57 | mutex_lock(&module_kaslr_mutex); | 65 | mutex_lock(&module_kaslr_mutex); |
58 | /* | 66 | /* |
59 | * Calculate the module_load_offset the first time this | 67 | * Calculate the module_load_offset the first time this |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 98dc9317286e..0a2421cca01f 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -122,8 +122,6 @@ | |||
122 | unsigned long max_low_pfn_mapped; | 122 | unsigned long max_low_pfn_mapped; |
123 | unsigned long max_pfn_mapped; | 123 | unsigned long max_pfn_mapped; |
124 | 124 | ||
125 | bool __read_mostly kaslr_enabled = false; | ||
126 | |||
127 | #ifdef CONFIG_DMI | 125 | #ifdef CONFIG_DMI |
128 | RESERVE_BRK(dmi_alloc, 65536); | 126 | RESERVE_BRK(dmi_alloc, 65536); |
129 | #endif | 127 | #endif |
@@ -427,11 +425,6 @@ static void __init reserve_initrd(void) | |||
427 | } | 425 | } |
428 | #endif /* CONFIG_BLK_DEV_INITRD */ | 426 | #endif /* CONFIG_BLK_DEV_INITRD */ |
429 | 427 | ||
430 | static void __init parse_kaslr_setup(u64 pa_data, u32 data_len) | ||
431 | { | ||
432 | kaslr_enabled = (bool)(pa_data + sizeof(struct setup_data)); | ||
433 | } | ||
434 | |||
435 | static void __init parse_setup_data(void) | 428 | static void __init parse_setup_data(void) |
436 | { | 429 | { |
437 | struct setup_data *data; | 430 | struct setup_data *data; |
@@ -457,9 +450,6 @@ static void __init parse_setup_data(void) | |||
457 | case SETUP_EFI: | 450 | case SETUP_EFI: |
458 | parse_efi_setup(pa_data, data_len); | 451 | parse_efi_setup(pa_data, data_len); |
459 | break; | 452 | break; |
460 | case SETUP_KASLR: | ||
461 | parse_kaslr_setup(pa_data, data_len); | ||
462 | break; | ||
463 | default: | 453 | default: |
464 | break; | 454 | break; |
465 | } | 455 | } |
@@ -842,14 +832,10 @@ static void __init trim_low_memory_range(void) | |||
842 | static int | 832 | static int |
843 | dump_kernel_offset(struct notifier_block *self, unsigned long v, void *p) | 833 | dump_kernel_offset(struct notifier_block *self, unsigned long v, void *p) |
844 | { | 834 | { |
845 | if (kaslr_enabled) | 835 | pr_emerg("Kernel Offset: 0x%lx from 0x%lx " |
846 | pr_emerg("Kernel Offset: 0x%lx from 0x%lx (relocation range: 0x%lx-0x%lx)\n", | 836 | "(relocation range: 0x%lx-0x%lx)\n", |
847 | (unsigned long)&_text - __START_KERNEL, | 837 | (unsigned long)&_text - __START_KERNEL, __START_KERNEL, |
848 | __START_KERNEL, | 838 | __START_KERNEL_map, MODULES_VADDR-1); |
849 | __START_KERNEL_map, | ||
850 | MODULES_VADDR-1); | ||
851 | else | ||
852 | pr_emerg("Kernel Offset: disabled\n"); | ||
853 | 839 | ||
854 | return 0; | 840 | return 0; |
855 | } | 841 | } |
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index 9d2073e2ecc9..4ff5d162ff9f 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -384,7 +384,7 @@ dotraplinkage void do_bounds(struct pt_regs *regs, long error_code) | |||
384 | goto exit; | 384 | goto exit; |
385 | conditional_sti(regs); | 385 | conditional_sti(regs); |
386 | 386 | ||
387 | if (!user_mode(regs)) | 387 | if (!user_mode_vm(regs)) |
388 | die("bounds", regs, error_code); | 388 | die("bounds", regs, error_code); |
389 | 389 | ||
390 | if (!cpu_feature_enabled(X86_FEATURE_MPX)) { | 390 | if (!cpu_feature_enabled(X86_FEATURE_MPX)) { |
@@ -637,7 +637,7 @@ dotraplinkage void do_debug(struct pt_regs *regs, long error_code) | |||
637 | * then it's very likely the result of an icebp/int01 trap. | 637 | * then it's very likely the result of an icebp/int01 trap. |
638 | * User wants a sigtrap for that. | 638 | * User wants a sigtrap for that. |
639 | */ | 639 | */ |
640 | if (!dr6 && user_mode(regs)) | 640 | if (!dr6 && user_mode_vm(regs)) |
641 | user_icebp = 1; | 641 | user_icebp = 1; |
642 | 642 | ||
643 | /* Catch kmemcheck conditions first of all! */ | 643 | /* Catch kmemcheck conditions first of all! */ |
diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c index 34f66e58a896..cdc6cf903078 100644 --- a/arch/x86/kernel/xsave.c +++ b/arch/x86/kernel/xsave.c | |||
@@ -379,7 +379,7 @@ int __restore_xstate_sig(void __user *buf, void __user *buf_fx, int size) | |||
379 | * thread's fpu state, reconstruct fxstate from the fsave | 379 | * thread's fpu state, reconstruct fxstate from the fsave |
380 | * header. Sanitize the copied state etc. | 380 | * header. Sanitize the copied state etc. |
381 | */ | 381 | */ |
382 | struct xsave_struct *xsave = &tsk->thread.fpu.state->xsave; | 382 | struct fpu *fpu = &tsk->thread.fpu; |
383 | struct user_i387_ia32_struct env; | 383 | struct user_i387_ia32_struct env; |
384 | int err = 0; | 384 | int err = 0; |
385 | 385 | ||
@@ -393,14 +393,15 @@ int __restore_xstate_sig(void __user *buf, void __user *buf_fx, int size) | |||
393 | */ | 393 | */ |
394 | drop_fpu(tsk); | 394 | drop_fpu(tsk); |
395 | 395 | ||
396 | if (__copy_from_user(xsave, buf_fx, state_size) || | 396 | if (__copy_from_user(&fpu->state->xsave, buf_fx, state_size) || |
397 | __copy_from_user(&env, buf, sizeof(env))) { | 397 | __copy_from_user(&env, buf, sizeof(env))) { |
398 | fpu_finit(fpu); | ||
398 | err = -1; | 399 | err = -1; |
399 | } else { | 400 | } else { |
400 | sanitize_restored_xstate(tsk, &env, xstate_bv, fx_only); | 401 | sanitize_restored_xstate(tsk, &env, xstate_bv, fx_only); |
401 | set_used_math(); | ||
402 | } | 402 | } |
403 | 403 | ||
404 | set_used_math(); | ||
404 | if (use_eager_fpu()) { | 405 | if (use_eager_fpu()) { |
405 | preempt_disable(); | 406 | preempt_disable(); |
406 | math_state_restore(); | 407 | math_state_restore(); |
diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c index cc31f7c06d3d..9541ba34126b 100644 --- a/arch/x86/kvm/i8259.c +++ b/arch/x86/kvm/i8259.c | |||
@@ -507,6 +507,7 @@ static int picdev_read(struct kvm_pic *s, | |||
507 | return -EOPNOTSUPP; | 507 | return -EOPNOTSUPP; |
508 | 508 | ||
509 | if (len != 1) { | 509 | if (len != 1) { |
510 | memset(val, 0, len); | ||
510 | pr_pic_unimpl("non byte read\n"); | 511 | pr_pic_unimpl("non byte read\n"); |
511 | return 0; | 512 | return 0; |
512 | } | 513 | } |
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index f7b20b417a3a..10a481b7674d 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -2168,7 +2168,10 @@ static void vmx_set_msr_bitmap(struct kvm_vcpu *vcpu) | |||
2168 | { | 2168 | { |
2169 | unsigned long *msr_bitmap; | 2169 | unsigned long *msr_bitmap; |
2170 | 2170 | ||
2171 | if (irqchip_in_kernel(vcpu->kvm) && apic_x2apic_mode(vcpu->arch.apic)) { | 2171 | if (is_guest_mode(vcpu)) |
2172 | msr_bitmap = vmx_msr_bitmap_nested; | ||
2173 | else if (irqchip_in_kernel(vcpu->kvm) && | ||
2174 | apic_x2apic_mode(vcpu->arch.apic)) { | ||
2172 | if (is_long_mode(vcpu)) | 2175 | if (is_long_mode(vcpu)) |
2173 | msr_bitmap = vmx_msr_bitmap_longmode_x2apic; | 2176 | msr_bitmap = vmx_msr_bitmap_longmode_x2apic; |
2174 | else | 2177 | else |
@@ -9218,9 +9221,9 @@ static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) | |||
9218 | } | 9221 | } |
9219 | 9222 | ||
9220 | if (cpu_has_vmx_msr_bitmap() && | 9223 | if (cpu_has_vmx_msr_bitmap() && |
9221 | exec_control & CPU_BASED_USE_MSR_BITMAPS && | 9224 | exec_control & CPU_BASED_USE_MSR_BITMAPS) { |
9222 | nested_vmx_merge_msr_bitmap(vcpu, vmcs12)) { | 9225 | nested_vmx_merge_msr_bitmap(vcpu, vmcs12); |
9223 | vmcs_write64(MSR_BITMAP, __pa(vmx_msr_bitmap_nested)); | 9226 | /* MSR_BITMAP will be set by following vmx_set_efer. */ |
9224 | } else | 9227 | } else |
9225 | exec_control &= ~CPU_BASED_USE_MSR_BITMAPS; | 9228 | exec_control &= ~CPU_BASED_USE_MSR_BITMAPS; |
9226 | 9229 | ||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index bd7a70be41b3..32bf19ef3115 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -2744,7 +2744,6 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) | |||
2744 | case KVM_CAP_USER_NMI: | 2744 | case KVM_CAP_USER_NMI: |
2745 | case KVM_CAP_REINJECT_CONTROL: | 2745 | case KVM_CAP_REINJECT_CONTROL: |
2746 | case KVM_CAP_IRQ_INJECT_STATUS: | 2746 | case KVM_CAP_IRQ_INJECT_STATUS: |
2747 | case KVM_CAP_IRQFD: | ||
2748 | case KVM_CAP_IOEVENTFD: | 2747 | case KVM_CAP_IOEVENTFD: |
2749 | case KVM_CAP_IOEVENTFD_NO_LENGTH: | 2748 | case KVM_CAP_IOEVENTFD_NO_LENGTH: |
2750 | case KVM_CAP_PIT2: | 2749 | case KVM_CAP_PIT2: |
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 3d2612b68694..2fb384724ebb 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -513,31 +513,6 @@ void __init pcibios_set_cache_line_size(void) | |||
513 | } | 513 | } |
514 | } | 514 | } |
515 | 515 | ||
516 | /* | ||
517 | * Some device drivers assume dev->irq won't change after calling | ||
518 | * pci_disable_device(). So delay releasing of IRQ resource to driver | ||
519 | * unbinding time. Otherwise it will break PM subsystem and drivers | ||
520 | * like xen-pciback etc. | ||
521 | */ | ||
522 | static int pci_irq_notifier(struct notifier_block *nb, unsigned long action, | ||
523 | void *data) | ||
524 | { | ||
525 | struct pci_dev *dev = to_pci_dev(data); | ||
526 | |||
527 | if (action != BUS_NOTIFY_UNBOUND_DRIVER) | ||
528 | return NOTIFY_DONE; | ||
529 | |||
530 | if (pcibios_disable_irq) | ||
531 | pcibios_disable_irq(dev); | ||
532 | |||
533 | return NOTIFY_OK; | ||
534 | } | ||
535 | |||
536 | static struct notifier_block pci_irq_nb = { | ||
537 | .notifier_call = pci_irq_notifier, | ||
538 | .priority = INT_MIN, | ||
539 | }; | ||
540 | |||
541 | int __init pcibios_init(void) | 516 | int __init pcibios_init(void) |
542 | { | 517 | { |
543 | if (!raw_pci_ops) { | 518 | if (!raw_pci_ops) { |
@@ -550,9 +525,6 @@ int __init pcibios_init(void) | |||
550 | 525 | ||
551 | if (pci_bf_sort >= pci_force_bf) | 526 | if (pci_bf_sort >= pci_force_bf) |
552 | pci_sort_breadthfirst(); | 527 | pci_sort_breadthfirst(); |
553 | |||
554 | bus_register_notifier(&pci_bus_type, &pci_irq_nb); | ||
555 | |||
556 | return 0; | 528 | return 0; |
557 | } | 529 | } |
558 | 530 | ||
@@ -711,6 +683,12 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) | |||
711 | return 0; | 683 | return 0; |
712 | } | 684 | } |
713 | 685 | ||
686 | void pcibios_disable_device (struct pci_dev *dev) | ||
687 | { | ||
688 | if (!pci_dev_msi_enabled(dev) && pcibios_disable_irq) | ||
689 | pcibios_disable_irq(dev); | ||
690 | } | ||
691 | |||
714 | int pci_ext_cfg_avail(void) | 692 | int pci_ext_cfg_avail(void) |
715 | { | 693 | { |
716 | if (raw_pci_ext_ops) | 694 | if (raw_pci_ext_ops) |
diff --git a/arch/x86/pci/intel_mid_pci.c b/arch/x86/pci/intel_mid_pci.c index efb849323c74..852aa4c92da0 100644 --- a/arch/x86/pci/intel_mid_pci.c +++ b/arch/x86/pci/intel_mid_pci.c | |||
@@ -234,10 +234,10 @@ static int intel_mid_pci_irq_enable(struct pci_dev *dev) | |||
234 | 234 | ||
235 | static void intel_mid_pci_irq_disable(struct pci_dev *dev) | 235 | static void intel_mid_pci_irq_disable(struct pci_dev *dev) |
236 | { | 236 | { |
237 | if (dev->irq_managed && dev->irq > 0) { | 237 | if (!mp_should_keep_irq(&dev->dev) && dev->irq_managed && |
238 | dev->irq > 0) { | ||
238 | mp_unmap_irq(dev->irq); | 239 | mp_unmap_irq(dev->irq); |
239 | dev->irq_managed = 0; | 240 | dev->irq_managed = 0; |
240 | dev->irq = 0; | ||
241 | } | 241 | } |
242 | } | 242 | } |
243 | 243 | ||
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c index e71b3dbd87b8..5dc6ca5e1741 100644 --- a/arch/x86/pci/irq.c +++ b/arch/x86/pci/irq.c | |||
@@ -1256,9 +1256,22 @@ static int pirq_enable_irq(struct pci_dev *dev) | |||
1256 | return 0; | 1256 | return 0; |
1257 | } | 1257 | } |
1258 | 1258 | ||
1259 | bool mp_should_keep_irq(struct device *dev) | ||
1260 | { | ||
1261 | if (dev->power.is_prepared) | ||
1262 | return true; | ||
1263 | #ifdef CONFIG_PM | ||
1264 | if (dev->power.runtime_status == RPM_SUSPENDING) | ||
1265 | return true; | ||
1266 | #endif | ||
1267 | |||
1268 | return false; | ||
1269 | } | ||
1270 | |||
1259 | static void pirq_disable_irq(struct pci_dev *dev) | 1271 | static void pirq_disable_irq(struct pci_dev *dev) |
1260 | { | 1272 | { |
1261 | if (io_apic_assign_pci_irqs && dev->irq_managed && dev->irq) { | 1273 | if (io_apic_assign_pci_irqs && !mp_should_keep_irq(&dev->dev) && |
1274 | dev->irq_managed && dev->irq) { | ||
1262 | mp_unmap_irq(dev->irq); | 1275 | mp_unmap_irq(dev->irq); |
1263 | dev->irq = 0; | 1276 | dev->irq = 0; |
1264 | dev->irq_managed = 0; | 1277 | dev->irq_managed = 0; |
diff --git a/arch/x86/vdso/vdso32/sigreturn.S b/arch/x86/vdso/vdso32/sigreturn.S index 31776d0efc8c..d7ec4e251c0a 100644 --- a/arch/x86/vdso/vdso32/sigreturn.S +++ b/arch/x86/vdso/vdso32/sigreturn.S | |||
@@ -17,6 +17,7 @@ | |||
17 | .text | 17 | .text |
18 | .globl __kernel_sigreturn | 18 | .globl __kernel_sigreturn |
19 | .type __kernel_sigreturn,@function | 19 | .type __kernel_sigreturn,@function |
20 | nop /* this guy is needed for .LSTARTFDEDLSI1 below (watch for HACK) */ | ||
20 | ALIGN | 21 | ALIGN |
21 | __kernel_sigreturn: | 22 | __kernel_sigreturn: |
22 | .LSTART_sigreturn: | 23 | .LSTART_sigreturn: |
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index 740ae3026a14..9f93af56a5fc 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c | |||
@@ -563,7 +563,7 @@ static bool alloc_p2m(unsigned long pfn) | |||
563 | if (p2m_pfn == PFN_DOWN(__pa(p2m_missing))) | 563 | if (p2m_pfn == PFN_DOWN(__pa(p2m_missing))) |
564 | p2m_init(p2m); | 564 | p2m_init(p2m); |
565 | else | 565 | else |
566 | p2m_init_identity(p2m, pfn); | 566 | p2m_init_identity(p2m, pfn & ~(P2M_PER_PAGE - 1)); |
567 | 567 | ||
568 | spin_lock_irqsave(&p2m_update_lock, flags); | 568 | spin_lock_irqsave(&p2m_update_lock, flags); |
569 | 569 | ||