diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2013-01-31 23:22:57 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2013-01-31 23:22:57 -0500 |
commit | b5831174f9d3f12a492deda6374ca96f87b694f8 (patch) | |
tree | 96aa46239200021f9545bda5836f7e80a640d88b /arch | |
parent | 40a1ef95da85843696fc3ebe5fce39b0db32669f (diff) | |
parent | 88b62b915b0b7e25870eb0604ed9a92ba4bfc9f7 (diff) |
Merge tag 'v3.8-rc6' into x86/urgent
Linux 3.8-rc6
Merged in order to add a documentation update versus new code in
upstream.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch')
107 files changed, 584 insertions, 394 deletions
diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts index 00044026ef1f..9b82facb2561 100644 --- a/arch/arm/boot/dts/armada-370-db.dts +++ b/arch/arm/boot/dts/armada-370-db.dts | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | memory { | 27 | memory { |
28 | device_type = "memory"; | 28 | device_type = "memory"; |
29 | reg = <0x00000000 0x20000000>; /* 512 MB */ | 29 | reg = <0x00000000 0x40000000>; /* 1 GB */ |
30 | }; | 30 | }; |
31 | 31 | ||
32 | soc { | 32 | soc { |
diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi index 271855a6e224..e041f42ed711 100644 --- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi | |||
@@ -50,27 +50,25 @@ | |||
50 | }; | 50 | }; |
51 | 51 | ||
52 | gpio0: gpio@d0018100 { | 52 | gpio0: gpio@d0018100 { |
53 | compatible = "marvell,armadaxp-gpio"; | 53 | compatible = "marvell,orion-gpio"; |
54 | reg = <0xd0018100 0x40>, | 54 | reg = <0xd0018100 0x40>; |
55 | <0xd0018800 0x30>; | ||
56 | ngpios = <32>; | 55 | ngpios = <32>; |
57 | gpio-controller; | 56 | gpio-controller; |
58 | #gpio-cells = <2>; | 57 | #gpio-cells = <2>; |
59 | interrupt-controller; | 58 | interrupt-controller; |
60 | #interrupts-cells = <2>; | 59 | #interrupts-cells = <2>; |
61 | interrupts = <16>, <17>, <18>, <19>; | 60 | interrupts = <82>, <83>, <84>, <85>; |
62 | }; | 61 | }; |
63 | 62 | ||
64 | gpio1: gpio@d0018140 { | 63 | gpio1: gpio@d0018140 { |
65 | compatible = "marvell,armadaxp-gpio"; | 64 | compatible = "marvell,orion-gpio"; |
66 | reg = <0xd0018140 0x40>, | 65 | reg = <0xd0018140 0x40>; |
67 | <0xd0018840 0x30>; | ||
68 | ngpios = <17>; | 66 | ngpios = <17>; |
69 | gpio-controller; | 67 | gpio-controller; |
70 | #gpio-cells = <2>; | 68 | #gpio-cells = <2>; |
71 | interrupt-controller; | 69 | interrupt-controller; |
72 | #interrupts-cells = <2>; | 70 | #interrupts-cells = <2>; |
73 | interrupts = <20>, <21>, <22>; | 71 | interrupts = <87>, <88>, <89>; |
74 | }; | 72 | }; |
75 | }; | 73 | }; |
76 | }; | 74 | }; |
diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi index 1c1937dbce73..9e23bd8c9536 100644 --- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi | |||
@@ -51,39 +51,36 @@ | |||
51 | }; | 51 | }; |
52 | 52 | ||
53 | gpio0: gpio@d0018100 { | 53 | gpio0: gpio@d0018100 { |
54 | compatible = "marvell,armadaxp-gpio"; | 54 | compatible = "marvell,orion-gpio"; |
55 | reg = <0xd0018100 0x40>, | 55 | reg = <0xd0018100 0x40>; |
56 | <0xd0018800 0x30>; | ||
57 | ngpios = <32>; | 56 | ngpios = <32>; |
58 | gpio-controller; | 57 | gpio-controller; |
59 | #gpio-cells = <2>; | 58 | #gpio-cells = <2>; |
60 | interrupt-controller; | 59 | interrupt-controller; |
61 | #interrupts-cells = <2>; | 60 | #interrupts-cells = <2>; |
62 | interrupts = <16>, <17>, <18>, <19>; | 61 | interrupts = <82>, <83>, <84>, <85>; |
63 | }; | 62 | }; |
64 | 63 | ||
65 | gpio1: gpio@d0018140 { | 64 | gpio1: gpio@d0018140 { |
66 | compatible = "marvell,armadaxp-gpio"; | 65 | compatible = "marvell,orion-gpio"; |
67 | reg = <0xd0018140 0x40>, | 66 | reg = <0xd0018140 0x40>; |
68 | <0xd0018840 0x30>; | ||
69 | ngpios = <32>; | 67 | ngpios = <32>; |
70 | gpio-controller; | 68 | gpio-controller; |
71 | #gpio-cells = <2>; | 69 | #gpio-cells = <2>; |
72 | interrupt-controller; | 70 | interrupt-controller; |
73 | #interrupts-cells = <2>; | 71 | #interrupts-cells = <2>; |
74 | interrupts = <20>, <21>, <22>, <23>; | 72 | interrupts = <87>, <88>, <89>, <90>; |
75 | }; | 73 | }; |
76 | 74 | ||
77 | gpio2: gpio@d0018180 { | 75 | gpio2: gpio@d0018180 { |
78 | compatible = "marvell,armadaxp-gpio"; | 76 | compatible = "marvell,orion-gpio"; |
79 | reg = <0xd0018180 0x40>, | 77 | reg = <0xd0018180 0x40>; |
80 | <0xd0018870 0x30>; | ||
81 | ngpios = <3>; | 78 | ngpios = <3>; |
82 | gpio-controller; | 79 | gpio-controller; |
83 | #gpio-cells = <2>; | 80 | #gpio-cells = <2>; |
84 | interrupt-controller; | 81 | interrupt-controller; |
85 | #interrupts-cells = <2>; | 82 | #interrupts-cells = <2>; |
86 | interrupts = <24>; | 83 | interrupts = <91>; |
87 | }; | 84 | }; |
88 | 85 | ||
89 | ethernet@d0034000 { | 86 | ethernet@d0034000 { |
diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi index 4905cf3a5ef8..965966110e38 100644 --- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi | |||
@@ -66,39 +66,36 @@ | |||
66 | }; | 66 | }; |
67 | 67 | ||
68 | gpio0: gpio@d0018100 { | 68 | gpio0: gpio@d0018100 { |
69 | compatible = "marvell,armadaxp-gpio"; | 69 | compatible = "marvell,orion-gpio"; |
70 | reg = <0xd0018100 0x40>, | 70 | reg = <0xd0018100 0x40>; |
71 | <0xd0018800 0x30>; | ||
72 | ngpios = <32>; | 71 | ngpios = <32>; |
73 | gpio-controller; | 72 | gpio-controller; |
74 | #gpio-cells = <2>; | 73 | #gpio-cells = <2>; |
75 | interrupt-controller; | 74 | interrupt-controller; |
76 | #interrupts-cells = <2>; | 75 | #interrupts-cells = <2>; |
77 | interrupts = <16>, <17>, <18>, <19>; | 76 | interrupts = <82>, <83>, <84>, <85>; |
78 | }; | 77 | }; |
79 | 78 | ||
80 | gpio1: gpio@d0018140 { | 79 | gpio1: gpio@d0018140 { |
81 | compatible = "marvell,armadaxp-gpio"; | 80 | compatible = "marvell,orion-gpio"; |
82 | reg = <0xd0018140 0x40>, | 81 | reg = <0xd0018140 0x40>; |
83 | <0xd0018840 0x30>; | ||
84 | ngpios = <32>; | 82 | ngpios = <32>; |
85 | gpio-controller; | 83 | gpio-controller; |
86 | #gpio-cells = <2>; | 84 | #gpio-cells = <2>; |
87 | interrupt-controller; | 85 | interrupt-controller; |
88 | #interrupts-cells = <2>; | 86 | #interrupts-cells = <2>; |
89 | interrupts = <20>, <21>, <22>, <23>; | 87 | interrupts = <87>, <88>, <89>, <90>; |
90 | }; | 88 | }; |
91 | 89 | ||
92 | gpio2: gpio@d0018180 { | 90 | gpio2: gpio@d0018180 { |
93 | compatible = "marvell,armadaxp-gpio"; | 91 | compatible = "marvell,orion-gpio"; |
94 | reg = <0xd0018180 0x40>, | 92 | reg = <0xd0018180 0x40>; |
95 | <0xd0018870 0x30>; | ||
96 | ngpios = <3>; | 93 | ngpios = <3>; |
97 | gpio-controller; | 94 | gpio-controller; |
98 | #gpio-cells = <2>; | 95 | #gpio-cells = <2>; |
99 | interrupt-controller; | 96 | interrupt-controller; |
100 | #interrupts-cells = <2>; | 97 | #interrupts-cells = <2>; |
101 | interrupts = <24>; | 98 | interrupts = <91>; |
102 | }; | 99 | }; |
103 | 100 | ||
104 | ethernet@d0034000 { | 101 | ethernet@d0034000 { |
diff --git a/arch/arm/boot/dts/at91rm9200.dtsi b/arch/arm/boot/dts/at91rm9200.dtsi index e154f242c680..222047f1ece9 100644 --- a/arch/arm/boot/dts/at91rm9200.dtsi +++ b/arch/arm/boot/dts/at91rm9200.dtsi | |||
@@ -336,8 +336,8 @@ | |||
336 | 336 | ||
337 | i2c@0 { | 337 | i2c@0 { |
338 | compatible = "i2c-gpio"; | 338 | compatible = "i2c-gpio"; |
339 | gpios = <&pioA 23 0 /* sda */ | 339 | gpios = <&pioA 25 0 /* sda */ |
340 | &pioA 24 0 /* scl */ | 340 | &pioA 26 0 /* scl */ |
341 | >; | 341 | >; |
342 | i2c-gpio,sda-open-drain; | 342 | i2c-gpio,sda-open-drain; |
343 | i2c-gpio,scl-open-drain; | 343 | i2c-gpio,scl-open-drain; |
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi index 3a47cf952146..8ecca6948d81 100644 --- a/arch/arm/boot/dts/at91sam9x5.dtsi +++ b/arch/arm/boot/dts/at91sam9x5.dtsi | |||
@@ -143,6 +143,11 @@ | |||
143 | atmel,pins = | 143 | atmel,pins = |
144 | <0 3 0x1 0x0>; /* PA3 periph A */ | 144 | <0 3 0x1 0x0>; /* PA3 periph A */ |
145 | }; | 145 | }; |
146 | |||
147 | pinctrl_usart0_sck: usart0_sck-0 { | ||
148 | atmel,pins = | ||
149 | <0 4 0x1 0x0>; /* PA4 periph A */ | ||
150 | }; | ||
146 | }; | 151 | }; |
147 | 152 | ||
148 | usart1 { | 153 | usart1 { |
@@ -154,12 +159,17 @@ | |||
154 | 159 | ||
155 | pinctrl_usart1_rts: usart1_rts-0 { | 160 | pinctrl_usart1_rts: usart1_rts-0 { |
156 | atmel,pins = | 161 | atmel,pins = |
157 | <3 27 0x3 0x0>; /* PC27 periph C */ | 162 | <2 27 0x3 0x0>; /* PC27 periph C */ |
158 | }; | 163 | }; |
159 | 164 | ||
160 | pinctrl_usart1_cts: usart1_cts-0 { | 165 | pinctrl_usart1_cts: usart1_cts-0 { |
161 | atmel,pins = | 166 | atmel,pins = |
162 | <3 28 0x3 0x0>; /* PC28 periph C */ | 167 | <2 28 0x3 0x0>; /* PC28 periph C */ |
168 | }; | ||
169 | |||
170 | pinctrl_usart1_sck: usart1_sck-0 { | ||
171 | atmel,pins = | ||
172 | <2 28 0x3 0x0>; /* PC29 periph C */ | ||
163 | }; | 173 | }; |
164 | }; | 174 | }; |
165 | 175 | ||
@@ -172,46 +182,56 @@ | |||
172 | 182 | ||
173 | pinctrl_uart2_rts: uart2_rts-0 { | 183 | pinctrl_uart2_rts: uart2_rts-0 { |
174 | atmel,pins = | 184 | atmel,pins = |
175 | <0 0 0x2 0x0>; /* PB0 periph B */ | 185 | <1 0 0x2 0x0>; /* PB0 periph B */ |
176 | }; | 186 | }; |
177 | 187 | ||
178 | pinctrl_uart2_cts: uart2_cts-0 { | 188 | pinctrl_uart2_cts: uart2_cts-0 { |
179 | atmel,pins = | 189 | atmel,pins = |
180 | <0 1 0x2 0x0>; /* PB1 periph B */ | 190 | <1 1 0x2 0x0>; /* PB1 periph B */ |
191 | }; | ||
192 | |||
193 | pinctrl_usart2_sck: usart2_sck-0 { | ||
194 | atmel,pins = | ||
195 | <1 2 0x2 0x0>; /* PB2 periph B */ | ||
181 | }; | 196 | }; |
182 | }; | 197 | }; |
183 | 198 | ||
184 | usart3 { | 199 | usart3 { |
185 | pinctrl_uart3: usart3-0 { | 200 | pinctrl_uart3: usart3-0 { |
186 | atmel,pins = | 201 | atmel,pins = |
187 | <3 23 0x2 0x1 /* PC22 periph B with pullup */ | 202 | <2 23 0x2 0x1 /* PC22 periph B with pullup */ |
188 | 3 23 0x2 0x0>; /* PC23 periph B */ | 203 | 2 23 0x2 0x0>; /* PC23 periph B */ |
189 | }; | 204 | }; |
190 | 205 | ||
191 | pinctrl_usart3_rts: usart3_rts-0 { | 206 | pinctrl_usart3_rts: usart3_rts-0 { |
192 | atmel,pins = | 207 | atmel,pins = |
193 | <3 24 0x2 0x0>; /* PC24 periph B */ | 208 | <2 24 0x2 0x0>; /* PC24 periph B */ |
194 | }; | 209 | }; |
195 | 210 | ||
196 | pinctrl_usart3_cts: usart3_cts-0 { | 211 | pinctrl_usart3_cts: usart3_cts-0 { |
197 | atmel,pins = | 212 | atmel,pins = |
198 | <3 25 0x2 0x0>; /* PC25 periph B */ | 213 | <2 25 0x2 0x0>; /* PC25 periph B */ |
214 | }; | ||
215 | |||
216 | pinctrl_usart3_sck: usart3_sck-0 { | ||
217 | atmel,pins = | ||
218 | <2 26 0x2 0x0>; /* PC26 periph B */ | ||
199 | }; | 219 | }; |
200 | }; | 220 | }; |
201 | 221 | ||
202 | uart0 { | 222 | uart0 { |
203 | pinctrl_uart0: uart0-0 { | 223 | pinctrl_uart0: uart0-0 { |
204 | atmel,pins = | 224 | atmel,pins = |
205 | <3 8 0x3 0x0 /* PC8 periph C */ | 225 | <2 8 0x3 0x0 /* PC8 periph C */ |
206 | 3 9 0x3 0x1>; /* PC9 periph C with pullup */ | 226 | 2 9 0x3 0x1>; /* PC9 periph C with pullup */ |
207 | }; | 227 | }; |
208 | }; | 228 | }; |
209 | 229 | ||
210 | uart1 { | 230 | uart1 { |
211 | pinctrl_uart1: uart1-0 { | 231 | pinctrl_uart1: uart1-0 { |
212 | atmel,pins = | 232 | atmel,pins = |
213 | <3 16 0x3 0x0 /* PC16 periph C */ | 233 | <2 16 0x3 0x0 /* PC16 periph C */ |
214 | 3 17 0x3 0x1>; /* PC17 periph C with pullup */ | 234 | 2 17 0x3 0x1>; /* PC17 periph C with pullup */ |
215 | }; | 235 | }; |
216 | }; | 236 | }; |
217 | 237 | ||
@@ -240,14 +260,14 @@ | |||
240 | 260 | ||
241 | pinctrl_macb0_rmii_mii: macb0_rmii_mii-0 { | 261 | pinctrl_macb0_rmii_mii: macb0_rmii_mii-0 { |
242 | atmel,pins = | 262 | atmel,pins = |
243 | <1 8 0x1 0x0 /* PA8 periph A */ | 263 | <1 8 0x1 0x0 /* PB8 periph A */ |
244 | 1 11 0x1 0x0 /* PA11 periph A */ | 264 | 1 11 0x1 0x0 /* PB11 periph A */ |
245 | 1 12 0x1 0x0 /* PA12 periph A */ | 265 | 1 12 0x1 0x0 /* PB12 periph A */ |
246 | 1 13 0x1 0x0 /* PA13 periph A */ | 266 | 1 13 0x1 0x0 /* PB13 periph A */ |
247 | 1 14 0x1 0x0 /* PA14 periph A */ | 267 | 1 14 0x1 0x0 /* PB14 periph A */ |
248 | 1 15 0x1 0x0 /* PA15 periph A */ | 268 | 1 15 0x1 0x0 /* PB15 periph A */ |
249 | 1 16 0x1 0x0 /* PA16 periph A */ | 269 | 1 16 0x1 0x0 /* PB16 periph A */ |
250 | 1 17 0x1 0x0>; /* PA17 periph A */ | 270 | 1 17 0x1 0x0>; /* PB17 periph A */ |
251 | }; | 271 | }; |
252 | }; | 272 | }; |
253 | 273 | ||
diff --git a/arch/arm/boot/dts/cros5250-common.dtsi b/arch/arm/boot/dts/cros5250-common.dtsi index fddd17417433..46c098017036 100644 --- a/arch/arm/boot/dts/cros5250-common.dtsi +++ b/arch/arm/boot/dts/cros5250-common.dtsi | |||
@@ -96,8 +96,8 @@ | |||
96 | fifo-depth = <0x80>; | 96 | fifo-depth = <0x80>; |
97 | card-detect-delay = <200>; | 97 | card-detect-delay = <200>; |
98 | samsung,dw-mshc-ciu-div = <3>; | 98 | samsung,dw-mshc-ciu-div = <3>; |
99 | samsung,dw-mshc-sdr-timing = <2 3 3>; | 99 | samsung,dw-mshc-sdr-timing = <2 3>; |
100 | samsung,dw-mshc-ddr-timing = <1 2 3>; | 100 | samsung,dw-mshc-ddr-timing = <1 2>; |
101 | 101 | ||
102 | slot@0 { | 102 | slot@0 { |
103 | reg = <0>; | 103 | reg = <0>; |
@@ -120,8 +120,8 @@ | |||
120 | fifo-depth = <0x80>; | 120 | fifo-depth = <0x80>; |
121 | card-detect-delay = <200>; | 121 | card-detect-delay = <200>; |
122 | samsung,dw-mshc-ciu-div = <3>; | 122 | samsung,dw-mshc-ciu-div = <3>; |
123 | samsung,dw-mshc-sdr-timing = <2 3 3>; | 123 | samsung,dw-mshc-sdr-timing = <2 3>; |
124 | samsung,dw-mshc-ddr-timing = <1 2 3>; | 124 | samsung,dw-mshc-ddr-timing = <1 2>; |
125 | 125 | ||
126 | slot@0 { | 126 | slot@0 { |
127 | reg = <0>; | 127 | reg = <0>; |
@@ -141,8 +141,8 @@ | |||
141 | fifo-depth = <0x80>; | 141 | fifo-depth = <0x80>; |
142 | card-detect-delay = <200>; | 142 | card-detect-delay = <200>; |
143 | samsung,dw-mshc-ciu-div = <3>; | 143 | samsung,dw-mshc-ciu-div = <3>; |
144 | samsung,dw-mshc-sdr-timing = <2 3 3>; | 144 | samsung,dw-mshc-sdr-timing = <2 3>; |
145 | samsung,dw-mshc-ddr-timing = <1 2 3>; | 145 | samsung,dw-mshc-ddr-timing = <1 2>; |
146 | 146 | ||
147 | slot@0 { | 147 | slot@0 { |
148 | reg = <0>; | 148 | reg = <0>; |
diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts index fed7d3f9f431..cdee96fca6e2 100644 --- a/arch/arm/boot/dts/dove-cubox.dts +++ b/arch/arm/boot/dts/dove-cubox.dts | |||
@@ -26,10 +26,15 @@ | |||
26 | }; | 26 | }; |
27 | 27 | ||
28 | &uart0 { status = "okay"; }; | 28 | &uart0 { status = "okay"; }; |
29 | &sdio0 { status = "okay"; }; | ||
30 | &sata0 { status = "okay"; }; | 29 | &sata0 { status = "okay"; }; |
31 | &i2c0 { status = "okay"; }; | 30 | &i2c0 { status = "okay"; }; |
32 | 31 | ||
32 | &sdio0 { | ||
33 | status = "okay"; | ||
34 | /* sdio0 card detect is connected to wrong pin on CuBox */ | ||
35 | cd-gpios = <&gpio0 12 1>; | ||
36 | }; | ||
37 | |||
33 | &spi0 { | 38 | &spi0 { |
34 | status = "okay"; | 39 | status = "okay"; |
35 | 40 | ||
@@ -42,9 +47,14 @@ | |||
42 | }; | 47 | }; |
43 | 48 | ||
44 | &pinctrl { | 49 | &pinctrl { |
45 | pinctrl-0 = <&pmx_gpio_18>; | 50 | pinctrl-0 = <&pmx_gpio_12 &pmx_gpio_18>; |
46 | pinctrl-names = "default"; | 51 | pinctrl-names = "default"; |
47 | 52 | ||
53 | pmx_gpio_12: pmx-gpio-12 { | ||
54 | marvell,pins = "mpp12"; | ||
55 | marvell,function = "gpio"; | ||
56 | }; | ||
57 | |||
48 | pmx_gpio_18: pmx-gpio-18 { | 58 | pmx_gpio_18: pmx-gpio-18 { |
49 | marvell,pins = "mpp18"; | 59 | marvell,pins = "mpp18"; |
50 | marvell,function = "gpio"; | 60 | marvell,function = "gpio"; |
diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts index 942d5761ca97..e05b18f3c33d 100644 --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts | |||
@@ -115,8 +115,8 @@ | |||
115 | fifo-depth = <0x80>; | 115 | fifo-depth = <0x80>; |
116 | card-detect-delay = <200>; | 116 | card-detect-delay = <200>; |
117 | samsung,dw-mshc-ciu-div = <3>; | 117 | samsung,dw-mshc-ciu-div = <3>; |
118 | samsung,dw-mshc-sdr-timing = <2 3 3>; | 118 | samsung,dw-mshc-sdr-timing = <2 3>; |
119 | samsung,dw-mshc-ddr-timing = <1 2 3>; | 119 | samsung,dw-mshc-ddr-timing = <1 2>; |
120 | 120 | ||
121 | slot@0 { | 121 | slot@0 { |
122 | reg = <0>; | 122 | reg = <0>; |
@@ -139,8 +139,8 @@ | |||
139 | fifo-depth = <0x80>; | 139 | fifo-depth = <0x80>; |
140 | card-detect-delay = <200>; | 140 | card-detect-delay = <200>; |
141 | samsung,dw-mshc-ciu-div = <3>; | 141 | samsung,dw-mshc-ciu-div = <3>; |
142 | samsung,dw-mshc-sdr-timing = <2 3 3>; | 142 | samsung,dw-mshc-sdr-timing = <2 3>; |
143 | samsung,dw-mshc-ddr-timing = <1 2 3>; | 143 | samsung,dw-mshc-ddr-timing = <1 2>; |
144 | 144 | ||
145 | slot@0 { | 145 | slot@0 { |
146 | reg = <0>; | 146 | reg = <0>; |
diff --git a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi index 9bc6785ad228..77d21abfcdf7 100644 --- a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi +++ b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi | |||
@@ -1,4 +1,5 @@ | |||
1 | /include/ "kirkwood.dtsi" | 1 | /include/ "kirkwood.dtsi" |
2 | /include/ "kirkwood-6281.dtsi" | ||
2 | 3 | ||
3 | / { | 4 | / { |
4 | chosen { | 5 | chosen { |
@@ -6,6 +7,21 @@ | |||
6 | }; | 7 | }; |
7 | 8 | ||
8 | ocp@f1000000 { | 9 | ocp@f1000000 { |
10 | pinctrl: pinctrl@10000 { | ||
11 | pinctrl-0 = < &pmx_spi &pmx_twsi0 &pmx_uart0 | ||
12 | &pmx_ns2_sata0 &pmx_ns2_sata1>; | ||
13 | pinctrl-names = "default"; | ||
14 | |||
15 | pmx_ns2_sata0: pmx-ns2-sata0 { | ||
16 | marvell,pins = "mpp21"; | ||
17 | marvell,function = "sata0"; | ||
18 | }; | ||
19 | pmx_ns2_sata1: pmx-ns2-sata1 { | ||
20 | marvell,pins = "mpp20"; | ||
21 | marvell,function = "sata1"; | ||
22 | }; | ||
23 | }; | ||
24 | |||
9 | serial@12000 { | 25 | serial@12000 { |
10 | clock-frequency = <166666667>; | 26 | clock-frequency = <166666667>; |
11 | status = "okay"; | 27 | status = "okay"; |
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi index 110d6cbb795b..d6ab442b7011 100644 --- a/arch/arm/boot/dts/kirkwood.dtsi +++ b/arch/arm/boot/dts/kirkwood.dtsi | |||
@@ -36,6 +36,7 @@ | |||
36 | reg = <0x10100 0x40>; | 36 | reg = <0x10100 0x40>; |
37 | ngpios = <32>; | 37 | ngpios = <32>; |
38 | interrupt-controller; | 38 | interrupt-controller; |
39 | #interrupt-cells = <2>; | ||
39 | interrupts = <35>, <36>, <37>, <38>; | 40 | interrupts = <35>, <36>, <37>, <38>; |
40 | }; | 41 | }; |
41 | 42 | ||
@@ -46,6 +47,7 @@ | |||
46 | reg = <0x10140 0x40>; | 47 | reg = <0x10140 0x40>; |
47 | ngpios = <18>; | 48 | ngpios = <18>; |
48 | interrupt-controller; | 49 | interrupt-controller; |
50 | #interrupt-cells = <2>; | ||
49 | interrupts = <39>, <40>, <41>; | 51 | interrupts = <39>, <40>, <41>; |
50 | }; | 52 | }; |
51 | 53 | ||
diff --git a/arch/arm/boot/dts/kizbox.dts b/arch/arm/boot/dts/kizbox.dts index e8814fe0e277..b4dc3ed9a3ec 100644 --- a/arch/arm/boot/dts/kizbox.dts +++ b/arch/arm/boot/dts/kizbox.dts | |||
@@ -48,6 +48,8 @@ | |||
48 | 48 | ||
49 | macb0: ethernet@fffc4000 { | 49 | macb0: ethernet@fffc4000 { |
50 | phy-mode = "mii"; | 50 | phy-mode = "mii"; |
51 | pinctrl-0 = <&pinctrl_macb_rmii | ||
52 | &pinctrl_macb_rmii_mii_alt>; | ||
51 | status = "okay"; | 53 | status = "okay"; |
52 | }; | 54 | }; |
53 | 55 | ||
diff --git a/arch/arm/boot/dts/sunxi.dtsi b/arch/arm/boot/dts/sunxi.dtsi index 8bbc2bfef221..8b36abea9f2e 100644 --- a/arch/arm/boot/dts/sunxi.dtsi +++ b/arch/arm/boot/dts/sunxi.dtsi | |||
@@ -60,19 +60,21 @@ | |||
60 | }; | 60 | }; |
61 | 61 | ||
62 | uart0: uart@01c28000 { | 62 | uart0: uart@01c28000 { |
63 | compatible = "ns8250"; | 63 | compatible = "snps,dw-apb-uart"; |
64 | reg = <0x01c28000 0x400>; | 64 | reg = <0x01c28000 0x400>; |
65 | interrupts = <1>; | 65 | interrupts = <1>; |
66 | reg-shift = <2>; | 66 | reg-shift = <2>; |
67 | reg-io-width = <4>; | ||
67 | clock-frequency = <24000000>; | 68 | clock-frequency = <24000000>; |
68 | status = "disabled"; | 69 | status = "disabled"; |
69 | }; | 70 | }; |
70 | 71 | ||
71 | uart1: uart@01c28400 { | 72 | uart1: uart@01c28400 { |
72 | compatible = "ns8250"; | 73 | compatible = "snps,dw-apb-uart"; |
73 | reg = <0x01c28400 0x400>; | 74 | reg = <0x01c28400 0x400>; |
74 | interrupts = <2>; | 75 | interrupts = <2>; |
75 | reg-shift = <2>; | 76 | reg-shift = <2>; |
77 | reg-io-width = <4>; | ||
76 | clock-frequency = <24000000>; | 78 | clock-frequency = <24000000>; |
77 | status = "disabled"; | 79 | status = "disabled"; |
78 | }; | 80 | }; |
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts b/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts index 1fc405a9ecfb..cf8071ad22d5 100644 --- a/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts +++ b/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts | |||
@@ -45,7 +45,6 @@ | |||
45 | reg = <1>; | 45 | reg = <1>; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | /* A7s disabled till big.LITTLE patches are available... | ||
49 | cpu2: cpu@2 { | 48 | cpu2: cpu@2 { |
50 | device_type = "cpu"; | 49 | device_type = "cpu"; |
51 | compatible = "arm,cortex-a7"; | 50 | compatible = "arm,cortex-a7"; |
@@ -63,7 +62,6 @@ | |||
63 | compatible = "arm,cortex-a7"; | 62 | compatible = "arm,cortex-a7"; |
64 | reg = <0x102>; | 63 | reg = <0x102>; |
65 | }; | 64 | }; |
66 | */ | ||
67 | }; | 65 | }; |
68 | 66 | ||
69 | memory@80000000 { | 67 | memory@80000000 { |
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig index b175577d7abb..1ea959019fcd 100644 --- a/arch/arm/configs/at91_dt_defconfig +++ b/arch/arm/configs/at91_dt_defconfig | |||
@@ -19,6 +19,7 @@ CONFIG_SOC_AT91SAM9260=y | |||
19 | CONFIG_SOC_AT91SAM9263=y | 19 | CONFIG_SOC_AT91SAM9263=y |
20 | CONFIG_SOC_AT91SAM9G45=y | 20 | CONFIG_SOC_AT91SAM9G45=y |
21 | CONFIG_SOC_AT91SAM9X5=y | 21 | CONFIG_SOC_AT91SAM9X5=y |
22 | CONFIG_SOC_AT91SAM9N12=y | ||
22 | CONFIG_MACH_AT91SAM_DT=y | 23 | CONFIG_MACH_AT91SAM_DT=y |
23 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y | 24 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y |
24 | CONFIG_AT91_TIMER_HZ=128 | 25 | CONFIG_AT91_TIMER_HZ=128 |
@@ -31,7 +32,7 @@ CONFIG_ZBOOT_ROM_TEXT=0x0 | |||
31 | CONFIG_ZBOOT_ROM_BSS=0x0 | 32 | CONFIG_ZBOOT_ROM_BSS=0x0 |
32 | CONFIG_ARM_APPENDED_DTB=y | 33 | CONFIG_ARM_APPENDED_DTB=y |
33 | CONFIG_ARM_ATAG_DTB_COMPAT=y | 34 | CONFIG_ARM_ATAG_DTB_COMPAT=y |
34 | CONFIG_CMDLINE="mem=128M console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw" | 35 | CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw" |
35 | CONFIG_KEXEC=y | 36 | CONFIG_KEXEC=y |
36 | CONFIG_AUTO_ZRELADDR=y | 37 | CONFIG_AUTO_ZRELADDR=y |
37 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 38 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index 6809200c31fb..14f7c3b14632 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S | |||
@@ -100,12 +100,14 @@ ENTRY(printch) | |||
100 | b 1b | 100 | b 1b |
101 | ENDPROC(printch) | 101 | ENDPROC(printch) |
102 | 102 | ||
103 | #ifdef CONFIG_MMU | ||
103 | ENTRY(debug_ll_addr) | 104 | ENTRY(debug_ll_addr) |
104 | addruart r2, r3, ip | 105 | addruart r2, r3, ip |
105 | str r2, [r0] | 106 | str r2, [r0] |
106 | str r3, [r1] | 107 | str r3, [r1] |
107 | mov pc, lr | 108 | mov pc, lr |
108 | ENDPROC(debug_ll_addr) | 109 | ENDPROC(debug_ll_addr) |
110 | #endif | ||
109 | 111 | ||
110 | #else | 112 | #else |
111 | 113 | ||
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 4eee351f4668..486a15ae9011 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -246,6 +246,7 @@ __create_page_tables: | |||
246 | 246 | ||
247 | /* | 247 | /* |
248 | * Then map boot params address in r2 if specified. | 248 | * Then map boot params address in r2 if specified. |
249 | * We map 2 sections in case the ATAGs/DTB crosses a section boundary. | ||
249 | */ | 250 | */ |
250 | mov r0, r2, lsr #SECTION_SHIFT | 251 | mov r0, r2, lsr #SECTION_SHIFT |
251 | movs r0, r0, lsl #SECTION_SHIFT | 252 | movs r0, r0, lsl #SECTION_SHIFT |
@@ -253,6 +254,8 @@ __create_page_tables: | |||
253 | addne r3, r3, #PAGE_OFFSET | 254 | addne r3, r3, #PAGE_OFFSET |
254 | addne r3, r4, r3, lsr #(SECTION_SHIFT - PMD_ORDER) | 255 | addne r3, r4, r3, lsr #(SECTION_SHIFT - PMD_ORDER) |
255 | orrne r6, r7, r0 | 256 | orrne r6, r7, r0 |
257 | strne r6, [r3], #1 << PMD_ORDER | ||
258 | addne r6, r6, #1 << SECTION_SHIFT | ||
256 | strne r6, [r3] | 259 | strne r6, [r3] |
257 | 260 | ||
258 | #ifdef CONFIG_DEBUG_LL | 261 | #ifdef CONFIG_DEBUG_LL |
@@ -331,7 +334,7 @@ ENTRY(secondary_startup) | |||
331 | * as it has already been validated by the primary processor. | 334 | * as it has already been validated by the primary processor. |
332 | */ | 335 | */ |
333 | #ifdef CONFIG_ARM_VIRT_EXT | 336 | #ifdef CONFIG_ARM_VIRT_EXT |
334 | bl __hyp_stub_install | 337 | bl __hyp_stub_install_secondary |
335 | #endif | 338 | #endif |
336 | safe_svcmode_maskall r9 | 339 | safe_svcmode_maskall r9 |
337 | 340 | ||
diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S index 65b2417aebce..1315c4ccfa56 100644 --- a/arch/arm/kernel/hyp-stub.S +++ b/arch/arm/kernel/hyp-stub.S | |||
@@ -99,7 +99,7 @@ ENTRY(__hyp_stub_install_secondary) | |||
99 | * immediately. | 99 | * immediately. |
100 | */ | 100 | */ |
101 | compare_cpu_mode_with_primary r4, r5, r6, r7 | 101 | compare_cpu_mode_with_primary r4, r5, r6, r7 |
102 | bxne lr | 102 | movne pc, lr |
103 | 103 | ||
104 | /* | 104 | /* |
105 | * Once we have given up on one CPU, we do not try to install the | 105 | * Once we have given up on one CPU, we do not try to install the |
@@ -111,7 +111,7 @@ ENTRY(__hyp_stub_install_secondary) | |||
111 | */ | 111 | */ |
112 | 112 | ||
113 | cmp r4, #HYP_MODE | 113 | cmp r4, #HYP_MODE |
114 | bxne lr @ give up if the CPU is not in HYP mode | 114 | movne pc, lr @ give up if the CPU is not in HYP mode |
115 | 115 | ||
116 | /* | 116 | /* |
117 | * Configure HSCTLR to set correct exception endianness/instruction set | 117 | * Configure HSCTLR to set correct exception endianness/instruction set |
@@ -120,7 +120,8 @@ ENTRY(__hyp_stub_install_secondary) | |||
120 | * Eventually, CPU-specific code might be needed -- assume not for now | 120 | * Eventually, CPU-specific code might be needed -- assume not for now |
121 | * | 121 | * |
122 | * This code relies on the "eret" instruction to synchronize the | 122 | * This code relies on the "eret" instruction to synchronize the |
123 | * various coprocessor accesses. | 123 | * various coprocessor accesses. This is done when we switch to SVC |
124 | * (see safe_svcmode_maskall). | ||
124 | */ | 125 | */ |
125 | @ Now install the hypervisor stub: | 126 | @ Now install the hypervisor stub: |
126 | adr r7, __hyp_stub_vectors | 127 | adr r7, __hyp_stub_vectors |
@@ -155,14 +156,7 @@ THUMB( orr r7, #(1 << 30) ) @ HSCTLR.TE | |||
155 | 1: | 156 | 1: |
156 | #endif | 157 | #endif |
157 | 158 | ||
158 | bic r7, r4, #MODE_MASK | 159 | bx lr @ The boot CPU mode is left in r4. |
159 | orr r7, r7, #SVC_MODE | ||
160 | THUMB( orr r7, r7, #PSR_T_BIT ) | ||
161 | msr spsr_cxsf, r7 @ This is SPSR_hyp. | ||
162 | |||
163 | __MSR_ELR_HYP(14) @ msr elr_hyp, lr | ||
164 | __ERET @ return, switching to SVC mode | ||
165 | @ The boot CPU mode is left in r4. | ||
166 | ENDPROC(__hyp_stub_install_secondary) | 160 | ENDPROC(__hyp_stub_install_secondary) |
167 | 161 | ||
168 | __hyp_stub_do_trap: | 162 | __hyp_stub_do_trap: |
@@ -200,7 +194,7 @@ ENDPROC(__hyp_get_vectors) | |||
200 | @ fall through | 194 | @ fall through |
201 | ENTRY(__hyp_set_vectors) | 195 | ENTRY(__hyp_set_vectors) |
202 | __HVC(0) | 196 | __HVC(0) |
203 | bx lr | 197 | mov pc, lr |
204 | ENDPROC(__hyp_set_vectors) | 198 | ENDPROC(__hyp_set_vectors) |
205 | 199 | ||
206 | #ifndef ZIMAGE | 200 | #ifndef ZIMAGE |
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index 9ee866ce0478..4b678478cf95 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c | |||
@@ -105,6 +105,8 @@ static void __init soc_detect(u32 dbgu_base) | |||
105 | switch (socid) { | 105 | switch (socid) { |
106 | case ARCH_ID_AT91RM9200: | 106 | case ARCH_ID_AT91RM9200: |
107 | at91_soc_initdata.type = AT91_SOC_RM9200; | 107 | at91_soc_initdata.type = AT91_SOC_RM9200; |
108 | if (at91_soc_initdata.subtype == AT91_SOC_SUBTYPE_NONE) | ||
109 | at91_soc_initdata.subtype = AT91_SOC_RM9200_BGA; | ||
108 | at91_boot_soc = at91rm9200_soc; | 110 | at91_boot_soc = at91rm9200_soc; |
109 | break; | 111 | break; |
110 | 112 | ||
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 3e628fd7a674..0a2349dc7018 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -851,6 +851,7 @@ config SOC_IMX6Q | |||
851 | select HAVE_CAN_FLEXCAN if CAN | 851 | select HAVE_CAN_FLEXCAN if CAN |
852 | select HAVE_IMX_GPC | 852 | select HAVE_IMX_GPC |
853 | select HAVE_IMX_MMDC | 853 | select HAVE_IMX_MMDC |
854 | select HAVE_IMX_SRC | ||
854 | select HAVE_SMP | 855 | select HAVE_SMP |
855 | select MFD_SYSCON | 856 | select MFD_SYSCON |
856 | select PINCTRL | 857 | select PINCTRL |
diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c index b197aa73dc4b..2c570cdaae7b 100644 --- a/arch/arm/mach-imx/clk-imx25.c +++ b/arch/arm/mach-imx/clk-imx25.c | |||
@@ -254,9 +254,9 @@ int __init mx25_clocks_init(void) | |||
254 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); | 254 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); |
255 | clk_register_clkdev(clk[usbotg_ahb], "ahb", "mxc-ehci.2"); | 255 | clk_register_clkdev(clk[usbotg_ahb], "ahb", "mxc-ehci.2"); |
256 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2"); | 256 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2"); |
257 | clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc"); | 257 | clk_register_clkdev(clk[ipg], "ipg", "imx-udc-mx27"); |
258 | clk_register_clkdev(clk[usbotg_ahb], "ahb", "fsl-usb2-udc"); | 258 | clk_register_clkdev(clk[usbotg_ahb], "ahb", "imx-udc-mx27"); |
259 | clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); | 259 | clk_register_clkdev(clk[usb_div], "per", "imx-udc-mx27"); |
260 | clk_register_clkdev(clk[nfc_ipg_per], NULL, "imx25-nand.0"); | 260 | clk_register_clkdev(clk[nfc_ipg_per], NULL, "imx25-nand.0"); |
261 | /* i.mx25 has the i.mx35 type cspi */ | 261 | /* i.mx25 has the i.mx35 type cspi */ |
262 | clk_register_clkdev(clk[cspi1_ipg], NULL, "imx35-cspi.0"); | 262 | clk_register_clkdev(clk[cspi1_ipg], NULL, "imx35-cspi.0"); |
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c index 4c1d1e4efc74..1ffe3b534e51 100644 --- a/arch/arm/mach-imx/clk-imx27.c +++ b/arch/arm/mach-imx/clk-imx27.c | |||
@@ -236,9 +236,9 @@ int __init mx27_clocks_init(unsigned long fref) | |||
236 | clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0"); | 236 | clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0"); |
237 | clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0"); | 237 | clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0"); |
238 | clk_register_clkdev(clk[per4_gate], "per", "imx27-camera.0"); | 238 | clk_register_clkdev(clk[per4_gate], "per", "imx27-camera.0"); |
239 | clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); | 239 | clk_register_clkdev(clk[usb_div], "per", "imx-udc-mx27"); |
240 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc"); | 240 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "imx-udc-mx27"); |
241 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc"); | 241 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "imx-udc-mx27"); |
242 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.0"); | 242 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.0"); |
243 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "mxc-ehci.0"); | 243 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "mxc-ehci.0"); |
244 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.0"); | 244 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.0"); |
diff --git a/arch/arm/mach-imx/clk-imx31.c b/arch/arm/mach-imx/clk-imx31.c index 8be64e0a4ace..16ccbd41dea9 100644 --- a/arch/arm/mach-imx/clk-imx31.c +++ b/arch/arm/mach-imx/clk-imx31.c | |||
@@ -139,9 +139,9 @@ int __init mx31_clocks_init(unsigned long fref) | |||
139 | clk_register_clkdev(clk[usb_div_post], "per", "mxc-ehci.2"); | 139 | clk_register_clkdev(clk[usb_div_post], "per", "mxc-ehci.2"); |
140 | clk_register_clkdev(clk[usb_gate], "ahb", "mxc-ehci.2"); | 140 | clk_register_clkdev(clk[usb_gate], "ahb", "mxc-ehci.2"); |
141 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); | 141 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); |
142 | clk_register_clkdev(clk[usb_div_post], "per", "fsl-usb2-udc"); | 142 | clk_register_clkdev(clk[usb_div_post], "per", "imx-udc-mx27"); |
143 | clk_register_clkdev(clk[usb_gate], "ahb", "fsl-usb2-udc"); | 143 | clk_register_clkdev(clk[usb_gate], "ahb", "imx-udc-mx27"); |
144 | clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc"); | 144 | clk_register_clkdev(clk[ipg], "ipg", "imx-udc-mx27"); |
145 | clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0"); | 145 | clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0"); |
146 | /* i.mx31 has the i.mx21 type uart */ | 146 | /* i.mx31 has the i.mx21 type uart */ |
147 | clk_register_clkdev(clk[uart1_gate], "per", "imx21-uart.0"); | 147 | clk_register_clkdev(clk[uart1_gate], "per", "imx21-uart.0"); |
diff --git a/arch/arm/mach-imx/clk-imx35.c b/arch/arm/mach-imx/clk-imx35.c index 66f3d65ea275..f0727e80815d 100644 --- a/arch/arm/mach-imx/clk-imx35.c +++ b/arch/arm/mach-imx/clk-imx35.c | |||
@@ -251,9 +251,9 @@ int __init mx35_clocks_init() | |||
251 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2"); | 251 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2"); |
252 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); | 252 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); |
253 | clk_register_clkdev(clk[usbotg_gate], "ahb", "mxc-ehci.2"); | 253 | clk_register_clkdev(clk[usbotg_gate], "ahb", "mxc-ehci.2"); |
254 | clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); | 254 | clk_register_clkdev(clk[usb_div], "per", "imx-udc-mx27"); |
255 | clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc"); | 255 | clk_register_clkdev(clk[ipg], "ipg", "imx-udc-mx27"); |
256 | clk_register_clkdev(clk[usbotg_gate], "ahb", "fsl-usb2-udc"); | 256 | clk_register_clkdev(clk[usbotg_gate], "ahb", "imx-udc-mx27"); |
257 | clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0"); | 257 | clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0"); |
258 | clk_register_clkdev(clk[nfc_div], NULL, "imx25-nand.0"); | 258 | clk_register_clkdev(clk[nfc_div], NULL, "imx25-nand.0"); |
259 | clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0"); | 259 | clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0"); |
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c index 579023f59dc1..fb7cb841b64c 100644 --- a/arch/arm/mach-imx/clk-imx51-imx53.c +++ b/arch/arm/mach-imx/clk-imx51-imx53.c | |||
@@ -269,9 +269,9 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil, | |||
269 | clk_register_clkdev(clk[usboh3_per_gate], "per", "mxc-ehci.2"); | 269 | clk_register_clkdev(clk[usboh3_per_gate], "per", "mxc-ehci.2"); |
270 | clk_register_clkdev(clk[usboh3_gate], "ipg", "mxc-ehci.2"); | 270 | clk_register_clkdev(clk[usboh3_gate], "ipg", "mxc-ehci.2"); |
271 | clk_register_clkdev(clk[usboh3_gate], "ahb", "mxc-ehci.2"); | 271 | clk_register_clkdev(clk[usboh3_gate], "ahb", "mxc-ehci.2"); |
272 | clk_register_clkdev(clk[usboh3_per_gate], "per", "fsl-usb2-udc"); | 272 | clk_register_clkdev(clk[usboh3_per_gate], "per", "imx-udc-mx51"); |
273 | clk_register_clkdev(clk[usboh3_gate], "ipg", "fsl-usb2-udc"); | 273 | clk_register_clkdev(clk[usboh3_gate], "ipg", "imx-udc-mx51"); |
274 | clk_register_clkdev(clk[usboh3_gate], "ahb", "fsl-usb2-udc"); | 274 | clk_register_clkdev(clk[usboh3_gate], "ahb", "imx-udc-mx51"); |
275 | clk_register_clkdev(clk[nfc_gate], NULL, "imx51-nand"); | 275 | clk_register_clkdev(clk[nfc_gate], NULL, "imx51-nand"); |
276 | clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0"); | 276 | clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0"); |
277 | clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1"); | 277 | clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1"); |
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 7f2c10c7413a..c0c4e723b7f5 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
@@ -436,6 +436,9 @@ int __init mx6q_clocks_init(void) | |||
436 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) | 436 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) |
437 | clk_prepare_enable(clk[clks_init_on[i]]); | 437 | clk_prepare_enable(clk[clks_init_on[i]]); |
438 | 438 | ||
439 | /* Set initial power mode */ | ||
440 | imx6q_set_lpm(WAIT_CLOCKED); | ||
441 | |||
439 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); | 442 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); |
440 | base = of_iomap(np, 0); | 443 | base = of_iomap(np, 0); |
441 | WARN_ON(!base); | 444 | WARN_ON(!base); |
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index 7191ab4434e5..fa36fb84ab19 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h | |||
@@ -142,6 +142,7 @@ extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode); | |||
142 | extern void imx6q_clock_map_io(void); | 142 | extern void imx6q_clock_map_io(void); |
143 | 143 | ||
144 | extern void imx_cpu_die(unsigned int cpu); | 144 | extern void imx_cpu_die(unsigned int cpu); |
145 | extern int imx_cpu_kill(unsigned int cpu); | ||
145 | 146 | ||
146 | #ifdef CONFIG_PM | 147 | #ifdef CONFIG_PM |
147 | extern void imx6q_pm_init(void); | 148 | extern void imx6q_pm_init(void); |
diff --git a/arch/arm/mach-imx/devices/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h index 6277baf1b7be..9bd5777ff0e7 100644 --- a/arch/arm/mach-imx/devices/devices-common.h +++ b/arch/arm/mach-imx/devices/devices-common.h | |||
@@ -63,6 +63,7 @@ struct platform_device *__init imx_add_flexcan( | |||
63 | 63 | ||
64 | #include <linux/fsl_devices.h> | 64 | #include <linux/fsl_devices.h> |
65 | struct imx_fsl_usb2_udc_data { | 65 | struct imx_fsl_usb2_udc_data { |
66 | const char *devid; | ||
66 | resource_size_t iobase; | 67 | resource_size_t iobase; |
67 | resource_size_t irq; | 68 | resource_size_t irq; |
68 | }; | 69 | }; |
diff --git a/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c b/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c index 37e44398197b..3c06bd96e9cc 100644 --- a/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c +++ b/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c | |||
@@ -11,35 +11,36 @@ | |||
11 | #include "../hardware.h" | 11 | #include "../hardware.h" |
12 | #include "devices-common.h" | 12 | #include "devices-common.h" |
13 | 13 | ||
14 | #define imx_fsl_usb2_udc_data_entry_single(soc) \ | 14 | #define imx_fsl_usb2_udc_data_entry_single(soc, _devid) \ |
15 | { \ | 15 | { \ |
16 | .devid = _devid, \ | ||
16 | .iobase = soc ## _USB_OTG_BASE_ADDR, \ | 17 | .iobase = soc ## _USB_OTG_BASE_ADDR, \ |
17 | .irq = soc ## _INT_USB_OTG, \ | 18 | .irq = soc ## _INT_USB_OTG, \ |
18 | } | 19 | } |
19 | 20 | ||
20 | #ifdef CONFIG_SOC_IMX25 | 21 | #ifdef CONFIG_SOC_IMX25 |
21 | const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data __initconst = | 22 | const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data __initconst = |
22 | imx_fsl_usb2_udc_data_entry_single(MX25); | 23 | imx_fsl_usb2_udc_data_entry_single(MX25, "imx-udc-mx27"); |
23 | #endif /* ifdef CONFIG_SOC_IMX25 */ | 24 | #endif /* ifdef CONFIG_SOC_IMX25 */ |
24 | 25 | ||
25 | #ifdef CONFIG_SOC_IMX27 | 26 | #ifdef CONFIG_SOC_IMX27 |
26 | const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data __initconst = | 27 | const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data __initconst = |
27 | imx_fsl_usb2_udc_data_entry_single(MX27); | 28 | imx_fsl_usb2_udc_data_entry_single(MX27, "imx-udc-mx27"); |
28 | #endif /* ifdef CONFIG_SOC_IMX27 */ | 29 | #endif /* ifdef CONFIG_SOC_IMX27 */ |
29 | 30 | ||
30 | #ifdef CONFIG_SOC_IMX31 | 31 | #ifdef CONFIG_SOC_IMX31 |
31 | const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data __initconst = | 32 | const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data __initconst = |
32 | imx_fsl_usb2_udc_data_entry_single(MX31); | 33 | imx_fsl_usb2_udc_data_entry_single(MX31, "imx-udc-mx27"); |
33 | #endif /* ifdef CONFIG_SOC_IMX31 */ | 34 | #endif /* ifdef CONFIG_SOC_IMX31 */ |
34 | 35 | ||
35 | #ifdef CONFIG_SOC_IMX35 | 36 | #ifdef CONFIG_SOC_IMX35 |
36 | const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst = | 37 | const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst = |
37 | imx_fsl_usb2_udc_data_entry_single(MX35); | 38 | imx_fsl_usb2_udc_data_entry_single(MX35, "imx-udc-mx27"); |
38 | #endif /* ifdef CONFIG_SOC_IMX35 */ | 39 | #endif /* ifdef CONFIG_SOC_IMX35 */ |
39 | 40 | ||
40 | #ifdef CONFIG_SOC_IMX51 | 41 | #ifdef CONFIG_SOC_IMX51 |
41 | const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data __initconst = | 42 | const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data __initconst = |
42 | imx_fsl_usb2_udc_data_entry_single(MX51); | 43 | imx_fsl_usb2_udc_data_entry_single(MX51, "imx-udc-mx51"); |
43 | #endif | 44 | #endif |
44 | 45 | ||
45 | struct platform_device *__init imx_add_fsl_usb2_udc( | 46 | struct platform_device *__init imx_add_fsl_usb2_udc( |
@@ -57,7 +58,7 @@ struct platform_device *__init imx_add_fsl_usb2_udc( | |||
57 | .flags = IORESOURCE_IRQ, | 58 | .flags = IORESOURCE_IRQ, |
58 | }, | 59 | }, |
59 | }; | 60 | }; |
60 | return imx_add_platform_device_dmamask("fsl-usb2-udc", -1, | 61 | return imx_add_platform_device_dmamask(data->devid, -1, |
61 | res, ARRAY_SIZE(res), | 62 | res, ARRAY_SIZE(res), |
62 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | 63 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); |
63 | } | 64 | } |
diff --git a/arch/arm/mach-imx/devices/platform-imx-fb.c b/arch/arm/mach-imx/devices/platform-imx-fb.c index 10b0ed39f07f..25a47c616b2d 100644 --- a/arch/arm/mach-imx/devices/platform-imx-fb.c +++ b/arch/arm/mach-imx/devices/platform-imx-fb.c | |||
@@ -54,7 +54,7 @@ struct platform_device *__init imx_add_imx_fb( | |||
54 | .flags = IORESOURCE_IRQ, | 54 | .flags = IORESOURCE_IRQ, |
55 | }, | 55 | }, |
56 | }; | 56 | }; |
57 | return imx_add_platform_device_dmamask("imx-fb", 0, | 57 | return imx_add_platform_device_dmamask(data->devid, 0, |
58 | res, ARRAY_SIZE(res), | 58 | res, ARRAY_SIZE(res), |
59 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | 59 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); |
60 | } | 60 | } |
diff --git a/arch/arm/mach-imx/hotplug.c b/arch/arm/mach-imx/hotplug.c index 3dec962b0770..7bc5fe15dda2 100644 --- a/arch/arm/mach-imx/hotplug.c +++ b/arch/arm/mach-imx/hotplug.c | |||
@@ -46,9 +46,11 @@ static inline void cpu_enter_lowpower(void) | |||
46 | void imx_cpu_die(unsigned int cpu) | 46 | void imx_cpu_die(unsigned int cpu) |
47 | { | 47 | { |
48 | cpu_enter_lowpower(); | 48 | cpu_enter_lowpower(); |
49 | imx_enable_cpu(cpu, false); | 49 | cpu_do_idle(); |
50 | } | ||
50 | 51 | ||
51 | /* spin here until hardware takes it down */ | 52 | int imx_cpu_kill(unsigned int cpu) |
52 | while (1) | 53 | { |
53 | ; | 54 | imx_enable_cpu(cpu, false); |
55 | return 1; | ||
54 | } | 56 | } |
diff --git a/arch/arm/mach-imx/iram.h b/arch/arm/mach-imx/iram.h deleted file mode 100644 index 022690c33702..000000000000 --- a/arch/arm/mach-imx/iram.h +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | #include <linux/errno.h> | ||
20 | |||
21 | #ifdef CONFIG_IRAM_ALLOC | ||
22 | |||
23 | int __init iram_init(unsigned long base, unsigned long size); | ||
24 | void __iomem *iram_alloc(unsigned int size, unsigned long *dma_addr); | ||
25 | void iram_free(unsigned long dma_addr, unsigned int size); | ||
26 | |||
27 | #else | ||
28 | |||
29 | static inline int __init iram_init(unsigned long base, unsigned long size) | ||
30 | { | ||
31 | return -ENOMEM; | ||
32 | } | ||
33 | |||
34 | static inline void __iomem *iram_alloc(unsigned int size, unsigned long *dma_addr) | ||
35 | { | ||
36 | return NULL; | ||
37 | } | ||
38 | |||
39 | static inline void iram_free(unsigned long base, unsigned long size) {} | ||
40 | |||
41 | #endif | ||
diff --git a/arch/arm/mach-imx/iram_alloc.c b/arch/arm/mach-imx/iram_alloc.c index 6c80424f678e..e05cf407db65 100644 --- a/arch/arm/mach-imx/iram_alloc.c +++ b/arch/arm/mach-imx/iram_alloc.c | |||
@@ -22,8 +22,7 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
24 | #include <linux/genalloc.h> | 24 | #include <linux/genalloc.h> |
25 | 25 | #include "linux/platform_data/imx-iram.h" | |
26 | #include "iram.h" | ||
27 | 26 | ||
28 | static unsigned long iram_phys_base; | 27 | static unsigned long iram_phys_base; |
29 | static void __iomem *iram_virt_base; | 28 | static void __iomem *iram_virt_base; |
diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c index 3777b805b76b..66fae885c842 100644 --- a/arch/arm/mach-imx/platsmp.c +++ b/arch/arm/mach-imx/platsmp.c | |||
@@ -92,5 +92,6 @@ struct smp_operations imx_smp_ops __initdata = { | |||
92 | .smp_boot_secondary = imx_boot_secondary, | 92 | .smp_boot_secondary = imx_boot_secondary, |
93 | #ifdef CONFIG_HOTPLUG_CPU | 93 | #ifdef CONFIG_HOTPLUG_CPU |
94 | .cpu_die = imx_cpu_die, | 94 | .cpu_die = imx_cpu_die, |
95 | .cpu_kill = imx_cpu_kill, | ||
95 | #endif | 96 | #endif |
96 | }; | 97 | }; |
diff --git a/arch/arm/mach-imx/pm-imx6q.c b/arch/arm/mach-imx/pm-imx6q.c index a17543da602d..ee42d20cba19 100644 --- a/arch/arm/mach-imx/pm-imx6q.c +++ b/arch/arm/mach-imx/pm-imx6q.c | |||
@@ -41,6 +41,7 @@ static int imx6q_pm_enter(suspend_state_t state) | |||
41 | cpu_suspend(0, imx6q_suspend_finish); | 41 | cpu_suspend(0, imx6q_suspend_finish); |
42 | imx_smp_prepare(); | 42 | imx_smp_prepare(); |
43 | imx_gpc_post_resume(); | 43 | imx_gpc_post_resume(); |
44 | imx6q_set_lpm(WAIT_CLOCKED); | ||
44 | break; | 45 | break; |
45 | default: | 46 | default: |
46 | return -EINVAL; | 47 | return -EINVAL; |
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index be50e795536d..e7fcea7f3300 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c | |||
@@ -475,13 +475,12 @@ int __init pci_v3_setup(int nr, struct pci_sys_data *sys) | |||
475 | { | 475 | { |
476 | int ret = 0; | 476 | int ret = 0; |
477 | 477 | ||
478 | if (!ap_syscon_base) | ||
479 | return -EINVAL; | ||
480 | |||
478 | if (nr == 0) { | 481 | if (nr == 0) { |
479 | sys->mem_offset = PHYS_PCI_MEM_BASE; | 482 | sys->mem_offset = PHYS_PCI_MEM_BASE; |
480 | ret = pci_v3_setup_resources(sys); | 483 | ret = pci_v3_setup_resources(sys); |
481 | /* Remap the Integrator system controller */ | ||
482 | ap_syscon_base = ioremap(INTEGRATOR_SC_BASE, 0x100); | ||
483 | if (!ap_syscon_base) | ||
484 | return -EINVAL; | ||
485 | } | 484 | } |
486 | 485 | ||
487 | return ret; | 486 | return ret; |
@@ -497,6 +496,13 @@ void __init pci_v3_preinit(void) | |||
497 | unsigned int temp; | 496 | unsigned int temp; |
498 | int ret; | 497 | int ret; |
499 | 498 | ||
499 | /* Remap the Integrator system controller */ | ||
500 | ap_syscon_base = ioremap(INTEGRATOR_SC_BASE, 0x100); | ||
501 | if (!ap_syscon_base) { | ||
502 | pr_err("unable to remap the AP syscon for PCIv3\n"); | ||
503 | return; | ||
504 | } | ||
505 | |||
500 | pcibios_min_mem = 0x00100000; | 506 | pcibios_min_mem = 0x00100000; |
501 | 507 | ||
502 | /* | 508 | /* |
diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c index 8821720ab5a4..f4632a809f68 100644 --- a/arch/arm/mach-kirkwood/board-ns2.c +++ b/arch/arm/mach-kirkwood/board-ns2.c | |||
@@ -18,47 +18,11 @@ | |||
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include <linux/of.h> | 19 | #include <linux/of.h> |
20 | #include "common.h" | 20 | #include "common.h" |
21 | #include "mpp.h" | ||
22 | 21 | ||
23 | static struct mv643xx_eth_platform_data ns2_ge00_data = { | 22 | static struct mv643xx_eth_platform_data ns2_ge00_data = { |
24 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | 23 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), |
25 | }; | 24 | }; |
26 | 25 | ||
27 | static unsigned int ns2_mpp_config[] __initdata = { | ||
28 | MPP0_SPI_SCn, | ||
29 | MPP1_SPI_MOSI, | ||
30 | MPP2_SPI_SCK, | ||
31 | MPP3_SPI_MISO, | ||
32 | MPP4_NF_IO6, | ||
33 | MPP5_NF_IO7, | ||
34 | MPP6_SYSRST_OUTn, | ||
35 | MPP7_GPO, /* Fan speed (bit 1) */ | ||
36 | MPP8_TW0_SDA, | ||
37 | MPP9_TW0_SCK, | ||
38 | MPP10_UART0_TXD, | ||
39 | MPP11_UART0_RXD, | ||
40 | MPP12_GPO, /* Red led */ | ||
41 | MPP14_GPIO, /* USB fuse */ | ||
42 | MPP16_GPIO, /* SATA 0 power */ | ||
43 | MPP17_GPIO, /* SATA 1 power */ | ||
44 | MPP18_NF_IO0, | ||
45 | MPP19_NF_IO1, | ||
46 | MPP20_SATA1_ACTn, | ||
47 | MPP21_SATA0_ACTn, | ||
48 | MPP22_GPIO, /* Fan speed (bit 0) */ | ||
49 | MPP23_GPIO, /* Fan power */ | ||
50 | MPP24_GPIO, /* USB mode select */ | ||
51 | MPP25_GPIO, /* Fan rotation fail */ | ||
52 | MPP26_GPIO, /* USB device vbus */ | ||
53 | MPP28_GPIO, /* USB enable host vbus */ | ||
54 | MPP29_GPIO, /* Blue led (slow register) */ | ||
55 | MPP30_GPIO, /* Blue led (command register) */ | ||
56 | MPP31_GPIO, /* Board power off */ | ||
57 | MPP32_GPIO, /* Power button (0 = Released, 1 = Pushed) */ | ||
58 | MPP33_GPO, /* Fan speed (bit 2) */ | ||
59 | 0 | ||
60 | }; | ||
61 | |||
62 | #define NS2_GPIO_POWER_OFF 31 | 26 | #define NS2_GPIO_POWER_OFF 31 |
63 | 27 | ||
64 | static void ns2_power_off(void) | 28 | static void ns2_power_off(void) |
@@ -71,8 +35,6 @@ void __init ns2_init(void) | |||
71 | /* | 35 | /* |
72 | * Basic setup. Needs to be called early. | 36 | * Basic setup. Needs to be called early. |
73 | */ | 37 | */ |
74 | kirkwood_mpp_conf(ns2_mpp_config); | ||
75 | |||
76 | if (of_machine_is_compatible("lacie,netspace_lite_v2") || | 38 | if (of_machine_is_compatible("lacie,netspace_lite_v2") || |
77 | of_machine_is_compatible("lacie,netspace_mini_v2")) | 39 | of_machine_is_compatible("lacie,netspace_mini_v2")) |
78 | ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); | 40 | ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); |
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile index 5dcb369b58aa..99df4df680fd 100644 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile | |||
@@ -1,6 +1,8 @@ | |||
1 | ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ | 1 | ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ |
2 | -I$(srctree)/arch/arm/plat-orion/include | 2 | -I$(srctree)/arch/arm/plat-orion/include |
3 | 3 | ||
4 | AFLAGS_coherency_ll.o := -Wa,-march=armv7-a | ||
5 | |||
4 | obj-y += system-controller.o | 6 | obj-y += system-controller.o |
5 | obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o irq-armada-370-xp.o addr-map.o coherency.o coherency_ll.o pmsu.o | 7 | obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o irq-armada-370-xp.o addr-map.o coherency.o coherency_ll.o pmsu.o |
6 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o | 8 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 5c8e9cee2c2e..769c1feee1c4 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -397,6 +397,12 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
397 | OMAP_PULL_ENA), | 397 | OMAP_PULL_ENA), |
398 | OMAP4_MUX(ABE_MCBSP1_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | 398 | OMAP4_MUX(ABE_MCBSP1_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
399 | 399 | ||
400 | /* UART2 - BT/FM/GPS shared transport */ | ||
401 | OMAP4_MUX(UART2_CTS, OMAP_PIN_INPUT | OMAP_MUX_MODE0), | ||
402 | OMAP4_MUX(UART2_RTS, OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), | ||
403 | OMAP4_MUX(UART2_RX, OMAP_PIN_INPUT | OMAP_MUX_MODE0), | ||
404 | OMAP4_MUX(UART2_TX, OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), | ||
405 | |||
400 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 406 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
401 | }; | 407 | }; |
402 | 408 | ||
diff --git a/arch/arm/mach-omap2/cclock2420_data.c b/arch/arm/mach-omap2/cclock2420_data.c index 7e5febe456d9..ab7e952d2070 100644 --- a/arch/arm/mach-omap2/cclock2420_data.c +++ b/arch/arm/mach-omap2/cclock2420_data.c | |||
@@ -1935,6 +1935,8 @@ int __init omap2420_clk_init(void) | |||
1935 | omap2_init_clk_hw_omap_clocks(c->lk.clk); | 1935 | omap2_init_clk_hw_omap_clocks(c->lk.clk); |
1936 | } | 1936 | } |
1937 | 1937 | ||
1938 | omap2xxx_clkt_vps_late_init(); | ||
1939 | |||
1938 | omap2_clk_disable_autoidle_all(); | 1940 | omap2_clk_disable_autoidle_all(); |
1939 | 1941 | ||
1940 | omap2_clk_enable_init_clocks(enable_init_clks, | 1942 | omap2_clk_enable_init_clocks(enable_init_clks, |
diff --git a/arch/arm/mach-omap2/cclock2430_data.c b/arch/arm/mach-omap2/cclock2430_data.c index eda079b96c6a..eb3dab68d536 100644 --- a/arch/arm/mach-omap2/cclock2430_data.c +++ b/arch/arm/mach-omap2/cclock2430_data.c | |||
@@ -2050,6 +2050,8 @@ int __init omap2430_clk_init(void) | |||
2050 | omap2_init_clk_hw_omap_clocks(c->lk.clk); | 2050 | omap2_init_clk_hw_omap_clocks(c->lk.clk); |
2051 | } | 2051 | } |
2052 | 2052 | ||
2053 | omap2xxx_clkt_vps_late_init(); | ||
2054 | |||
2053 | omap2_clk_disable_autoidle_all(); | 2055 | omap2_clk_disable_autoidle_all(); |
2054 | 2056 | ||
2055 | omap2_clk_enable_init_clocks(enable_init_clks, | 2057 | omap2_clk_enable_init_clocks(enable_init_clks, |
diff --git a/arch/arm/mach-omap2/cclock44xx_data.c b/arch/arm/mach-omap2/cclock44xx_data.c index 5789a5e25563..a2cc046b47f4 100644 --- a/arch/arm/mach-omap2/cclock44xx_data.c +++ b/arch/arm/mach-omap2/cclock44xx_data.c | |||
@@ -2026,14 +2026,13 @@ int __init omap4xxx_clk_init(void) | |||
2026 | * On OMAP4460 the ABE DPLL fails to turn on if in idle low-power | 2026 | * On OMAP4460 the ABE DPLL fails to turn on if in idle low-power |
2027 | * state when turning the ABE clock domain. Workaround this by | 2027 | * state when turning the ABE clock domain. Workaround this by |
2028 | * locking the ABE DPLL on boot. | 2028 | * locking the ABE DPLL on boot. |
2029 | * Lock the ABE DPLL in any case to avoid issues with audio. | ||
2029 | */ | 2030 | */ |
2030 | if (cpu_is_omap446x()) { | 2031 | rc = clk_set_parent(&abe_dpll_refclk_mux_ck, &sys_32k_ck); |
2031 | rc = clk_set_parent(&abe_dpll_refclk_mux_ck, &sys_32k_ck); | 2032 | if (!rc) |
2032 | if (!rc) | 2033 | rc = clk_set_rate(&dpll_abe_ck, OMAP4_DPLL_ABE_DEFFREQ); |
2033 | rc = clk_set_rate(&dpll_abe_ck, OMAP4_DPLL_ABE_DEFFREQ); | 2034 | if (rc) |
2034 | if (rc) | 2035 | pr_err("%s: failed to configure ABE DPLL!\n", __func__); |
2035 | pr_err("%s: failed to configure ABE DPLL!\n", __func__); | ||
2036 | } | ||
2037 | 2036 | ||
2038 | return 0; | 2037 | return 0; |
2039 | } | 2038 | } |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 5e304d0719a2..626f3ea3142f 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -639,7 +639,7 @@ static int count_ocp2scp_devices(struct omap_ocp2scp_dev *ocp2scp_dev) | |||
639 | return cnt; | 639 | return cnt; |
640 | } | 640 | } |
641 | 641 | ||
642 | static void omap_init_ocp2scp(void) | 642 | static void __init omap_init_ocp2scp(void) |
643 | { | 643 | { |
644 | struct omap_hwmod *oh; | 644 | struct omap_hwmod *oh; |
645 | struct platform_device *pdev; | 645 | struct platform_device *pdev; |
diff --git a/arch/arm/mach-omap2/drm.c b/arch/arm/mach-omap2/drm.c index 4c7566c7e24a..2a2cfa88ddbf 100644 --- a/arch/arm/mach-omap2/drm.c +++ b/arch/arm/mach-omap2/drm.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/dma-mapping.h> | 25 | #include <linux/dma-mapping.h> |
26 | #include <linux/platform_data/omap_drm.h> | 26 | #include <linux/platform_data/omap_drm.h> |
27 | 27 | ||
28 | #include "soc.h" | ||
28 | #include "omap_device.h" | 29 | #include "omap_device.h" |
29 | #include "omap_hwmod.h" | 30 | #include "omap_hwmod.h" |
30 | 31 | ||
@@ -56,7 +57,7 @@ static int __init omap_init_drm(void) | |||
56 | oh->name); | 57 | oh->name); |
57 | } | 58 | } |
58 | 59 | ||
59 | platform_data.omaprev = GET_OMAP_REVISION(); | 60 | platform_data.omaprev = GET_OMAP_TYPE; |
60 | 61 | ||
61 | return platform_device_register(&omap_drm_device); | 62 | return platform_device_register(&omap_drm_device); |
62 | 63 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 129d5081ed15..793f54ac7d14 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -2132,8 +2132,12 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = { | |||
2132 | * currently reset very early during boot, before I2C is | 2132 | * currently reset very early during boot, before I2C is |
2133 | * available, so it doesn't seem that we have any choice in | 2133 | * available, so it doesn't seem that we have any choice in |
2134 | * the kernel other than to avoid resetting it. | 2134 | * the kernel other than to avoid resetting it. |
2135 | * | ||
2136 | * Also, McPDM needs to be configured to NO_IDLE mode when it | ||
2137 | * is in used otherwise vital clocks will be gated which | ||
2138 | * results 'slow motion' audio playback. | ||
2135 | */ | 2139 | */ |
2136 | .flags = HWMOD_EXT_OPT_MAIN_CLK, | 2140 | .flags = HWMOD_EXT_OPT_MAIN_CLK | HWMOD_SWSUP_SIDLE, |
2137 | .mpu_irqs = omap44xx_mcpdm_irqs, | 2141 | .mpu_irqs = omap44xx_mcpdm_irqs, |
2138 | .sdma_reqs = omap44xx_mcpdm_sdma_reqs, | 2142 | .sdma_reqs = omap44xx_mcpdm_sdma_reqs, |
2139 | .main_clk = "mcpdm_fck", | 2143 | .main_clk = "mcpdm_fck", |
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 691aa674665a..b8ad6e632bb8 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -165,15 +165,11 @@ static struct device_node * __init omap_get_timer_dt(struct of_device_id *match, | |||
165 | struct device_node *np; | 165 | struct device_node *np; |
166 | 166 | ||
167 | for_each_matching_node(np, match) { | 167 | for_each_matching_node(np, match) { |
168 | if (!of_device_is_available(np)) { | 168 | if (!of_device_is_available(np)) |
169 | of_node_put(np); | ||
170 | continue; | 169 | continue; |
171 | } | ||
172 | 170 | ||
173 | if (property && !of_get_property(np, property, NULL)) { | 171 | if (property && !of_get_property(np, property, NULL)) |
174 | of_node_put(np); | ||
175 | continue; | 172 | continue; |
176 | } | ||
177 | 173 | ||
178 | of_add_property(np, &device_disabled); | 174 | of_add_property(np, &device_disabled); |
179 | return np; | 175 | return np; |
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c index 553059f51841..755c0bb119f4 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c | |||
@@ -47,7 +47,7 @@ static struct spi_board_info wm1253_devs[] = { | |||
47 | .bus_num = 0, | 47 | .bus_num = 0, |
48 | .chip_select = 0, | 48 | .chip_select = 0, |
49 | .mode = SPI_MODE_0, | 49 | .mode = SPI_MODE_0, |
50 | .irq = S3C_EINT(5), | 50 | .irq = S3C_EINT(4), |
51 | .controller_data = &wm0010_spi_csinfo, | 51 | .controller_data = &wm0010_spi_csinfo, |
52 | .platform_data = &wm0010_pdata, | 52 | .platform_data = &wm0010_pdata, |
53 | }, | 53 | }, |
diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c index 7feb426fc202..d2e1a16690bd 100644 --- a/arch/arm/mach-s3c64xx/pm.c +++ b/arch/arm/mach-s3c64xx/pm.c | |||
@@ -338,8 +338,10 @@ int __init s3c64xx_pm_init(void) | |||
338 | for (i = 0; i < ARRAY_SIZE(s3c64xx_pm_domains); i++) | 338 | for (i = 0; i < ARRAY_SIZE(s3c64xx_pm_domains); i++) |
339 | pm_genpd_init(&s3c64xx_pm_domains[i]->pd, NULL, false); | 339 | pm_genpd_init(&s3c64xx_pm_domains[i]->pd, NULL, false); |
340 | 340 | ||
341 | #ifdef CONFIG_S3C_DEV_FB | ||
341 | if (dev_get_platdata(&s3c_device_fb.dev)) | 342 | if (dev_get_platdata(&s3c_device_fb.dev)) |
342 | pm_genpd_add_device(&s3c64xx_pm_f.pd, &s3c_device_fb.dev); | 343 | pm_genpd_add_device(&s3c64xx_pm_f.pd, &s3c_device_fb.dev); |
344 | #endif | ||
343 | 345 | ||
344 | return 0; | 346 | return 0; |
345 | } | 347 | } |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 6b2fb87c8698..076c26d43864 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -774,25 +774,27 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset, | |||
774 | size_t size, enum dma_data_direction dir, | 774 | size_t size, enum dma_data_direction dir, |
775 | void (*op)(const void *, size_t, int)) | 775 | void (*op)(const void *, size_t, int)) |
776 | { | 776 | { |
777 | unsigned long pfn; | ||
778 | size_t left = size; | ||
779 | |||
780 | pfn = page_to_pfn(page) + offset / PAGE_SIZE; | ||
781 | offset %= PAGE_SIZE; | ||
782 | |||
777 | /* | 783 | /* |
778 | * A single sg entry may refer to multiple physically contiguous | 784 | * A single sg entry may refer to multiple physically contiguous |
779 | * pages. But we still need to process highmem pages individually. | 785 | * pages. But we still need to process highmem pages individually. |
780 | * If highmem is not configured then the bulk of this loop gets | 786 | * If highmem is not configured then the bulk of this loop gets |
781 | * optimized out. | 787 | * optimized out. |
782 | */ | 788 | */ |
783 | size_t left = size; | ||
784 | do { | 789 | do { |
785 | size_t len = left; | 790 | size_t len = left; |
786 | void *vaddr; | 791 | void *vaddr; |
787 | 792 | ||
793 | page = pfn_to_page(pfn); | ||
794 | |||
788 | if (PageHighMem(page)) { | 795 | if (PageHighMem(page)) { |
789 | if (len + offset > PAGE_SIZE) { | 796 | if (len + offset > PAGE_SIZE) |
790 | if (offset >= PAGE_SIZE) { | ||
791 | page += offset / PAGE_SIZE; | ||
792 | offset %= PAGE_SIZE; | ||
793 | } | ||
794 | len = PAGE_SIZE - offset; | 797 | len = PAGE_SIZE - offset; |
795 | } | ||
796 | vaddr = kmap_high_get(page); | 798 | vaddr = kmap_high_get(page); |
797 | if (vaddr) { | 799 | if (vaddr) { |
798 | vaddr += offset; | 800 | vaddr += offset; |
@@ -809,7 +811,7 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset, | |||
809 | op(vaddr, len, dir); | 811 | op(vaddr, len, dir); |
810 | } | 812 | } |
811 | offset = 0; | 813 | offset = 0; |
812 | page++; | 814 | pfn++; |
813 | left -= len; | 815 | left -= len; |
814 | } while (left); | 816 | } while (left); |
815 | } | 817 | } |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 9f0610243bd6..ce328c7f5c94 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -283,7 +283,7 @@ static struct mem_type mem_types[] = { | |||
283 | }, | 283 | }, |
284 | [MT_MEMORY_SO] = { | 284 | [MT_MEMORY_SO] = { |
285 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | | 285 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | |
286 | L_PTE_MT_UNCACHED, | 286 | L_PTE_MT_UNCACHED | L_PTE_XN, |
287 | .prot_l1 = PMD_TYPE_TABLE, | 287 | .prot_l1 = PMD_TYPE_TABLE, |
288 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_S | | 288 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_S | |
289 | PMD_SECT_UNCACHED | PMD_SECT_XN, | 289 | PMD_SECT_UNCACHED | PMD_SECT_XN, |
diff --git a/arch/arm/plat-versatile/headsmp.S b/arch/arm/plat-versatile/headsmp.S index dd703ef09b8d..b178d44e9eaa 100644 --- a/arch/arm/plat-versatile/headsmp.S +++ b/arch/arm/plat-versatile/headsmp.S | |||
@@ -20,7 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | ENTRY(versatile_secondary_startup) | 21 | ENTRY(versatile_secondary_startup) |
22 | mrc p15, 0, r0, c0, c0, 5 | 22 | mrc p15, 0, r0, c0, c0, 5 |
23 | and r0, r0, #15 | 23 | bic r0, #0xff000000 |
24 | adr r4, 1f | 24 | adr r4, 1f |
25 | ldmia r4, {r5, r6} | 25 | ldmia r4, {r5, r6} |
26 | sub r4, r4, r5 | 26 | sub r4, r4, r5 |
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S index cc926c985981..323ce1a62bbf 100644 --- a/arch/arm/vfp/entry.S +++ b/arch/arm/vfp/entry.S | |||
@@ -22,7 +22,7 @@ | |||
22 | @ IRQs disabled. | 22 | @ IRQs disabled. |
23 | @ | 23 | @ |
24 | ENTRY(do_vfp) | 24 | ENTRY(do_vfp) |
25 | #ifdef CONFIG_PREEMPT | 25 | #ifdef CONFIG_PREEMPT_COUNT |
26 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count | 26 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count |
27 | add r11, r4, #1 @ increment it | 27 | add r11, r4, #1 @ increment it |
28 | str r11, [r10, #TI_PREEMPT] | 28 | str r11, [r10, #TI_PREEMPT] |
@@ -35,7 +35,7 @@ ENTRY(do_vfp) | |||
35 | ENDPROC(do_vfp) | 35 | ENDPROC(do_vfp) |
36 | 36 | ||
37 | ENTRY(vfp_null_entry) | 37 | ENTRY(vfp_null_entry) |
38 | #ifdef CONFIG_PREEMPT | 38 | #ifdef CONFIG_PREEMPT_COUNT |
39 | get_thread_info r10 | 39 | get_thread_info r10 |
40 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count | 40 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count |
41 | sub r11, r4, #1 @ decrement it | 41 | sub r11, r4, #1 @ decrement it |
@@ -53,7 +53,7 @@ ENDPROC(vfp_null_entry) | |||
53 | 53 | ||
54 | __INIT | 54 | __INIT |
55 | ENTRY(vfp_testing_entry) | 55 | ENTRY(vfp_testing_entry) |
56 | #ifdef CONFIG_PREEMPT | 56 | #ifdef CONFIG_PREEMPT_COUNT |
57 | get_thread_info r10 | 57 | get_thread_info r10 |
58 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count | 58 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count |
59 | sub r11, r4, #1 @ decrement it | 59 | sub r11, r4, #1 @ decrement it |
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S index ea0349f63586..dd5e56f95f3f 100644 --- a/arch/arm/vfp/vfphw.S +++ b/arch/arm/vfp/vfphw.S | |||
@@ -168,7 +168,7 @@ vfp_hw_state_valid: | |||
168 | @ else it's one 32-bit instruction, so | 168 | @ else it's one 32-bit instruction, so |
169 | @ always subtract 4 from the following | 169 | @ always subtract 4 from the following |
170 | @ instruction address. | 170 | @ instruction address. |
171 | #ifdef CONFIG_PREEMPT | 171 | #ifdef CONFIG_PREEMPT_COUNT |
172 | get_thread_info r10 | 172 | get_thread_info r10 |
173 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count | 173 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count |
174 | sub r11, r4, #1 @ decrement it | 174 | sub r11, r4, #1 @ decrement it |
@@ -192,7 +192,7 @@ look_for_VFP_exceptions: | |||
192 | @ not recognised by VFP | 192 | @ not recognised by VFP |
193 | 193 | ||
194 | DBGSTR "not VFP" | 194 | DBGSTR "not VFP" |
195 | #ifdef CONFIG_PREEMPT | 195 | #ifdef CONFIG_PREEMPT_COUNT |
196 | get_thread_info r10 | 196 | get_thread_info r10 |
197 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count | 197 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count |
198 | sub r11, r4, #1 @ decrement it | 198 | sub r11, r4, #1 @ decrement it |
diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h index 07fea290d7c1..fe32c0e4ac01 100644 --- a/arch/arm64/include/asm/elf.h +++ b/arch/arm64/include/asm/elf.h | |||
@@ -26,7 +26,10 @@ | |||
26 | 26 | ||
27 | typedef unsigned long elf_greg_t; | 27 | typedef unsigned long elf_greg_t; |
28 | 28 | ||
29 | #define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) | 29 | #define ELF_NGREG (sizeof(struct user_pt_regs) / sizeof(elf_greg_t)) |
30 | #define ELF_CORE_COPY_REGS(dest, regs) \ | ||
31 | *(struct user_pt_regs *)&(dest) = (regs)->user_regs; | ||
32 | |||
30 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | 33 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; |
31 | typedef struct user_fpsimd_state elf_fpregset_t; | 34 | typedef struct user_fpsimd_state elf_fpregset_t; |
32 | 35 | ||
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c index 4265ff64219b..b7a5fffe0924 100644 --- a/arch/ia64/kernel/ptrace.c +++ b/arch/ia64/kernel/ptrace.c | |||
@@ -672,33 +672,6 @@ ptrace_attach_sync_user_rbs (struct task_struct *child) | |||
672 | read_unlock(&tasklist_lock); | 672 | read_unlock(&tasklist_lock); |
673 | } | 673 | } |
674 | 674 | ||
675 | static inline int | ||
676 | thread_matches (struct task_struct *thread, unsigned long addr) | ||
677 | { | ||
678 | unsigned long thread_rbs_end; | ||
679 | struct pt_regs *thread_regs; | ||
680 | |||
681 | if (ptrace_check_attach(thread, 0) < 0) | ||
682 | /* | ||
683 | * If the thread is not in an attachable state, we'll | ||
684 | * ignore it. The net effect is that if ADDR happens | ||
685 | * to overlap with the portion of the thread's | ||
686 | * register backing store that is currently residing | ||
687 | * on the thread's kernel stack, then ptrace() may end | ||
688 | * up accessing a stale value. But if the thread | ||
689 | * isn't stopped, that's a problem anyhow, so we're | ||
690 | * doing as well as we can... | ||
691 | */ | ||
692 | return 0; | ||
693 | |||
694 | thread_regs = task_pt_regs(thread); | ||
695 | thread_rbs_end = ia64_get_user_rbs_end(thread, thread_regs, NULL); | ||
696 | if (!on_kernel_rbs(addr, thread_regs->ar_bspstore, thread_rbs_end)) | ||
697 | return 0; | ||
698 | |||
699 | return 1; /* looks like we've got a winner */ | ||
700 | } | ||
701 | |||
702 | /* | 675 | /* |
703 | * Write f32-f127 back to task->thread.fph if it has been modified. | 676 | * Write f32-f127 back to task->thread.fph if it has been modified. |
704 | */ | 677 | */ |
diff --git a/arch/m68k/include/asm/dma-mapping.h b/arch/m68k/include/asm/dma-mapping.h index 17f7a45948ea..3e6b8445af6a 100644 --- a/arch/m68k/include/asm/dma-mapping.h +++ b/arch/m68k/include/asm/dma-mapping.h | |||
@@ -21,6 +21,22 @@ extern void *dma_alloc_coherent(struct device *, size_t, | |||
21 | extern void dma_free_coherent(struct device *, size_t, | 21 | extern void dma_free_coherent(struct device *, size_t, |
22 | void *, dma_addr_t); | 22 | void *, dma_addr_t); |
23 | 23 | ||
24 | static inline void *dma_alloc_attrs(struct device *dev, size_t size, | ||
25 | dma_addr_t *dma_handle, gfp_t flag, | ||
26 | struct dma_attrs *attrs) | ||
27 | { | ||
28 | /* attrs is not supported and ignored */ | ||
29 | return dma_alloc_coherent(dev, size, dma_handle, flag); | ||
30 | } | ||
31 | |||
32 | static inline void dma_free_attrs(struct device *dev, size_t size, | ||
33 | void *cpu_addr, dma_addr_t dma_handle, | ||
34 | struct dma_attrs *attrs) | ||
35 | { | ||
36 | /* attrs is not supported and ignored */ | ||
37 | dma_free_coherent(dev, size, cpu_addr, dma_handle); | ||
38 | } | ||
39 | |||
24 | static inline void *dma_alloc_noncoherent(struct device *dev, size_t size, | 40 | static inline void *dma_alloc_noncoherent(struct device *dev, size_t size, |
25 | dma_addr_t *handle, gfp_t flag) | 41 | dma_addr_t *handle, gfp_t flag) |
26 | { | 42 | { |
diff --git a/arch/m68k/include/asm/pgtable_no.h b/arch/m68k/include/asm/pgtable_no.h index bf86b29fe64a..037028f4ab70 100644 --- a/arch/m68k/include/asm/pgtable_no.h +++ b/arch/m68k/include/asm/pgtable_no.h | |||
@@ -64,6 +64,8 @@ extern unsigned int kobjsize(const void *objp); | |||
64 | */ | 64 | */ |
65 | #define VMALLOC_START 0 | 65 | #define VMALLOC_START 0 |
66 | #define VMALLOC_END 0xffffffff | 66 | #define VMALLOC_END 0xffffffff |
67 | #define KMAP_START 0 | ||
68 | #define KMAP_END 0xffffffff | ||
67 | 69 | ||
68 | #include <asm-generic/pgtable.h> | 70 | #include <asm-generic/pgtable.h> |
69 | 71 | ||
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h index 847994ce6804..f9337f614660 100644 --- a/arch/m68k/include/asm/unistd.h +++ b/arch/m68k/include/asm/unistd.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #include <uapi/asm/unistd.h> | 4 | #include <uapi/asm/unistd.h> |
5 | 5 | ||
6 | 6 | ||
7 | #define NR_syscalls 348 | 7 | #define NR_syscalls 349 |
8 | 8 | ||
9 | #define __ARCH_WANT_OLD_READDIR | 9 | #define __ARCH_WANT_OLD_READDIR |
10 | #define __ARCH_WANT_OLD_STAT | 10 | #define __ARCH_WANT_OLD_STAT |
diff --git a/arch/m68k/include/uapi/asm/unistd.h b/arch/m68k/include/uapi/asm/unistd.h index b94bfbf90705..625f321001dc 100644 --- a/arch/m68k/include/uapi/asm/unistd.h +++ b/arch/m68k/include/uapi/asm/unistd.h | |||
@@ -353,5 +353,6 @@ | |||
353 | #define __NR_process_vm_readv 345 | 353 | #define __NR_process_vm_readv 345 |
354 | #define __NR_process_vm_writev 346 | 354 | #define __NR_process_vm_writev 346 |
355 | #define __NR_kcmp 347 | 355 | #define __NR_kcmp 347 |
356 | #define __NR_finit_module 348 | ||
356 | 357 | ||
357 | #endif /* _UAPI_ASM_M68K_UNISTD_H_ */ | 358 | #endif /* _UAPI_ASM_M68K_UNISTD_H_ */ |
diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S index c30da5b3f2db..3f04ea0ab802 100644 --- a/arch/m68k/kernel/syscalltable.S +++ b/arch/m68k/kernel/syscalltable.S | |||
@@ -368,4 +368,5 @@ ENTRY(sys_call_table) | |||
368 | .long sys_process_vm_readv /* 345 */ | 368 | .long sys_process_vm_readv /* 345 */ |
369 | .long sys_process_vm_writev | 369 | .long sys_process_vm_writev |
370 | .long sys_kcmp | 370 | .long sys_kcmp |
371 | .long sys_finit_module | ||
371 | 372 | ||
diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c index f0e05bce92f2..afd8106fd83b 100644 --- a/arch/m68k/mm/init.c +++ b/arch/m68k/mm/init.c | |||
@@ -39,6 +39,11 @@ | |||
39 | void *empty_zero_page; | 39 | void *empty_zero_page; |
40 | EXPORT_SYMBOL(empty_zero_page); | 40 | EXPORT_SYMBOL(empty_zero_page); |
41 | 41 | ||
42 | #if !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE) | ||
43 | extern void init_pointer_table(unsigned long ptable); | ||
44 | extern pmd_t *zero_pgtable; | ||
45 | #endif | ||
46 | |||
42 | #ifdef CONFIG_MMU | 47 | #ifdef CONFIG_MMU |
43 | 48 | ||
44 | pg_data_t pg_data_map[MAX_NUMNODES]; | 49 | pg_data_t pg_data_map[MAX_NUMNODES]; |
@@ -69,9 +74,6 @@ void __init m68k_setup_node(int node) | |||
69 | node_set_online(node); | 74 | node_set_online(node); |
70 | } | 75 | } |
71 | 76 | ||
72 | extern void init_pointer_table(unsigned long ptable); | ||
73 | extern pmd_t *zero_pgtable; | ||
74 | |||
75 | #else /* CONFIG_MMU */ | 77 | #else /* CONFIG_MMU */ |
76 | 78 | ||
77 | /* | 79 | /* |
diff --git a/arch/mips/bcm47xx/Kconfig b/arch/mips/bcm47xx/Kconfig index d7af29f1fcf0..ba611927749b 100644 --- a/arch/mips/bcm47xx/Kconfig +++ b/arch/mips/bcm47xx/Kconfig | |||
@@ -8,8 +8,10 @@ config BCM47XX_SSB | |||
8 | select SSB_DRIVER_EXTIF | 8 | select SSB_DRIVER_EXTIF |
9 | select SSB_EMBEDDED | 9 | select SSB_EMBEDDED |
10 | select SSB_B43_PCI_BRIDGE if PCI | 10 | select SSB_B43_PCI_BRIDGE if PCI |
11 | select SSB_DRIVER_PCICORE if PCI | ||
11 | select SSB_PCICORE_HOSTMODE if PCI | 12 | select SSB_PCICORE_HOSTMODE if PCI |
12 | select SSB_DRIVER_GPIO | 13 | select SSB_DRIVER_GPIO |
14 | select GPIOLIB | ||
13 | default y | 15 | default y |
14 | help | 16 | help |
15 | Add support for old Broadcom BCM47xx boards with Sonics Silicon Backplane support. | 17 | Add support for old Broadcom BCM47xx boards with Sonics Silicon Backplane support. |
@@ -25,6 +27,7 @@ config BCM47XX_BCMA | |||
25 | select BCMA_HOST_PCI if PCI | 27 | select BCMA_HOST_PCI if PCI |
26 | select BCMA_DRIVER_PCI_HOSTMODE if PCI | 28 | select BCMA_DRIVER_PCI_HOSTMODE if PCI |
27 | select BCMA_DRIVER_GPIO | 29 | select BCMA_DRIVER_GPIO |
30 | select GPIOLIB | ||
28 | default y | 31 | default y |
29 | help | 32 | help |
30 | Add support for new Broadcom BCM47xx boards with Broadcom specific Advanced Microcontroller Bus. | 33 | Add support for new Broadcom BCM47xx boards with Broadcom specific Advanced Microcontroller Bus. |
diff --git a/arch/mips/cavium-octeon/executive/cvmx-l2c.c b/arch/mips/cavium-octeon/executive/cvmx-l2c.c index 9f883bf76953..33b72144db31 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-l2c.c +++ b/arch/mips/cavium-octeon/executive/cvmx-l2c.c | |||
@@ -30,6 +30,7 @@ | |||
30 | * measurement, and debugging facilities. | 30 | * measurement, and debugging facilities. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/compiler.h> | ||
33 | #include <linux/irqflags.h> | 34 | #include <linux/irqflags.h> |
34 | #include <asm/octeon/cvmx.h> | 35 | #include <asm/octeon/cvmx.h> |
35 | #include <asm/octeon/cvmx-l2c.h> | 36 | #include <asm/octeon/cvmx-l2c.h> |
@@ -285,22 +286,22 @@ uint64_t cvmx_l2c_read_perf(uint32_t counter) | |||
285 | */ | 286 | */ |
286 | static void fault_in(uint64_t addr, int len) | 287 | static void fault_in(uint64_t addr, int len) |
287 | { | 288 | { |
288 | volatile char *ptr; | 289 | char *ptr; |
289 | volatile char dummy; | 290 | |
290 | /* | 291 | /* |
291 | * Adjust addr and length so we get all cache lines even for | 292 | * Adjust addr and length so we get all cache lines even for |
292 | * small ranges spanning two cache lines. | 293 | * small ranges spanning two cache lines. |
293 | */ | 294 | */ |
294 | len += addr & CVMX_CACHE_LINE_MASK; | 295 | len += addr & CVMX_CACHE_LINE_MASK; |
295 | addr &= ~CVMX_CACHE_LINE_MASK; | 296 | addr &= ~CVMX_CACHE_LINE_MASK; |
296 | ptr = (volatile char *)cvmx_phys_to_ptr(addr); | 297 | ptr = cvmx_phys_to_ptr(addr); |
297 | /* | 298 | /* |
298 | * Invalidate L1 cache to make sure all loads result in data | 299 | * Invalidate L1 cache to make sure all loads result in data |
299 | * being in L2. | 300 | * being in L2. |
300 | */ | 301 | */ |
301 | CVMX_DCACHE_INVALIDATE; | 302 | CVMX_DCACHE_INVALIDATE; |
302 | while (len > 0) { | 303 | while (len > 0) { |
303 | dummy += *ptr; | 304 | ACCESS_ONCE(*ptr); |
304 | len -= CVMX_CACHE_LINE_SIZE; | 305 | len -= CVMX_CACHE_LINE_SIZE; |
305 | ptr += CVMX_CACHE_LINE_SIZE; | 306 | ptr += CVMX_CACHE_LINE_SIZE; |
306 | } | 307 | } |
diff --git a/arch/mips/include/asm/dsp.h b/arch/mips/include/asm/dsp.h index e9bfc0813c72..7bfad0520e25 100644 --- a/arch/mips/include/asm/dsp.h +++ b/arch/mips/include/asm/dsp.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <asm/mipsregs.h> | 16 | #include <asm/mipsregs.h> |
17 | 17 | ||
18 | #define DSP_DEFAULT 0x00000000 | 18 | #define DSP_DEFAULT 0x00000000 |
19 | #define DSP_MASK 0x3ff | 19 | #define DSP_MASK 0x3f |
20 | 20 | ||
21 | #define __enable_dsp_hazard() \ | 21 | #define __enable_dsp_hazard() \ |
22 | do { \ | 22 | do { \ |
diff --git a/arch/mips/include/asm/inst.h b/arch/mips/include/asm/inst.h index ab84064283db..33c34adbecfa 100644 --- a/arch/mips/include/asm/inst.h +++ b/arch/mips/include/asm/inst.h | |||
@@ -353,6 +353,7 @@ union mips_instruction { | |||
353 | struct u_format u_format; | 353 | struct u_format u_format; |
354 | struct c_format c_format; | 354 | struct c_format c_format; |
355 | struct r_format r_format; | 355 | struct r_format r_format; |
356 | struct p_format p_format; | ||
356 | struct f_format f_format; | 357 | struct f_format f_format; |
357 | struct ma_format ma_format; | 358 | struct ma_format ma_format; |
358 | struct b_format b_format; | 359 | struct b_format b_format; |
diff --git a/arch/mips/include/asm/mach-pnx833x/war.h b/arch/mips/include/asm/mach-pnx833x/war.h index edaa06d9d492..e410df4e1b3a 100644 --- a/arch/mips/include/asm/mach-pnx833x/war.h +++ b/arch/mips/include/asm/mach-pnx833x/war.h | |||
@@ -21,4 +21,4 @@ | |||
21 | #define R10000_LLSC_WAR 0 | 21 | #define R10000_LLSC_WAR 0 |
22 | #define MIPS34K_MISSED_ITLB_WAR 0 | 22 | #define MIPS34K_MISSED_ITLB_WAR 0 |
23 | 23 | ||
24 | #endif /* __ASM_MIPS_MACH_PNX8550_WAR_H */ | 24 | #endif /* __ASM_MIPS_MACH_PNX833X_WAR_H */ |
diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h index c63191055e69..013d5f781263 100644 --- a/arch/mips/include/asm/pgtable-64.h +++ b/arch/mips/include/asm/pgtable-64.h | |||
@@ -230,6 +230,7 @@ static inline void pud_clear(pud_t *pudp) | |||
230 | #else | 230 | #else |
231 | #define pte_pfn(x) ((unsigned long)((x).pte >> _PFN_SHIFT)) | 231 | #define pte_pfn(x) ((unsigned long)((x).pte >> _PFN_SHIFT)) |
232 | #define pfn_pte(pfn, prot) __pte(((pfn) << _PFN_SHIFT) | pgprot_val(prot)) | 232 | #define pfn_pte(pfn, prot) __pte(((pfn) << _PFN_SHIFT) | pgprot_val(prot)) |
233 | #define pfn_pmd(pfn, prot) __pmd(((pfn) << _PFN_SHIFT) | pgprot_val(prot)) | ||
233 | #endif | 234 | #endif |
234 | 235 | ||
235 | #define __pgd_offset(address) pgd_index(address) | 236 | #define __pgd_offset(address) pgd_index(address) |
diff --git a/arch/mips/include/uapi/asm/Kbuild b/arch/mips/include/uapi/asm/Kbuild index a1a0452ac185..77d4fb33f75a 100644 --- a/arch/mips/include/uapi/asm/Kbuild +++ b/arch/mips/include/uapi/asm/Kbuild | |||
@@ -3,6 +3,7 @@ include include/uapi/asm-generic/Kbuild.asm | |||
3 | 3 | ||
4 | header-y += auxvec.h | 4 | header-y += auxvec.h |
5 | header-y += bitsperlong.h | 5 | header-y += bitsperlong.h |
6 | header-y += break.h | ||
6 | header-y += byteorder.h | 7 | header-y += byteorder.h |
7 | header-y += cachectl.h | 8 | header-y += cachectl.h |
8 | header-y += errno.h | 9 | header-y += errno.h |
diff --git a/arch/mips/include/asm/break.h b/arch/mips/include/uapi/asm/break.h index 9161e684cb4c..9161e684cb4c 100644 --- a/arch/mips/include/asm/break.h +++ b/arch/mips/include/uapi/asm/break.h | |||
diff --git a/arch/mips/kernel/ftrace.c b/arch/mips/kernel/ftrace.c index 6a2d758dd8e9..83fa1460e294 100644 --- a/arch/mips/kernel/ftrace.c +++ b/arch/mips/kernel/ftrace.c | |||
@@ -25,6 +25,12 @@ | |||
25 | #define MCOUNT_OFFSET_INSNS 4 | 25 | #define MCOUNT_OFFSET_INSNS 4 |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | /* Arch override because MIPS doesn't need to run this from stop_machine() */ | ||
29 | void arch_ftrace_update_code(int command) | ||
30 | { | ||
31 | ftrace_modify_all_code(command); | ||
32 | } | ||
33 | |||
28 | /* | 34 | /* |
29 | * Check if the address is in kernel space | 35 | * Check if the address is in kernel space |
30 | * | 36 | * |
@@ -89,6 +95,24 @@ static int ftrace_modify_code(unsigned long ip, unsigned int new_code) | |||
89 | return 0; | 95 | return 0; |
90 | } | 96 | } |
91 | 97 | ||
98 | #ifndef CONFIG_64BIT | ||
99 | static int ftrace_modify_code_2(unsigned long ip, unsigned int new_code1, | ||
100 | unsigned int new_code2) | ||
101 | { | ||
102 | int faulted; | ||
103 | |||
104 | safe_store_code(new_code1, ip, faulted); | ||
105 | if (unlikely(faulted)) | ||
106 | return -EFAULT; | ||
107 | ip += 4; | ||
108 | safe_store_code(new_code2, ip, faulted); | ||
109 | if (unlikely(faulted)) | ||
110 | return -EFAULT; | ||
111 | flush_icache_range(ip, ip + 8); /* original ip + 12 */ | ||
112 | return 0; | ||
113 | } | ||
114 | #endif | ||
115 | |||
92 | /* | 116 | /* |
93 | * The details about the calling site of mcount on MIPS | 117 | * The details about the calling site of mcount on MIPS |
94 | * | 118 | * |
@@ -131,8 +155,18 @@ int ftrace_make_nop(struct module *mod, | |||
131 | * needed. | 155 | * needed. |
132 | */ | 156 | */ |
133 | new = in_kernel_space(ip) ? INSN_NOP : INSN_B_1F; | 157 | new = in_kernel_space(ip) ? INSN_NOP : INSN_B_1F; |
134 | 158 | #ifdef CONFIG_64BIT | |
135 | return ftrace_modify_code(ip, new); | 159 | return ftrace_modify_code(ip, new); |
160 | #else | ||
161 | /* | ||
162 | * On 32 bit MIPS platforms, gcc adds a stack adjust | ||
163 | * instruction in the delay slot after the branch to | ||
164 | * mcount and expects mcount to restore the sp on return. | ||
165 | * This is based on a legacy API and does nothing but | ||
166 | * waste instructions so it's being removed at runtime. | ||
167 | */ | ||
168 | return ftrace_modify_code_2(ip, new, INSN_NOP); | ||
169 | #endif | ||
136 | } | 170 | } |
137 | 171 | ||
138 | int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) | 172 | int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) |
diff --git a/arch/mips/kernel/mcount.S b/arch/mips/kernel/mcount.S index 4c968e7efb74..165867673357 100644 --- a/arch/mips/kernel/mcount.S +++ b/arch/mips/kernel/mcount.S | |||
@@ -46,9 +46,8 @@ | |||
46 | PTR_L a5, PT_R9(sp) | 46 | PTR_L a5, PT_R9(sp) |
47 | PTR_L a6, PT_R10(sp) | 47 | PTR_L a6, PT_R10(sp) |
48 | PTR_L a7, PT_R11(sp) | 48 | PTR_L a7, PT_R11(sp) |
49 | PTR_ADDIU sp, PT_SIZE | ||
50 | #else | 49 | #else |
51 | PTR_ADDIU sp, (PT_SIZE + 8) | 50 | PTR_ADDIU sp, PT_SIZE |
52 | #endif | 51 | #endif |
53 | .endm | 52 | .endm |
54 | 53 | ||
@@ -69,7 +68,9 @@ NESTED(ftrace_caller, PT_SIZE, ra) | |||
69 | .globl _mcount | 68 | .globl _mcount |
70 | _mcount: | 69 | _mcount: |
71 | b ftrace_stub | 70 | b ftrace_stub |
72 | nop | 71 | addiu sp,sp,8 |
72 | |||
73 | /* When tracing is activated, it calls ftrace_caller+8 (aka here) */ | ||
73 | lw t1, function_trace_stop | 74 | lw t1, function_trace_stop |
74 | bnez t1, ftrace_stub | 75 | bnez t1, ftrace_stub |
75 | nop | 76 | nop |
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index eec690af6581..147cec19621d 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c | |||
@@ -705,7 +705,7 @@ static int vpe_run(struct vpe * v) | |||
705 | 705 | ||
706 | printk(KERN_WARNING | 706 | printk(KERN_WARNING |
707 | "VPE loader: TC %d is already in use.\n", | 707 | "VPE loader: TC %d is already in use.\n", |
708 | t->index); | 708 | v->tc->index); |
709 | return -ENOEXEC; | 709 | return -ENOEXEC; |
710 | } | 710 | } |
711 | } else { | 711 | } else { |
diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c index f36acd1b3808..a7935bf0fecb 100644 --- a/arch/mips/lantiq/irq.c +++ b/arch/mips/lantiq/irq.c | |||
@@ -408,7 +408,7 @@ int __init icu_of_init(struct device_node *node, struct device_node *parent) | |||
408 | #endif | 408 | #endif |
409 | 409 | ||
410 | /* tell oprofile which irq to use */ | 410 | /* tell oprofile which irq to use */ |
411 | cp0_perfcount_irq = LTQ_PERF_IRQ; | 411 | cp0_perfcount_irq = irq_create_mapping(ltq_domain, LTQ_PERF_IRQ); |
412 | 412 | ||
413 | /* | 413 | /* |
414 | * if the timer irq is not one of the mips irqs we need to | 414 | * if the timer irq is not one of the mips irqs we need to |
diff --git a/arch/mips/lib/delay.c b/arch/mips/lib/delay.c index dc81ca8dc0dd..288f7954988d 100644 --- a/arch/mips/lib/delay.c +++ b/arch/mips/lib/delay.c | |||
@@ -21,7 +21,7 @@ void __delay(unsigned long loops) | |||
21 | " .set noreorder \n" | 21 | " .set noreorder \n" |
22 | " .align 3 \n" | 22 | " .align 3 \n" |
23 | "1: bnez %0, 1b \n" | 23 | "1: bnez %0, 1b \n" |
24 | #if __SIZEOF_LONG__ == 4 | 24 | #if BITS_PER_LONG == 32 |
25 | " subu %0, 1 \n" | 25 | " subu %0, 1 \n" |
26 | #else | 26 | #else |
27 | " dsubu %0, 1 \n" | 27 | " dsubu %0, 1 \n" |
diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c index 7657fd21cd3f..cacfd31e8ec9 100644 --- a/arch/mips/mm/ioremap.c +++ b/arch/mips/mm/ioremap.c | |||
@@ -190,9 +190,3 @@ void __iounmap(const volatile void __iomem *addr) | |||
190 | 190 | ||
191 | EXPORT_SYMBOL(__ioremap); | 191 | EXPORT_SYMBOL(__ioremap); |
192 | EXPORT_SYMBOL(__iounmap); | 192 | EXPORT_SYMBOL(__iounmap); |
193 | |||
194 | int __virt_addr_valid(const volatile void *kaddr) | ||
195 | { | ||
196 | return pfn_valid(PFN_DOWN(virt_to_phys(kaddr))); | ||
197 | } | ||
198 | EXPORT_SYMBOL_GPL(__virt_addr_valid); | ||
diff --git a/arch/mips/mm/mmap.c b/arch/mips/mm/mmap.c index d9be7540a6be..7e5fe2790d8a 100644 --- a/arch/mips/mm/mmap.c +++ b/arch/mips/mm/mmap.c | |||
@@ -192,3 +192,9 @@ unsigned long arch_randomize_brk(struct mm_struct *mm) | |||
192 | 192 | ||
193 | return ret; | 193 | return ret; |
194 | } | 194 | } |
195 | |||
196 | int __virt_addr_valid(const volatile void *kaddr) | ||
197 | { | ||
198 | return pfn_valid(PFN_DOWN(virt_to_phys(kaddr))); | ||
199 | } | ||
200 | EXPORT_SYMBOL_GPL(__virt_addr_valid); | ||
diff --git a/arch/mips/netlogic/xlr/setup.c b/arch/mips/netlogic/xlr/setup.c index 4e7f49d3d5a8..c5ce6992ac4c 100644 --- a/arch/mips/netlogic/xlr/setup.c +++ b/arch/mips/netlogic/xlr/setup.c | |||
@@ -193,8 +193,11 @@ static void nlm_init_node(void) | |||
193 | 193 | ||
194 | void __init prom_init(void) | 194 | void __init prom_init(void) |
195 | { | 195 | { |
196 | int i, *argv, *envp; /* passed as 32 bit ptrs */ | 196 | int *argv, *envp; /* passed as 32 bit ptrs */ |
197 | struct psb_info *prom_infop; | 197 | struct psb_info *prom_infop; |
198 | #ifdef CONFIG_SMP | ||
199 | int i; | ||
200 | #endif | ||
198 | 201 | ||
199 | /* truncate to 32 bit and sign extend all args */ | 202 | /* truncate to 32 bit and sign extend all args */ |
200 | argv = (int *)(long)(int)fw_arg1; | 203 | argv = (int *)(long)(int)fw_arg1; |
diff --git a/arch/mips/pci/pci-ar71xx.c b/arch/mips/pci/pci-ar71xx.c index 1552522b8718..6eaa4f2d0e38 100644 --- a/arch/mips/pci/pci-ar71xx.c +++ b/arch/mips/pci/pci-ar71xx.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <asm/mach-ath79/pci.h> | 24 | #include <asm/mach-ath79/pci.h> |
25 | 25 | ||
26 | #define AR71XX_PCI_MEM_BASE 0x10000000 | 26 | #define AR71XX_PCI_MEM_BASE 0x10000000 |
27 | #define AR71XX_PCI_MEM_SIZE 0x08000000 | 27 | #define AR71XX_PCI_MEM_SIZE 0x07000000 |
28 | 28 | ||
29 | #define AR71XX_PCI_WIN0_OFFS 0x10000000 | 29 | #define AR71XX_PCI_WIN0_OFFS 0x10000000 |
30 | #define AR71XX_PCI_WIN1_OFFS 0x11000000 | 30 | #define AR71XX_PCI_WIN1_OFFS 0x11000000 |
diff --git a/arch/mips/pci/pci-ar724x.c b/arch/mips/pci/pci-ar724x.c index 86d77a666458..c11c75be2d7e 100644 --- a/arch/mips/pci/pci-ar724x.c +++ b/arch/mips/pci/pci-ar724x.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #define AR724X_PCI_CTRL_SIZE 0x100 | 21 | #define AR724X_PCI_CTRL_SIZE 0x100 |
22 | 22 | ||
23 | #define AR724X_PCI_MEM_BASE 0x10000000 | 23 | #define AR724X_PCI_MEM_BASE 0x10000000 |
24 | #define AR724X_PCI_MEM_SIZE 0x08000000 | 24 | #define AR724X_PCI_MEM_SIZE 0x04000000 |
25 | 25 | ||
26 | #define AR724X_PCI_REG_RESET 0x18 | 26 | #define AR724X_PCI_REG_RESET 0x18 |
27 | #define AR724X_PCI_REG_INT_STATUS 0x4c | 27 | #define AR724X_PCI_REG_INT_STATUS 0x4c |
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index bfb44247d7a7..eb7850b46c25 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -1865,7 +1865,7 @@ syscall_restore: | |||
1865 | 1865 | ||
1866 | /* Are we being ptraced? */ | 1866 | /* Are we being ptraced? */ |
1867 | ldw TASK_FLAGS(%r1),%r19 | 1867 | ldw TASK_FLAGS(%r1),%r19 |
1868 | ldi (_TIF_SINGLESTEP|_TIF_BLOCKSTEP),%r2 | 1868 | ldi _TIF_SYSCALL_TRACE_MASK,%r2 |
1869 | and,COND(=) %r19,%r2,%r0 | 1869 | and,COND(=) %r19,%r2,%r0 |
1870 | b,n syscall_restore_rfi | 1870 | b,n syscall_restore_rfi |
1871 | 1871 | ||
@@ -1978,15 +1978,23 @@ syscall_restore_rfi: | |||
1978 | /* sr2 should be set to zero for userspace syscalls */ | 1978 | /* sr2 should be set to zero for userspace syscalls */ |
1979 | STREG %r0,TASK_PT_SR2(%r1) | 1979 | STREG %r0,TASK_PT_SR2(%r1) |
1980 | 1980 | ||
1981 | pt_regs_ok: | ||
1982 | LDREG TASK_PT_GR31(%r1),%r2 | 1981 | LDREG TASK_PT_GR31(%r1),%r2 |
1983 | depi 3,31,2,%r2 /* ensure return to user mode. */ | 1982 | depi 3,31,2,%r2 /* ensure return to user mode. */ |
1984 | STREG %r2,TASK_PT_IAOQ0(%r1) | 1983 | STREG %r2,TASK_PT_IAOQ0(%r1) |
1985 | ldo 4(%r2),%r2 | 1984 | ldo 4(%r2),%r2 |
1986 | STREG %r2,TASK_PT_IAOQ1(%r1) | 1985 | STREG %r2,TASK_PT_IAOQ1(%r1) |
1986 | b intr_restore | ||
1987 | copy %r25,%r16 | 1987 | copy %r25,%r16 |
1988 | |||
1989 | pt_regs_ok: | ||
1990 | LDREG TASK_PT_IAOQ0(%r1),%r2 | ||
1991 | depi 3,31,2,%r2 /* ensure return to user mode. */ | ||
1992 | STREG %r2,TASK_PT_IAOQ0(%r1) | ||
1993 | LDREG TASK_PT_IAOQ1(%r1),%r2 | ||
1994 | depi 3,31,2,%r2 | ||
1995 | STREG %r2,TASK_PT_IAOQ1(%r1) | ||
1988 | b intr_restore | 1996 | b intr_restore |
1989 | nop | 1997 | copy %r25,%r16 |
1990 | 1998 | ||
1991 | .import schedule,code | 1999 | .import schedule,code |
1992 | syscall_do_resched: | 2000 | syscall_do_resched: |
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index c0b1affc06a8..0299d63cd112 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c | |||
@@ -410,11 +410,13 @@ void __init init_IRQ(void) | |||
410 | { | 410 | { |
411 | local_irq_disable(); /* PARANOID - should already be disabled */ | 411 | local_irq_disable(); /* PARANOID - should already be disabled */ |
412 | mtctl(~0UL, 23); /* EIRR : clear all pending external intr */ | 412 | mtctl(~0UL, 23); /* EIRR : clear all pending external intr */ |
413 | claim_cpu_irqs(); | ||
414 | #ifdef CONFIG_SMP | 413 | #ifdef CONFIG_SMP |
415 | if (!cpu_eiem) | 414 | if (!cpu_eiem) { |
415 | claim_cpu_irqs(); | ||
416 | cpu_eiem = EIEM_MASK(IPI_IRQ) | EIEM_MASK(TIMER_IRQ); | 416 | cpu_eiem = EIEM_MASK(IPI_IRQ) | EIEM_MASK(TIMER_IRQ); |
417 | } | ||
417 | #else | 418 | #else |
419 | claim_cpu_irqs(); | ||
418 | cpu_eiem = EIEM_MASK(TIMER_IRQ); | 420 | cpu_eiem = EIEM_MASK(TIMER_IRQ); |
419 | #endif | 421 | #endif |
420 | set_eiem(cpu_eiem); /* EIEM : enable all external intr */ | 422 | set_eiem(cpu_eiem); /* EIEM : enable all external intr */ |
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c index 857c2f545470..534abd4936e1 100644 --- a/arch/parisc/kernel/ptrace.c +++ b/arch/parisc/kernel/ptrace.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <asm/asm-offsets.h> | 26 | #include <asm/asm-offsets.h> |
27 | 27 | ||
28 | /* PSW bits we allow the debugger to modify */ | 28 | /* PSW bits we allow the debugger to modify */ |
29 | #define USER_PSW_BITS (PSW_N | PSW_V | PSW_CB) | 29 | #define USER_PSW_BITS (PSW_N | PSW_B | PSW_V | PSW_CB) |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * Called by kernel/ptrace.c when detaching.. | 32 | * Called by kernel/ptrace.c when detaching.. |
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index 537996955998..fd051705a407 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c | |||
@@ -190,8 +190,10 @@ get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size) | |||
190 | DBG(1,"get_sigframe: ka = %#lx, sp = %#lx, frame_size = %#lx\n", | 190 | DBG(1,"get_sigframe: ka = %#lx, sp = %#lx, frame_size = %#lx\n", |
191 | (unsigned long)ka, sp, frame_size); | 191 | (unsigned long)ka, sp, frame_size); |
192 | 192 | ||
193 | /* Align alternate stack and reserve 64 bytes for the signal | ||
194 | handler's frame marker. */ | ||
193 | if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! sas_ss_flags(sp)) | 195 | if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! sas_ss_flags(sp)) |
194 | sp = current->sas_ss_sp; /* Stacks grow up! */ | 196 | sp = (current->sas_ss_sp + 0x7f) & ~0x3f; /* Stacks grow up! */ |
195 | 197 | ||
196 | DBG(1,"get_sigframe: Returning sp = %#lx\n", (unsigned long)sp); | 198 | DBG(1,"get_sigframe: Returning sp = %#lx\n", (unsigned long)sp); |
197 | return (void __user *) sp; /* Stacks grow up. Fun. */ | 199 | return (void __user *) sp; /* Stacks grow up. Fun. */ |
diff --git a/arch/parisc/math-emu/cnv_float.h b/arch/parisc/math-emu/cnv_float.h index 9071e093164a..933423fa5144 100644 --- a/arch/parisc/math-emu/cnv_float.h +++ b/arch/parisc/math-emu/cnv_float.h | |||
@@ -347,16 +347,15 @@ | |||
347 | Sgl_isinexact_to_fix(sgl_value,exponent) | 347 | Sgl_isinexact_to_fix(sgl_value,exponent) |
348 | 348 | ||
349 | #define Duint_from_sgl_mantissa(sgl_value,exponent,dresultA,dresultB) \ | 349 | #define Duint_from_sgl_mantissa(sgl_value,exponent,dresultA,dresultB) \ |
350 | {Sall(sgl_value) <<= SGL_EXP_LENGTH; /* left-justify */ \ | 350 | {unsigned int val = Sall(sgl_value) << SGL_EXP_LENGTH; \ |
351 | if (exponent <= 31) { \ | 351 | if (exponent <= 31) { \ |
352 | Dintp1(dresultA) = 0; \ | 352 | Dintp1(dresultA) = 0; \ |
353 | Dintp2(dresultB) = (unsigned)Sall(sgl_value) >> (31 - exponent); \ | 353 | Dintp2(dresultB) = val >> (31 - exponent); \ |
354 | } \ | 354 | } \ |
355 | else { \ | 355 | else { \ |
356 | Dintp1(dresultA) = Sall(sgl_value) >> (63 - exponent); \ | 356 | Dintp1(dresultA) = val >> (63 - exponent); \ |
357 | Dintp2(dresultB) = Sall(sgl_value) << (exponent - 31); \ | 357 | Dintp2(dresultB) = exponent <= 62 ? val << (exponent - 31) : 0; \ |
358 | } \ | 358 | } \ |
359 | Sall(sgl_value) >>= SGL_EXP_LENGTH; /* return to original */ \ | ||
360 | } | 359 | } |
361 | 360 | ||
362 | #define Duint_setzero(dresultA,dresultB) \ | 361 | #define Duint_setzero(dresultA,dresultB) \ |
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index d22e73e4618b..e514de57a125 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -439,6 +439,8 @@ ret_from_fork: | |||
439 | ret_from_kernel_thread: | 439 | ret_from_kernel_thread: |
440 | REST_NVGPRS(r1) | 440 | REST_NVGPRS(r1) |
441 | bl schedule_tail | 441 | bl schedule_tail |
442 | li r3,0 | ||
443 | stw r3,0(r1) | ||
442 | mtlr r14 | 444 | mtlr r14 |
443 | mr r3,r15 | 445 | mr r3,r15 |
444 | PPC440EP_ERR42 | 446 | PPC440EP_ERR42 |
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index b310a0573625..3d990d3bd8ba 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -664,6 +664,19 @@ resume_kernel: | |||
664 | ld r4,TI_FLAGS(r9) | 664 | ld r4,TI_FLAGS(r9) |
665 | andi. r0,r4,_TIF_NEED_RESCHED | 665 | andi. r0,r4,_TIF_NEED_RESCHED |
666 | bne 1b | 666 | bne 1b |
667 | |||
668 | /* | ||
669 | * arch_local_irq_restore() from preempt_schedule_irq above may | ||
670 | * enable hard interrupt but we really should disable interrupts | ||
671 | * when we return from the interrupt, and so that we don't get | ||
672 | * interrupted after loading SRR0/1. | ||
673 | */ | ||
674 | #ifdef CONFIG_PPC_BOOK3E | ||
675 | wrteei 0 | ||
676 | #else | ||
677 | ld r10,PACAKMSR(r13) /* Get kernel MSR without EE */ | ||
678 | mtmsrd r10,1 /* Update machine state */ | ||
679 | #endif /* CONFIG_PPC_BOOK3E */ | ||
667 | #endif /* CONFIG_PREEMPT */ | 680 | #endif /* CONFIG_PREEMPT */ |
668 | 681 | ||
669 | .globl fast_exc_return_irq | 682 | .globl fast_exc_return_irq |
diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c index c470a40b29f5..a7bc7521c064 100644 --- a/arch/powerpc/kernel/kgdb.c +++ b/arch/powerpc/kernel/kgdb.c | |||
@@ -154,12 +154,12 @@ static int kgdb_handle_breakpoint(struct pt_regs *regs) | |||
154 | static int kgdb_singlestep(struct pt_regs *regs) | 154 | static int kgdb_singlestep(struct pt_regs *regs) |
155 | { | 155 | { |
156 | struct thread_info *thread_info, *exception_thread_info; | 156 | struct thread_info *thread_info, *exception_thread_info; |
157 | struct thread_info *backup_current_thread_info = \ | 157 | struct thread_info *backup_current_thread_info; |
158 | (struct thread_info *)kmalloc(sizeof(struct thread_info), GFP_KERNEL); | ||
159 | 158 | ||
160 | if (user_mode(regs)) | 159 | if (user_mode(regs)) |
161 | return 0; | 160 | return 0; |
162 | 161 | ||
162 | backup_current_thread_info = (struct thread_info *)kmalloc(sizeof(struct thread_info), GFP_KERNEL); | ||
163 | /* | 163 | /* |
164 | * On Book E and perhaps other processors, singlestep is handled on | 164 | * On Book E and perhaps other processors, singlestep is handled on |
165 | * the critical exception stack. This causes current_thread_info() | 165 | * the critical exception stack. This causes current_thread_info() |
@@ -185,6 +185,7 @@ static int kgdb_singlestep(struct pt_regs *regs) | |||
185 | /* Restore current_thread_info lastly. */ | 185 | /* Restore current_thread_info lastly. */ |
186 | memcpy(exception_thread_info, backup_current_thread_info, sizeof *thread_info); | 186 | memcpy(exception_thread_info, backup_current_thread_info, sizeof *thread_info); |
187 | 187 | ||
188 | kfree(backup_current_thread_info); | ||
188 | return 1; | 189 | return 1; |
189 | } | 190 | } |
190 | 191 | ||
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 6f6b1cccc916..127361e093f4 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -494,10 +494,15 @@ void timer_interrupt(struct pt_regs * regs) | |||
494 | set_dec(DECREMENTER_MAX); | 494 | set_dec(DECREMENTER_MAX); |
495 | 495 | ||
496 | /* Some implementations of hotplug will get timer interrupts while | 496 | /* Some implementations of hotplug will get timer interrupts while |
497 | * offline, just ignore these | 497 | * offline, just ignore these and we also need to set |
498 | * decrementers_next_tb as MAX to make sure __check_irq_replay | ||
499 | * don't replay timer interrupt when return, otherwise we'll trap | ||
500 | * here infinitely :( | ||
498 | */ | 501 | */ |
499 | if (!cpu_online(smp_processor_id())) | 502 | if (!cpu_online(smp_processor_id())) { |
503 | *next_tb = ~(u64)0; | ||
500 | return; | 504 | return; |
505 | } | ||
501 | 506 | ||
502 | /* Conditionally hard-enable interrupts now that the DEC has been | 507 | /* Conditionally hard-enable interrupts now that the DEC has been |
503 | * bumped to its maximum value | 508 | * bumped to its maximum value |
diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index b0855e5d8905..9d9cddc5b346 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #define OP_31_XOP_TRAP 4 | 39 | #define OP_31_XOP_TRAP 4 |
40 | #define OP_31_XOP_LWZX 23 | 40 | #define OP_31_XOP_LWZX 23 |
41 | #define OP_31_XOP_TRAP_64 68 | 41 | #define OP_31_XOP_TRAP_64 68 |
42 | #define OP_31_XOP_DCBF 86 | ||
42 | #define OP_31_XOP_LBZX 87 | 43 | #define OP_31_XOP_LBZX 87 |
43 | #define OP_31_XOP_STWX 151 | 44 | #define OP_31_XOP_STWX 151 |
44 | #define OP_31_XOP_STBX 215 | 45 | #define OP_31_XOP_STBX 215 |
@@ -374,6 +375,7 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu) | |||
374 | emulated = kvmppc_emulate_mtspr(vcpu, sprn, rs); | 375 | emulated = kvmppc_emulate_mtspr(vcpu, sprn, rs); |
375 | break; | 376 | break; |
376 | 377 | ||
378 | case OP_31_XOP_DCBF: | ||
377 | case OP_31_XOP_DCBI: | 379 | case OP_31_XOP_DCBI: |
378 | /* Do nothing. The guest is performing dcbi because | 380 | /* Do nothing. The guest is performing dcbi because |
379 | * hardware DMA is not snooped by the dcache, but | 381 | * hardware DMA is not snooped by the dcache, but |
diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c index 315f9495e9b2..f444b94935f5 100644 --- a/arch/powerpc/oprofile/op_model_power4.c +++ b/arch/powerpc/oprofile/op_model_power4.c | |||
@@ -52,7 +52,7 @@ static int power7_marked_instr_event(u64 mmcr1) | |||
52 | for (pmc = 0; pmc < 4; pmc++) { | 52 | for (pmc = 0; pmc < 4; pmc++) { |
53 | psel = mmcr1 & (OPROFILE_PM_PMCSEL_MSK | 53 | psel = mmcr1 & (OPROFILE_PM_PMCSEL_MSK |
54 | << (OPROFILE_MAX_PMC_NUM - pmc) | 54 | << (OPROFILE_MAX_PMC_NUM - pmc) |
55 | * OPROFILE_MAX_PMC_NUM); | 55 | * OPROFILE_PMSEL_FIELD_WIDTH); |
56 | psel = (psel >> ((OPROFILE_MAX_PMC_NUM - pmc) | 56 | psel = (psel >> ((OPROFILE_MAX_PMC_NUM - pmc) |
57 | * OPROFILE_PMSEL_FIELD_WIDTH)) & ~1ULL; | 57 | * OPROFILE_PMSEL_FIELD_WIDTH)) & ~1ULL; |
58 | unit = mmcr1 & (OPROFILE_PM_UNIT_MSK | 58 | unit = mmcr1 & (OPROFILE_PM_UNIT_MSK |
diff --git a/arch/powerpc/platforms/pasemi/cpufreq.c b/arch/powerpc/platforms/pasemi/cpufreq.c index 95d00173029f..890f30e70f98 100644 --- a/arch/powerpc/platforms/pasemi/cpufreq.c +++ b/arch/powerpc/platforms/pasemi/cpufreq.c | |||
@@ -236,6 +236,13 @@ out: | |||
236 | 236 | ||
237 | static int pas_cpufreq_cpu_exit(struct cpufreq_policy *policy) | 237 | static int pas_cpufreq_cpu_exit(struct cpufreq_policy *policy) |
238 | { | 238 | { |
239 | /* | ||
240 | * We don't support CPU hotplug. Don't unmap after the system | ||
241 | * has already made it to a running state. | ||
242 | */ | ||
243 | if (system_state != SYSTEM_BOOTING) | ||
244 | return 0; | ||
245 | |||
239 | if (sdcasr_mapbase) | 246 | if (sdcasr_mapbase) |
240 | iounmap(sdcasr_mapbase); | 247 | iounmap(sdcasr_mapbase); |
241 | if (sdcpwr_mapbase) | 248 | if (sdcpwr_mapbase) |
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index c1d7930a82f4..098adbb62660 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -1365,6 +1365,18 @@ static inline void pmdp_invalidate(struct vm_area_struct *vma, | |||
1365 | __pmd_idte(address, pmdp); | 1365 | __pmd_idte(address, pmdp); |
1366 | } | 1366 | } |
1367 | 1367 | ||
1368 | #define __HAVE_ARCH_PMDP_SET_WRPROTECT | ||
1369 | static inline void pmdp_set_wrprotect(struct mm_struct *mm, | ||
1370 | unsigned long address, pmd_t *pmdp) | ||
1371 | { | ||
1372 | pmd_t pmd = *pmdp; | ||
1373 | |||
1374 | if (pmd_write(pmd)) { | ||
1375 | __pmd_idte(address, pmdp); | ||
1376 | set_pmd_at(mm, address, pmdp, pmd_wrprotect(pmd)); | ||
1377 | } | ||
1378 | } | ||
1379 | |||
1368 | static inline pmd_t mk_pmd_phys(unsigned long physpage, pgprot_t pgprot) | 1380 | static inline pmd_t mk_pmd_phys(unsigned long physpage, pgprot_t pgprot) |
1369 | { | 1381 | { |
1370 | pmd_t __pmd; | 1382 | pmd_t __pmd; |
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index ccce0ed67dde..379814bc41e3 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile | |||
@@ -71,7 +71,7 @@ GCOV_PROFILE := n | |||
71 | $(obj)/bzImage: asflags-y := $(SVGA_MODE) | 71 | $(obj)/bzImage: asflags-y := $(SVGA_MODE) |
72 | 72 | ||
73 | quiet_cmd_image = BUILD $@ | 73 | quiet_cmd_image = BUILD $@ |
74 | cmd_image = $(obj)/tools/build $(obj)/setup.bin $(obj)/vmlinux.bin > $@ | 74 | cmd_image = $(obj)/tools/build $(obj)/setup.bin $(obj)/vmlinux.bin $(obj)/zoffset.h > $@ |
75 | 75 | ||
76 | $(obj)/bzImage: $(obj)/setup.bin $(obj)/vmlinux.bin $(obj)/tools/build FORCE | 76 | $(obj)/bzImage: $(obj)/setup.bin $(obj)/vmlinux.bin $(obj)/tools/build FORCE |
77 | $(call if_changed,image) | 77 | $(call if_changed,image) |
@@ -92,7 +92,7 @@ targets += voffset.h | |||
92 | $(obj)/voffset.h: vmlinux FORCE | 92 | $(obj)/voffset.h: vmlinux FORCE |
93 | $(call if_changed,voffset) | 93 | $(call if_changed,voffset) |
94 | 94 | ||
95 | sed-zoffset := -e 's/^\([0-9a-fA-F]*\) . \(startup_32\|input_data\|_end\|z_.*\)$$/\#define ZO_\2 0x\1/p' | 95 | sed-zoffset := -e 's/^\([0-9a-fA-F]*\) . \(startup_32\|startup_64\|efi_pe_entry\|efi_stub_entry\|input_data\|_end\|z_.*\)$$/\#define ZO_\2 0x\1/p' |
96 | 96 | ||
97 | quiet_cmd_zoffset = ZOFFSET $@ | 97 | quiet_cmd_zoffset = ZOFFSET $@ |
98 | cmd_zoffset = $(NM) $< | sed -n $(sed-zoffset) > $@ | 98 | cmd_zoffset = $(NM) $< | sed -n $(sed-zoffset) > $@ |
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index 18e329ca108e..f8fa41190c35 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c | |||
@@ -256,10 +256,10 @@ static efi_status_t setup_efi_pci(struct boot_params *params) | |||
256 | int i; | 256 | int i; |
257 | struct setup_data *data; | 257 | struct setup_data *data; |
258 | 258 | ||
259 | data = (struct setup_data *)params->hdr.setup_data; | 259 | data = (struct setup_data *)(unsigned long)params->hdr.setup_data; |
260 | 260 | ||
261 | while (data && data->next) | 261 | while (data && data->next) |
262 | data = (struct setup_data *)data->next; | 262 | data = (struct setup_data *)(unsigned long)data->next; |
263 | 263 | ||
264 | status = efi_call_phys5(sys_table->boottime->locate_handle, | 264 | status = efi_call_phys5(sys_table->boottime->locate_handle, |
265 | EFI_LOCATE_BY_PROTOCOL, &pci_proto, | 265 | EFI_LOCATE_BY_PROTOCOL, &pci_proto, |
@@ -295,16 +295,18 @@ static efi_status_t setup_efi_pci(struct boot_params *params) | |||
295 | if (!pci) | 295 | if (!pci) |
296 | continue; | 296 | continue; |
297 | 297 | ||
298 | #ifdef CONFIG_X86_64 | ||
298 | status = efi_call_phys4(pci->attributes, pci, | 299 | status = efi_call_phys4(pci->attributes, pci, |
299 | EfiPciIoAttributeOperationGet, 0, | 300 | EfiPciIoAttributeOperationGet, 0, |
300 | &attributes); | 301 | &attributes); |
301 | 302 | #else | |
303 | status = efi_call_phys5(pci->attributes, pci, | ||
304 | EfiPciIoAttributeOperationGet, 0, 0, | ||
305 | &attributes); | ||
306 | #endif | ||
302 | if (status != EFI_SUCCESS) | 307 | if (status != EFI_SUCCESS) |
303 | continue; | 308 | continue; |
304 | 309 | ||
305 | if (!(attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM)) | ||
306 | continue; | ||
307 | |||
308 | if (!pci->romimage || !pci->romsize) | 310 | if (!pci->romimage || !pci->romsize) |
309 | continue; | 311 | continue; |
310 | 312 | ||
@@ -345,9 +347,9 @@ static efi_status_t setup_efi_pci(struct boot_params *params) | |||
345 | memcpy(rom->romdata, pci->romimage, pci->romsize); | 347 | memcpy(rom->romdata, pci->romimage, pci->romsize); |
346 | 348 | ||
347 | if (data) | 349 | if (data) |
348 | data->next = (uint64_t)rom; | 350 | data->next = (unsigned long)rom; |
349 | else | 351 | else |
350 | params->hdr.setup_data = (uint64_t)rom; | 352 | params->hdr.setup_data = (unsigned long)rom; |
351 | 353 | ||
352 | data = (struct setup_data *)rom; | 354 | data = (struct setup_data *)rom; |
353 | 355 | ||
@@ -432,10 +434,9 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto, | |||
432 | * Once we've found a GOP supporting ConOut, | 434 | * Once we've found a GOP supporting ConOut, |
433 | * don't bother looking any further. | 435 | * don't bother looking any further. |
434 | */ | 436 | */ |
437 | first_gop = gop; | ||
435 | if (conout_found) | 438 | if (conout_found) |
436 | break; | 439 | break; |
437 | |||
438 | first_gop = gop; | ||
439 | } | 440 | } |
440 | } | 441 | } |
441 | 442 | ||
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S index aa4aaf1b2380..1e3184f6072f 100644 --- a/arch/x86/boot/compressed/head_32.S +++ b/arch/x86/boot/compressed/head_32.S | |||
@@ -35,11 +35,11 @@ ENTRY(startup_32) | |||
35 | #ifdef CONFIG_EFI_STUB | 35 | #ifdef CONFIG_EFI_STUB |
36 | jmp preferred_addr | 36 | jmp preferred_addr |
37 | 37 | ||
38 | .balign 0x10 | ||
39 | /* | 38 | /* |
40 | * We don't need the return address, so set up the stack so | 39 | * We don't need the return address, so set up the stack so |
41 | * efi_main() can find its arugments. | 40 | * efi_main() can find its arguments. |
42 | */ | 41 | */ |
42 | ENTRY(efi_pe_entry) | ||
43 | add $0x4, %esp | 43 | add $0x4, %esp |
44 | 44 | ||
45 | call make_boot_params | 45 | call make_boot_params |
@@ -50,8 +50,10 @@ ENTRY(startup_32) | |||
50 | pushl %eax | 50 | pushl %eax |
51 | pushl %esi | 51 | pushl %esi |
52 | pushl %ecx | 52 | pushl %ecx |
53 | sub $0x4, %esp | ||
53 | 54 | ||
54 | .org 0x30,0x90 | 55 | ENTRY(efi_stub_entry) |
56 | add $0x4, %esp | ||
55 | call efi_main | 57 | call efi_main |
56 | cmpl $0, %eax | 58 | cmpl $0, %eax |
57 | movl %eax, %esi | 59 | movl %eax, %esi |
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S index 2c4b171eec33..f5d1aaa0dec8 100644 --- a/arch/x86/boot/compressed/head_64.S +++ b/arch/x86/boot/compressed/head_64.S | |||
@@ -201,12 +201,12 @@ ENTRY(startup_64) | |||
201 | */ | 201 | */ |
202 | #ifdef CONFIG_EFI_STUB | 202 | #ifdef CONFIG_EFI_STUB |
203 | /* | 203 | /* |
204 | * The entry point for the PE/COFF executable is 0x210, so only | 204 | * The entry point for the PE/COFF executable is efi_pe_entry, so |
205 | * legacy boot loaders will execute this jmp. | 205 | * only legacy boot loaders will execute this jmp. |
206 | */ | 206 | */ |
207 | jmp preferred_addr | 207 | jmp preferred_addr |
208 | 208 | ||
209 | .org 0x210 | 209 | ENTRY(efi_pe_entry) |
210 | mov %rcx, %rdi | 210 | mov %rcx, %rdi |
211 | mov %rdx, %rsi | 211 | mov %rdx, %rsi |
212 | pushq %rdi | 212 | pushq %rdi |
@@ -218,7 +218,7 @@ ENTRY(startup_64) | |||
218 | popq %rsi | 218 | popq %rsi |
219 | popq %rdi | 219 | popq %rdi |
220 | 220 | ||
221 | .org 0x230,0x90 | 221 | ENTRY(efi_stub_entry) |
222 | call efi_main | 222 | call efi_main |
223 | movq %rax,%rsi | 223 | movq %rax,%rsi |
224 | cmpq $0,%rax | 224 | cmpq $0,%rax |
diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S index 8c132a625b94..944ce595f767 100644 --- a/arch/x86/boot/header.S +++ b/arch/x86/boot/header.S | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <asm/e820.h> | 21 | #include <asm/e820.h> |
22 | #include <asm/page_types.h> | 22 | #include <asm/page_types.h> |
23 | #include <asm/setup.h> | 23 | #include <asm/setup.h> |
24 | #include <asm/bootparam.h> | ||
24 | #include "boot.h" | 25 | #include "boot.h" |
25 | #include "voffset.h" | 26 | #include "voffset.h" |
26 | #include "zoffset.h" | 27 | #include "zoffset.h" |
@@ -255,6 +256,9 @@ section_table: | |||
255 | # header, from the old boot sector. | 256 | # header, from the old boot sector. |
256 | 257 | ||
257 | .section ".header", "a" | 258 | .section ".header", "a" |
259 | .globl sentinel | ||
260 | sentinel: .byte 0xff, 0xff /* Used to detect broken loaders */ | ||
261 | |||
258 | .globl hdr | 262 | .globl hdr |
259 | hdr: | 263 | hdr: |
260 | setup_sects: .byte 0 /* Filled in by build.c */ | 264 | setup_sects: .byte 0 /* Filled in by build.c */ |
@@ -279,7 +283,7 @@ _start: | |||
279 | # Part 2 of the header, from the old setup.S | 283 | # Part 2 of the header, from the old setup.S |
280 | 284 | ||
281 | .ascii "HdrS" # header signature | 285 | .ascii "HdrS" # header signature |
282 | .word 0x020b # header version number (>= 0x0105) | 286 | .word 0x020c # header version number (>= 0x0105) |
283 | # or else old loadlin-1.5 will fail) | 287 | # or else old loadlin-1.5 will fail) |
284 | .globl realmode_swtch | 288 | .globl realmode_swtch |
285 | realmode_swtch: .word 0, 0 # default_switch, SETUPSEG | 289 | realmode_swtch: .word 0, 0 # default_switch, SETUPSEG |
@@ -297,13 +301,7 @@ type_of_loader: .byte 0 # 0 means ancient bootloader, newer | |||
297 | 301 | ||
298 | # flags, unused bits must be zero (RFU) bit within loadflags | 302 | # flags, unused bits must be zero (RFU) bit within loadflags |
299 | loadflags: | 303 | loadflags: |
300 | LOADED_HIGH = 1 # If set, the kernel is loaded high | 304 | .byte LOADED_HIGH # The kernel is to be loaded high |
301 | CAN_USE_HEAP = 0x80 # If set, the loader also has set | ||
302 | # heap_end_ptr to tell how much | ||
303 | # space behind setup.S can be used for | ||
304 | # heap purposes. | ||
305 | # Only the loader knows what is free | ||
306 | .byte LOADED_HIGH | ||
307 | 305 | ||
308 | setup_move_size: .word 0x8000 # size to move, when setup is not | 306 | setup_move_size: .word 0x8000 # size to move, when setup is not |
309 | # loaded at 0x90000. We will move setup | 307 | # loaded at 0x90000. We will move setup |
@@ -369,7 +367,23 @@ relocatable_kernel: .byte 1 | |||
369 | relocatable_kernel: .byte 0 | 367 | relocatable_kernel: .byte 0 |
370 | #endif | 368 | #endif |
371 | min_alignment: .byte MIN_KERNEL_ALIGN_LG2 # minimum alignment | 369 | min_alignment: .byte MIN_KERNEL_ALIGN_LG2 # minimum alignment |
372 | pad3: .word 0 | 370 | |
371 | xloadflags: | ||
372 | #ifdef CONFIG_X86_64 | ||
373 | # define XLF0 XLF_KERNEL_64 /* 64-bit kernel */ | ||
374 | #else | ||
375 | # define XLF0 0 | ||
376 | #endif | ||
377 | #ifdef CONFIG_EFI_STUB | ||
378 | # ifdef CONFIG_X86_64 | ||
379 | # define XLF23 XLF_EFI_HANDOVER_64 /* 64-bit EFI handover ok */ | ||
380 | # else | ||
381 | # define XLF23 XLF_EFI_HANDOVER_32 /* 32-bit EFI handover ok */ | ||
382 | # endif | ||
383 | #else | ||
384 | # define XLF23 0 | ||
385 | #endif | ||
386 | .word XLF0 | XLF23 | ||
373 | 387 | ||
374 | cmdline_size: .long COMMAND_LINE_SIZE-1 #length of the command line, | 388 | cmdline_size: .long COMMAND_LINE_SIZE-1 #length of the command line, |
375 | #added with boot protocol | 389 | #added with boot protocol |
@@ -397,8 +411,13 @@ pref_address: .quad LOAD_PHYSICAL_ADDR # preferred load addr | |||
397 | #define INIT_SIZE VO_INIT_SIZE | 411 | #define INIT_SIZE VO_INIT_SIZE |
398 | #endif | 412 | #endif |
399 | init_size: .long INIT_SIZE # kernel initialization size | 413 | init_size: .long INIT_SIZE # kernel initialization size |
400 | handover_offset: .long 0x30 # offset to the handover | 414 | handover_offset: |
415 | #ifdef CONFIG_EFI_STUB | ||
416 | .long 0x30 # offset to the handover | ||
401 | # protocol entry point | 417 | # protocol entry point |
418 | #else | ||
419 | .long 0 | ||
420 | #endif | ||
402 | 421 | ||
403 | # End of setup header ##################################################### | 422 | # End of setup header ##################################################### |
404 | 423 | ||
diff --git a/arch/x86/boot/setup.ld b/arch/x86/boot/setup.ld index 03c0683636b6..96a6c7563538 100644 --- a/arch/x86/boot/setup.ld +++ b/arch/x86/boot/setup.ld | |||
@@ -13,7 +13,7 @@ SECTIONS | |||
13 | .bstext : { *(.bstext) } | 13 | .bstext : { *(.bstext) } |
14 | .bsdata : { *(.bsdata) } | 14 | .bsdata : { *(.bsdata) } |
15 | 15 | ||
16 | . = 497; | 16 | . = 495; |
17 | .header : { *(.header) } | 17 | .header : { *(.header) } |
18 | .entrytext : { *(.entrytext) } | 18 | .entrytext : { *(.entrytext) } |
19 | .inittext : { *(.inittext) } | 19 | .inittext : { *(.inittext) } |
diff --git a/arch/x86/boot/tools/build.c b/arch/x86/boot/tools/build.c index 4b8e165ee572..94c544650020 100644 --- a/arch/x86/boot/tools/build.c +++ b/arch/x86/boot/tools/build.c | |||
@@ -52,6 +52,10 @@ int is_big_kernel; | |||
52 | 52 | ||
53 | #define PECOFF_RELOC_RESERVE 0x20 | 53 | #define PECOFF_RELOC_RESERVE 0x20 |
54 | 54 | ||
55 | unsigned long efi_stub_entry; | ||
56 | unsigned long efi_pe_entry; | ||
57 | unsigned long startup_64; | ||
58 | |||
55 | /*----------------------------------------------------------------------*/ | 59 | /*----------------------------------------------------------------------*/ |
56 | 60 | ||
57 | static const u32 crctab32[] = { | 61 | static const u32 crctab32[] = { |
@@ -132,7 +136,7 @@ static void die(const char * str, ...) | |||
132 | 136 | ||
133 | static void usage(void) | 137 | static void usage(void) |
134 | { | 138 | { |
135 | die("Usage: build setup system [> image]"); | 139 | die("Usage: build setup system [zoffset.h] [> image]"); |
136 | } | 140 | } |
137 | 141 | ||
138 | #ifdef CONFIG_EFI_STUB | 142 | #ifdef CONFIG_EFI_STUB |
@@ -206,30 +210,54 @@ static void update_pecoff_text(unsigned int text_start, unsigned int file_sz) | |||
206 | */ | 210 | */ |
207 | put_unaligned_le32(file_sz - 512, &buf[pe_header + 0x1c]); | 211 | put_unaligned_le32(file_sz - 512, &buf[pe_header + 0x1c]); |
208 | 212 | ||
209 | #ifdef CONFIG_X86_32 | ||
210 | /* | 213 | /* |
211 | * Address of entry point. | 214 | * Address of entry point for PE/COFF executable |
212 | * | ||
213 | * The EFI stub entry point is +16 bytes from the start of | ||
214 | * the .text section. | ||
215 | */ | 215 | */ |
216 | put_unaligned_le32(text_start + 16, &buf[pe_header + 0x28]); | 216 | put_unaligned_le32(text_start + efi_pe_entry, &buf[pe_header + 0x28]); |
217 | #else | ||
218 | /* | ||
219 | * Address of entry point. startup_32 is at the beginning and | ||
220 | * the 64-bit entry point (startup_64) is always 512 bytes | ||
221 | * after. The EFI stub entry point is 16 bytes after that, as | ||
222 | * the first instruction allows legacy loaders to jump over | ||
223 | * the EFI stub initialisation | ||
224 | */ | ||
225 | put_unaligned_le32(text_start + 528, &buf[pe_header + 0x28]); | ||
226 | #endif /* CONFIG_X86_32 */ | ||
227 | 217 | ||
228 | update_pecoff_section_header(".text", text_start, text_sz); | 218 | update_pecoff_section_header(".text", text_start, text_sz); |
229 | } | 219 | } |
230 | 220 | ||
231 | #endif /* CONFIG_EFI_STUB */ | 221 | #endif /* CONFIG_EFI_STUB */ |
232 | 222 | ||
223 | |||
224 | /* | ||
225 | * Parse zoffset.h and find the entry points. We could just #include zoffset.h | ||
226 | * but that would mean tools/build would have to be rebuilt every time. It's | ||
227 | * not as if parsing it is hard... | ||
228 | */ | ||
229 | #define PARSE_ZOFS(p, sym) do { \ | ||
230 | if (!strncmp(p, "#define ZO_" #sym " ", 11+sizeof(#sym))) \ | ||
231 | sym = strtoul(p + 11 + sizeof(#sym), NULL, 16); \ | ||
232 | } while (0) | ||
233 | |||
234 | static void parse_zoffset(char *fname) | ||
235 | { | ||
236 | FILE *file; | ||
237 | char *p; | ||
238 | int c; | ||
239 | |||
240 | file = fopen(fname, "r"); | ||
241 | if (!file) | ||
242 | die("Unable to open `%s': %m", fname); | ||
243 | c = fread(buf, 1, sizeof(buf) - 1, file); | ||
244 | if (ferror(file)) | ||
245 | die("read-error on `zoffset.h'"); | ||
246 | buf[c] = 0; | ||
247 | |||
248 | p = (char *)buf; | ||
249 | |||
250 | while (p && *p) { | ||
251 | PARSE_ZOFS(p, efi_stub_entry); | ||
252 | PARSE_ZOFS(p, efi_pe_entry); | ||
253 | PARSE_ZOFS(p, startup_64); | ||
254 | |||
255 | p = strchr(p, '\n'); | ||
256 | while (p && (*p == '\r' || *p == '\n')) | ||
257 | p++; | ||
258 | } | ||
259 | } | ||
260 | |||
233 | int main(int argc, char ** argv) | 261 | int main(int argc, char ** argv) |
234 | { | 262 | { |
235 | unsigned int i, sz, setup_sectors; | 263 | unsigned int i, sz, setup_sectors; |
@@ -241,7 +269,19 @@ int main(int argc, char ** argv) | |||
241 | void *kernel; | 269 | void *kernel; |
242 | u32 crc = 0xffffffffUL; | 270 | u32 crc = 0xffffffffUL; |
243 | 271 | ||
244 | if (argc != 3) | 272 | /* Defaults for old kernel */ |
273 | #ifdef CONFIG_X86_32 | ||
274 | efi_pe_entry = 0x10; | ||
275 | efi_stub_entry = 0x30; | ||
276 | #else | ||
277 | efi_pe_entry = 0x210; | ||
278 | efi_stub_entry = 0x230; | ||
279 | startup_64 = 0x200; | ||
280 | #endif | ||
281 | |||
282 | if (argc == 4) | ||
283 | parse_zoffset(argv[3]); | ||
284 | else if (argc != 3) | ||
245 | usage(); | 285 | usage(); |
246 | 286 | ||
247 | /* Copy the setup code */ | 287 | /* Copy the setup code */ |
@@ -299,6 +339,11 @@ int main(int argc, char ** argv) | |||
299 | 339 | ||
300 | #ifdef CONFIG_EFI_STUB | 340 | #ifdef CONFIG_EFI_STUB |
301 | update_pecoff_text(setup_sectors * 512, sz + i + ((sys_size * 16) - sz)); | 341 | update_pecoff_text(setup_sectors * 512, sz + i + ((sys_size * 16) - sz)); |
342 | |||
343 | #ifdef CONFIG_X86_64 /* Yes, this is really how we defined it :( */ | ||
344 | efi_stub_entry -= 0x200; | ||
345 | #endif | ||
346 | put_unaligned_le32(efi_stub_entry, &buf[0x264]); | ||
302 | #endif | 347 | #endif |
303 | 348 | ||
304 | crc = partial_crc32(buf, i, crc); | 349 | crc = partial_crc32(buf, i, crc); |
diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h index 92862cd90201..c15ddaf90710 100644 --- a/arch/x86/include/uapi/asm/bootparam.h +++ b/arch/x86/include/uapi/asm/bootparam.h | |||
@@ -1,6 +1,31 @@ | |||
1 | #ifndef _ASM_X86_BOOTPARAM_H | 1 | #ifndef _ASM_X86_BOOTPARAM_H |
2 | #define _ASM_X86_BOOTPARAM_H | 2 | #define _ASM_X86_BOOTPARAM_H |
3 | 3 | ||
4 | /* setup_data types */ | ||
5 | #define SETUP_NONE 0 | ||
6 | #define SETUP_E820_EXT 1 | ||
7 | #define SETUP_DTB 2 | ||
8 | #define SETUP_PCI 3 | ||
9 | |||
10 | /* ram_size flags */ | ||
11 | #define RAMDISK_IMAGE_START_MASK 0x07FF | ||
12 | #define RAMDISK_PROMPT_FLAG 0x8000 | ||
13 | #define RAMDISK_LOAD_FLAG 0x4000 | ||
14 | |||
15 | /* loadflags */ | ||
16 | #define LOADED_HIGH (1<<0) | ||
17 | #define QUIET_FLAG (1<<5) | ||
18 | #define KEEP_SEGMENTS (1<<6) | ||
19 | #define CAN_USE_HEAP (1<<7) | ||
20 | |||
21 | /* xloadflags */ | ||
22 | #define XLF_KERNEL_64 (1<<0) | ||
23 | #define XLF_CAN_BE_LOADED_ABOVE_4G (1<<1) | ||
24 | #define XLF_EFI_HANDOVER_32 (1<<2) | ||
25 | #define XLF_EFI_HANDOVER_64 (1<<3) | ||
26 | |||
27 | #ifndef __ASSEMBLY__ | ||
28 | |||
4 | #include <linux/types.h> | 29 | #include <linux/types.h> |
5 | #include <linux/screen_info.h> | 30 | #include <linux/screen_info.h> |
6 | #include <linux/apm_bios.h> | 31 | #include <linux/apm_bios.h> |
@@ -9,12 +34,6 @@ | |||
9 | #include <asm/ist.h> | 34 | #include <asm/ist.h> |
10 | #include <video/edid.h> | 35 | #include <video/edid.h> |
11 | 36 | ||
12 | /* setup data types */ | ||
13 | #define SETUP_NONE 0 | ||
14 | #define SETUP_E820_EXT 1 | ||
15 | #define SETUP_DTB 2 | ||
16 | #define SETUP_PCI 3 | ||
17 | |||
18 | /* extensible setup data list node */ | 37 | /* extensible setup data list node */ |
19 | struct setup_data { | 38 | struct setup_data { |
20 | __u64 next; | 39 | __u64 next; |
@@ -28,9 +47,6 @@ struct setup_header { | |||
28 | __u16 root_flags; | 47 | __u16 root_flags; |
29 | __u32 syssize; | 48 | __u32 syssize; |
30 | __u16 ram_size; | 49 | __u16 ram_size; |
31 | #define RAMDISK_IMAGE_START_MASK 0x07FF | ||
32 | #define RAMDISK_PROMPT_FLAG 0x8000 | ||
33 | #define RAMDISK_LOAD_FLAG 0x4000 | ||
34 | __u16 vid_mode; | 50 | __u16 vid_mode; |
35 | __u16 root_dev; | 51 | __u16 root_dev; |
36 | __u16 boot_flag; | 52 | __u16 boot_flag; |
@@ -42,10 +58,6 @@ struct setup_header { | |||
42 | __u16 kernel_version; | 58 | __u16 kernel_version; |
43 | __u8 type_of_loader; | 59 | __u8 type_of_loader; |
44 | __u8 loadflags; | 60 | __u8 loadflags; |
45 | #define LOADED_HIGH (1<<0) | ||
46 | #define QUIET_FLAG (1<<5) | ||
47 | #define KEEP_SEGMENTS (1<<6) | ||
48 | #define CAN_USE_HEAP (1<<7) | ||
49 | __u16 setup_move_size; | 61 | __u16 setup_move_size; |
50 | __u32 code32_start; | 62 | __u32 code32_start; |
51 | __u32 ramdisk_image; | 63 | __u32 ramdisk_image; |
@@ -58,7 +70,8 @@ struct setup_header { | |||
58 | __u32 initrd_addr_max; | 70 | __u32 initrd_addr_max; |
59 | __u32 kernel_alignment; | 71 | __u32 kernel_alignment; |
60 | __u8 relocatable_kernel; | 72 | __u8 relocatable_kernel; |
61 | __u8 _pad2[3]; | 73 | __u8 min_alignment; |
74 | __u16 xloadflags; | ||
62 | __u32 cmdline_size; | 75 | __u32 cmdline_size; |
63 | __u32 hardware_subarch; | 76 | __u32 hardware_subarch; |
64 | __u64 hardware_subarch_data; | 77 | __u64 hardware_subarch_data; |
@@ -106,7 +119,10 @@ struct boot_params { | |||
106 | __u8 hd1_info[16]; /* obsolete! */ /* 0x090 */ | 119 | __u8 hd1_info[16]; /* obsolete! */ /* 0x090 */ |
107 | struct sys_desc_table sys_desc_table; /* 0x0a0 */ | 120 | struct sys_desc_table sys_desc_table; /* 0x0a0 */ |
108 | struct olpc_ofw_header olpc_ofw_header; /* 0x0b0 */ | 121 | struct olpc_ofw_header olpc_ofw_header; /* 0x0b0 */ |
109 | __u8 _pad4[128]; /* 0x0c0 */ | 122 | __u32 ext_ramdisk_image; /* 0x0c0 */ |
123 | __u32 ext_ramdisk_size; /* 0x0c4 */ | ||
124 | __u32 ext_cmd_line_ptr; /* 0x0c8 */ | ||
125 | __u8 _pad4[116]; /* 0x0cc */ | ||
110 | struct edid_info edid_info; /* 0x140 */ | 126 | struct edid_info edid_info; /* 0x140 */ |
111 | struct efi_info efi_info; /* 0x1c0 */ | 127 | struct efi_info efi_info; /* 0x1c0 */ |
112 | __u32 alt_mem_k; /* 0x1e0 */ | 128 | __u32 alt_mem_k; /* 0x1e0 */ |
@@ -115,7 +131,20 @@ struct boot_params { | |||
115 | __u8 eddbuf_entries; /* 0x1e9 */ | 131 | __u8 eddbuf_entries; /* 0x1e9 */ |
116 | __u8 edd_mbr_sig_buf_entries; /* 0x1ea */ | 132 | __u8 edd_mbr_sig_buf_entries; /* 0x1ea */ |
117 | __u8 kbd_status; /* 0x1eb */ | 133 | __u8 kbd_status; /* 0x1eb */ |
118 | __u8 _pad6[5]; /* 0x1ec */ | 134 | __u8 _pad5[3]; /* 0x1ec */ |
135 | /* | ||
136 | * The sentinel is set to a nonzero value (0xff) in header.S. | ||
137 | * | ||
138 | * A bootloader is supposed to only take setup_header and put | ||
139 | * it into a clean boot_params buffer. If it turns out that | ||
140 | * it is clumsy or too generous with the buffer, it most | ||
141 | * probably will pick up the sentinel variable too. The fact | ||
142 | * that this variable then is still 0xff will let kernel | ||
143 | * know that some variables in boot_params are invalid and | ||
144 | * kernel should zero out certain portions of boot_params. | ||
145 | */ | ||
146 | __u8 sentinel; /* 0x1ef */ | ||
147 | __u8 _pad6[1]; /* 0x1f0 */ | ||
119 | struct setup_header hdr; /* setup header */ /* 0x1f1 */ | 148 | struct setup_header hdr; /* setup header */ /* 0x1f1 */ |
120 | __u8 _pad7[0x290-0x1f1-sizeof(struct setup_header)]; | 149 | __u8 _pad7[0x290-0x1f1-sizeof(struct setup_header)]; |
121 | __u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX]; /* 0x290 */ | 150 | __u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX]; /* 0x290 */ |
@@ -134,6 +163,6 @@ enum { | |||
134 | X86_NR_SUBARCHS, | 163 | X86_NR_SUBARCHS, |
135 | }; | 164 | }; |
136 | 165 | ||
137 | 166 | #endif /* __ASSEMBLY__ */ | |
138 | 167 | ||
139 | #endif /* _ASM_X86_BOOTPARAM_H */ | 168 | #endif /* _ASM_X86_BOOTPARAM_H */ |
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 4428fd178bce..6774c17a5576 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -340,9 +340,6 @@ int x86_setup_perfctr(struct perf_event *event) | |||
340 | /* BTS is currently only allowed for user-mode. */ | 340 | /* BTS is currently only allowed for user-mode. */ |
341 | if (!attr->exclude_kernel) | 341 | if (!attr->exclude_kernel) |
342 | return -EOPNOTSUPP; | 342 | return -EOPNOTSUPP; |
343 | |||
344 | if (!attr->exclude_guest) | ||
345 | return -EOPNOTSUPP; | ||
346 | } | 343 | } |
347 | 344 | ||
348 | hwc->config |= config; | 345 | hwc->config |= config; |
@@ -385,9 +382,6 @@ int x86_pmu_hw_config(struct perf_event *event) | |||
385 | if (event->attr.precise_ip) { | 382 | if (event->attr.precise_ip) { |
386 | int precise = 0; | 383 | int precise = 0; |
387 | 384 | ||
388 | if (!event->attr.exclude_guest) | ||
389 | return -EOPNOTSUPP; | ||
390 | |||
391 | /* Support for constant skid */ | 385 | /* Support for constant skid */ |
392 | if (x86_pmu.pebs_active && !x86_pmu.pebs_broken) { | 386 | if (x86_pmu.pebs_active && !x86_pmu.pebs_broken) { |
393 | precise++; | 387 | precise++; |
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index ff84d5469d77..6ed91d9980e2 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
@@ -1065,7 +1065,6 @@ ENTRY(xen_failsafe_callback) | |||
1065 | lea 16(%esp),%esp | 1065 | lea 16(%esp),%esp |
1066 | CFI_ADJUST_CFA_OFFSET -16 | 1066 | CFI_ADJUST_CFA_OFFSET -16 |
1067 | jz 5f | 1067 | jz 5f |
1068 | addl $16,%esp | ||
1069 | jmp iret_exc | 1068 | jmp iret_exc |
1070 | 5: pushl_cfi $-1 /* orig_ax = -1 => not a system call */ | 1069 | 5: pushl_cfi $-1 /* orig_ax = -1 => not a system call */ |
1071 | SAVE_ALL | 1070 | SAVE_ALL |
diff --git a/arch/x86/kernel/step.c b/arch/x86/kernel/step.c index cd3b2438a980..9b4d51d0c0d0 100644 --- a/arch/x86/kernel/step.c +++ b/arch/x86/kernel/step.c | |||
@@ -165,10 +165,11 @@ void set_task_blockstep(struct task_struct *task, bool on) | |||
165 | * Ensure irq/preemption can't change debugctl in between. | 165 | * Ensure irq/preemption can't change debugctl in between. |
166 | * Note also that both TIF_BLOCKSTEP and debugctl should | 166 | * Note also that both TIF_BLOCKSTEP and debugctl should |
167 | * be changed atomically wrt preemption. | 167 | * be changed atomically wrt preemption. |
168 | * FIXME: this means that set/clear TIF_BLOCKSTEP is simply | 168 | * |
169 | * wrong if task != current, SIGKILL can wakeup the stopped | 169 | * NOTE: this means that set/clear TIF_BLOCKSTEP is only safe if |
170 | * tracee and set/clear can play with the running task, this | 170 | * task is current or it can't be running, otherwise we can race |
171 | * can confuse the next __switch_to_xtra(). | 171 | * with __switch_to_xtra(). We rely on ptrace_freeze_traced() but |
172 | * PTRACE_KILL is not safe. | ||
172 | */ | 173 | */ |
173 | local_irq_disable(); | 174 | local_irq_disable(); |
174 | debugctl = get_debugctlmsr(); | 175 | debugctl = get_debugctlmsr(); |
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 5426e482db6e..77cf0090c0a3 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c | |||
@@ -949,7 +949,7 @@ void __init efi_enter_virtual_mode(void) | |||
949 | * | 949 | * |
950 | * Call EFI services through wrapper functions. | 950 | * Call EFI services through wrapper functions. |
951 | */ | 951 | */ |
952 | efi.runtime_version = efi_systab.fw_revision; | 952 | efi.runtime_version = efi_systab.hdr.revision; |
953 | efi.get_time = virt_efi_get_time; | 953 | efi.get_time = virt_efi_get_time; |
954 | efi.set_time = virt_efi_set_time; | 954 | efi.set_time = virt_efi_set_time; |
955 | efi.get_wakeup_time = virt_efi_get_wakeup_time; | 955 | efi.get_wakeup_time = virt_efi_get_wakeup_time; |
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c index 95fd505dfeb6..2b2003860615 100644 --- a/arch/x86/platform/efi/efi_64.c +++ b/arch/x86/platform/efi/efi_64.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include <asm/cacheflush.h> | 38 | #include <asm/cacheflush.h> |
39 | #include <asm/fixmap.h> | 39 | #include <asm/fixmap.h> |
40 | 40 | ||
41 | static pgd_t save_pgd __initdata; | 41 | static pgd_t *save_pgd __initdata; |
42 | static unsigned long efi_flags __initdata; | 42 | static unsigned long efi_flags __initdata; |
43 | 43 | ||
44 | static void __init early_code_mapping_set_exec(int executable) | 44 | static void __init early_code_mapping_set_exec(int executable) |
@@ -61,12 +61,20 @@ static void __init early_code_mapping_set_exec(int executable) | |||
61 | void __init efi_call_phys_prelog(void) | 61 | void __init efi_call_phys_prelog(void) |
62 | { | 62 | { |
63 | unsigned long vaddress; | 63 | unsigned long vaddress; |
64 | int pgd; | ||
65 | int n_pgds; | ||
64 | 66 | ||
65 | early_code_mapping_set_exec(1); | 67 | early_code_mapping_set_exec(1); |
66 | local_irq_save(efi_flags); | 68 | local_irq_save(efi_flags); |
67 | vaddress = (unsigned long)__va(0x0UL); | 69 | |
68 | save_pgd = *pgd_offset_k(0x0UL); | 70 | n_pgds = DIV_ROUND_UP((max_pfn << PAGE_SHIFT), PGDIR_SIZE); |
69 | set_pgd(pgd_offset_k(0x0UL), *pgd_offset_k(vaddress)); | 71 | save_pgd = kmalloc(n_pgds * sizeof(pgd_t), GFP_KERNEL); |
72 | |||
73 | for (pgd = 0; pgd < n_pgds; pgd++) { | ||
74 | save_pgd[pgd] = *pgd_offset_k(pgd * PGDIR_SIZE); | ||
75 | vaddress = (unsigned long)__va(pgd * PGDIR_SIZE); | ||
76 | set_pgd(pgd_offset_k(pgd * PGDIR_SIZE), *pgd_offset_k(vaddress)); | ||
77 | } | ||
70 | __flush_tlb_all(); | 78 | __flush_tlb_all(); |
71 | } | 79 | } |
72 | 80 | ||
@@ -75,7 +83,11 @@ void __init efi_call_phys_epilog(void) | |||
75 | /* | 83 | /* |
76 | * After the lock is released, the original page table is restored. | 84 | * After the lock is released, the original page table is restored. |
77 | */ | 85 | */ |
78 | set_pgd(pgd_offset_k(0x0UL), save_pgd); | 86 | int pgd; |
87 | int n_pgds = DIV_ROUND_UP((max_pfn << PAGE_SHIFT) , PGDIR_SIZE); | ||
88 | for (pgd = 0; pgd < n_pgds; pgd++) | ||
89 | set_pgd(pgd_offset_k(pgd * PGDIR_SIZE), save_pgd[pgd]); | ||
90 | kfree(save_pgd); | ||
79 | __flush_tlb_all(); | 91 | __flush_tlb_all(); |
80 | local_irq_restore(efi_flags); | 92 | local_irq_restore(efi_flags); |
81 | early_code_mapping_set_exec(0); | 93 | early_code_mapping_set_exec(0); |
diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c index 5a1847d61930..79d67bd507fa 100644 --- a/arch/x86/tools/relocs.c +++ b/arch/x86/tools/relocs.c | |||
@@ -814,12 +814,14 @@ int main(int argc, char **argv) | |||
814 | read_relocs(fp); | 814 | read_relocs(fp); |
815 | if (show_absolute_syms) { | 815 | if (show_absolute_syms) { |
816 | print_absolute_symbols(); | 816 | print_absolute_symbols(); |
817 | return 0; | 817 | goto out; |
818 | } | 818 | } |
819 | if (show_absolute_relocs) { | 819 | if (show_absolute_relocs) { |
820 | print_absolute_relocs(); | 820 | print_absolute_relocs(); |
821 | return 0; | 821 | goto out; |
822 | } | 822 | } |
823 | emit_relocs(as_text, use_real_mode); | 823 | emit_relocs(as_text, use_real_mode); |
824 | out: | ||
825 | fclose(fp); | ||
824 | return 0; | 826 | return 0; |
825 | } | 827 | } |
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index 4f7d2599b484..34bc4cee8887 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c | |||
@@ -432,13 +432,6 @@ static void __cpuinit xen_play_dead(void) /* used only with HOTPLUG_CPU */ | |||
432 | play_dead_common(); | 432 | play_dead_common(); |
433 | HYPERVISOR_vcpu_op(VCPUOP_down, smp_processor_id(), NULL); | 433 | HYPERVISOR_vcpu_op(VCPUOP_down, smp_processor_id(), NULL); |
434 | cpu_bringup(); | 434 | cpu_bringup(); |
435 | /* | ||
436 | * Balance out the preempt calls - as we are running in cpu_idle | ||
437 | * loop which has been called at bootup from cpu_bringup_and_idle. | ||
438 | * The cpucpu_bringup_and_idle called cpu_bringup which made a | ||
439 | * preempt_disable() So this preempt_enable will balance it out. | ||
440 | */ | ||
441 | preempt_enable(); | ||
442 | } | 435 | } |
443 | 436 | ||
444 | #else /* !CONFIG_HOTPLUG_CPU */ | 437 | #else /* !CONFIG_HOTPLUG_CPU */ |