diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-18 23:40:33 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-18 23:40:33 -0400 |
commit | 5bc0b123dcb2bb65b0b1ec57e591459dcf583d3d (patch) | |
tree | 6ee79d18fd716755d49d18c465c1b25fabc43597 /arch | |
parent | eefbc594abbb1b7e6e7eeadb65ae7c7538474210 (diff) | |
parent | b36f4be3de1b123d8601de062e7dbfc904f305fb (diff) |
Merge 3.11-rc6 into char-misc-next
We want these fixes in this tree.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
149 files changed, 1478 insertions, 697 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index 8d2ae24b9f4a..1feb169274fe 100644 --- a/arch/Kconfig +++ b/arch/Kconfig | |||
@@ -407,6 +407,12 @@ config CLONE_BACKWARDS2 | |||
407 | help | 407 | help |
408 | Architecture has the first two arguments of clone(2) swapped. | 408 | Architecture has the first two arguments of clone(2) swapped. |
409 | 409 | ||
410 | config CLONE_BACKWARDS3 | ||
411 | bool | ||
412 | help | ||
413 | Architecture has tls passed as the 3rd argument of clone(2), | ||
414 | not the 5th one. | ||
415 | |||
410 | config ODD_RT_SIGACTION | 416 | config ODD_RT_SIGACTION |
411 | bool | 417 | bool |
412 | help | 418 | help |
diff --git a/arch/arc/include/asm/entry.h b/arch/arc/include/asm/entry.h index 8943c028d4bb..df57611652e5 100644 --- a/arch/arc/include/asm/entry.h +++ b/arch/arc/include/asm/entry.h | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/ptrace.h> | 38 | #include <asm/ptrace.h> |
39 | #include <asm/processor.h> /* For VMALLOC_START */ | 39 | #include <asm/processor.h> /* For VMALLOC_START */ |
40 | #include <asm/thread_info.h> /* For THREAD_SIZE */ | 40 | #include <asm/thread_info.h> /* For THREAD_SIZE */ |
41 | #include <asm/mmu.h> | ||
41 | 42 | ||
42 | /* Note on the LD/ST addr modes with addr reg wback | 43 | /* Note on the LD/ST addr modes with addr reg wback |
43 | * | 44 | * |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 37c0f4e978d4..43594d5116ef 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -20,7 +20,6 @@ config ARM | |||
20 | select GENERIC_STRNCPY_FROM_USER | 20 | select GENERIC_STRNCPY_FROM_USER |
21 | select GENERIC_STRNLEN_USER | 21 | select GENERIC_STRNLEN_USER |
22 | select HARDIRQS_SW_RESEND | 22 | select HARDIRQS_SW_RESEND |
23 | select HAVE_AOUT | ||
24 | select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL | 23 | select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL |
25 | select HAVE_ARCH_KGDB | 24 | select HAVE_ARCH_KGDB |
26 | select HAVE_ARCH_SECCOMP_FILTER | 25 | select HAVE_ARCH_SECCOMP_FILTER |
@@ -218,7 +217,8 @@ config VECTORS_BASE | |||
218 | default DRAM_BASE if REMAP_VECTORS_TO_RAM | 217 | default DRAM_BASE if REMAP_VECTORS_TO_RAM |
219 | default 0x00000000 | 218 | default 0x00000000 |
220 | help | 219 | help |
221 | The base address of exception vectors. | 220 | The base address of exception vectors. This must be two pages |
221 | in size. | ||
222 | 222 | ||
223 | config ARM_PATCH_PHYS_VIRT | 223 | config ARM_PATCH_PHYS_VIRT |
224 | bool "Patch physical to virtual translations at runtime" if EMBEDDED | 224 | bool "Patch physical to virtual translations at runtime" if EMBEDDED |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index e401a766c0bd..583f4a00ec32 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -804,9 +804,19 @@ config DEBUG_LL_INCLUDE | |||
804 | 804 | ||
805 | config DEBUG_UNCOMPRESS | 805 | config DEBUG_UNCOMPRESS |
806 | bool | 806 | bool |
807 | default y if ARCH_MULTIPLATFORM && DEBUG_LL && \ | 807 | depends on ARCH_MULTIPLATFORM |
808 | !DEBUG_OMAP2PLUS_UART && \ | 808 | default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ |
809 | !DEBUG_TEGRA_UART | 809 | !DEBUG_TEGRA_UART |
810 | help | ||
811 | This option influences the normal decompressor output for | ||
812 | multiplatform kernels. Normally, multiplatform kernels disable | ||
813 | decompressor output because it is not possible to know where to | ||
814 | send the decompressor output. | ||
815 | |||
816 | When this option is set, the selected DEBUG_LL output method | ||
817 | will be re-used for normal decompressor output on multiplatform | ||
818 | kernels. | ||
819 | |||
810 | 820 | ||
811 | config UNCOMPRESS_INCLUDE | 821 | config UNCOMPRESS_INCLUDE |
812 | string | 822 | string |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index c0ac0f5e5e5c..6fd2ceae305a 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -153,6 +153,7 @@ machine-$(CONFIG_ARCH_DAVINCI) += davinci | |||
153 | machine-$(CONFIG_ARCH_DOVE) += dove | 153 | machine-$(CONFIG_ARCH_DOVE) += dove |
154 | machine-$(CONFIG_ARCH_EBSA110) += ebsa110 | 154 | machine-$(CONFIG_ARCH_EBSA110) += ebsa110 |
155 | machine-$(CONFIG_ARCH_EP93XX) += ep93xx | 155 | machine-$(CONFIG_ARCH_EP93XX) += ep93xx |
156 | machine-$(CONFIG_ARCH_EXYNOS) += exynos | ||
156 | machine-$(CONFIG_ARCH_GEMINI) += gemini | 157 | machine-$(CONFIG_ARCH_GEMINI) += gemini |
157 | machine-$(CONFIG_ARCH_HIGHBANK) += highbank | 158 | machine-$(CONFIG_ARCH_HIGHBANK) += highbank |
158 | machine-$(CONFIG_ARCH_INTEGRATOR) += integrator | 159 | machine-$(CONFIG_ARCH_INTEGRATOR) += integrator |
@@ -160,15 +161,16 @@ machine-$(CONFIG_ARCH_IOP13XX) += iop13xx | |||
160 | machine-$(CONFIG_ARCH_IOP32X) += iop32x | 161 | machine-$(CONFIG_ARCH_IOP32X) += iop32x |
161 | machine-$(CONFIG_ARCH_IOP33X) += iop33x | 162 | machine-$(CONFIG_ARCH_IOP33X) += iop33x |
162 | machine-$(CONFIG_ARCH_IXP4XX) += ixp4xx | 163 | machine-$(CONFIG_ARCH_IXP4XX) += ixp4xx |
164 | machine-$(CONFIG_ARCH_KEYSTONE) += keystone | ||
163 | machine-$(CONFIG_ARCH_KIRKWOOD) += kirkwood | 165 | machine-$(CONFIG_ARCH_KIRKWOOD) += kirkwood |
164 | machine-$(CONFIG_ARCH_KS8695) += ks8695 | 166 | machine-$(CONFIG_ARCH_KS8695) += ks8695 |
165 | machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx | 167 | machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx |
166 | machine-$(CONFIG_ARCH_MMP) += mmp | 168 | machine-$(CONFIG_ARCH_MMP) += mmp |
167 | machine-$(CONFIG_ARCH_MSM) += msm | 169 | machine-$(CONFIG_ARCH_MSM) += msm |
168 | machine-$(CONFIG_ARCH_MV78XX0) += mv78xx0 | 170 | machine-$(CONFIG_ARCH_MV78XX0) += mv78xx0 |
171 | machine-$(CONFIG_ARCH_MVEBU) += mvebu | ||
169 | machine-$(CONFIG_ARCH_MXC) += imx | 172 | machine-$(CONFIG_ARCH_MXC) += imx |
170 | machine-$(CONFIG_ARCH_MXS) += mxs | 173 | machine-$(CONFIG_ARCH_MXS) += mxs |
171 | machine-$(CONFIG_ARCH_MVEBU) += mvebu | ||
172 | machine-$(CONFIG_ARCH_NETX) += netx | 174 | machine-$(CONFIG_ARCH_NETX) += netx |
173 | machine-$(CONFIG_ARCH_NOMADIK) += nomadik | 175 | machine-$(CONFIG_ARCH_NOMADIK) += nomadik |
174 | machine-$(CONFIG_ARCH_NSPIRE) += nspire | 176 | machine-$(CONFIG_ARCH_NSPIRE) += nspire |
@@ -176,7 +178,6 @@ machine-$(CONFIG_ARCH_OMAP1) += omap1 | |||
176 | machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2 | 178 | machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2 |
177 | machine-$(CONFIG_ARCH_ORION5X) += orion5x | 179 | machine-$(CONFIG_ARCH_ORION5X) += orion5x |
178 | machine-$(CONFIG_ARCH_PICOXCELL) += picoxcell | 180 | machine-$(CONFIG_ARCH_PICOXCELL) += picoxcell |
179 | machine-$(CONFIG_ARCH_SIRF) += prima2 | ||
180 | machine-$(CONFIG_ARCH_PXA) += pxa | 181 | machine-$(CONFIG_ARCH_PXA) += pxa |
181 | machine-$(CONFIG_ARCH_REALVIEW) += realview | 182 | machine-$(CONFIG_ARCH_REALVIEW) += realview |
182 | machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip | 183 | machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip |
@@ -186,25 +187,24 @@ machine-$(CONFIG_ARCH_S3C64XX) += s3c64xx | |||
186 | machine-$(CONFIG_ARCH_S5P64X0) += s5p64x0 | 187 | machine-$(CONFIG_ARCH_S5P64X0) += s5p64x0 |
187 | machine-$(CONFIG_ARCH_S5PC100) += s5pc100 | 188 | machine-$(CONFIG_ARCH_S5PC100) += s5pc100 |
188 | machine-$(CONFIG_ARCH_S5PV210) += s5pv210 | 189 | machine-$(CONFIG_ARCH_S5PV210) += s5pv210 |
189 | machine-$(CONFIG_ARCH_EXYNOS) += exynos | ||
190 | machine-$(CONFIG_ARCH_SA1100) += sa1100 | 190 | machine-$(CONFIG_ARCH_SA1100) += sa1100 |
191 | machine-$(CONFIG_ARCH_SHARK) += shark | 191 | machine-$(CONFIG_ARCH_SHARK) += shark |
192 | machine-$(CONFIG_ARCH_SHMOBILE) += shmobile | 192 | machine-$(CONFIG_ARCH_SHMOBILE) += shmobile |
193 | machine-$(CONFIG_ARCH_SIRF) += prima2 | ||
194 | machine-$(CONFIG_ARCH_SOCFPGA) += socfpga | ||
195 | machine-$(CONFIG_ARCH_STI) += sti | ||
196 | machine-$(CONFIG_ARCH_SUNXI) += sunxi | ||
193 | machine-$(CONFIG_ARCH_TEGRA) += tegra | 197 | machine-$(CONFIG_ARCH_TEGRA) += tegra |
194 | machine-$(CONFIG_ARCH_U300) += u300 | 198 | machine-$(CONFIG_ARCH_U300) += u300 |
195 | machine-$(CONFIG_ARCH_U8500) += ux500 | 199 | machine-$(CONFIG_ARCH_U8500) += ux500 |
196 | machine-$(CONFIG_ARCH_VERSATILE) += versatile | 200 | machine-$(CONFIG_ARCH_VERSATILE) += versatile |
197 | machine-$(CONFIG_ARCH_VEXPRESS) += vexpress | 201 | machine-$(CONFIG_ARCH_VEXPRESS) += vexpress |
202 | machine-$(CONFIG_ARCH_VIRT) += virt | ||
198 | machine-$(CONFIG_ARCH_VT8500) += vt8500 | 203 | machine-$(CONFIG_ARCH_VT8500) += vt8500 |
199 | machine-$(CONFIG_ARCH_W90X900) += w90x900 | 204 | machine-$(CONFIG_ARCH_W90X900) += w90x900 |
205 | machine-$(CONFIG_ARCH_ZYNQ) += zynq | ||
200 | machine-$(CONFIG_FOOTBRIDGE) += footbridge | 206 | machine-$(CONFIG_FOOTBRIDGE) += footbridge |
201 | machine-$(CONFIG_ARCH_SOCFPGA) += socfpga | ||
202 | machine-$(CONFIG_PLAT_SPEAR) += spear | 207 | machine-$(CONFIG_PLAT_SPEAR) += spear |
203 | machine-$(CONFIG_ARCH_STI) += sti | ||
204 | machine-$(CONFIG_ARCH_VIRT) += virt | ||
205 | machine-$(CONFIG_ARCH_ZYNQ) += zynq | ||
206 | machine-$(CONFIG_ARCH_SUNXI) += sunxi | ||
207 | machine-$(CONFIG_ARCH_KEYSTONE) += keystone | ||
208 | 208 | ||
209 | # Platform directory name. This list is sorted alphanumerically | 209 | # Platform directory name. This list is sorted alphanumerically |
210 | # by CONFIG_* macro name. | 210 | # by CONFIG_* macro name. |
diff --git a/arch/arm/boot/dts/msm8960-cdp.dts b/arch/arm/boot/dts/msm8960-cdp.dts index db2060c46540..9c1167b0459b 100644 --- a/arch/arm/boot/dts/msm8960-cdp.dts +++ b/arch/arm/boot/dts/msm8960-cdp.dts | |||
@@ -26,7 +26,7 @@ | |||
26 | cpu-offset = <0x80000>; | 26 | cpu-offset = <0x80000>; |
27 | }; | 27 | }; |
28 | 28 | ||
29 | msmgpio: gpio@fd510000 { | 29 | msmgpio: gpio@800000 { |
30 | compatible = "qcom,msm-gpio"; | 30 | compatible = "qcom,msm-gpio"; |
31 | gpio-controller; | 31 | gpio-controller; |
32 | #gpio-cells = <2>; | 32 | #gpio-cells = <2>; |
@@ -34,7 +34,7 @@ | |||
34 | interrupts = <0 32 0x4>; | 34 | interrupts = <0 32 0x4>; |
35 | interrupt-controller; | 35 | interrupt-controller; |
36 | #interrupt-cells = <2>; | 36 | #interrupt-cells = <2>; |
37 | reg = <0xfd510000 0x4000>; | 37 | reg = <0x800000 0x4000>; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | serial@16440000 { | 40 | serial@16440000 { |
diff --git a/arch/arm/boot/dts/omap5-uevm.dts b/arch/arm/boot/dts/omap5-uevm.dts index 08b72678abff..65d7b601651c 100644 --- a/arch/arm/boot/dts/omap5-uevm.dts +++ b/arch/arm/boot/dts/omap5-uevm.dts | |||
@@ -235,7 +235,7 @@ | |||
235 | }; | 235 | }; |
236 | 236 | ||
237 | &mmc1 { | 237 | &mmc1 { |
238 | vmmc-supply = <&vmmcsd_fixed>; | 238 | vmmc-supply = <&ldo9_reg>; |
239 | bus-width = <4>; | 239 | bus-width = <4>; |
240 | }; | 240 | }; |
241 | 241 | ||
@@ -282,6 +282,7 @@ | |||
282 | 282 | ||
283 | regulators { | 283 | regulators { |
284 | smps123_reg: smps123 { | 284 | smps123_reg: smps123 { |
285 | /* VDD_OPP_MPU */ | ||
285 | regulator-name = "smps123"; | 286 | regulator-name = "smps123"; |
286 | regulator-min-microvolt = < 600000>; | 287 | regulator-min-microvolt = < 600000>; |
287 | regulator-max-microvolt = <1500000>; | 288 | regulator-max-microvolt = <1500000>; |
@@ -290,6 +291,7 @@ | |||
290 | }; | 291 | }; |
291 | 292 | ||
292 | smps45_reg: smps45 { | 293 | smps45_reg: smps45 { |
294 | /* VDD_OPP_MM */ | ||
293 | regulator-name = "smps45"; | 295 | regulator-name = "smps45"; |
294 | regulator-min-microvolt = < 600000>; | 296 | regulator-min-microvolt = < 600000>; |
295 | regulator-max-microvolt = <1310000>; | 297 | regulator-max-microvolt = <1310000>; |
@@ -298,6 +300,7 @@ | |||
298 | }; | 300 | }; |
299 | 301 | ||
300 | smps6_reg: smps6 { | 302 | smps6_reg: smps6 { |
303 | /* VDD_DDR3 - over VDD_SMPS6 */ | ||
301 | regulator-name = "smps6"; | 304 | regulator-name = "smps6"; |
302 | regulator-min-microvolt = <1200000>; | 305 | regulator-min-microvolt = <1200000>; |
303 | regulator-max-microvolt = <1200000>; | 306 | regulator-max-microvolt = <1200000>; |
@@ -306,6 +309,7 @@ | |||
306 | }; | 309 | }; |
307 | 310 | ||
308 | smps7_reg: smps7 { | 311 | smps7_reg: smps7 { |
312 | /* VDDS_1v8_OMAP over VDDS_1v8_MAIN */ | ||
309 | regulator-name = "smps7"; | 313 | regulator-name = "smps7"; |
310 | regulator-min-microvolt = <1800000>; | 314 | regulator-min-microvolt = <1800000>; |
311 | regulator-max-microvolt = <1800000>; | 315 | regulator-max-microvolt = <1800000>; |
@@ -314,6 +318,7 @@ | |||
314 | }; | 318 | }; |
315 | 319 | ||
316 | smps8_reg: smps8 { | 320 | smps8_reg: smps8 { |
321 | /* VDD_OPP_CORE */ | ||
317 | regulator-name = "smps8"; | 322 | regulator-name = "smps8"; |
318 | regulator-min-microvolt = < 600000>; | 323 | regulator-min-microvolt = < 600000>; |
319 | regulator-max-microvolt = <1310000>; | 324 | regulator-max-microvolt = <1310000>; |
@@ -322,15 +327,15 @@ | |||
322 | }; | 327 | }; |
323 | 328 | ||
324 | smps9_reg: smps9 { | 329 | smps9_reg: smps9 { |
330 | /* VDDA_2v1_AUD over VDD_2v1 */ | ||
325 | regulator-name = "smps9"; | 331 | regulator-name = "smps9"; |
326 | regulator-min-microvolt = <2100000>; | 332 | regulator-min-microvolt = <2100000>; |
327 | regulator-max-microvolt = <2100000>; | 333 | regulator-max-microvolt = <2100000>; |
328 | regulator-always-on; | ||
329 | regulator-boot-on; | ||
330 | ti,smps-range = <0x80>; | 334 | ti,smps-range = <0x80>; |
331 | }; | 335 | }; |
332 | 336 | ||
333 | smps10_reg: smps10 { | 337 | smps10_reg: smps10 { |
338 | /* VBUS_5V_OTG */ | ||
334 | regulator-name = "smps10"; | 339 | regulator-name = "smps10"; |
335 | regulator-min-microvolt = <5000000>; | 340 | regulator-min-microvolt = <5000000>; |
336 | regulator-max-microvolt = <5000000>; | 341 | regulator-max-microvolt = <5000000>; |
@@ -339,38 +344,40 @@ | |||
339 | }; | 344 | }; |
340 | 345 | ||
341 | ldo1_reg: ldo1 { | 346 | ldo1_reg: ldo1 { |
347 | /* VDDAPHY_CAM: vdda_csiport */ | ||
342 | regulator-name = "ldo1"; | 348 | regulator-name = "ldo1"; |
343 | regulator-min-microvolt = <2800000>; | 349 | regulator-min-microvolt = <1500000>; |
344 | regulator-max-microvolt = <2800000>; | 350 | regulator-max-microvolt = <1800000>; |
345 | regulator-always-on; | ||
346 | regulator-boot-on; | ||
347 | }; | 351 | }; |
348 | 352 | ||
349 | ldo2_reg: ldo2 { | 353 | ldo2_reg: ldo2 { |
354 | /* VCC_2V8_DISP: Does not go anywhere */ | ||
350 | regulator-name = "ldo2"; | 355 | regulator-name = "ldo2"; |
351 | regulator-min-microvolt = <2900000>; | 356 | regulator-min-microvolt = <2800000>; |
352 | regulator-max-microvolt = <2900000>; | 357 | regulator-max-microvolt = <2800000>; |
353 | regulator-always-on; | 358 | /* Unused */ |
354 | regulator-boot-on; | 359 | status = "disabled"; |
355 | }; | 360 | }; |
356 | 361 | ||
357 | ldo3_reg: ldo3 { | 362 | ldo3_reg: ldo3 { |
363 | /* VDDAPHY_MDM: vdda_lli */ | ||
358 | regulator-name = "ldo3"; | 364 | regulator-name = "ldo3"; |
359 | regulator-min-microvolt = <3000000>; | 365 | regulator-min-microvolt = <1500000>; |
360 | regulator-max-microvolt = <3000000>; | 366 | regulator-max-microvolt = <1500000>; |
361 | regulator-always-on; | ||
362 | regulator-boot-on; | 367 | regulator-boot-on; |
368 | /* Only if Modem is used */ | ||
369 | status = "disabled"; | ||
363 | }; | 370 | }; |
364 | 371 | ||
365 | ldo4_reg: ldo4 { | 372 | ldo4_reg: ldo4 { |
373 | /* VDDAPHY_DISP: vdda_dsiport/hdmi */ | ||
366 | regulator-name = "ldo4"; | 374 | regulator-name = "ldo4"; |
367 | regulator-min-microvolt = <2200000>; | 375 | regulator-min-microvolt = <1500000>; |
368 | regulator-max-microvolt = <2200000>; | 376 | regulator-max-microvolt = <1800000>; |
369 | regulator-always-on; | ||
370 | regulator-boot-on; | ||
371 | }; | 377 | }; |
372 | 378 | ||
373 | ldo5_reg: ldo5 { | 379 | ldo5_reg: ldo5 { |
380 | /* VDDA_1V8_PHY: usb/sata/hdmi.. */ | ||
374 | regulator-name = "ldo5"; | 381 | regulator-name = "ldo5"; |
375 | regulator-min-microvolt = <1800000>; | 382 | regulator-min-microvolt = <1800000>; |
376 | regulator-max-microvolt = <1800000>; | 383 | regulator-max-microvolt = <1800000>; |
@@ -379,38 +386,43 @@ | |||
379 | }; | 386 | }; |
380 | 387 | ||
381 | ldo6_reg: ldo6 { | 388 | ldo6_reg: ldo6 { |
389 | /* VDDS_1V2_WKUP: hsic/ldo_emu_wkup */ | ||
382 | regulator-name = "ldo6"; | 390 | regulator-name = "ldo6"; |
383 | regulator-min-microvolt = <1500000>; | 391 | regulator-min-microvolt = <1200000>; |
384 | regulator-max-microvolt = <1500000>; | 392 | regulator-max-microvolt = <1200000>; |
385 | regulator-always-on; | 393 | regulator-always-on; |
386 | regulator-boot-on; | 394 | regulator-boot-on; |
387 | }; | 395 | }; |
388 | 396 | ||
389 | ldo7_reg: ldo7 { | 397 | ldo7_reg: ldo7 { |
398 | /* VDD_VPP: vpp1 */ | ||
390 | regulator-name = "ldo7"; | 399 | regulator-name = "ldo7"; |
391 | regulator-min-microvolt = <1500000>; | 400 | regulator-min-microvolt = <2000000>; |
392 | regulator-max-microvolt = <1500000>; | 401 | regulator-max-microvolt = <2000000>; |
393 | regulator-always-on; | 402 | /* Only for efuse reprograming! */ |
394 | regulator-boot-on; | 403 | status = "disabled"; |
395 | }; | 404 | }; |
396 | 405 | ||
397 | ldo8_reg: ldo8 { | 406 | ldo8_reg: ldo8 { |
407 | /* VDD_3v0: Does not go anywhere */ | ||
398 | regulator-name = "ldo8"; | 408 | regulator-name = "ldo8"; |
399 | regulator-min-microvolt = <1500000>; | 409 | regulator-min-microvolt = <3000000>; |
400 | regulator-max-microvolt = <1500000>; | 410 | regulator-max-microvolt = <3000000>; |
401 | regulator-always-on; | ||
402 | regulator-boot-on; | 411 | regulator-boot-on; |
412 | /* Unused */ | ||
413 | status = "disabled"; | ||
403 | }; | 414 | }; |
404 | 415 | ||
405 | ldo9_reg: ldo9 { | 416 | ldo9_reg: ldo9 { |
417 | /* VCC_DV_SDIO: vdds_sdcard */ | ||
406 | regulator-name = "ldo9"; | 418 | regulator-name = "ldo9"; |
407 | regulator-min-microvolt = <1800000>; | 419 | regulator-min-microvolt = <1800000>; |
408 | regulator-max-microvolt = <3300000>; | 420 | regulator-max-microvolt = <3000000>; |
409 | regulator-always-on; | ||
410 | regulator-boot-on; | 421 | regulator-boot-on; |
411 | }; | 422 | }; |
412 | 423 | ||
413 | ldoln_reg: ldoln { | 424 | ldoln_reg: ldoln { |
425 | /* VDDA_1v8_REF: vdds_osc/mm_l4per.. */ | ||
414 | regulator-name = "ldoln"; | 426 | regulator-name = "ldoln"; |
415 | regulator-min-microvolt = <1800000>; | 427 | regulator-min-microvolt = <1800000>; |
416 | regulator-max-microvolt = <1800000>; | 428 | regulator-max-microvolt = <1800000>; |
@@ -419,12 +431,20 @@ | |||
419 | }; | 431 | }; |
420 | 432 | ||
421 | ldousb_reg: ldousb { | 433 | ldousb_reg: ldousb { |
434 | /* VDDA_3V_USB: VDDA_USBHS33 */ | ||
422 | regulator-name = "ldousb"; | 435 | regulator-name = "ldousb"; |
423 | regulator-min-microvolt = <3250000>; | 436 | regulator-min-microvolt = <3250000>; |
424 | regulator-max-microvolt = <3250000>; | 437 | regulator-max-microvolt = <3250000>; |
425 | regulator-always-on; | 438 | regulator-always-on; |
426 | regulator-boot-on; | 439 | regulator-boot-on; |
427 | }; | 440 | }; |
441 | |||
442 | regen3_reg: regen3 { | ||
443 | /* REGEN3 controls LDO9 supply to card */ | ||
444 | regulator-name = "regen3"; | ||
445 | regulator-always-on; | ||
446 | regulator-boot-on; | ||
447 | }; | ||
428 | }; | 448 | }; |
429 | }; | 449 | }; |
430 | }; | 450 | }; |
diff --git a/arch/arm/boot/dts/stih41x.dtsi b/arch/arm/boot/dts/stih41x.dtsi index 7321403cab8a..f5b9898d9c6e 100644 --- a/arch/arm/boot/dts/stih41x.dtsi +++ b/arch/arm/boot/dts/stih41x.dtsi | |||
@@ -6,10 +6,12 @@ | |||
6 | #address-cells = <1>; | 6 | #address-cells = <1>; |
7 | #size-cells = <0>; | 7 | #size-cells = <0>; |
8 | cpu@0 { | 8 | cpu@0 { |
9 | device_type = "cpu"; | ||
9 | compatible = "arm,cortex-a9"; | 10 | compatible = "arm,cortex-a9"; |
10 | reg = <0>; | 11 | reg = <0>; |
11 | }; | 12 | }; |
12 | cpu@1 { | 13 | cpu@1 { |
14 | device_type = "cpu"; | ||
13 | compatible = "arm,cortex-a9"; | 15 | compatible = "arm,cortex-a9"; |
14 | reg = <1>; | 16 | reg = <1>; |
15 | }; | 17 | }; |
diff --git a/arch/arm/boot/dts/tegra20-colibri-512.dtsi b/arch/arm/boot/dts/tegra20-colibri-512.dtsi index 2fcb3f2ca160..5592be6f2f7a 100644 --- a/arch/arm/boot/dts/tegra20-colibri-512.dtsi +++ b/arch/arm/boot/dts/tegra20-colibri-512.dtsi | |||
@@ -457,6 +457,7 @@ | |||
457 | }; | 457 | }; |
458 | 458 | ||
459 | usb-phy@c5004000 { | 459 | usb-phy@c5004000 { |
460 | status = "okay"; | ||
460 | nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1) | 461 | nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1) |
461 | GPIO_ACTIVE_LOW>; | 462 | GPIO_ACTIVE_LOW>; |
462 | }; | 463 | }; |
diff --git a/arch/arm/include/asm/a.out-core.h b/arch/arm/include/asm/a.out-core.h deleted file mode 100644 index 92f10cb5c70c..000000000000 --- a/arch/arm/include/asm/a.out-core.h +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | /* a.out coredump register dumper | ||
2 | * | ||
3 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _ASM_A_OUT_CORE_H | ||
13 | #define _ASM_A_OUT_CORE_H | ||
14 | |||
15 | #ifdef __KERNEL__ | ||
16 | |||
17 | #include <linux/user.h> | ||
18 | #include <linux/elfcore.h> | ||
19 | |||
20 | /* | ||
21 | * fill in the user structure for an a.out core dump | ||
22 | */ | ||
23 | static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump) | ||
24 | { | ||
25 | struct task_struct *tsk = current; | ||
26 | |||
27 | dump->magic = CMAGIC; | ||
28 | dump->start_code = tsk->mm->start_code; | ||
29 | dump->start_stack = regs->ARM_sp & ~(PAGE_SIZE - 1); | ||
30 | |||
31 | dump->u_tsize = (tsk->mm->end_code - tsk->mm->start_code) >> PAGE_SHIFT; | ||
32 | dump->u_dsize = (tsk->mm->brk - tsk->mm->start_data + PAGE_SIZE - 1) >> PAGE_SHIFT; | ||
33 | dump->u_ssize = 0; | ||
34 | |||
35 | memset(dump->u_debugreg, 0, sizeof(dump->u_debugreg)); | ||
36 | |||
37 | if (dump->start_stack < 0x04000000) | ||
38 | dump->u_ssize = (0x04000000 - dump->start_stack) >> PAGE_SHIFT; | ||
39 | |||
40 | dump->regs = *regs; | ||
41 | dump->u_fpvalid = dump_fpu (regs, &dump->u_fp); | ||
42 | } | ||
43 | |||
44 | #endif /* __KERNEL__ */ | ||
45 | #endif /* _ASM_A_OUT_CORE_H */ | ||
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h index 8c25dc4e9851..9672e978d50d 100644 --- a/arch/arm/include/asm/cputype.h +++ b/arch/arm/include/asm/cputype.h | |||
@@ -89,13 +89,18 @@ extern unsigned int processor_id; | |||
89 | __val; \ | 89 | __val; \ |
90 | }) | 90 | }) |
91 | 91 | ||
92 | /* | ||
93 | * The memory clobber prevents gcc 4.5 from reordering the mrc before | ||
94 | * any is_smp() tests, which can cause undefined instruction aborts on | ||
95 | * ARM1136 r0 due to the missing extended CP15 registers. | ||
96 | */ | ||
92 | #define read_cpuid_ext(ext_reg) \ | 97 | #define read_cpuid_ext(ext_reg) \ |
93 | ({ \ | 98 | ({ \ |
94 | unsigned int __val; \ | 99 | unsigned int __val; \ |
95 | asm("mrc p15, 0, %0, c0, " ext_reg \ | 100 | asm("mrc p15, 0, %0, c0, " ext_reg \ |
96 | : "=r" (__val) \ | 101 | : "=r" (__val) \ |
97 | : \ | 102 | : \ |
98 | : "cc"); \ | 103 | : "memory"); \ |
99 | __val; \ | 104 | __val; \ |
100 | }) | 105 | }) |
101 | 106 | ||
diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h index 38050b1c4800..56211f2084ef 100644 --- a/arch/arm/include/asm/elf.h +++ b/arch/arm/include/asm/elf.h | |||
@@ -130,4 +130,10 @@ struct mm_struct; | |||
130 | extern unsigned long arch_randomize_brk(struct mm_struct *mm); | 130 | extern unsigned long arch_randomize_brk(struct mm_struct *mm); |
131 | #define arch_randomize_brk arch_randomize_brk | 131 | #define arch_randomize_brk arch_randomize_brk |
132 | 132 | ||
133 | #ifdef CONFIG_MMU | ||
134 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 | ||
135 | struct linux_binprm; | ||
136 | int arch_setup_additional_pages(struct linux_binprm *, int); | ||
137 | #endif | ||
138 | |||
133 | #endif | 139 | #endif |
diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h index e3d55547e755..6f18da09668b 100644 --- a/arch/arm/include/asm/mmu.h +++ b/arch/arm/include/asm/mmu.h | |||
@@ -6,8 +6,11 @@ | |||
6 | typedef struct { | 6 | typedef struct { |
7 | #ifdef CONFIG_CPU_HAS_ASID | 7 | #ifdef CONFIG_CPU_HAS_ASID |
8 | atomic64_t id; | 8 | atomic64_t id; |
9 | #else | ||
10 | int switch_pending; | ||
9 | #endif | 11 | #endif |
10 | unsigned int vmalloc_seq; | 12 | unsigned int vmalloc_seq; |
13 | unsigned long sigpage; | ||
11 | } mm_context_t; | 14 | } mm_context_t; |
12 | 15 | ||
13 | #ifdef CONFIG_CPU_HAS_ASID | 16 | #ifdef CONFIG_CPU_HAS_ASID |
diff --git a/arch/arm/include/asm/mmu_context.h b/arch/arm/include/asm/mmu_context.h index b5792b7fd8d3..9b32f76bb0dd 100644 --- a/arch/arm/include/asm/mmu_context.h +++ b/arch/arm/include/asm/mmu_context.h | |||
@@ -56,7 +56,7 @@ static inline void check_and_switch_context(struct mm_struct *mm, | |||
56 | * on non-ASID CPUs, the old mm will remain valid until the | 56 | * on non-ASID CPUs, the old mm will remain valid until the |
57 | * finish_arch_post_lock_switch() call. | 57 | * finish_arch_post_lock_switch() call. |
58 | */ | 58 | */ |
59 | set_ti_thread_flag(task_thread_info(tsk), TIF_SWITCH_MM); | 59 | mm->context.switch_pending = 1; |
60 | else | 60 | else |
61 | cpu_switch_mm(mm->pgd, mm); | 61 | cpu_switch_mm(mm->pgd, mm); |
62 | } | 62 | } |
@@ -65,9 +65,21 @@ static inline void check_and_switch_context(struct mm_struct *mm, | |||
65 | finish_arch_post_lock_switch | 65 | finish_arch_post_lock_switch |
66 | static inline void finish_arch_post_lock_switch(void) | 66 | static inline void finish_arch_post_lock_switch(void) |
67 | { | 67 | { |
68 | if (test_and_clear_thread_flag(TIF_SWITCH_MM)) { | 68 | struct mm_struct *mm = current->mm; |
69 | struct mm_struct *mm = current->mm; | 69 | |
70 | cpu_switch_mm(mm->pgd, mm); | 70 | if (mm && mm->context.switch_pending) { |
71 | /* | ||
72 | * Preemption must be disabled during cpu_switch_mm() as we | ||
73 | * have some stateful cache flush implementations. Check | ||
74 | * switch_pending again in case we were preempted and the | ||
75 | * switch to this mm was already done. | ||
76 | */ | ||
77 | preempt_disable(); | ||
78 | if (mm->context.switch_pending) { | ||
79 | mm->context.switch_pending = 0; | ||
80 | cpu_switch_mm(mm->pgd, mm); | ||
81 | } | ||
82 | preempt_enable_no_resched(); | ||
71 | } | 83 | } |
72 | } | 84 | } |
73 | 85 | ||
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index 6363f3d1d505..4355f0ec44d6 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -142,7 +142,9 @@ extern void __cpu_copy_user_highpage(struct page *to, struct page *from, | |||
142 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) | 142 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) |
143 | extern void copy_page(void *to, const void *from); | 143 | extern void copy_page(void *to, const void *from); |
144 | 144 | ||
145 | #ifdef CONFIG_KUSER_HELPERS | ||
145 | #define __HAVE_ARCH_GATE_AREA 1 | 146 | #define __HAVE_ARCH_GATE_AREA 1 |
147 | #endif | ||
146 | 148 | ||
147 | #ifdef CONFIG_ARM_LPAE | 149 | #ifdef CONFIG_ARM_LPAE |
148 | #include <asm/pgtable-3level-types.h> | 150 | #include <asm/pgtable-3level-types.h> |
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index 06e7d509eaac..413f3876341c 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h | |||
@@ -54,7 +54,6 @@ struct thread_struct { | |||
54 | 54 | ||
55 | #define start_thread(regs,pc,sp) \ | 55 | #define start_thread(regs,pc,sp) \ |
56 | ({ \ | 56 | ({ \ |
57 | unsigned long *stack = (unsigned long *)sp; \ | ||
58 | memset(regs->uregs, 0, sizeof(regs->uregs)); \ | 57 | memset(regs->uregs, 0, sizeof(regs->uregs)); \ |
59 | if (current->personality & ADDR_LIMIT_32BIT) \ | 58 | if (current->personality & ADDR_LIMIT_32BIT) \ |
60 | regs->ARM_cpsr = USR_MODE; \ | 59 | regs->ARM_cpsr = USR_MODE; \ |
@@ -65,9 +64,6 @@ struct thread_struct { | |||
65 | regs->ARM_cpsr |= PSR_ENDSTATE; \ | 64 | regs->ARM_cpsr |= PSR_ENDSTATE; \ |
66 | regs->ARM_pc = pc & ~1; /* pc */ \ | 65 | regs->ARM_pc = pc & ~1; /* pc */ \ |
67 | regs->ARM_sp = sp; /* sp */ \ | 66 | regs->ARM_sp = sp; /* sp */ \ |
68 | regs->ARM_r2 = stack[2]; /* r2 (envp) */ \ | ||
69 | regs->ARM_r1 = stack[1]; /* r1 (argv) */ \ | ||
70 | regs->ARM_r0 = stack[0]; /* r0 (argc) */ \ | ||
71 | nommu_start_thread(regs); \ | 67 | nommu_start_thread(regs); \ |
72 | }) | 68 | }) |
73 | 69 | ||
diff --git a/arch/arm/include/asm/smp_plat.h b/arch/arm/include/asm/smp_plat.h index 6462a721ebd4..a252c0bfacf5 100644 --- a/arch/arm/include/asm/smp_plat.h +++ b/arch/arm/include/asm/smp_plat.h | |||
@@ -88,4 +88,7 @@ static inline u32 mpidr_hash_size(void) | |||
88 | { | 88 | { |
89 | return 1 << mpidr_hash.bits; | 89 | return 1 << mpidr_hash.bits; |
90 | } | 90 | } |
91 | |||
92 | extern int platform_can_cpu_hotplug(void); | ||
93 | |||
91 | #endif | 94 | #endif |
diff --git a/arch/arm/include/asm/spinlock.h b/arch/arm/include/asm/spinlock.h index f8b8965666e9..b07c09e5a0ac 100644 --- a/arch/arm/include/asm/spinlock.h +++ b/arch/arm/include/asm/spinlock.h | |||
@@ -107,7 +107,7 @@ static inline int arch_spin_trylock(arch_spinlock_t *lock) | |||
107 | " subs %1, %0, %0, ror #16\n" | 107 | " subs %1, %0, %0, ror #16\n" |
108 | " addeq %0, %0, %4\n" | 108 | " addeq %0, %0, %4\n" |
109 | " strexeq %2, %0, [%3]" | 109 | " strexeq %2, %0, [%3]" |
110 | : "=&r" (slock), "=&r" (contended), "=r" (res) | 110 | : "=&r" (slock), "=&r" (contended), "=&r" (res) |
111 | : "r" (&lock->slock), "I" (1 << TICKET_SHIFT) | 111 | : "r" (&lock->slock), "I" (1 << TICKET_SHIFT) |
112 | : "cc"); | 112 | : "cc"); |
113 | } while (res); | 113 | } while (res); |
@@ -168,17 +168,20 @@ static inline void arch_write_lock(arch_rwlock_t *rw) | |||
168 | 168 | ||
169 | static inline int arch_write_trylock(arch_rwlock_t *rw) | 169 | static inline int arch_write_trylock(arch_rwlock_t *rw) |
170 | { | 170 | { |
171 | unsigned long tmp; | 171 | unsigned long contended, res; |
172 | 172 | ||
173 | __asm__ __volatile__( | 173 | do { |
174 | " ldrex %0, [%1]\n" | 174 | __asm__ __volatile__( |
175 | " teq %0, #0\n" | 175 | " ldrex %0, [%2]\n" |
176 | " strexeq %0, %2, [%1]" | 176 | " mov %1, #0\n" |
177 | : "=&r" (tmp) | 177 | " teq %0, #0\n" |
178 | : "r" (&rw->lock), "r" (0x80000000) | 178 | " strexeq %1, %3, [%2]" |
179 | : "cc"); | 179 | : "=&r" (contended), "=&r" (res) |
180 | : "r" (&rw->lock), "r" (0x80000000) | ||
181 | : "cc"); | ||
182 | } while (res); | ||
180 | 183 | ||
181 | if (tmp == 0) { | 184 | if (!contended) { |
182 | smp_mb(); | 185 | smp_mb(); |
183 | return 1; | 186 | return 1; |
184 | } else { | 187 | } else { |
@@ -254,18 +257,26 @@ static inline void arch_read_unlock(arch_rwlock_t *rw) | |||
254 | 257 | ||
255 | static inline int arch_read_trylock(arch_rwlock_t *rw) | 258 | static inline int arch_read_trylock(arch_rwlock_t *rw) |
256 | { | 259 | { |
257 | unsigned long tmp, tmp2 = 1; | 260 | unsigned long contended, res; |
258 | 261 | ||
259 | __asm__ __volatile__( | 262 | do { |
260 | " ldrex %0, [%2]\n" | 263 | __asm__ __volatile__( |
261 | " adds %0, %0, #1\n" | 264 | " ldrex %0, [%2]\n" |
262 | " strexpl %1, %0, [%2]\n" | 265 | " mov %1, #0\n" |
263 | : "=&r" (tmp), "+r" (tmp2) | 266 | " adds %0, %0, #1\n" |
264 | : "r" (&rw->lock) | 267 | " strexpl %1, %0, [%2]" |
265 | : "cc"); | 268 | : "=&r" (contended), "=&r" (res) |
269 | : "r" (&rw->lock) | ||
270 | : "cc"); | ||
271 | } while (res); | ||
266 | 272 | ||
267 | smp_mb(); | 273 | /* If the lock is negative, then it is already held for write. */ |
268 | return tmp2 == 0; | 274 | if (contended < 0x80000000) { |
275 | smp_mb(); | ||
276 | return 1; | ||
277 | } else { | ||
278 | return 0; | ||
279 | } | ||
269 | } | 280 | } |
270 | 281 | ||
271 | /* read_can_lock - would read_trylock() succeed? */ | 282 | /* read_can_lock - would read_trylock() succeed? */ |
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index 214d4158089a..2b8114fcba09 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h | |||
@@ -156,7 +156,6 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, | |||
156 | #define TIF_USING_IWMMXT 17 | 156 | #define TIF_USING_IWMMXT 17 |
157 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 157 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
158 | #define TIF_RESTORE_SIGMASK 20 | 158 | #define TIF_RESTORE_SIGMASK 20 |
159 | #define TIF_SWITCH_MM 22 /* deferred switch_mm */ | ||
160 | 159 | ||
161 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 160 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
162 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 161 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
diff --git a/arch/arm/include/asm/tlb.h b/arch/arm/include/asm/tlb.h index 46e7cfb3e721..0baf7f0d9394 100644 --- a/arch/arm/include/asm/tlb.h +++ b/arch/arm/include/asm/tlb.h | |||
@@ -43,6 +43,7 @@ struct mmu_gather { | |||
43 | struct mm_struct *mm; | 43 | struct mm_struct *mm; |
44 | unsigned int fullmm; | 44 | unsigned int fullmm; |
45 | struct vm_area_struct *vma; | 45 | struct vm_area_struct *vma; |
46 | unsigned long start, end; | ||
46 | unsigned long range_start; | 47 | unsigned long range_start; |
47 | unsigned long range_end; | 48 | unsigned long range_end; |
48 | unsigned int nr; | 49 | unsigned int nr; |
@@ -107,10 +108,12 @@ static inline void tlb_flush_mmu(struct mmu_gather *tlb) | |||
107 | } | 108 | } |
108 | 109 | ||
109 | static inline void | 110 | static inline void |
110 | tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned int fullmm) | 111 | tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start, unsigned long end) |
111 | { | 112 | { |
112 | tlb->mm = mm; | 113 | tlb->mm = mm; |
113 | tlb->fullmm = fullmm; | 114 | tlb->fullmm = !(start | (end+1)); |
115 | tlb->start = start; | ||
116 | tlb->end = end; | ||
114 | tlb->vma = NULL; | 117 | tlb->vma = NULL; |
115 | tlb->max = ARRAY_SIZE(tlb->local); | 118 | tlb->max = ARRAY_SIZE(tlb->local); |
116 | tlb->pages = tlb->local; | 119 | tlb->pages = tlb->local; |
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h index fdbb9e369745..f467e9b3f8d5 100644 --- a/arch/arm/include/asm/tlbflush.h +++ b/arch/arm/include/asm/tlbflush.h | |||
@@ -443,7 +443,18 @@ static inline void local_flush_bp_all(void) | |||
443 | isb(); | 443 | isb(); |
444 | } | 444 | } |
445 | 445 | ||
446 | #include <asm/cputype.h> | ||
446 | #ifdef CONFIG_ARM_ERRATA_798181 | 447 | #ifdef CONFIG_ARM_ERRATA_798181 |
448 | static inline int erratum_a15_798181(void) | ||
449 | { | ||
450 | unsigned int midr = read_cpuid_id(); | ||
451 | |||
452 | /* Cortex-A15 r0p0..r3p2 affected */ | ||
453 | if ((midr & 0xff0ffff0) != 0x410fc0f0 || midr > 0x413fc0f2) | ||
454 | return 0; | ||
455 | return 1; | ||
456 | } | ||
457 | |||
447 | static inline void dummy_flush_tlb_a15_erratum(void) | 458 | static inline void dummy_flush_tlb_a15_erratum(void) |
448 | { | 459 | { |
449 | /* | 460 | /* |
@@ -453,6 +464,11 @@ static inline void dummy_flush_tlb_a15_erratum(void) | |||
453 | dsb(); | 464 | dsb(); |
454 | } | 465 | } |
455 | #else | 466 | #else |
467 | static inline int erratum_a15_798181(void) | ||
468 | { | ||
469 | return 0; | ||
470 | } | ||
471 | |||
456 | static inline void dummy_flush_tlb_a15_erratum(void) | 472 | static inline void dummy_flush_tlb_a15_erratum(void) |
457 | { | 473 | { |
458 | } | 474 | } |
diff --git a/arch/arm/include/asm/virt.h b/arch/arm/include/asm/virt.h index 50af92bac737..4371f45c5784 100644 --- a/arch/arm/include/asm/virt.h +++ b/arch/arm/include/asm/virt.h | |||
@@ -29,6 +29,7 @@ | |||
29 | #define BOOT_CPU_MODE_MISMATCH PSR_N_BIT | 29 | #define BOOT_CPU_MODE_MISMATCH PSR_N_BIT |
30 | 30 | ||
31 | #ifndef __ASSEMBLY__ | 31 | #ifndef __ASSEMBLY__ |
32 | #include <asm/cacheflush.h> | ||
32 | 33 | ||
33 | #ifdef CONFIG_ARM_VIRT_EXT | 34 | #ifdef CONFIG_ARM_VIRT_EXT |
34 | /* | 35 | /* |
@@ -41,10 +42,21 @@ | |||
41 | */ | 42 | */ |
42 | extern int __boot_cpu_mode; | 43 | extern int __boot_cpu_mode; |
43 | 44 | ||
45 | static inline void sync_boot_mode(void) | ||
46 | { | ||
47 | /* | ||
48 | * As secondaries write to __boot_cpu_mode with caches disabled, we | ||
49 | * must flush the corresponding cache entries to ensure the visibility | ||
50 | * of their writes. | ||
51 | */ | ||
52 | sync_cache_r(&__boot_cpu_mode); | ||
53 | } | ||
54 | |||
44 | void __hyp_set_vectors(unsigned long phys_vector_base); | 55 | void __hyp_set_vectors(unsigned long phys_vector_base); |
45 | unsigned long __hyp_get_vectors(void); | 56 | unsigned long __hyp_get_vectors(void); |
46 | #else | 57 | #else |
47 | #define __boot_cpu_mode (SVC_MODE) | 58 | #define __boot_cpu_mode (SVC_MODE) |
59 | #define sync_boot_mode() | ||
48 | #endif | 60 | #endif |
49 | 61 | ||
50 | #ifndef ZIMAGE | 62 | #ifndef ZIMAGE |
diff --git a/arch/arm/include/uapi/asm/Kbuild b/arch/arm/include/uapi/asm/Kbuild index 47bcb2d254af..18d76fd5a2af 100644 --- a/arch/arm/include/uapi/asm/Kbuild +++ b/arch/arm/include/uapi/asm/Kbuild | |||
@@ -1,7 +1,6 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += a.out.h | ||
5 | header-y += byteorder.h | 4 | header-y += byteorder.h |
6 | header-y += fcntl.h | 5 | header-y += fcntl.h |
7 | header-y += hwcap.h | 6 | header-y += hwcap.h |
diff --git a/arch/arm/include/uapi/asm/a.out.h b/arch/arm/include/uapi/asm/a.out.h deleted file mode 100644 index 083894b2e3bc..000000000000 --- a/arch/arm/include/uapi/asm/a.out.h +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | #ifndef __ARM_A_OUT_H__ | ||
2 | #define __ARM_A_OUT_H__ | ||
3 | |||
4 | #include <linux/personality.h> | ||
5 | #include <linux/types.h> | ||
6 | |||
7 | struct exec | ||
8 | { | ||
9 | __u32 a_info; /* Use macros N_MAGIC, etc for access */ | ||
10 | __u32 a_text; /* length of text, in bytes */ | ||
11 | __u32 a_data; /* length of data, in bytes */ | ||
12 | __u32 a_bss; /* length of uninitialized data area for file, in bytes */ | ||
13 | __u32 a_syms; /* length of symbol table data in file, in bytes */ | ||
14 | __u32 a_entry; /* start address */ | ||
15 | __u32 a_trsize; /* length of relocation info for text, in bytes */ | ||
16 | __u32 a_drsize; /* length of relocation info for data, in bytes */ | ||
17 | }; | ||
18 | |||
19 | /* | ||
20 | * This is always the same | ||
21 | */ | ||
22 | #define N_TXTADDR(a) (0x00008000) | ||
23 | |||
24 | #define N_TRSIZE(a) ((a).a_trsize) | ||
25 | #define N_DRSIZE(a) ((a).a_drsize) | ||
26 | #define N_SYMSIZE(a) ((a).a_syms) | ||
27 | |||
28 | #define M_ARM 103 | ||
29 | |||
30 | #ifndef LIBRARY_START_TEXT | ||
31 | #define LIBRARY_START_TEXT (0x00c00000) | ||
32 | #endif | ||
33 | |||
34 | #endif /* __A_OUT_GNU_H__ */ | ||
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index a39cfc2a1f90..9cbe70c8b0ef 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -357,7 +357,8 @@ ENDPROC(__pabt_svc) | |||
357 | .endm | 357 | .endm |
358 | 358 | ||
359 | .macro kuser_cmpxchg_check | 359 | .macro kuser_cmpxchg_check |
360 | #if !defined(CONFIG_CPU_32v6K) && !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG) | 360 | #if !defined(CONFIG_CPU_32v6K) && defined(CONFIG_KUSER_HELPERS) && \ |
361 | !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG) | ||
361 | #ifndef CONFIG_MMU | 362 | #ifndef CONFIG_MMU |
362 | #warning "NPTL on non MMU needs fixing" | 363 | #warning "NPTL on non MMU needs fixing" |
363 | #else | 364 | #else |
@@ -742,6 +743,18 @@ ENDPROC(__switch_to) | |||
742 | #endif | 743 | #endif |
743 | .endm | 744 | .endm |
744 | 745 | ||
746 | .macro kuser_pad, sym, size | ||
747 | .if (. - \sym) & 3 | ||
748 | .rept 4 - (. - \sym) & 3 | ||
749 | .byte 0 | ||
750 | .endr | ||
751 | .endif | ||
752 | .rept (\size - (. - \sym)) / 4 | ||
753 | .word 0xe7fddef1 | ||
754 | .endr | ||
755 | .endm | ||
756 | |||
757 | #ifdef CONFIG_KUSER_HELPERS | ||
745 | .align 5 | 758 | .align 5 |
746 | .globl __kuser_helper_start | 759 | .globl __kuser_helper_start |
747 | __kuser_helper_start: | 760 | __kuser_helper_start: |
@@ -832,18 +845,13 @@ kuser_cmpxchg64_fixup: | |||
832 | #error "incoherent kernel configuration" | 845 | #error "incoherent kernel configuration" |
833 | #endif | 846 | #endif |
834 | 847 | ||
835 | /* pad to next slot */ | 848 | kuser_pad __kuser_cmpxchg64, 64 |
836 | .rept (16 - (. - __kuser_cmpxchg64)/4) | ||
837 | .word 0 | ||
838 | .endr | ||
839 | |||
840 | .align 5 | ||
841 | 849 | ||
842 | __kuser_memory_barrier: @ 0xffff0fa0 | 850 | __kuser_memory_barrier: @ 0xffff0fa0 |
843 | smp_dmb arm | 851 | smp_dmb arm |
844 | usr_ret lr | 852 | usr_ret lr |
845 | 853 | ||
846 | .align 5 | 854 | kuser_pad __kuser_memory_barrier, 32 |
847 | 855 | ||
848 | __kuser_cmpxchg: @ 0xffff0fc0 | 856 | __kuser_cmpxchg: @ 0xffff0fc0 |
849 | 857 | ||
@@ -916,13 +924,14 @@ kuser_cmpxchg32_fixup: | |||
916 | 924 | ||
917 | #endif | 925 | #endif |
918 | 926 | ||
919 | .align 5 | 927 | kuser_pad __kuser_cmpxchg, 32 |
920 | 928 | ||
921 | __kuser_get_tls: @ 0xffff0fe0 | 929 | __kuser_get_tls: @ 0xffff0fe0 |
922 | ldr r0, [pc, #(16 - 8)] @ read TLS, set in kuser_get_tls_init | 930 | ldr r0, [pc, #(16 - 8)] @ read TLS, set in kuser_get_tls_init |
923 | usr_ret lr | 931 | usr_ret lr |
924 | mrc p15, 0, r0, c13, c0, 3 @ 0xffff0fe8 hardware TLS code | 932 | mrc p15, 0, r0, c13, c0, 3 @ 0xffff0fe8 hardware TLS code |
925 | .rep 4 | 933 | kuser_pad __kuser_get_tls, 16 |
934 | .rep 3 | ||
926 | .word 0 @ 0xffff0ff0 software TLS value, then | 935 | .word 0 @ 0xffff0ff0 software TLS value, then |
927 | .endr @ pad up to __kuser_helper_version | 936 | .endr @ pad up to __kuser_helper_version |
928 | 937 | ||
@@ -932,14 +941,16 @@ __kuser_helper_version: @ 0xffff0ffc | |||
932 | .globl __kuser_helper_end | 941 | .globl __kuser_helper_end |
933 | __kuser_helper_end: | 942 | __kuser_helper_end: |
934 | 943 | ||
944 | #endif | ||
945 | |||
935 | THUMB( .thumb ) | 946 | THUMB( .thumb ) |
936 | 947 | ||
937 | /* | 948 | /* |
938 | * Vector stubs. | 949 | * Vector stubs. |
939 | * | 950 | * |
940 | * This code is copied to 0xffff0200 so we can use branches in the | 951 | * This code is copied to 0xffff1000 so we can use branches in the |
941 | * vectors, rather than ldr's. Note that this code must not | 952 | * vectors, rather than ldr's. Note that this code must not exceed |
942 | * exceed 0x300 bytes. | 953 | * a page size. |
943 | * | 954 | * |
944 | * Common stub entry macro: | 955 | * Common stub entry macro: |
945 | * Enter in IRQ mode, spsr = SVC/USR CPSR, lr = SVC/USR PC | 956 | * Enter in IRQ mode, spsr = SVC/USR CPSR, lr = SVC/USR PC |
@@ -986,8 +997,17 @@ ENDPROC(vector_\name) | |||
986 | 1: | 997 | 1: |
987 | .endm | 998 | .endm |
988 | 999 | ||
989 | .globl __stubs_start | 1000 | .section .stubs, "ax", %progbits |
990 | __stubs_start: | 1001 | __stubs_start: |
1002 | @ This must be the first word | ||
1003 | .word vector_swi | ||
1004 | |||
1005 | vector_rst: | ||
1006 | ARM( swi SYS_ERROR0 ) | ||
1007 | THUMB( svc #0 ) | ||
1008 | THUMB( nop ) | ||
1009 | b vector_und | ||
1010 | |||
991 | /* | 1011 | /* |
992 | * Interrupt dispatcher | 1012 | * Interrupt dispatcher |
993 | */ | 1013 | */ |
@@ -1082,6 +1102,16 @@ __stubs_start: | |||
1082 | .align 5 | 1102 | .align 5 |
1083 | 1103 | ||
1084 | /*============================================================================= | 1104 | /*============================================================================= |
1105 | * Address exception handler | ||
1106 | *----------------------------------------------------------------------------- | ||
1107 | * These aren't too critical. | ||
1108 | * (they're not supposed to happen, and won't happen in 32-bit data mode). | ||
1109 | */ | ||
1110 | |||
1111 | vector_addrexcptn: | ||
1112 | b vector_addrexcptn | ||
1113 | |||
1114 | /*============================================================================= | ||
1085 | * Undefined FIQs | 1115 | * Undefined FIQs |
1086 | *----------------------------------------------------------------------------- | 1116 | *----------------------------------------------------------------------------- |
1087 | * Enter in FIQ mode, spsr = ANY CPSR, lr = ANY PC | 1117 | * Enter in FIQ mode, spsr = ANY CPSR, lr = ANY PC |
@@ -1094,45 +1124,19 @@ __stubs_start: | |||
1094 | vector_fiq: | 1124 | vector_fiq: |
1095 | subs pc, lr, #4 | 1125 | subs pc, lr, #4 |
1096 | 1126 | ||
1097 | /*============================================================================= | 1127 | .globl vector_fiq_offset |
1098 | * Address exception handler | 1128 | .equ vector_fiq_offset, vector_fiq |
1099 | *----------------------------------------------------------------------------- | ||
1100 | * These aren't too critical. | ||
1101 | * (they're not supposed to happen, and won't happen in 32-bit data mode). | ||
1102 | */ | ||
1103 | |||
1104 | vector_addrexcptn: | ||
1105 | b vector_addrexcptn | ||
1106 | |||
1107 | /* | ||
1108 | * We group all the following data together to optimise | ||
1109 | * for CPUs with separate I & D caches. | ||
1110 | */ | ||
1111 | .align 5 | ||
1112 | |||
1113 | .LCvswi: | ||
1114 | .word vector_swi | ||
1115 | |||
1116 | .globl __stubs_end | ||
1117 | __stubs_end: | ||
1118 | |||
1119 | .equ stubs_offset, __vectors_start + 0x200 - __stubs_start | ||
1120 | 1129 | ||
1121 | .globl __vectors_start | 1130 | .section .vectors, "ax", %progbits |
1122 | __vectors_start: | 1131 | __vectors_start: |
1123 | ARM( swi SYS_ERROR0 ) | 1132 | W(b) vector_rst |
1124 | THUMB( svc #0 ) | 1133 | W(b) vector_und |
1125 | THUMB( nop ) | 1134 | W(ldr) pc, __vectors_start + 0x1000 |
1126 | W(b) vector_und + stubs_offset | 1135 | W(b) vector_pabt |
1127 | W(ldr) pc, .LCvswi + stubs_offset | 1136 | W(b) vector_dabt |
1128 | W(b) vector_pabt + stubs_offset | 1137 | W(b) vector_addrexcptn |
1129 | W(b) vector_dabt + stubs_offset | 1138 | W(b) vector_irq |
1130 | W(b) vector_addrexcptn + stubs_offset | 1139 | W(b) vector_fiq |
1131 | W(b) vector_irq + stubs_offset | ||
1132 | W(b) vector_fiq + stubs_offset | ||
1133 | |||
1134 | .globl __vectors_end | ||
1135 | __vectors_end: | ||
1136 | 1140 | ||
1137 | .data | 1141 | .data |
1138 | 1142 | ||
diff --git a/arch/arm/kernel/entry-v7m.S b/arch/arm/kernel/entry-v7m.S index e00621f1403f..52b26432c9a9 100644 --- a/arch/arm/kernel/entry-v7m.S +++ b/arch/arm/kernel/entry-v7m.S | |||
@@ -49,7 +49,7 @@ __irq_entry: | |||
49 | mov r1, sp | 49 | mov r1, sp |
50 | stmdb sp!, {lr} | 50 | stmdb sp!, {lr} |
51 | @ routine called with r0 = irq number, r1 = struct pt_regs * | 51 | @ routine called with r0 = irq number, r1 = struct pt_regs * |
52 | bl nvic_do_IRQ | 52 | bl nvic_handle_irq |
53 | 53 | ||
54 | pop {lr} | 54 | pop {lr} |
55 | @ | 55 | @ |
diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c index 2adda11f712f..fc7920288a3d 100644 --- a/arch/arm/kernel/fiq.c +++ b/arch/arm/kernel/fiq.c | |||
@@ -47,6 +47,11 @@ | |||
47 | #include <asm/irq.h> | 47 | #include <asm/irq.h> |
48 | #include <asm/traps.h> | 48 | #include <asm/traps.h> |
49 | 49 | ||
50 | #define FIQ_OFFSET ({ \ | ||
51 | extern void *vector_fiq_offset; \ | ||
52 | (unsigned)&vector_fiq_offset; \ | ||
53 | }) | ||
54 | |||
50 | static unsigned long no_fiq_insn; | 55 | static unsigned long no_fiq_insn; |
51 | 56 | ||
52 | /* Default reacquire function | 57 | /* Default reacquire function |
@@ -79,14 +84,13 @@ int show_fiq_list(struct seq_file *p, int prec) | |||
79 | 84 | ||
80 | void set_fiq_handler(void *start, unsigned int length) | 85 | void set_fiq_handler(void *start, unsigned int length) |
81 | { | 86 | { |
82 | #if defined(CONFIG_CPU_USE_DOMAINS) | 87 | void *base = vectors_page; |
83 | memcpy((void *)0xffff001c, start, length); | 88 | unsigned offset = FIQ_OFFSET; |
84 | #else | 89 | |
85 | memcpy(vectors_page + 0x1c, start, length); | 90 | memcpy(base + offset, start, length); |
86 | #endif | 91 | if (!cache_is_vipt_nonaliasing()) |
87 | flush_icache_range(0xffff001c, 0xffff001c + length); | 92 | flush_icache_range(base + offset, offset + length); |
88 | if (!vectors_high()) | 93 | flush_icache_range(0xffff0000 + offset, 0xffff0000 + offset + length); |
89 | flush_icache_range(0x1c, 0x1c + length); | ||
90 | } | 94 | } |
91 | 95 | ||
92 | int claim_fiq(struct fiq_handler *f) | 96 | int claim_fiq(struct fiq_handler *f) |
@@ -144,6 +148,7 @@ EXPORT_SYMBOL(disable_fiq); | |||
144 | 148 | ||
145 | void __init init_FIQ(int start) | 149 | void __init init_FIQ(int start) |
146 | { | 150 | { |
147 | no_fiq_insn = *(unsigned long *)0xffff001c; | 151 | unsigned offset = FIQ_OFFSET; |
152 | no_fiq_insn = *(unsigned long *)(0xffff0000 + offset); | ||
148 | fiq_start = start; | 153 | fiq_start = start; |
149 | } | 154 | } |
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S index b361de143756..14235ba64a90 100644 --- a/arch/arm/kernel/head-nommu.S +++ b/arch/arm/kernel/head-nommu.S | |||
@@ -87,6 +87,7 @@ ENTRY(stext) | |||
87 | ENDPROC(stext) | 87 | ENDPROC(stext) |
88 | 88 | ||
89 | #ifdef CONFIG_SMP | 89 | #ifdef CONFIG_SMP |
90 | .text | ||
90 | ENTRY(secondary_startup) | 91 | ENTRY(secondary_startup) |
91 | /* | 92 | /* |
92 | * Common entry point for secondary CPUs. | 93 | * Common entry point for secondary CPUs. |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 9cf6063020ae..2c7cc1e03473 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -343,6 +343,7 @@ __turn_mmu_on_loc: | |||
343 | .long __turn_mmu_on_end | 343 | .long __turn_mmu_on_end |
344 | 344 | ||
345 | #if defined(CONFIG_SMP) | 345 | #if defined(CONFIG_SMP) |
346 | .text | ||
346 | ENTRY(secondary_startup) | 347 | ENTRY(secondary_startup) |
347 | /* | 348 | /* |
348 | * Common entry point for secondary CPUs. | 349 | * Common entry point for secondary CPUs. |
diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S index 4910232c4833..797b1a6a4906 100644 --- a/arch/arm/kernel/hyp-stub.S +++ b/arch/arm/kernel/hyp-stub.S | |||
@@ -56,8 +56,8 @@ ENTRY(__boot_cpu_mode) | |||
56 | ldr \reg3, [\reg2] | 56 | ldr \reg3, [\reg2] |
57 | ldr \reg1, [\reg2, \reg3] | 57 | ldr \reg1, [\reg2, \reg3] |
58 | cmp \mode, \reg1 @ matches primary CPU boot mode? | 58 | cmp \mode, \reg1 @ matches primary CPU boot mode? |
59 | orrne r7, r7, #BOOT_CPU_MODE_MISMATCH | 59 | orrne \reg1, \reg1, #BOOT_CPU_MODE_MISMATCH |
60 | strne r7, [r5, r6] @ record what happened and give up | 60 | strne \reg1, [\reg2, \reg3] @ record what happened and give up |
61 | .endm | 61 | .endm |
62 | 62 | ||
63 | #else /* ZIMAGE */ | 63 | #else /* ZIMAGE */ |
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index 4fb074c446bf..d7c82df69243 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/mmu_context.h> | 15 | #include <asm/mmu_context.h> |
16 | #include <asm/cacheflush.h> | 16 | #include <asm/cacheflush.h> |
17 | #include <asm/mach-types.h> | 17 | #include <asm/mach-types.h> |
18 | #include <asm/smp_plat.h> | ||
18 | #include <asm/system_misc.h> | 19 | #include <asm/system_misc.h> |
19 | 20 | ||
20 | extern const unsigned char relocate_new_kernel[]; | 21 | extern const unsigned char relocate_new_kernel[]; |
@@ -39,6 +40,14 @@ int machine_kexec_prepare(struct kimage *image) | |||
39 | int i, err; | 40 | int i, err; |
40 | 41 | ||
41 | /* | 42 | /* |
43 | * Validate that if the current HW supports SMP, then the SW supports | ||
44 | * and implements CPU hotplug for the current HW. If not, we won't be | ||
45 | * able to kexec reliably, so fail the prepare operation. | ||
46 | */ | ||
47 | if (num_possible_cpus() > 1 && !platform_can_cpu_hotplug()) | ||
48 | return -EINVAL; | ||
49 | |||
50 | /* | ||
42 | * No segment at default ATAGs address. try to locate | 51 | * No segment at default ATAGs address. try to locate |
43 | * a dtb using magic. | 52 | * a dtb using magic. |
44 | */ | 53 | */ |
@@ -134,10 +143,13 @@ void machine_kexec(struct kimage *image) | |||
134 | unsigned long reboot_code_buffer_phys; | 143 | unsigned long reboot_code_buffer_phys; |
135 | void *reboot_code_buffer; | 144 | void *reboot_code_buffer; |
136 | 145 | ||
137 | if (num_online_cpus() > 1) { | 146 | /* |
138 | pr_err("kexec: error: multiple CPUs still online\n"); | 147 | * This can only happen if machine_shutdown() failed to disable some |
139 | return; | 148 | * CPU, and that can only happen if the checks in |
140 | } | 149 | * machine_kexec_prepare() were not correct. If this fails, we can't |
150 | * reliably kexec anyway, so BUG_ON is appropriate. | ||
151 | */ | ||
152 | BUG_ON(num_online_cpus() > 1); | ||
141 | 153 | ||
142 | page_list = image->head & PAGE_MASK; | 154 | page_list = image->head & PAGE_MASK; |
143 | 155 | ||
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index d9f5cd4e533f..e186ee1e63f6 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -53,7 +53,12 @@ armpmu_map_cache_event(const unsigned (*cache_map) | |||
53 | static int | 53 | static int |
54 | armpmu_map_hw_event(const unsigned (*event_map)[PERF_COUNT_HW_MAX], u64 config) | 54 | armpmu_map_hw_event(const unsigned (*event_map)[PERF_COUNT_HW_MAX], u64 config) |
55 | { | 55 | { |
56 | int mapping = (*event_map)[config]; | 56 | int mapping; |
57 | |||
58 | if (config >= PERF_COUNT_HW_MAX) | ||
59 | return -EINVAL; | ||
60 | |||
61 | mapping = (*event_map)[config]; | ||
57 | return mapping == HW_OP_UNSUPPORTED ? -ENOENT : mapping; | 62 | return mapping == HW_OP_UNSUPPORTED ? -ENOENT : mapping; |
58 | } | 63 | } |
59 | 64 | ||
@@ -253,6 +258,9 @@ validate_event(struct pmu_hw_events *hw_events, | |||
253 | struct arm_pmu *armpmu = to_arm_pmu(event->pmu); | 258 | struct arm_pmu *armpmu = to_arm_pmu(event->pmu); |
254 | struct pmu *leader_pmu = event->group_leader->pmu; | 259 | struct pmu *leader_pmu = event->group_leader->pmu; |
255 | 260 | ||
261 | if (is_software_event(event)) | ||
262 | return 1; | ||
263 | |||
256 | if (event->pmu != leader_pmu || event->state < PERF_EVENT_STATE_OFF) | 264 | if (event->pmu != leader_pmu || event->state < PERF_EVENT_STATE_OFF) |
257 | return 1; | 265 | return 1; |
258 | 266 | ||
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index d3ca4f6915af..94f6b05f9e24 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -197,6 +197,7 @@ void machine_shutdown(void) | |||
197 | */ | 197 | */ |
198 | void machine_halt(void) | 198 | void machine_halt(void) |
199 | { | 199 | { |
200 | local_irq_disable(); | ||
200 | smp_send_stop(); | 201 | smp_send_stop(); |
201 | 202 | ||
202 | local_irq_disable(); | 203 | local_irq_disable(); |
@@ -211,6 +212,7 @@ void machine_halt(void) | |||
211 | */ | 212 | */ |
212 | void machine_power_off(void) | 213 | void machine_power_off(void) |
213 | { | 214 | { |
215 | local_irq_disable(); | ||
214 | smp_send_stop(); | 216 | smp_send_stop(); |
215 | 217 | ||
216 | if (pm_power_off) | 218 | if (pm_power_off) |
@@ -230,6 +232,7 @@ void machine_power_off(void) | |||
230 | */ | 232 | */ |
231 | void machine_restart(char *cmd) | 233 | void machine_restart(char *cmd) |
232 | { | 234 | { |
235 | local_irq_disable(); | ||
233 | smp_send_stop(); | 236 | smp_send_stop(); |
234 | 237 | ||
235 | arm_pm_restart(reboot_mode, cmd); | 238 | arm_pm_restart(reboot_mode, cmd); |
@@ -426,10 +429,11 @@ unsigned long arch_randomize_brk(struct mm_struct *mm) | |||
426 | } | 429 | } |
427 | 430 | ||
428 | #ifdef CONFIG_MMU | 431 | #ifdef CONFIG_MMU |
432 | #ifdef CONFIG_KUSER_HELPERS | ||
429 | /* | 433 | /* |
430 | * The vectors page is always readable from user space for the | 434 | * The vectors page is always readable from user space for the |
431 | * atomic helpers and the signal restart code. Insert it into the | 435 | * atomic helpers. Insert it into the gate_vma so that it is visible |
432 | * gate_vma so that it is visible through ptrace and /proc/<pid>/mem. | 436 | * through ptrace and /proc/<pid>/mem. |
433 | */ | 437 | */ |
434 | static struct vm_area_struct gate_vma = { | 438 | static struct vm_area_struct gate_vma = { |
435 | .vm_start = 0xffff0000, | 439 | .vm_start = 0xffff0000, |
@@ -458,9 +462,48 @@ int in_gate_area_no_mm(unsigned long addr) | |||
458 | { | 462 | { |
459 | return in_gate_area(NULL, addr); | 463 | return in_gate_area(NULL, addr); |
460 | } | 464 | } |
465 | #define is_gate_vma(vma) ((vma) == &gate_vma) | ||
466 | #else | ||
467 | #define is_gate_vma(vma) 0 | ||
468 | #endif | ||
461 | 469 | ||
462 | const char *arch_vma_name(struct vm_area_struct *vma) | 470 | const char *arch_vma_name(struct vm_area_struct *vma) |
463 | { | 471 | { |
464 | return (vma == &gate_vma) ? "[vectors]" : NULL; | 472 | return is_gate_vma(vma) ? "[vectors]" : |
473 | (vma->vm_mm && vma->vm_start == vma->vm_mm->context.sigpage) ? | ||
474 | "[sigpage]" : NULL; | ||
475 | } | ||
476 | |||
477 | static struct page *signal_page; | ||
478 | extern struct page *get_signal_page(void); | ||
479 | |||
480 | int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) | ||
481 | { | ||
482 | struct mm_struct *mm = current->mm; | ||
483 | unsigned long addr; | ||
484 | int ret; | ||
485 | |||
486 | if (!signal_page) | ||
487 | signal_page = get_signal_page(); | ||
488 | if (!signal_page) | ||
489 | return -ENOMEM; | ||
490 | |||
491 | down_write(&mm->mmap_sem); | ||
492 | addr = get_unmapped_area(NULL, 0, PAGE_SIZE, 0, 0); | ||
493 | if (IS_ERR_VALUE(addr)) { | ||
494 | ret = addr; | ||
495 | goto up_fail; | ||
496 | } | ||
497 | |||
498 | ret = install_special_mapping(mm, addr, PAGE_SIZE, | ||
499 | VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC, | ||
500 | &signal_page); | ||
501 | |||
502 | if (ret == 0) | ||
503 | mm->context.sigpage = addr; | ||
504 | |||
505 | up_fail: | ||
506 | up_write(&mm->mmap_sem); | ||
507 | return ret; | ||
465 | } | 508 | } |
466 | #endif | 509 | #endif |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 63af9a7ae512..afc2489ee13b 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -836,6 +836,8 @@ static int __init meminfo_cmp(const void *_a, const void *_b) | |||
836 | void __init hyp_mode_check(void) | 836 | void __init hyp_mode_check(void) |
837 | { | 837 | { |
838 | #ifdef CONFIG_ARM_VIRT_EXT | 838 | #ifdef CONFIG_ARM_VIRT_EXT |
839 | sync_boot_mode(); | ||
840 | |||
839 | if (is_hyp_mode_available()) { | 841 | if (is_hyp_mode_available()) { |
840 | pr_info("CPU: All CPU(s) started in HYP mode.\n"); | 842 | pr_info("CPU: All CPU(s) started in HYP mode.\n"); |
841 | pr_info("CPU: Virtualization extensions available.\n"); | 843 | pr_info("CPU: Virtualization extensions available.\n"); |
@@ -971,6 +973,7 @@ static const char *hwcap_str[] = { | |||
971 | "vfpv4", | 973 | "vfpv4", |
972 | "idiva", | 974 | "idiva", |
973 | "idivt", | 975 | "idivt", |
976 | "vfpd32", | ||
974 | "lpae", | 977 | "lpae", |
975 | NULL | 978 | NULL |
976 | }; | 979 | }; |
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 1c16c35c271a..ab3304225272 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/random.h> | ||
11 | #include <linux/signal.h> | 12 | #include <linux/signal.h> |
12 | #include <linux/personality.h> | 13 | #include <linux/personality.h> |
13 | #include <linux/uaccess.h> | 14 | #include <linux/uaccess.h> |
@@ -15,12 +16,11 @@ | |||
15 | 16 | ||
16 | #include <asm/elf.h> | 17 | #include <asm/elf.h> |
17 | #include <asm/cacheflush.h> | 18 | #include <asm/cacheflush.h> |
19 | #include <asm/traps.h> | ||
18 | #include <asm/ucontext.h> | 20 | #include <asm/ucontext.h> |
19 | #include <asm/unistd.h> | 21 | #include <asm/unistd.h> |
20 | #include <asm/vfp.h> | 22 | #include <asm/vfp.h> |
21 | 23 | ||
22 | #include "signal.h" | ||
23 | |||
24 | /* | 24 | /* |
25 | * For ARM syscalls, we encode the syscall number into the instruction. | 25 | * For ARM syscalls, we encode the syscall number into the instruction. |
26 | */ | 26 | */ |
@@ -40,11 +40,13 @@ | |||
40 | #define SWI_THUMB_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_sigreturn - __NR_SYSCALL_BASE)) | 40 | #define SWI_THUMB_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_sigreturn - __NR_SYSCALL_BASE)) |
41 | #define SWI_THUMB_RT_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_rt_sigreturn - __NR_SYSCALL_BASE)) | 41 | #define SWI_THUMB_RT_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_rt_sigreturn - __NR_SYSCALL_BASE)) |
42 | 42 | ||
43 | const unsigned long sigreturn_codes[7] = { | 43 | static const unsigned long sigreturn_codes[7] = { |
44 | MOV_R7_NR_SIGRETURN, SWI_SYS_SIGRETURN, SWI_THUMB_SIGRETURN, | 44 | MOV_R7_NR_SIGRETURN, SWI_SYS_SIGRETURN, SWI_THUMB_SIGRETURN, |
45 | MOV_R7_NR_RT_SIGRETURN, SWI_SYS_RT_SIGRETURN, SWI_THUMB_RT_SIGRETURN, | 45 | MOV_R7_NR_RT_SIGRETURN, SWI_SYS_RT_SIGRETURN, SWI_THUMB_RT_SIGRETURN, |
46 | }; | 46 | }; |
47 | 47 | ||
48 | static unsigned long signal_return_offset; | ||
49 | |||
48 | #ifdef CONFIG_CRUNCH | 50 | #ifdef CONFIG_CRUNCH |
49 | static int preserve_crunch_context(struct crunch_sigframe __user *frame) | 51 | static int preserve_crunch_context(struct crunch_sigframe __user *frame) |
50 | { | 52 | { |
@@ -400,14 +402,20 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig, | |||
400 | __put_user(sigreturn_codes[idx+1], rc+1)) | 402 | __put_user(sigreturn_codes[idx+1], rc+1)) |
401 | return 1; | 403 | return 1; |
402 | 404 | ||
403 | if ((cpsr & MODE32_BIT) && !IS_ENABLED(CONFIG_ARM_MPU)) { | 405 | #ifdef CONFIG_MMU |
406 | if (cpsr & MODE32_BIT) { | ||
407 | struct mm_struct *mm = current->mm; | ||
408 | |||
404 | /* | 409 | /* |
405 | * 32-bit code can use the new high-page | 410 | * 32-bit code can use the signal return page |
406 | * signal return code support except when the MPU has | 411 | * except when the MPU has protected the vectors |
407 | * protected the vectors page from PL0 | 412 | * page from PL0 |
408 | */ | 413 | */ |
409 | retcode = KERN_SIGRETURN_CODE + (idx << 2) + thumb; | 414 | retcode = mm->context.sigpage + signal_return_offset + |
410 | } else { | 415 | (idx << 2) + thumb; |
416 | } else | ||
417 | #endif | ||
418 | { | ||
411 | /* | 419 | /* |
412 | * Ensure that the instruction cache sees | 420 | * Ensure that the instruction cache sees |
413 | * the return code written onto the stack. | 421 | * the return code written onto the stack. |
@@ -608,3 +616,33 @@ do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall) | |||
608 | } while (thread_flags & _TIF_WORK_MASK); | 616 | } while (thread_flags & _TIF_WORK_MASK); |
609 | return 0; | 617 | return 0; |
610 | } | 618 | } |
619 | |||
620 | struct page *get_signal_page(void) | ||
621 | { | ||
622 | unsigned long ptr; | ||
623 | unsigned offset; | ||
624 | struct page *page; | ||
625 | void *addr; | ||
626 | |||
627 | page = alloc_pages(GFP_KERNEL, 0); | ||
628 | |||
629 | if (!page) | ||
630 | return NULL; | ||
631 | |||
632 | addr = page_address(page); | ||
633 | |||
634 | /* Give the signal return code some randomness */ | ||
635 | offset = 0x200 + (get_random_int() & 0x7fc); | ||
636 | signal_return_offset = offset; | ||
637 | |||
638 | /* | ||
639 | * Copy signal return handlers into the vector page, and | ||
640 | * set sigreturn to be a pointer to these. | ||
641 | */ | ||
642 | memcpy(addr + offset, sigreturn_codes, sizeof(sigreturn_codes)); | ||
643 | |||
644 | ptr = (unsigned long)addr + offset; | ||
645 | flush_icache_range(ptr, ptr + sizeof(sigreturn_codes)); | ||
646 | |||
647 | return page; | ||
648 | } | ||
diff --git a/arch/arm/kernel/signal.h b/arch/arm/kernel/signal.h deleted file mode 100644 index 5ff067b7c752..000000000000 --- a/arch/arm/kernel/signal.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/kernel/signal.h | ||
3 | * | ||
4 | * Copyright (C) 2005-2009 Russell King. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #define KERN_SIGRETURN_CODE (CONFIG_VECTORS_BASE + 0x00000500) | ||
11 | |||
12 | extern const unsigned long sigreturn_codes[7]; | ||
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index c2b4f8f0be9a..2dc19349eb19 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -145,6 +145,16 @@ int boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
145 | return -ENOSYS; | 145 | return -ENOSYS; |
146 | } | 146 | } |
147 | 147 | ||
148 | int platform_can_cpu_hotplug(void) | ||
149 | { | ||
150 | #ifdef CONFIG_HOTPLUG_CPU | ||
151 | if (smp_ops.cpu_kill) | ||
152 | return 1; | ||
153 | #endif | ||
154 | |||
155 | return 0; | ||
156 | } | ||
157 | |||
148 | #ifdef CONFIG_HOTPLUG_CPU | 158 | #ifdef CONFIG_HOTPLUG_CPU |
149 | static void percpu_timer_stop(void); | 159 | static void percpu_timer_stop(void); |
150 | 160 | ||
diff --git a/arch/arm/kernel/smp_tlb.c b/arch/arm/kernel/smp_tlb.c index a98b62dca2fa..c2edfff573c2 100644 --- a/arch/arm/kernel/smp_tlb.c +++ b/arch/arm/kernel/smp_tlb.c | |||
@@ -70,23 +70,6 @@ static inline void ipi_flush_bp_all(void *ignored) | |||
70 | local_flush_bp_all(); | 70 | local_flush_bp_all(); |
71 | } | 71 | } |
72 | 72 | ||
73 | #ifdef CONFIG_ARM_ERRATA_798181 | ||
74 | static int erratum_a15_798181(void) | ||
75 | { | ||
76 | unsigned int midr = read_cpuid_id(); | ||
77 | |||
78 | /* Cortex-A15 r0p0..r3p2 affected */ | ||
79 | if ((midr & 0xff0ffff0) != 0x410fc0f0 || midr > 0x413fc0f2) | ||
80 | return 0; | ||
81 | return 1; | ||
82 | } | ||
83 | #else | ||
84 | static int erratum_a15_798181(void) | ||
85 | { | ||
86 | return 0; | ||
87 | } | ||
88 | #endif | ||
89 | |||
90 | static void ipi_flush_tlb_a15_erratum(void *arg) | 73 | static void ipi_flush_tlb_a15_erratum(void *arg) |
91 | { | 74 | { |
92 | dmb(); | 75 | dmb(); |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index cab094c234ee..ab517fcce21b 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -35,8 +35,6 @@ | |||
35 | #include <asm/tls.h> | 35 | #include <asm/tls.h> |
36 | #include <asm/system_misc.h> | 36 | #include <asm/system_misc.h> |
37 | 37 | ||
38 | #include "signal.h" | ||
39 | |||
40 | static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" }; | 38 | static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" }; |
41 | 39 | ||
42 | void *vectors_page; | 40 | void *vectors_page; |
@@ -800,15 +798,26 @@ void __init trap_init(void) | |||
800 | return; | 798 | return; |
801 | } | 799 | } |
802 | 800 | ||
803 | static void __init kuser_get_tls_init(unsigned long vectors) | 801 | #ifdef CONFIG_KUSER_HELPERS |
802 | static void __init kuser_init(void *vectors) | ||
804 | { | 803 | { |
804 | extern char __kuser_helper_start[], __kuser_helper_end[]; | ||
805 | int kuser_sz = __kuser_helper_end - __kuser_helper_start; | ||
806 | |||
807 | memcpy(vectors + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz); | ||
808 | |||
805 | /* | 809 | /* |
806 | * vectors + 0xfe0 = __kuser_get_tls | 810 | * vectors + 0xfe0 = __kuser_get_tls |
807 | * vectors + 0xfe8 = hardware TLS instruction at 0xffff0fe8 | 811 | * vectors + 0xfe8 = hardware TLS instruction at 0xffff0fe8 |
808 | */ | 812 | */ |
809 | if (tls_emu || has_tls_reg) | 813 | if (tls_emu || has_tls_reg) |
810 | memcpy((void *)vectors + 0xfe0, (void *)vectors + 0xfe8, 4); | 814 | memcpy(vectors + 0xfe0, vectors + 0xfe8, 4); |
811 | } | 815 | } |
816 | #else | ||
817 | static void __init kuser_init(void *vectors) | ||
818 | { | ||
819 | } | ||
820 | #endif | ||
812 | 821 | ||
813 | void __init early_trap_init(void *vectors_base) | 822 | void __init early_trap_init(void *vectors_base) |
814 | { | 823 | { |
@@ -816,33 +825,30 @@ void __init early_trap_init(void *vectors_base) | |||
816 | unsigned long vectors = (unsigned long)vectors_base; | 825 | unsigned long vectors = (unsigned long)vectors_base; |
817 | extern char __stubs_start[], __stubs_end[]; | 826 | extern char __stubs_start[], __stubs_end[]; |
818 | extern char __vectors_start[], __vectors_end[]; | 827 | extern char __vectors_start[], __vectors_end[]; |
819 | extern char __kuser_helper_start[], __kuser_helper_end[]; | 828 | unsigned i; |
820 | int kuser_sz = __kuser_helper_end - __kuser_helper_start; | ||
821 | 829 | ||
822 | vectors_page = vectors_base; | 830 | vectors_page = vectors_base; |
823 | 831 | ||
824 | /* | 832 | /* |
833 | * Poison the vectors page with an undefined instruction. This | ||
834 | * instruction is chosen to be undefined for both ARM and Thumb | ||
835 | * ISAs. The Thumb version is an undefined instruction with a | ||
836 | * branch back to the undefined instruction. | ||
837 | */ | ||
838 | for (i = 0; i < PAGE_SIZE / sizeof(u32); i++) | ||
839 | ((u32 *)vectors_base)[i] = 0xe7fddef1; | ||
840 | |||
841 | /* | ||
825 | * Copy the vectors, stubs and kuser helpers (in entry-armv.S) | 842 | * Copy the vectors, stubs and kuser helpers (in entry-armv.S) |
826 | * into the vector page, mapped at 0xffff0000, and ensure these | 843 | * into the vector page, mapped at 0xffff0000, and ensure these |
827 | * are visible to the instruction stream. | 844 | * are visible to the instruction stream. |
828 | */ | 845 | */ |
829 | memcpy((void *)vectors, __vectors_start, __vectors_end - __vectors_start); | 846 | memcpy((void *)vectors, __vectors_start, __vectors_end - __vectors_start); |
830 | memcpy((void *)vectors + 0x200, __stubs_start, __stubs_end - __stubs_start); | 847 | memcpy((void *)vectors + 0x1000, __stubs_start, __stubs_end - __stubs_start); |
831 | memcpy((void *)vectors + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz); | ||
832 | 848 | ||
833 | /* | 849 | kuser_init(vectors_base); |
834 | * Do processor specific fixups for the kuser helpers | ||
835 | */ | ||
836 | kuser_get_tls_init(vectors); | ||
837 | |||
838 | /* | ||
839 | * Copy signal return handlers into the vector page, and | ||
840 | * set sigreturn to be a pointer to these. | ||
841 | */ | ||
842 | memcpy((void *)(vectors + KERN_SIGRETURN_CODE - CONFIG_VECTORS_BASE), | ||
843 | sigreturn_codes, sizeof(sigreturn_codes)); | ||
844 | 850 | ||
845 | flush_icache_range(vectors, vectors + PAGE_SIZE); | 851 | flush_icache_range(vectors, vectors + PAGE_SIZE * 2); |
846 | modify_domain(DOMAIN_USER, DOMAIN_CLIENT); | 852 | modify_domain(DOMAIN_USER, DOMAIN_CLIENT); |
847 | #else /* ifndef CONFIG_CPU_V7M */ | 853 | #else /* ifndef CONFIG_CPU_V7M */ |
848 | /* | 854 | /* |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index fa25e4e425f6..7bcee5c9b604 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -148,6 +148,23 @@ SECTIONS | |||
148 | . = ALIGN(PAGE_SIZE); | 148 | . = ALIGN(PAGE_SIZE); |
149 | __init_begin = .; | 149 | __init_begin = .; |
150 | #endif | 150 | #endif |
151 | /* | ||
152 | * The vectors and stubs are relocatable code, and the | ||
153 | * only thing that matters is their relative offsets | ||
154 | */ | ||
155 | __vectors_start = .; | ||
156 | .vectors 0 : AT(__vectors_start) { | ||
157 | *(.vectors) | ||
158 | } | ||
159 | . = __vectors_start + SIZEOF(.vectors); | ||
160 | __vectors_end = .; | ||
161 | |||
162 | __stubs_start = .; | ||
163 | .stubs 0x1000 : AT(__stubs_start) { | ||
164 | *(.stubs) | ||
165 | } | ||
166 | . = __stubs_start + SIZEOF(.stubs); | ||
167 | __stubs_end = .; | ||
151 | 168 | ||
152 | INIT_TEXT_SECTION(8) | 169 | INIT_TEXT_SECTION(8) |
153 | .exit.text : { | 170 | .exit.text : { |
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index 614e41e7881b..905efc8cac79 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig | |||
@@ -121,8 +121,7 @@ config MSM_SMD | |||
121 | bool | 121 | bool |
122 | 122 | ||
123 | config MSM_GPIOMUX | 123 | config MSM_GPIOMUX |
124 | depends on !(ARCH_MSM8X60 || ARCH_MSM8960) | 124 | bool |
125 | bool "MSM V1 TLMM GPIOMUX architecture" | ||
126 | help | 125 | help |
127 | Support for MSM V1 TLMM GPIOMUX architecture. | 126 | Support for MSM V1 TLMM GPIOMUX architecture. |
128 | 127 | ||
diff --git a/arch/arm/mach-msm/gpiomux-v1.c b/arch/arm/mach-msm/gpiomux-v1.c deleted file mode 100644 index 27de2abd7144..000000000000 --- a/arch/arm/mach-msm/gpiomux-v1.c +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* Copyright (c) 2010, Code Aurora Forum. All rights reserved. | ||
2 | * | ||
3 | * This program is free software; you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License version 2 and | ||
5 | * only version 2 as published by the Free Software Foundation. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | * | ||
12 | * You should have received a copy of the GNU General Public License | ||
13 | * along with this program; if not, write to the Free Software | ||
14 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
15 | * 02110-1301, USA. | ||
16 | */ | ||
17 | #include <linux/kernel.h> | ||
18 | #include "gpiomux.h" | ||
19 | #include "proc_comm.h" | ||
20 | |||
21 | void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val) | ||
22 | { | ||
23 | unsigned tlmm_config = (val & ~GPIOMUX_CTL_MASK) | | ||
24 | ((gpio & 0x3ff) << 4); | ||
25 | unsigned tlmm_disable = 0; | ||
26 | int rc; | ||
27 | |||
28 | rc = msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, | ||
29 | &tlmm_config, &tlmm_disable); | ||
30 | if (rc) | ||
31 | pr_err("%s: unexpected proc_comm failure %d: %08x %08x\n", | ||
32 | __func__, rc, tlmm_config, tlmm_disable); | ||
33 | } | ||
diff --git a/arch/arm/mach-msm/gpiomux.h b/arch/arm/mach-msm/gpiomux.h index 8e82f41a8923..4410d7766f93 100644 --- a/arch/arm/mach-msm/gpiomux.h +++ b/arch/arm/mach-msm/gpiomux.h | |||
@@ -73,16 +73,6 @@ extern struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS]; | |||
73 | int msm_gpiomux_write(unsigned gpio, | 73 | int msm_gpiomux_write(unsigned gpio, |
74 | gpiomux_config_t active, | 74 | gpiomux_config_t active, |
75 | gpiomux_config_t suspended); | 75 | gpiomux_config_t suspended); |
76 | |||
77 | /* Architecture-internal function for use by the framework only. | ||
78 | * This function can assume the following: | ||
79 | * - the gpio value has passed a bounds-check | ||
80 | * - the gpiomux spinlock has been obtained | ||
81 | * | ||
82 | * This function is not for public consumption. External users | ||
83 | * should use msm_gpiomux_write. | ||
84 | */ | ||
85 | void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val); | ||
86 | #else | 76 | #else |
87 | static inline int msm_gpiomux_write(unsigned gpio, | 77 | static inline int msm_gpiomux_write(unsigned gpio, |
88 | gpiomux_config_t active, | 78 | gpiomux_config_t active, |
diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c index 393aeefaebb0..043e5705f2a6 100644 --- a/arch/arm/mach-omap2/dss-common.c +++ b/arch/arm/mach-omap2/dss-common.c | |||
@@ -42,7 +42,7 @@ | |||
42 | 42 | ||
43 | /* Using generic display panel */ | 43 | /* Using generic display panel */ |
44 | static struct tfp410_platform_data omap4_dvi_panel = { | 44 | static struct tfp410_platform_data omap4_dvi_panel = { |
45 | .i2c_bus_num = 3, | 45 | .i2c_bus_num = 2, |
46 | .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, | 46 | .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, |
47 | }; | 47 | }; |
48 | 48 | ||
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index 5cc92874be7e..f99f68e1e85b 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c | |||
@@ -129,6 +129,7 @@ static int omap_device_build_from_dt(struct platform_device *pdev) | |||
129 | struct device_node *node = pdev->dev.of_node; | 129 | struct device_node *node = pdev->dev.of_node; |
130 | const char *oh_name; | 130 | const char *oh_name; |
131 | int oh_cnt, i, ret = 0; | 131 | int oh_cnt, i, ret = 0; |
132 | bool device_active = false; | ||
132 | 133 | ||
133 | oh_cnt = of_property_count_strings(node, "ti,hwmods"); | 134 | oh_cnt = of_property_count_strings(node, "ti,hwmods"); |
134 | if (oh_cnt <= 0) { | 135 | if (oh_cnt <= 0) { |
@@ -152,6 +153,8 @@ static int omap_device_build_from_dt(struct platform_device *pdev) | |||
152 | goto odbfd_exit1; | 153 | goto odbfd_exit1; |
153 | } | 154 | } |
154 | hwmods[i] = oh; | 155 | hwmods[i] = oh; |
156 | if (oh->flags & HWMOD_INIT_NO_IDLE) | ||
157 | device_active = true; | ||
155 | } | 158 | } |
156 | 159 | ||
157 | od = omap_device_alloc(pdev, hwmods, oh_cnt); | 160 | od = omap_device_alloc(pdev, hwmods, oh_cnt); |
@@ -172,6 +175,11 @@ static int omap_device_build_from_dt(struct platform_device *pdev) | |||
172 | 175 | ||
173 | pdev->dev.pm_domain = &omap_device_pm_domain; | 176 | pdev->dev.pm_domain = &omap_device_pm_domain; |
174 | 177 | ||
178 | if (device_active) { | ||
179 | omap_device_enable(pdev); | ||
180 | pm_runtime_set_active(&pdev->dev); | ||
181 | } | ||
182 | |||
175 | odbfd_exit1: | 183 | odbfd_exit1: |
176 | kfree(hwmods); | 184 | kfree(hwmods); |
177 | odbfd_exit: | 185 | odbfd_exit: |
@@ -842,6 +850,7 @@ static int __init omap_device_late_idle(struct device *dev, void *data) | |||
842 | { | 850 | { |
843 | struct platform_device *pdev = to_platform_device(dev); | 851 | struct platform_device *pdev = to_platform_device(dev); |
844 | struct omap_device *od = to_omap_device(pdev); | 852 | struct omap_device *od = to_omap_device(pdev); |
853 | int i; | ||
845 | 854 | ||
846 | if (!od) | 855 | if (!od) |
847 | return 0; | 856 | return 0; |
@@ -850,6 +859,15 @@ static int __init omap_device_late_idle(struct device *dev, void *data) | |||
850 | * If omap_device state is enabled, but has no driver bound, | 859 | * If omap_device state is enabled, but has no driver bound, |
851 | * idle it. | 860 | * idle it. |
852 | */ | 861 | */ |
862 | |||
863 | /* | ||
864 | * Some devices (like memory controllers) are always kept | ||
865 | * enabled, and should not be idled even with no drivers. | ||
866 | */ | ||
867 | for (i = 0; i < od->hwmods_cnt; i++) | ||
868 | if (od->hwmods[i]->flags & HWMOD_INIT_NO_IDLE) | ||
869 | return 0; | ||
870 | |||
853 | if (od->_driver_status != BUS_NOTIFY_BOUND_DRIVER) { | 871 | if (od->_driver_status != BUS_NOTIFY_BOUND_DRIVER) { |
854 | if (od->_state == OMAP_DEVICE_STATE_ENABLED) { | 872 | if (od->_state == OMAP_DEVICE_STATE_ENABLED) { |
855 | dev_warn(dev, "%s: enabled but no driver. Idling\n", | 873 | dev_warn(dev, "%s: enabled but no driver. Idling\n", |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 7341eff63f56..7f4db12b1459 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -2386,7 +2386,7 @@ static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data) | |||
2386 | 2386 | ||
2387 | np = of_dev_hwmod_lookup(of_find_node_by_name(NULL, "ocp"), oh); | 2387 | np = of_dev_hwmod_lookup(of_find_node_by_name(NULL, "ocp"), oh); |
2388 | if (np) | 2388 | if (np) |
2389 | va_start = of_iomap(np, 0); | 2389 | va_start = of_iomap(np, oh->mpu_rt_idx); |
2390 | } else { | 2390 | } else { |
2391 | va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start); | 2391 | va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start); |
2392 | } | 2392 | } |
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h index aab33fd814c0..e1482a9b3bc2 100644 --- a/arch/arm/mach-omap2/omap_hwmod.h +++ b/arch/arm/mach-omap2/omap_hwmod.h | |||
@@ -95,6 +95,54 @@ extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type3; | |||
95 | #define MODULEMODE_HWCTRL 1 | 95 | #define MODULEMODE_HWCTRL 1 |
96 | #define MODULEMODE_SWCTRL 2 | 96 | #define MODULEMODE_SWCTRL 2 |
97 | 97 | ||
98 | #define DEBUG_OMAP2UART1_FLAGS 0 | ||
99 | #define DEBUG_OMAP2UART2_FLAGS 0 | ||
100 | #define DEBUG_OMAP2UART3_FLAGS 0 | ||
101 | #define DEBUG_OMAP3UART3_FLAGS 0 | ||
102 | #define DEBUG_OMAP3UART4_FLAGS 0 | ||
103 | #define DEBUG_OMAP4UART3_FLAGS 0 | ||
104 | #define DEBUG_OMAP4UART4_FLAGS 0 | ||
105 | #define DEBUG_TI81XXUART1_FLAGS 0 | ||
106 | #define DEBUG_TI81XXUART2_FLAGS 0 | ||
107 | #define DEBUG_TI81XXUART3_FLAGS 0 | ||
108 | #define DEBUG_AM33XXUART1_FLAGS 0 | ||
109 | |||
110 | #define DEBUG_OMAPUART_FLAGS (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET) | ||
111 | |||
112 | #if defined(CONFIG_DEBUG_OMAP2UART1) | ||
113 | #undef DEBUG_OMAP2UART1_FLAGS | ||
114 | #define DEBUG_OMAP2UART1_FLAGS DEBUG_OMAPUART_FLAGS | ||
115 | #elif defined(CONFIG_DEBUG_OMAP2UART2) | ||
116 | #undef DEBUG_OMAP2UART2_FLAGS | ||
117 | #define DEBUG_OMAP2UART2_FLAGS DEBUG_OMAPUART_FLAGS | ||
118 | #elif defined(CONFIG_DEBUG_OMAP2UART3) | ||
119 | #undef DEBUG_OMAP2UART3_FLAGS | ||
120 | #define DEBUG_OMAP2UART3_FLAGS DEBUG_OMAPUART_FLAGS | ||
121 | #elif defined(CONFIG_DEBUG_OMAP3UART3) | ||
122 | #undef DEBUG_OMAP3UART3_FLAGS | ||
123 | #define DEBUG_OMAP3UART3_FLAGS DEBUG_OMAPUART_FLAGS | ||
124 | #elif defined(CONFIG_DEBUG_OMAP3UART4) | ||
125 | #undef DEBUG_OMAP3UART4_FLAGS | ||
126 | #define DEBUG_OMAP3UART4_FLAGS DEBUG_OMAPUART_FLAGS | ||
127 | #elif defined(CONFIG_DEBUG_OMAP4UART3) | ||
128 | #undef DEBUG_OMAP4UART3_FLAGS | ||
129 | #define DEBUG_OMAP4UART3_FLAGS DEBUG_OMAPUART_FLAGS | ||
130 | #elif defined(CONFIG_DEBUG_OMAP4UART4) | ||
131 | #undef DEBUG_OMAP4UART4_FLAGS | ||
132 | #define DEBUG_OMAP4UART4_FLAGS DEBUG_OMAPUART_FLAGS | ||
133 | #elif defined(CONFIG_DEBUG_TI81XXUART1) | ||
134 | #undef DEBUG_TI81XXUART1_FLAGS | ||
135 | #define DEBUG_TI81XXUART1_FLAGS DEBUG_OMAPUART_FLAGS | ||
136 | #elif defined(CONFIG_DEBUG_TI81XXUART2) | ||
137 | #undef DEBUG_TI81XXUART2_FLAGS | ||
138 | #define DEBUG_TI81XXUART2_FLAGS DEBUG_OMAPUART_FLAGS | ||
139 | #elif defined(CONFIG_DEBUG_TI81XXUART3) | ||
140 | #undef DEBUG_TI81XXUART3_FLAGS | ||
141 | #define DEBUG_TI81XXUART3_FLAGS DEBUG_OMAPUART_FLAGS | ||
142 | #elif defined(CONFIG_DEBUG_AM33XXUART1) | ||
143 | #undef DEBUG_AM33XXUART1_FLAGS | ||
144 | #define DEBUG_AM33XXUART1_FLAGS DEBUG_OMAPUART_FLAGS | ||
145 | #endif | ||
98 | 146 | ||
99 | /** | 147 | /** |
100 | * struct omap_hwmod_mux_info - hwmod specific mux configuration | 148 | * struct omap_hwmod_mux_info - hwmod specific mux configuration |
@@ -568,6 +616,7 @@ struct omap_hwmod_link { | |||
568 | * @voltdm: pointer to voltage domain (filled in at runtime) | 616 | * @voltdm: pointer to voltage domain (filled in at runtime) |
569 | * @dev_attr: arbitrary device attributes that can be passed to the driver | 617 | * @dev_attr: arbitrary device attributes that can be passed to the driver |
570 | * @_sysc_cache: internal-use hwmod flags | 618 | * @_sysc_cache: internal-use hwmod flags |
619 | * @mpu_rt_idx: index of device address space for register target (for DT boot) | ||
571 | * @_mpu_rt_va: cached register target start address (internal use) | 620 | * @_mpu_rt_va: cached register target start address (internal use) |
572 | * @_mpu_port: cached MPU register target slave (internal use) | 621 | * @_mpu_port: cached MPU register target slave (internal use) |
573 | * @opt_clks_cnt: number of @opt_clks | 622 | * @opt_clks_cnt: number of @opt_clks |
@@ -617,6 +666,7 @@ struct omap_hwmod { | |||
617 | struct list_head node; | 666 | struct list_head node; |
618 | struct omap_hwmod_ocp_if *_mpu_port; | 667 | struct omap_hwmod_ocp_if *_mpu_port; |
619 | u16 flags; | 668 | u16 flags; |
669 | u8 mpu_rt_idx; | ||
620 | u8 response_lat; | 670 | u8 response_lat; |
621 | u8 rst_lines_cnt; | 671 | u8 rst_lines_cnt; |
622 | u8 opt_clks_cnt; | 672 | u8 opt_clks_cnt; |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c index d05fc7b54567..56cebb05509e 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | |||
@@ -512,7 +512,7 @@ struct omap_hwmod omap2xxx_uart1_hwmod = { | |||
512 | .mpu_irqs = omap2_uart1_mpu_irqs, | 512 | .mpu_irqs = omap2_uart1_mpu_irqs, |
513 | .sdma_reqs = omap2_uart1_sdma_reqs, | 513 | .sdma_reqs = omap2_uart1_sdma_reqs, |
514 | .main_clk = "uart1_fck", | 514 | .main_clk = "uart1_fck", |
515 | .flags = HWMOD_SWSUP_SIDLE_ACT, | 515 | .flags = DEBUG_OMAP2UART1_FLAGS | HWMOD_SWSUP_SIDLE_ACT, |
516 | .prcm = { | 516 | .prcm = { |
517 | .omap2 = { | 517 | .omap2 = { |
518 | .module_offs = CORE_MOD, | 518 | .module_offs = CORE_MOD, |
@@ -532,7 +532,7 @@ struct omap_hwmod omap2xxx_uart2_hwmod = { | |||
532 | .mpu_irqs = omap2_uart2_mpu_irqs, | 532 | .mpu_irqs = omap2_uart2_mpu_irqs, |
533 | .sdma_reqs = omap2_uart2_sdma_reqs, | 533 | .sdma_reqs = omap2_uart2_sdma_reqs, |
534 | .main_clk = "uart2_fck", | 534 | .main_clk = "uart2_fck", |
535 | .flags = HWMOD_SWSUP_SIDLE_ACT, | 535 | .flags = DEBUG_OMAP2UART2_FLAGS | HWMOD_SWSUP_SIDLE_ACT, |
536 | .prcm = { | 536 | .prcm = { |
537 | .omap2 = { | 537 | .omap2 = { |
538 | .module_offs = CORE_MOD, | 538 | .module_offs = CORE_MOD, |
@@ -552,7 +552,7 @@ struct omap_hwmod omap2xxx_uart3_hwmod = { | |||
552 | .mpu_irqs = omap2_uart3_mpu_irqs, | 552 | .mpu_irqs = omap2_uart3_mpu_irqs, |
553 | .sdma_reqs = omap2_uart3_sdma_reqs, | 553 | .sdma_reqs = omap2_uart3_sdma_reqs, |
554 | .main_clk = "uart3_fck", | 554 | .main_clk = "uart3_fck", |
555 | .flags = HWMOD_SWSUP_SIDLE_ACT, | 555 | .flags = DEBUG_OMAP2UART3_FLAGS | HWMOD_SWSUP_SIDLE_ACT, |
556 | .prcm = { | 556 | .prcm = { |
557 | .omap2 = { | 557 | .omap2 = { |
558 | .module_offs = CORE_MOD, | 558 | .module_offs = CORE_MOD, |
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c index 28bbd56346a9..eb2f3b93b51c 100644 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c | |||
@@ -562,6 +562,7 @@ static struct omap_hwmod am33xx_cpgmac0_hwmod = { | |||
562 | .clkdm_name = "cpsw_125mhz_clkdm", | 562 | .clkdm_name = "cpsw_125mhz_clkdm", |
563 | .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY), | 563 | .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY), |
564 | .main_clk = "cpsw_125mhz_gclk", | 564 | .main_clk = "cpsw_125mhz_gclk", |
565 | .mpu_rt_idx = 1, | ||
565 | .prcm = { | 566 | .prcm = { |
566 | .omap4 = { | 567 | .omap4 = { |
567 | .clkctrl_offs = AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET, | 568 | .clkctrl_offs = AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET, |
@@ -1512,7 +1513,7 @@ static struct omap_hwmod am33xx_uart1_hwmod = { | |||
1512 | .name = "uart1", | 1513 | .name = "uart1", |
1513 | .class = &uart_class, | 1514 | .class = &uart_class, |
1514 | .clkdm_name = "l4_wkup_clkdm", | 1515 | .clkdm_name = "l4_wkup_clkdm", |
1515 | .flags = HWMOD_SWSUP_SIDLE_ACT, | 1516 | .flags = DEBUG_AM33XXUART1_FLAGS | HWMOD_SWSUP_SIDLE_ACT, |
1516 | .main_clk = "dpll_per_m2_div4_wkupdm_ck", | 1517 | .main_clk = "dpll_per_m2_div4_wkupdm_ck", |
1517 | .prcm = { | 1518 | .prcm = { |
1518 | .omap4 = { | 1519 | .omap4 = { |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index f7a3df2fb579..0c3a427da544 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -490,7 +490,7 @@ static struct omap_hwmod omap3xxx_uart1_hwmod = { | |||
490 | .mpu_irqs = omap2_uart1_mpu_irqs, | 490 | .mpu_irqs = omap2_uart1_mpu_irqs, |
491 | .sdma_reqs = omap2_uart1_sdma_reqs, | 491 | .sdma_reqs = omap2_uart1_sdma_reqs, |
492 | .main_clk = "uart1_fck", | 492 | .main_clk = "uart1_fck", |
493 | .flags = HWMOD_SWSUP_SIDLE_ACT, | 493 | .flags = DEBUG_TI81XXUART1_FLAGS | HWMOD_SWSUP_SIDLE_ACT, |
494 | .prcm = { | 494 | .prcm = { |
495 | .omap2 = { | 495 | .omap2 = { |
496 | .module_offs = CORE_MOD, | 496 | .module_offs = CORE_MOD, |
@@ -509,7 +509,7 @@ static struct omap_hwmod omap3xxx_uart2_hwmod = { | |||
509 | .mpu_irqs = omap2_uart2_mpu_irqs, | 509 | .mpu_irqs = omap2_uart2_mpu_irqs, |
510 | .sdma_reqs = omap2_uart2_sdma_reqs, | 510 | .sdma_reqs = omap2_uart2_sdma_reqs, |
511 | .main_clk = "uart2_fck", | 511 | .main_clk = "uart2_fck", |
512 | .flags = HWMOD_SWSUP_SIDLE_ACT, | 512 | .flags = DEBUG_TI81XXUART2_FLAGS | HWMOD_SWSUP_SIDLE_ACT, |
513 | .prcm = { | 513 | .prcm = { |
514 | .omap2 = { | 514 | .omap2 = { |
515 | .module_offs = CORE_MOD, | 515 | .module_offs = CORE_MOD, |
@@ -528,7 +528,8 @@ static struct omap_hwmod omap3xxx_uart3_hwmod = { | |||
528 | .mpu_irqs = omap2_uart3_mpu_irqs, | 528 | .mpu_irqs = omap2_uart3_mpu_irqs, |
529 | .sdma_reqs = omap2_uart3_sdma_reqs, | 529 | .sdma_reqs = omap2_uart3_sdma_reqs, |
530 | .main_clk = "uart3_fck", | 530 | .main_clk = "uart3_fck", |
531 | .flags = HWMOD_SWSUP_SIDLE_ACT, | 531 | .flags = DEBUG_OMAP3UART3_FLAGS | DEBUG_TI81XXUART3_FLAGS | |
532 | HWMOD_SWSUP_SIDLE_ACT, | ||
532 | .prcm = { | 533 | .prcm = { |
533 | .omap2 = { | 534 | .omap2 = { |
534 | .module_offs = OMAP3430_PER_MOD, | 535 | .module_offs = OMAP3430_PER_MOD, |
@@ -558,7 +559,7 @@ static struct omap_hwmod omap36xx_uart4_hwmod = { | |||
558 | .mpu_irqs = uart4_mpu_irqs, | 559 | .mpu_irqs = uart4_mpu_irqs, |
559 | .sdma_reqs = uart4_sdma_reqs, | 560 | .sdma_reqs = uart4_sdma_reqs, |
560 | .main_clk = "uart4_fck", | 561 | .main_clk = "uart4_fck", |
561 | .flags = HWMOD_SWSUP_SIDLE_ACT, | 562 | .flags = DEBUG_OMAP3UART4_FLAGS | HWMOD_SWSUP_SIDLE_ACT, |
562 | .prcm = { | 563 | .prcm = { |
563 | .omap2 = { | 564 | .omap2 = { |
564 | .module_offs = OMAP3430_PER_MOD, | 565 | .module_offs = OMAP3430_PER_MOD, |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index d04b5e60fdbe..9c3b504477d7 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -2858,8 +2858,7 @@ static struct omap_hwmod omap44xx_uart3_hwmod = { | |||
2858 | .name = "uart3", | 2858 | .name = "uart3", |
2859 | .class = &omap44xx_uart_hwmod_class, | 2859 | .class = &omap44xx_uart_hwmod_class, |
2860 | .clkdm_name = "l4_per_clkdm", | 2860 | .clkdm_name = "l4_per_clkdm", |
2861 | .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET | | 2861 | .flags = DEBUG_OMAP4UART3_FLAGS | HWMOD_SWSUP_SIDLE_ACT, |
2862 | HWMOD_SWSUP_SIDLE_ACT, | ||
2863 | .main_clk = "func_48m_fclk", | 2862 | .main_clk = "func_48m_fclk", |
2864 | .prcm = { | 2863 | .prcm = { |
2865 | .omap4 = { | 2864 | .omap4 = { |
@@ -2875,7 +2874,7 @@ static struct omap_hwmod omap44xx_uart4_hwmod = { | |||
2875 | .name = "uart4", | 2874 | .name = "uart4", |
2876 | .class = &omap44xx_uart_hwmod_class, | 2875 | .class = &omap44xx_uart_hwmod_class, |
2877 | .clkdm_name = "l4_per_clkdm", | 2876 | .clkdm_name = "l4_per_clkdm", |
2878 | .flags = HWMOD_SWSUP_SIDLE_ACT, | 2877 | .flags = DEBUG_OMAP4UART4_FLAGS | HWMOD_SWSUP_SIDLE_ACT, |
2879 | .main_clk = "func_48m_fclk", | 2878 | .main_clk = "func_48m_fclk", |
2880 | .prcm = { | 2879 | .prcm = { |
2881 | .omap4 = { | 2880 | .omap4 = { |
diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c index f37ae96b70a1..3c70f5c1860f 100644 --- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c | |||
@@ -1375,7 +1375,7 @@ static struct omap_hwmod omap54xx_uart3_hwmod = { | |||
1375 | .name = "uart3", | 1375 | .name = "uart3", |
1376 | .class = &omap54xx_uart_hwmod_class, | 1376 | .class = &omap54xx_uart_hwmod_class, |
1377 | .clkdm_name = "l4per_clkdm", | 1377 | .clkdm_name = "l4per_clkdm", |
1378 | .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, | 1378 | .flags = DEBUG_OMAP4UART3_FLAGS, |
1379 | .main_clk = "func_48m_fclk", | 1379 | .main_clk = "func_48m_fclk", |
1380 | .prcm = { | 1380 | .prcm = { |
1381 | .omap4 = { | 1381 | .omap4 = { |
@@ -1391,6 +1391,7 @@ static struct omap_hwmod omap54xx_uart4_hwmod = { | |||
1391 | .name = "uart4", | 1391 | .name = "uart4", |
1392 | .class = &omap54xx_uart_hwmod_class, | 1392 | .class = &omap54xx_uart_hwmod_class, |
1393 | .clkdm_name = "l4per_clkdm", | 1393 | .clkdm_name = "l4per_clkdm", |
1394 | .flags = DEBUG_OMAP4UART4_FLAGS, | ||
1394 | .main_clk = "func_48m_fclk", | 1395 | .main_clk = "func_48m_fclk", |
1395 | .prcm = { | 1396 | .prcm = { |
1396 | .omap4 = { | 1397 | .omap4 = { |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 3a674de6cb63..a388f8c1bcb3 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -208,17 +208,6 @@ static int __init omap_serial_early_init(void) | |||
208 | pr_info("%s used as console in debug mode: uart%d clocks will not be gated", | 208 | pr_info("%s used as console in debug mode: uart%d clocks will not be gated", |
209 | uart_name, uart->num); | 209 | uart_name, uart->num); |
210 | } | 210 | } |
211 | |||
212 | /* | ||
213 | * omap-uart can be used for earlyprintk logs | ||
214 | * So if omap-uart is used as console then prevent | ||
215 | * uart reset and idle to get logs from omap-uart | ||
216 | * until uart console driver is available to take | ||
217 | * care for console messages. | ||
218 | * Idling or resetting omap-uart while printing logs | ||
219 | * early boot logs can stall the boot-up. | ||
220 | */ | ||
221 | oh->flags |= HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET; | ||
222 | } | 211 | } |
223 | } while (1); | 212 | } while (1); |
224 | 213 | ||
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index e115f6742107..c5be60d85e4b 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c | |||
@@ -1162,9 +1162,6 @@ static void __init eva_init(void) | |||
1162 | gpio_request_one(61, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ | 1162 | gpio_request_one(61, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ |
1163 | gpio_request_one(202, GPIOF_OUT_INIT_LOW, NULL); /* LCD0_LED_CONT */ | 1163 | gpio_request_one(202, GPIOF_OUT_INIT_LOW, NULL); /* LCD0_LED_CONT */ |
1164 | 1164 | ||
1165 | /* Touchscreen */ | ||
1166 | gpio_request_one(166, GPIOF_OUT_INIT_HIGH, NULL); /* TP_RST_B */ | ||
1167 | |||
1168 | /* GETHER */ | 1165 | /* GETHER */ |
1169 | gpio_request_one(18, GPIOF_OUT_INIT_HIGH, NULL); /* PHY_RST */ | 1166 | gpio_request_one(18, GPIOF_OUT_INIT_HIGH, NULL); /* PHY_RST */ |
1170 | 1167 | ||
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index d5554646916c..3354a85c90f7 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c | |||
@@ -167,7 +167,13 @@ static const struct pinctrl_map bockw_pinctrl_map[] = { | |||
167 | "usb1", "usb1"), | 167 | "usb1", "usb1"), |
168 | /* SDHI0 */ | 168 | /* SDHI0 */ |
169 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778", | 169 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778", |
170 | "sdhi0", "sdhi0"), | 170 | "sdhi0_data4", "sdhi0"), |
171 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778", | ||
172 | "sdhi0_ctrl", "sdhi0"), | ||
173 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778", | ||
174 | "sdhi0_cd", "sdhi0"), | ||
175 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778", | ||
176 | "sdhi0_wp", "sdhi0"), | ||
171 | }; | 177 | }; |
172 | 178 | ||
173 | #define FPGA 0x18200000 | 179 | #define FPGA 0x18200000 |
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index d73e21d3ea8a..8d6bd5c5efb9 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c | |||
@@ -59,7 +59,7 @@ static __initdata struct gpio_led_platform_data lager_leds_pdata = { | |||
59 | #define GPIO_KEY(c, g, d, ...) \ | 59 | #define GPIO_KEY(c, g, d, ...) \ |
60 | { .code = c, .gpio = g, .desc = d, .active_low = 1 } | 60 | { .code = c, .gpio = g, .desc = d, .active_low = 1 } |
61 | 61 | ||
62 | static __initdata struct gpio_keys_button gpio_buttons[] = { | 62 | static struct gpio_keys_button gpio_buttons[] = { |
63 | GPIO_KEY(KEY_4, RCAR_GP_PIN(1, 28), "SW2-pin4"), | 63 | GPIO_KEY(KEY_4, RCAR_GP_PIN(1, 28), "SW2-pin4"), |
64 | GPIO_KEY(KEY_3, RCAR_GP_PIN(1, 26), "SW2-pin3"), | 64 | GPIO_KEY(KEY_3, RCAR_GP_PIN(1, 26), "SW2-pin3"), |
65 | GPIO_KEY(KEY_2, RCAR_GP_PIN(1, 24), "SW2-pin2"), | 65 | GPIO_KEY(KEY_2, RCAR_GP_PIN(1, 24), "SW2-pin2"), |
diff --git a/arch/arm/mach-sti/headsmp.S b/arch/arm/mach-sti/headsmp.S index 78ebc7559f53..4c09bae86edf 100644 --- a/arch/arm/mach-sti/headsmp.S +++ b/arch/arm/mach-sti/headsmp.S | |||
@@ -16,8 +16,6 @@ | |||
16 | #include <linux/linkage.h> | 16 | #include <linux/linkage.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | 18 | ||
19 | __INIT | ||
20 | |||
21 | /* | 19 | /* |
22 | * ST specific entry point for secondary CPUs. This provides | 20 | * ST specific entry point for secondary CPUs. This provides |
23 | * a "holding pen" into which all secondary cores are held until we're | 21 | * a "holding pen" into which all secondary cores are held until we're |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 6cacdc8dd654..db5c2cab8fda 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -421,24 +421,28 @@ config CPU_32v3 | |||
421 | select CPU_USE_DOMAINS if MMU | 421 | select CPU_USE_DOMAINS if MMU |
422 | select NEEDS_SYSCALL_FOR_CMPXCHG if SMP | 422 | select NEEDS_SYSCALL_FOR_CMPXCHG if SMP |
423 | select TLS_REG_EMUL if SMP || !MMU | 423 | select TLS_REG_EMUL if SMP || !MMU |
424 | select NEED_KUSER_HELPERS | ||
424 | 425 | ||
425 | config CPU_32v4 | 426 | config CPU_32v4 |
426 | bool | 427 | bool |
427 | select CPU_USE_DOMAINS if MMU | 428 | select CPU_USE_DOMAINS if MMU |
428 | select NEEDS_SYSCALL_FOR_CMPXCHG if SMP | 429 | select NEEDS_SYSCALL_FOR_CMPXCHG if SMP |
429 | select TLS_REG_EMUL if SMP || !MMU | 430 | select TLS_REG_EMUL if SMP || !MMU |
431 | select NEED_KUSER_HELPERS | ||
430 | 432 | ||
431 | config CPU_32v4T | 433 | config CPU_32v4T |
432 | bool | 434 | bool |
433 | select CPU_USE_DOMAINS if MMU | 435 | select CPU_USE_DOMAINS if MMU |
434 | select NEEDS_SYSCALL_FOR_CMPXCHG if SMP | 436 | select NEEDS_SYSCALL_FOR_CMPXCHG if SMP |
435 | select TLS_REG_EMUL if SMP || !MMU | 437 | select TLS_REG_EMUL if SMP || !MMU |
438 | select NEED_KUSER_HELPERS | ||
436 | 439 | ||
437 | config CPU_32v5 | 440 | config CPU_32v5 |
438 | bool | 441 | bool |
439 | select CPU_USE_DOMAINS if MMU | 442 | select CPU_USE_DOMAINS if MMU |
440 | select NEEDS_SYSCALL_FOR_CMPXCHG if SMP | 443 | select NEEDS_SYSCALL_FOR_CMPXCHG if SMP |
441 | select TLS_REG_EMUL if SMP || !MMU | 444 | select TLS_REG_EMUL if SMP || !MMU |
445 | select NEED_KUSER_HELPERS | ||
442 | 446 | ||
443 | config CPU_32v6 | 447 | config CPU_32v6 |
444 | bool | 448 | bool |
@@ -776,6 +780,7 @@ config CPU_BPREDICT_DISABLE | |||
776 | 780 | ||
777 | config TLS_REG_EMUL | 781 | config TLS_REG_EMUL |
778 | bool | 782 | bool |
783 | select NEED_KUSER_HELPERS | ||
779 | help | 784 | help |
780 | An SMP system using a pre-ARMv6 processor (there are apparently | 785 | An SMP system using a pre-ARMv6 processor (there are apparently |
781 | a few prototypes like that in existence) and therefore access to | 786 | a few prototypes like that in existence) and therefore access to |
@@ -783,11 +788,40 @@ config TLS_REG_EMUL | |||
783 | 788 | ||
784 | config NEEDS_SYSCALL_FOR_CMPXCHG | 789 | config NEEDS_SYSCALL_FOR_CMPXCHG |
785 | bool | 790 | bool |
791 | select NEED_KUSER_HELPERS | ||
786 | help | 792 | help |
787 | SMP on a pre-ARMv6 processor? Well OK then. | 793 | SMP on a pre-ARMv6 processor? Well OK then. |
788 | Forget about fast user space cmpxchg support. | 794 | Forget about fast user space cmpxchg support. |
789 | It is just not possible. | 795 | It is just not possible. |
790 | 796 | ||
797 | config NEED_KUSER_HELPERS | ||
798 | bool | ||
799 | |||
800 | config KUSER_HELPERS | ||
801 | bool "Enable kuser helpers in vector page" if !NEED_KUSER_HELPERS | ||
802 | default y | ||
803 | help | ||
804 | Warning: disabling this option may break user programs. | ||
805 | |||
806 | Provide kuser helpers in the vector page. The kernel provides | ||
807 | helper code to userspace in read only form at a fixed location | ||
808 | in the high vector page to allow userspace to be independent of | ||
809 | the CPU type fitted to the system. This permits binaries to be | ||
810 | run on ARMv4 through to ARMv7 without modification. | ||
811 | |||
812 | However, the fixed address nature of these helpers can be used | ||
813 | by ROP (return orientated programming) authors when creating | ||
814 | exploits. | ||
815 | |||
816 | If all of the binaries and libraries which run on your platform | ||
817 | are built specifically for your platform, and make no use of | ||
818 | these helpers, then you can turn this option off. However, | ||
819 | when such an binary or library is run, it will receive a SIGILL | ||
820 | signal, which will terminate the program. | ||
821 | |||
822 | Say N here only if you are absolutely certain that you do not | ||
823 | need these helpers; otherwise, the safe option is to say Y. | ||
824 | |||
791 | config DMA_CACHE_RWFO | 825 | config DMA_CACHE_RWFO |
792 | bool "Enable read/write for ownership DMA cache maintenance" | 826 | bool "Enable read/write for ownership DMA cache maintenance" |
793 | depends on CPU_V6K && SMP | 827 | depends on CPU_V6K && SMP |
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c index b55b1015724b..4a0544492f10 100644 --- a/arch/arm/mm/context.c +++ b/arch/arm/mm/context.c | |||
@@ -245,7 +245,8 @@ void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk) | |||
245 | if (cpumask_test_and_clear_cpu(cpu, &tlb_flush_pending)) { | 245 | if (cpumask_test_and_clear_cpu(cpu, &tlb_flush_pending)) { |
246 | local_flush_bp_all(); | 246 | local_flush_bp_all(); |
247 | local_flush_tlb_all(); | 247 | local_flush_tlb_all(); |
248 | dummy_flush_tlb_a15_erratum(); | 248 | if (erratum_a15_798181()) |
249 | dummy_flush_tlb_a15_erratum(); | ||
249 | } | 250 | } |
250 | 251 | ||
251 | atomic64_set(&per_cpu(active_asids, cpu), asid); | 252 | atomic64_set(&per_cpu(active_asids, cpu), asid); |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 4f56617a2392..53cdbd39ec8e 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -989,6 +989,7 @@ phys_addr_t arm_lowmem_limit __initdata = 0; | |||
989 | 989 | ||
990 | void __init sanity_check_meminfo(void) | 990 | void __init sanity_check_meminfo(void) |
991 | { | 991 | { |
992 | phys_addr_t memblock_limit = 0; | ||
992 | int i, j, highmem = 0; | 993 | int i, j, highmem = 0; |
993 | phys_addr_t vmalloc_limit = __pa(vmalloc_min - 1) + 1; | 994 | phys_addr_t vmalloc_limit = __pa(vmalloc_min - 1) + 1; |
994 | 995 | ||
@@ -1052,9 +1053,32 @@ void __init sanity_check_meminfo(void) | |||
1052 | bank->size = size_limit; | 1053 | bank->size = size_limit; |
1053 | } | 1054 | } |
1054 | #endif | 1055 | #endif |
1055 | if (!bank->highmem && bank->start + bank->size > arm_lowmem_limit) | 1056 | if (!bank->highmem) { |
1056 | arm_lowmem_limit = bank->start + bank->size; | 1057 | phys_addr_t bank_end = bank->start + bank->size; |
1057 | 1058 | ||
1059 | if (bank_end > arm_lowmem_limit) | ||
1060 | arm_lowmem_limit = bank_end; | ||
1061 | |||
1062 | /* | ||
1063 | * Find the first non-section-aligned page, and point | ||
1064 | * memblock_limit at it. This relies on rounding the | ||
1065 | * limit down to be section-aligned, which happens at | ||
1066 | * the end of this function. | ||
1067 | * | ||
1068 | * With this algorithm, the start or end of almost any | ||
1069 | * bank can be non-section-aligned. The only exception | ||
1070 | * is that the start of the bank 0 must be section- | ||
1071 | * aligned, since otherwise memory would need to be | ||
1072 | * allocated when mapping the start of bank 0, which | ||
1073 | * occurs before any free memory is mapped. | ||
1074 | */ | ||
1075 | if (!memblock_limit) { | ||
1076 | if (!IS_ALIGNED(bank->start, SECTION_SIZE)) | ||
1077 | memblock_limit = bank->start; | ||
1078 | else if (!IS_ALIGNED(bank_end, SECTION_SIZE)) | ||
1079 | memblock_limit = bank_end; | ||
1080 | } | ||
1081 | } | ||
1058 | j++; | 1082 | j++; |
1059 | } | 1083 | } |
1060 | #ifdef CONFIG_HIGHMEM | 1084 | #ifdef CONFIG_HIGHMEM |
@@ -1079,7 +1103,18 @@ void __init sanity_check_meminfo(void) | |||
1079 | #endif | 1103 | #endif |
1080 | meminfo.nr_banks = j; | 1104 | meminfo.nr_banks = j; |
1081 | high_memory = __va(arm_lowmem_limit - 1) + 1; | 1105 | high_memory = __va(arm_lowmem_limit - 1) + 1; |
1082 | memblock_set_current_limit(arm_lowmem_limit); | 1106 | |
1107 | /* | ||
1108 | * Round the memblock limit down to a section size. This | ||
1109 | * helps to ensure that we will allocate memory from the | ||
1110 | * last full section, which should be mapped. | ||
1111 | */ | ||
1112 | if (memblock_limit) | ||
1113 | memblock_limit = round_down(memblock_limit, SECTION_SIZE); | ||
1114 | if (!memblock_limit) | ||
1115 | memblock_limit = arm_lowmem_limit; | ||
1116 | |||
1117 | memblock_set_current_limit(memblock_limit); | ||
1083 | } | 1118 | } |
1084 | 1119 | ||
1085 | static inline void prepare_page_table(void) | 1120 | static inline void prepare_page_table(void) |
@@ -1160,7 +1195,7 @@ static void __init devicemaps_init(struct machine_desc *mdesc) | |||
1160 | /* | 1195 | /* |
1161 | * Allocate the vector page early. | 1196 | * Allocate the vector page early. |
1162 | */ | 1197 | */ |
1163 | vectors = early_alloc(PAGE_SIZE); | 1198 | vectors = early_alloc(PAGE_SIZE * 2); |
1164 | 1199 | ||
1165 | early_trap_init(vectors); | 1200 | early_trap_init(vectors); |
1166 | 1201 | ||
@@ -1205,15 +1240,27 @@ static void __init devicemaps_init(struct machine_desc *mdesc) | |||
1205 | map.pfn = __phys_to_pfn(virt_to_phys(vectors)); | 1240 | map.pfn = __phys_to_pfn(virt_to_phys(vectors)); |
1206 | map.virtual = 0xffff0000; | 1241 | map.virtual = 0xffff0000; |
1207 | map.length = PAGE_SIZE; | 1242 | map.length = PAGE_SIZE; |
1243 | #ifdef CONFIG_KUSER_HELPERS | ||
1208 | map.type = MT_HIGH_VECTORS; | 1244 | map.type = MT_HIGH_VECTORS; |
1245 | #else | ||
1246 | map.type = MT_LOW_VECTORS; | ||
1247 | #endif | ||
1209 | create_mapping(&map); | 1248 | create_mapping(&map); |
1210 | 1249 | ||
1211 | if (!vectors_high()) { | 1250 | if (!vectors_high()) { |
1212 | map.virtual = 0; | 1251 | map.virtual = 0; |
1252 | map.length = PAGE_SIZE * 2; | ||
1213 | map.type = MT_LOW_VECTORS; | 1253 | map.type = MT_LOW_VECTORS; |
1214 | create_mapping(&map); | 1254 | create_mapping(&map); |
1215 | } | 1255 | } |
1216 | 1256 | ||
1257 | /* Now create a kernel read-only mapping */ | ||
1258 | map.pfn += 1; | ||
1259 | map.virtual = 0xffff0000 + PAGE_SIZE; | ||
1260 | map.length = PAGE_SIZE; | ||
1261 | map.type = MT_LOW_VECTORS; | ||
1262 | create_mapping(&map); | ||
1263 | |||
1217 | /* | 1264 | /* |
1218 | * Ask the machine support to map in the statically mapped devices. | 1265 | * Ask the machine support to map in the statically mapped devices. |
1219 | */ | 1266 | */ |
@@ -1276,8 +1323,6 @@ void __init paging_init(struct machine_desc *mdesc) | |||
1276 | { | 1323 | { |
1277 | void *zero_page; | 1324 | void *zero_page; |
1278 | 1325 | ||
1279 | memblock_set_current_limit(arm_lowmem_limit); | ||
1280 | |||
1281 | build_mem_type_table(); | 1326 | build_mem_type_table(); |
1282 | prepare_page_table(); | 1327 | prepare_page_table(); |
1283 | map_lowmem(); | 1328 | map_lowmem(); |
diff --git a/arch/arm/mm/proc-v7-2level.S b/arch/arm/mm/proc-v7-2level.S index f64afb9f1bd5..bdd3be4be77a 100644 --- a/arch/arm/mm/proc-v7-2level.S +++ b/arch/arm/mm/proc-v7-2level.S | |||
@@ -110,7 +110,7 @@ ENTRY(cpu_v7_set_pte_ext) | |||
110 | ARM( str r3, [r0, #2048]! ) | 110 | ARM( str r3, [r0, #2048]! ) |
111 | THUMB( add r0, r0, #2048 ) | 111 | THUMB( add r0, r0, #2048 ) |
112 | THUMB( str r3, [r0] ) | 112 | THUMB( str r3, [r0] ) |
113 | ALT_SMP(mov pc,lr) | 113 | ALT_SMP(W(nop)) |
114 | ALT_UP (mcr p15, 0, r0, c7, c10, 1) @ flush_pte | 114 | ALT_UP (mcr p15, 0, r0, c7, c10, 1) @ flush_pte |
115 | #endif | 115 | #endif |
116 | mov pc, lr | 116 | mov pc, lr |
diff --git a/arch/arm/mm/proc-v7-3level.S b/arch/arm/mm/proc-v7-3level.S index c36ac69488c8..01a719e18bb0 100644 --- a/arch/arm/mm/proc-v7-3level.S +++ b/arch/arm/mm/proc-v7-3level.S | |||
@@ -81,7 +81,7 @@ ENTRY(cpu_v7_set_pte_ext) | |||
81 | tst r3, #1 << (55 - 32) @ L_PTE_DIRTY | 81 | tst r3, #1 << (55 - 32) @ L_PTE_DIRTY |
82 | orreq r2, #L_PTE_RDONLY | 82 | orreq r2, #L_PTE_RDONLY |
83 | 1: strd r2, r3, [r0] | 83 | 1: strd r2, r3, [r0] |
84 | ALT_SMP(mov pc, lr) | 84 | ALT_SMP(W(nop)) |
85 | ALT_UP (mcr p15, 0, r0, c7, c10, 1) @ flush_pte | 85 | ALT_UP (mcr p15, 0, r0, c7, c10, 1) @ flush_pte |
86 | #endif | 86 | #endif |
87 | mov pc, lr | 87 | mov pc, lr |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 5c6d5a3050ea..73398bcf9bd8 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -75,13 +75,14 @@ ENTRY(cpu_v7_do_idle) | |||
75 | ENDPROC(cpu_v7_do_idle) | 75 | ENDPROC(cpu_v7_do_idle) |
76 | 76 | ||
77 | ENTRY(cpu_v7_dcache_clean_area) | 77 | ENTRY(cpu_v7_dcache_clean_area) |
78 | ALT_SMP(mov pc, lr) @ MP extensions imply L1 PTW | 78 | ALT_SMP(W(nop)) @ MP extensions imply L1 PTW |
79 | ALT_UP(W(nop)) | 79 | ALT_UP_B(1f) |
80 | dcache_line_size r2, r3 | 80 | mov pc, lr |
81 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 81 | 1: dcache_line_size r2, r3 |
82 | 2: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | ||
82 | add r0, r0, r2 | 83 | add r0, r0, r2 |
83 | subs r1, r1, r2 | 84 | subs r1, r1, r2 |
84 | bhi 1b | 85 | bhi 2b |
85 | dsb | 86 | dsb |
86 | mov pc, lr | 87 | mov pc, lr |
87 | ENDPROC(cpu_v7_dcache_clean_area) | 88 | ENDPROC(cpu_v7_dcache_clean_area) |
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index f71c37edca26..c9770ba5c7df 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c | |||
@@ -172,7 +172,7 @@ static void __init xen_percpu_init(void *unused) | |||
172 | enable_percpu_irq(xen_events_irq, 0); | 172 | enable_percpu_irq(xen_events_irq, 0); |
173 | } | 173 | } |
174 | 174 | ||
175 | static void xen_restart(char str, const char *cmd) | 175 | static void xen_restart(enum reboot_mode reboot_mode, const char *cmd) |
176 | { | 176 | { |
177 | struct sched_shutdown r = { .reason = SHUTDOWN_reboot }; | 177 | struct sched_shutdown r = { .reason = SHUTDOWN_reboot }; |
178 | int rc; | 178 | int rc; |
diff --git a/arch/arm64/include/asm/tlb.h b/arch/arm64/include/asm/tlb.h index 46b3beb4b773..717031a762c2 100644 --- a/arch/arm64/include/asm/tlb.h +++ b/arch/arm64/include/asm/tlb.h | |||
@@ -35,6 +35,7 @@ struct mmu_gather { | |||
35 | struct mm_struct *mm; | 35 | struct mm_struct *mm; |
36 | unsigned int fullmm; | 36 | unsigned int fullmm; |
37 | struct vm_area_struct *vma; | 37 | struct vm_area_struct *vma; |
38 | unsigned long start, end; | ||
38 | unsigned long range_start; | 39 | unsigned long range_start; |
39 | unsigned long range_end; | 40 | unsigned long range_end; |
40 | unsigned int nr; | 41 | unsigned int nr; |
@@ -97,10 +98,12 @@ static inline void tlb_flush_mmu(struct mmu_gather *tlb) | |||
97 | } | 98 | } |
98 | 99 | ||
99 | static inline void | 100 | static inline void |
100 | tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned int fullmm) | 101 | tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start, unsigned long end) |
101 | { | 102 | { |
102 | tlb->mm = mm; | 103 | tlb->mm = mm; |
103 | tlb->fullmm = fullmm; | 104 | tlb->fullmm = !(start | (end+1)); |
105 | tlb->start = start; | ||
106 | tlb->end = end; | ||
104 | tlb->vma = NULL; | 107 | tlb->vma = NULL; |
105 | tlb->max = ARRAY_SIZE(tlb->local); | 108 | tlb->max = ARRAY_SIZE(tlb->local); |
106 | tlb->pages = tlb->local; | 109 | tlb->pages = tlb->local; |
diff --git a/arch/avr32/boards/atngw100/mrmt.c b/arch/avr32/boards/atngw100/mrmt.c index f91431963452..7de083d19b7e 100644 --- a/arch/avr32/boards/atngw100/mrmt.c +++ b/arch/avr32/boards/atngw100/mrmt.c | |||
@@ -150,7 +150,6 @@ static struct ac97c_platform_data __initdata ac97c0_data = { | |||
150 | static struct platform_device rmt_ts_device = { | 150 | static struct platform_device rmt_ts_device = { |
151 | .name = "ucb1400_ts", | 151 | .name = "ucb1400_ts", |
152 | .id = -1, | 152 | .id = -1, |
153 | } | ||
154 | }; | 153 | }; |
155 | #endif | 154 | #endif |
156 | 155 | ||
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig index 33a97929d055..77d442ab28c8 100644 --- a/arch/hexagon/Kconfig +++ b/arch/hexagon/Kconfig | |||
@@ -158,6 +158,7 @@ source "kernel/Kconfig.hz" | |||
158 | endmenu | 158 | endmenu |
159 | 159 | ||
160 | source "init/Kconfig" | 160 | source "init/Kconfig" |
161 | source "kernel/Kconfig.freezer" | ||
161 | source "drivers/Kconfig" | 162 | source "drivers/Kconfig" |
162 | source "fs/Kconfig" | 163 | source "fs/Kconfig" |
163 | 164 | ||
diff --git a/arch/ia64/configs/generic_defconfig b/arch/ia64/configs/generic_defconfig index 7913695b2fcb..efbd2929aeb7 100644 --- a/arch/ia64/configs/generic_defconfig +++ b/arch/ia64/configs/generic_defconfig | |||
@@ -31,7 +31,7 @@ CONFIG_ACPI_FAN=m | |||
31 | CONFIG_ACPI_DOCK=y | 31 | CONFIG_ACPI_DOCK=y |
32 | CONFIG_ACPI_PROCESSOR=m | 32 | CONFIG_ACPI_PROCESSOR=m |
33 | CONFIG_ACPI_CONTAINER=m | 33 | CONFIG_ACPI_CONTAINER=m |
34 | CONFIG_HOTPLUG_PCI=m | 34 | CONFIG_HOTPLUG_PCI=y |
35 | CONFIG_HOTPLUG_PCI_ACPI=m | 35 | CONFIG_HOTPLUG_PCI_ACPI=m |
36 | CONFIG_PACKET=y | 36 | CONFIG_PACKET=y |
37 | CONFIG_UNIX=y | 37 | CONFIG_UNIX=y |
diff --git a/arch/ia64/configs/gensparse_defconfig b/arch/ia64/configs/gensparse_defconfig index f8e913365423..f64980dd20c3 100644 --- a/arch/ia64/configs/gensparse_defconfig +++ b/arch/ia64/configs/gensparse_defconfig | |||
@@ -25,7 +25,7 @@ CONFIG_ACPI_BUTTON=m | |||
25 | CONFIG_ACPI_FAN=m | 25 | CONFIG_ACPI_FAN=m |
26 | CONFIG_ACPI_PROCESSOR=m | 26 | CONFIG_ACPI_PROCESSOR=m |
27 | CONFIG_ACPI_CONTAINER=m | 27 | CONFIG_ACPI_CONTAINER=m |
28 | CONFIG_HOTPLUG_PCI=m | 28 | CONFIG_HOTPLUG_PCI=y |
29 | CONFIG_HOTPLUG_PCI_ACPI=m | 29 | CONFIG_HOTPLUG_PCI_ACPI=m |
30 | CONFIG_PACKET=y | 30 | CONFIG_PACKET=y |
31 | CONFIG_UNIX=y | 31 | CONFIG_UNIX=y |
diff --git a/arch/ia64/configs/tiger_defconfig b/arch/ia64/configs/tiger_defconfig index a5a9e02e60a0..0f4e9e41f130 100644 --- a/arch/ia64/configs/tiger_defconfig +++ b/arch/ia64/configs/tiger_defconfig | |||
@@ -31,7 +31,7 @@ CONFIG_ACPI_BUTTON=m | |||
31 | CONFIG_ACPI_FAN=m | 31 | CONFIG_ACPI_FAN=m |
32 | CONFIG_ACPI_PROCESSOR=m | 32 | CONFIG_ACPI_PROCESSOR=m |
33 | CONFIG_ACPI_CONTAINER=m | 33 | CONFIG_ACPI_CONTAINER=m |
34 | CONFIG_HOTPLUG_PCI=m | 34 | CONFIG_HOTPLUG_PCI=y |
35 | CONFIG_HOTPLUG_PCI_ACPI=m | 35 | CONFIG_HOTPLUG_PCI_ACPI=m |
36 | CONFIG_PACKET=y | 36 | CONFIG_PACKET=y |
37 | CONFIG_UNIX=y | 37 | CONFIG_UNIX=y |
diff --git a/arch/ia64/configs/xen_domu_defconfig b/arch/ia64/configs/xen_domu_defconfig index 37b9b422caad..b025acfde5c1 100644 --- a/arch/ia64/configs/xen_domu_defconfig +++ b/arch/ia64/configs/xen_domu_defconfig | |||
@@ -32,7 +32,7 @@ CONFIG_ACPI_BUTTON=m | |||
32 | CONFIG_ACPI_FAN=m | 32 | CONFIG_ACPI_FAN=m |
33 | CONFIG_ACPI_PROCESSOR=m | 33 | CONFIG_ACPI_PROCESSOR=m |
34 | CONFIG_ACPI_CONTAINER=m | 34 | CONFIG_ACPI_CONTAINER=m |
35 | CONFIG_HOTPLUG_PCI=m | 35 | CONFIG_HOTPLUG_PCI=y |
36 | CONFIG_HOTPLUG_PCI_ACPI=m | 36 | CONFIG_HOTPLUG_PCI_ACPI=m |
37 | CONFIG_PACKET=y | 37 | CONFIG_PACKET=y |
38 | CONFIG_UNIX=y | 38 | CONFIG_UNIX=y |
diff --git a/arch/ia64/include/asm/tlb.h b/arch/ia64/include/asm/tlb.h index ef3a9de01954..bc5efc7c3f3f 100644 --- a/arch/ia64/include/asm/tlb.h +++ b/arch/ia64/include/asm/tlb.h | |||
@@ -22,7 +22,7 @@ | |||
22 | * unmapping a portion of the virtual address space, these hooks are called according to | 22 | * unmapping a portion of the virtual address space, these hooks are called according to |
23 | * the following template: | 23 | * the following template: |
24 | * | 24 | * |
25 | * tlb <- tlb_gather_mmu(mm, full_mm_flush); // start unmap for address space MM | 25 | * tlb <- tlb_gather_mmu(mm, start, end); // start unmap for address space MM |
26 | * { | 26 | * { |
27 | * for each vma that needs a shootdown do { | 27 | * for each vma that needs a shootdown do { |
28 | * tlb_start_vma(tlb, vma); | 28 | * tlb_start_vma(tlb, vma); |
@@ -58,6 +58,7 @@ struct mmu_gather { | |||
58 | unsigned int max; | 58 | unsigned int max; |
59 | unsigned char fullmm; /* non-zero means full mm flush */ | 59 | unsigned char fullmm; /* non-zero means full mm flush */ |
60 | unsigned char need_flush; /* really unmapped some PTEs? */ | 60 | unsigned char need_flush; /* really unmapped some PTEs? */ |
61 | unsigned long start, end; | ||
61 | unsigned long start_addr; | 62 | unsigned long start_addr; |
62 | unsigned long end_addr; | 63 | unsigned long end_addr; |
63 | struct page **pages; | 64 | struct page **pages; |
@@ -155,13 +156,15 @@ static inline void __tlb_alloc_page(struct mmu_gather *tlb) | |||
155 | 156 | ||
156 | 157 | ||
157 | static inline void | 158 | static inline void |
158 | tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned int full_mm_flush) | 159 | tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start, unsigned long end) |
159 | { | 160 | { |
160 | tlb->mm = mm; | 161 | tlb->mm = mm; |
161 | tlb->max = ARRAY_SIZE(tlb->local); | 162 | tlb->max = ARRAY_SIZE(tlb->local); |
162 | tlb->pages = tlb->local; | 163 | tlb->pages = tlb->local; |
163 | tlb->nr = 0; | 164 | tlb->nr = 0; |
164 | tlb->fullmm = full_mm_flush; | 165 | tlb->fullmm = !(start | (end+1)); |
166 | tlb->start = start; | ||
167 | tlb->end = end; | ||
165 | tlb->start_addr = ~0UL; | 168 | tlb->start_addr = ~0UL; |
166 | } | 169 | } |
167 | 170 | ||
diff --git a/arch/m68k/emu/natfeat.c b/arch/m68k/emu/natfeat.c index 2291a7d69d49..fa277aecfb78 100644 --- a/arch/m68k/emu/natfeat.c +++ b/arch/m68k/emu/natfeat.c | |||
@@ -18,9 +18,11 @@ | |||
18 | #include <asm/machdep.h> | 18 | #include <asm/machdep.h> |
19 | #include <asm/natfeat.h> | 19 | #include <asm/natfeat.h> |
20 | 20 | ||
21 | extern long nf_get_id2(const char *feature_name); | ||
22 | |||
21 | asm("\n" | 23 | asm("\n" |
22 | " .global nf_get_id,nf_call\n" | 24 | " .global nf_get_id2,nf_call\n" |
23 | "nf_get_id:\n" | 25 | "nf_get_id2:\n" |
24 | " .short 0x7300\n" | 26 | " .short 0x7300\n" |
25 | " rts\n" | 27 | " rts\n" |
26 | "nf_call:\n" | 28 | "nf_call:\n" |
@@ -29,12 +31,25 @@ asm("\n" | |||
29 | "1: moveq.l #0,%d0\n" | 31 | "1: moveq.l #0,%d0\n" |
30 | " rts\n" | 32 | " rts\n" |
31 | " .section __ex_table,\"a\"\n" | 33 | " .section __ex_table,\"a\"\n" |
32 | " .long nf_get_id,1b\n" | 34 | " .long nf_get_id2,1b\n" |
33 | " .long nf_call,1b\n" | 35 | " .long nf_call,1b\n" |
34 | " .previous"); | 36 | " .previous"); |
35 | EXPORT_SYMBOL_GPL(nf_get_id); | ||
36 | EXPORT_SYMBOL_GPL(nf_call); | 37 | EXPORT_SYMBOL_GPL(nf_call); |
37 | 38 | ||
39 | long nf_get_id(const char *feature_name) | ||
40 | { | ||
41 | /* feature_name may be in vmalloc()ed memory, so make a copy */ | ||
42 | char name_copy[32]; | ||
43 | size_t n; | ||
44 | |||
45 | n = strlcpy(name_copy, feature_name, sizeof(name_copy)); | ||
46 | if (n >= sizeof(name_copy)) | ||
47 | return 0; | ||
48 | |||
49 | return nf_get_id2(name_copy); | ||
50 | } | ||
51 | EXPORT_SYMBOL_GPL(nf_get_id); | ||
52 | |||
38 | void nfprint(const char *fmt, ...) | 53 | void nfprint(const char *fmt, ...) |
39 | { | 54 | { |
40 | static char buf[256]; | 55 | static char buf[256]; |
diff --git a/arch/m68k/include/asm/div64.h b/arch/m68k/include/asm/div64.h index 444ea8a09e9f..ef881cfbbca9 100644 --- a/arch/m68k/include/asm/div64.h +++ b/arch/m68k/include/asm/div64.h | |||
@@ -15,16 +15,17 @@ | |||
15 | unsigned long long n64; \ | 15 | unsigned long long n64; \ |
16 | } __n; \ | 16 | } __n; \ |
17 | unsigned long __rem, __upper; \ | 17 | unsigned long __rem, __upper; \ |
18 | unsigned long __base = (base); \ | ||
18 | \ | 19 | \ |
19 | __n.n64 = (n); \ | 20 | __n.n64 = (n); \ |
20 | if ((__upper = __n.n32[0])) { \ | 21 | if ((__upper = __n.n32[0])) { \ |
21 | asm ("divul.l %2,%1:%0" \ | 22 | asm ("divul.l %2,%1:%0" \ |
22 | : "=d" (__n.n32[0]), "=d" (__upper) \ | 23 | : "=d" (__n.n32[0]), "=d" (__upper) \ |
23 | : "d" (base), "0" (__n.n32[0])); \ | 24 | : "d" (__base), "0" (__n.n32[0])); \ |
24 | } \ | 25 | } \ |
25 | asm ("divu.l %2,%1:%0" \ | 26 | asm ("divu.l %2,%1:%0" \ |
26 | : "=d" (__n.n32[1]), "=d" (__rem) \ | 27 | : "=d" (__n.n32[1]), "=d" (__rem) \ |
27 | : "d" (base), "1" (__upper), "0" (__n.n32[1])); \ | 28 | : "d" (__base), "1" (__upper), "0" (__n.n32[1])); \ |
28 | (n) = __n.n64; \ | 29 | (n) = __n.n64; \ |
29 | __rem; \ | 30 | __rem; \ |
30 | }) | 31 | }) |
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index d22a4ecffff4..4fab52294d98 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig | |||
@@ -28,7 +28,7 @@ config MICROBLAZE | |||
28 | select GENERIC_CLOCKEVENTS | 28 | select GENERIC_CLOCKEVENTS |
29 | select GENERIC_IDLE_POLL_SETUP | 29 | select GENERIC_IDLE_POLL_SETUP |
30 | select MODULES_USE_ELF_RELA | 30 | select MODULES_USE_ELF_RELA |
31 | select CLONE_BACKWARDS | 31 | select CLONE_BACKWARDS3 |
32 | 32 | ||
33 | config SWAP | 33 | config SWAP |
34 | def_bool n | 34 | def_bool n |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index c3abed332301..e12764c2a9d0 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -114,6 +114,7 @@ config BCM47XX | |||
114 | select FW_CFE | 114 | select FW_CFE |
115 | select HW_HAS_PCI | 115 | select HW_HAS_PCI |
116 | select IRQ_CPU | 116 | select IRQ_CPU |
117 | select SYS_HAS_CPU_MIPS32_R1 | ||
117 | select NO_EXCEPT_FILL | 118 | select NO_EXCEPT_FILL |
118 | select SYS_SUPPORTS_32BIT_KERNEL | 119 | select SYS_SUPPORTS_32BIT_KERNEL |
119 | select SYS_SUPPORTS_LITTLE_ENDIAN | 120 | select SYS_SUPPORTS_LITTLE_ENDIAN |
diff --git a/arch/mips/bcm47xx/Kconfig b/arch/mips/bcm47xx/Kconfig index ba611927749b..2b8b118398c4 100644 --- a/arch/mips/bcm47xx/Kconfig +++ b/arch/mips/bcm47xx/Kconfig | |||
@@ -2,7 +2,6 @@ if BCM47XX | |||
2 | 2 | ||
3 | config BCM47XX_SSB | 3 | config BCM47XX_SSB |
4 | bool "SSB Support for Broadcom BCM47XX" | 4 | bool "SSB Support for Broadcom BCM47XX" |
5 | select SYS_HAS_CPU_MIPS32_R1 | ||
6 | select SSB | 5 | select SSB |
7 | select SSB_DRIVER_MIPS | 6 | select SSB_DRIVER_MIPS |
8 | select SSB_DRIVER_EXTIF | 7 | select SSB_DRIVER_EXTIF |
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h index 1dc086087a72..fa44f3ec5302 100644 --- a/arch/mips/include/asm/cpu-features.h +++ b/arch/mips/include/asm/cpu-features.h | |||
@@ -17,6 +17,8 @@ | |||
17 | #define current_cpu_type() current_cpu_data.cputype | 17 | #define current_cpu_type() current_cpu_data.cputype |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #define boot_cpu_type() cpu_data[0].cputype | ||
21 | |||
20 | /* | 22 | /* |
21 | * SMP assumption: Options of CPU 0 are a superset of all processors. | 23 | * SMP assumption: Options of CPU 0 are a superset of all processors. |
22 | * This is true for all known MIPS systems. | 24 | * This is true for all known MIPS systems. |
diff --git a/arch/mips/include/asm/mach-generic/spaces.h b/arch/mips/include/asm/mach-generic/spaces.h index 5b2f2e68e57f..9488fa5f8866 100644 --- a/arch/mips/include/asm/mach-generic/spaces.h +++ b/arch/mips/include/asm/mach-generic/spaces.h | |||
@@ -25,8 +25,12 @@ | |||
25 | #else | 25 | #else |
26 | #define CAC_BASE _AC(0x80000000, UL) | 26 | #define CAC_BASE _AC(0x80000000, UL) |
27 | #endif | 27 | #endif |
28 | #ifndef IO_BASE | ||
28 | #define IO_BASE _AC(0xa0000000, UL) | 29 | #define IO_BASE _AC(0xa0000000, UL) |
30 | #endif | ||
31 | #ifndef UNCAC_BASE | ||
29 | #define UNCAC_BASE _AC(0xa0000000, UL) | 32 | #define UNCAC_BASE _AC(0xa0000000, UL) |
33 | #endif | ||
30 | 34 | ||
31 | #ifndef MAP_BASE | 35 | #ifndef MAP_BASE |
32 | #ifdef CONFIG_KVM_GUEST | 36 | #ifdef CONFIG_KVM_GUEST |
diff --git a/arch/mips/include/uapi/asm/siginfo.h b/arch/mips/include/uapi/asm/siginfo.h index b7a23064841f..88e292b7719e 100644 --- a/arch/mips/include/uapi/asm/siginfo.h +++ b/arch/mips/include/uapi/asm/siginfo.h | |||
@@ -25,11 +25,12 @@ struct siginfo; | |||
25 | /* | 25 | /* |
26 | * Careful to keep union _sifields from shifting ... | 26 | * Careful to keep union _sifields from shifting ... |
27 | */ | 27 | */ |
28 | #if __SIZEOF_LONG__ == 4 | 28 | #if _MIPS_SZLONG == 32 |
29 | #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) | 29 | #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) |
30 | #endif | 30 | #elif _MIPS_SZLONG == 64 |
31 | #if __SIZEOF_LONG__ == 8 | ||
32 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) | 31 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) |
32 | #else | ||
33 | #error _MIPS_SZLONG neither 32 nor 64 | ||
33 | #endif | 34 | #endif |
34 | 35 | ||
35 | #include <asm-generic/siginfo.h> | 36 | #include <asm-generic/siginfo.h> |
diff --git a/arch/mips/kernel/bmips_vec.S b/arch/mips/kernel/bmips_vec.S index f739aedcb509..bd79c4f9bff4 100644 --- a/arch/mips/kernel/bmips_vec.S +++ b/arch/mips/kernel/bmips_vec.S | |||
@@ -54,7 +54,11 @@ LEAF(bmips_smp_movevec) | |||
54 | /* set up CPU1 CBR; move BASE to 0xa000_0000 */ | 54 | /* set up CPU1 CBR; move BASE to 0xa000_0000 */ |
55 | li k0, 0xff400000 | 55 | li k0, 0xff400000 |
56 | mtc0 k0, $22, 6 | 56 | mtc0 k0, $22, 6 |
57 | li k1, CKSEG1 | BMIPS_RELO_VECTOR_CONTROL_1 | 57 | /* set up relocation vector address based on thread ID */ |
58 | mfc0 k1, $22, 3 | ||
59 | srl k1, 16 | ||
60 | andi k1, 0x8000 | ||
61 | or k1, CKSEG1 | BMIPS_RELO_VECTOR_CONTROL_0 | ||
58 | or k0, k1 | 62 | or k0, k1 |
59 | li k1, 0xa0080000 | 63 | li k1, 0xa0080000 |
60 | sw k1, 0(k0) | 64 | sw k1, 0(k0) |
diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c index c0bb4d59076a..126da74d4c55 100644 --- a/arch/mips/kernel/smp-bmips.c +++ b/arch/mips/kernel/smp-bmips.c | |||
@@ -66,6 +66,8 @@ static void __init bmips_smp_setup(void) | |||
66 | int i, cpu = 1, boot_cpu = 0; | 66 | int i, cpu = 1, boot_cpu = 0; |
67 | 67 | ||
68 | #if defined(CONFIG_CPU_BMIPS4350) || defined(CONFIG_CPU_BMIPS4380) | 68 | #if defined(CONFIG_CPU_BMIPS4350) || defined(CONFIG_CPU_BMIPS4380) |
69 | int cpu_hw_intr; | ||
70 | |||
69 | /* arbitration priority */ | 71 | /* arbitration priority */ |
70 | clear_c0_brcm_cmt_ctrl(0x30); | 72 | clear_c0_brcm_cmt_ctrl(0x30); |
71 | 73 | ||
@@ -79,15 +81,13 @@ static void __init bmips_smp_setup(void) | |||
79 | * MIPS interrupts 0,1 (SW INT 0,1) cross over to the other thread | 81 | * MIPS interrupts 0,1 (SW INT 0,1) cross over to the other thread |
80 | * MIPS interrupt 2 (HW INT 0) is the CPU0 L1 controller output | 82 | * MIPS interrupt 2 (HW INT 0) is the CPU0 L1 controller output |
81 | * MIPS interrupt 3 (HW INT 1) is the CPU1 L1 controller output | 83 | * MIPS interrupt 3 (HW INT 1) is the CPU1 L1 controller output |
82 | * | ||
83 | * If booting from TP1, leave the existing CMT interrupt routing | ||
84 | * such that TP0 responds to SW1 and TP1 responds to SW0. | ||
85 | */ | 84 | */ |
86 | if (boot_cpu == 0) | 85 | if (boot_cpu == 0) |
87 | change_c0_brcm_cmt_intr(0xf8018000, | 86 | cpu_hw_intr = 0x02; |
88 | (0x02 << 27) | (0x03 << 15)); | ||
89 | else | 87 | else |
90 | change_c0_brcm_cmt_intr(0xf8018000, (0x1d << 27)); | 88 | cpu_hw_intr = 0x1d; |
89 | |||
90 | change_c0_brcm_cmt_intr(0xf8018000, (cpu_hw_intr << 27) | (0x03 << 15)); | ||
91 | 91 | ||
92 | /* single core, 2 threads (2 pipelines) */ | 92 | /* single core, 2 threads (2 pipelines) */ |
93 | max_cpus = 2; | 93 | max_cpus = 2; |
@@ -202,9 +202,15 @@ static void bmips_init_secondary(void) | |||
202 | #if defined(CONFIG_CPU_BMIPS4350) || defined(CONFIG_CPU_BMIPS4380) | 202 | #if defined(CONFIG_CPU_BMIPS4350) || defined(CONFIG_CPU_BMIPS4380) |
203 | void __iomem *cbr = BMIPS_GET_CBR(); | 203 | void __iomem *cbr = BMIPS_GET_CBR(); |
204 | unsigned long old_vec; | 204 | unsigned long old_vec; |
205 | unsigned long relo_vector; | ||
206 | int boot_cpu; | ||
207 | |||
208 | boot_cpu = !!(read_c0_brcm_cmt_local() & (1 << 31)); | ||
209 | relo_vector = boot_cpu ? BMIPS_RELO_VECTOR_CONTROL_0 : | ||
210 | BMIPS_RELO_VECTOR_CONTROL_1; | ||
205 | 211 | ||
206 | old_vec = __raw_readl(cbr + BMIPS_RELO_VECTOR_CONTROL_1); | 212 | old_vec = __raw_readl(cbr + relo_vector); |
207 | __raw_writel(old_vec & ~0x20000000, cbr + BMIPS_RELO_VECTOR_CONTROL_1); | 213 | __raw_writel(old_vec & ~0x20000000, cbr + relo_vector); |
208 | 214 | ||
209 | clear_c0_cause(smp_processor_id() ? C_SW1 : C_SW0); | 215 | clear_c0_cause(smp_processor_id() ? C_SW1 : C_SW0); |
210 | #elif defined(CONFIG_CPU_BMIPS5000) | 216 | #elif defined(CONFIG_CPU_BMIPS5000) |
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c index e4b1140cdae0..3a2b6e9f25cf 100644 --- a/arch/mips/oprofile/op_model_mipsxx.c +++ b/arch/mips/oprofile/op_model_mipsxx.c | |||
@@ -166,7 +166,7 @@ static void mipsxx_reg_setup(struct op_counter_config *ctr) | |||
166 | reg.control[i] |= M_PERFCTL_USER; | 166 | reg.control[i] |= M_PERFCTL_USER; |
167 | if (ctr[i].exl) | 167 | if (ctr[i].exl) |
168 | reg.control[i] |= M_PERFCTL_EXL; | 168 | reg.control[i] |= M_PERFCTL_EXL; |
169 | if (current_cpu_type() == CPU_XLR) | 169 | if (boot_cpu_type() == CPU_XLR) |
170 | reg.control[i] |= M_PERFCTL_COUNT_ALL_THREADS; | 170 | reg.control[i] |= M_PERFCTL_COUNT_ALL_THREADS; |
171 | reg.counter[i] = 0x80000000 - ctr[i].count; | 171 | reg.counter[i] = 0x80000000 - ctr[i].count; |
172 | } | 172 | } |
diff --git a/arch/mips/pnx833x/common/platform.c b/arch/mips/pnx833x/common/platform.c index d22dc0d6f289..2b7e837dc2e2 100644 --- a/arch/mips/pnx833x/common/platform.c +++ b/arch/mips/pnx833x/common/platform.c | |||
@@ -206,11 +206,13 @@ static struct resource pnx833x_ethernet_resources[] = { | |||
206 | .end = PNX8335_IP3902_PORTS_END, | 206 | .end = PNX8335_IP3902_PORTS_END, |
207 | .flags = IORESOURCE_MEM, | 207 | .flags = IORESOURCE_MEM, |
208 | }, | 208 | }, |
209 | #ifdef CONFIG_SOC_PNX8335 | ||
209 | [1] = { | 210 | [1] = { |
210 | .start = PNX8335_PIC_ETHERNET_INT, | 211 | .start = PNX8335_PIC_ETHERNET_INT, |
211 | .end = PNX8335_PIC_ETHERNET_INT, | 212 | .end = PNX8335_PIC_ETHERNET_INT, |
212 | .flags = IORESOURCE_IRQ, | 213 | .flags = IORESOURCE_IRQ, |
213 | }, | 214 | }, |
215 | #endif | ||
214 | }; | 216 | }; |
215 | 217 | ||
216 | static struct platform_device pnx833x_ethernet_device = { | 218 | static struct platform_device pnx833x_ethernet_device = { |
diff --git a/arch/mips/powertv/asic/asic_devices.c b/arch/mips/powertv/asic/asic_devices.c index 9f64c2387808..0238af1ba503 100644 --- a/arch/mips/powertv/asic/asic_devices.c +++ b/arch/mips/powertv/asic/asic_devices.c | |||
@@ -529,8 +529,7 @@ EXPORT_SYMBOL(asic_resource_get); | |||
529 | */ | 529 | */ |
530 | void platform_release_memory(void *ptr, int size) | 530 | void platform_release_memory(void *ptr, int size) |
531 | { | 531 | { |
532 | free_reserved_area((unsigned long)ptr, (unsigned long)(ptr + size), | 532 | free_reserved_area(ptr, ptr + size, -1, NULL); |
533 | -1, NULL); | ||
534 | } | 533 | } |
535 | EXPORT_SYMBOL(platform_release_memory); | 534 | EXPORT_SYMBOL(platform_release_memory); |
536 | 535 | ||
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig index 99dbab1c59ac..d60bf98fa5cf 100644 --- a/arch/openrisc/Kconfig +++ b/arch/openrisc/Kconfig | |||
@@ -55,6 +55,7 @@ config GENERIC_CSUM | |||
55 | 55 | ||
56 | source "init/Kconfig" | 56 | source "init/Kconfig" |
57 | 57 | ||
58 | source "kernel/Kconfig.freezer" | ||
58 | 59 | ||
59 | menu "Processor type and features" | 60 | menu "Processor type and features" |
60 | 61 | ||
diff --git a/arch/parisc/configs/c8000_defconfig b/arch/parisc/configs/c8000_defconfig new file mode 100644 index 000000000000..f11006361297 --- /dev/null +++ b/arch/parisc/configs/c8000_defconfig | |||
@@ -0,0 +1,279 @@ | |||
1 | # CONFIG_LOCALVERSION_AUTO is not set | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_POSIX_MQUEUE=y | ||
4 | CONFIG_FHANDLE=y | ||
5 | CONFIG_BSD_PROCESS_ACCT=y | ||
6 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
7 | CONFIG_IKCONFIG=y | ||
8 | CONFIG_IKCONFIG_PROC=y | ||
9 | CONFIG_RELAY=y | ||
10 | CONFIG_BLK_DEV_INITRD=y | ||
11 | CONFIG_RD_BZIP2=y | ||
12 | CONFIG_RD_LZMA=y | ||
13 | CONFIG_RD_LZO=y | ||
14 | CONFIG_EXPERT=y | ||
15 | CONFIG_SYSCTL_SYSCALL=y | ||
16 | CONFIG_SLAB=y | ||
17 | CONFIG_MODULES=y | ||
18 | CONFIG_MODULE_UNLOAD=y | ||
19 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
20 | CONFIG_MODVERSIONS=y | ||
21 | CONFIG_BLK_DEV_INTEGRITY=y | ||
22 | CONFIG_PA8X00=y | ||
23 | CONFIG_MLONGCALLS=y | ||
24 | CONFIG_64BIT=y | ||
25 | CONFIG_SMP=y | ||
26 | CONFIG_PREEMPT=y | ||
27 | # CONFIG_CROSS_MEMORY_ATTACH is not set | ||
28 | CONFIG_IOMMU_CCIO=y | ||
29 | CONFIG_PCI=y | ||
30 | CONFIG_PCI_LBA=y | ||
31 | # CONFIG_SUPERIO is not set | ||
32 | # CONFIG_CHASSIS_LCD_LED is not set | ||
33 | # CONFIG_PDC_CHASSIS is not set | ||
34 | # CONFIG_PDC_CHASSIS_WARN is not set | ||
35 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
36 | CONFIG_BINFMT_MISC=m | ||
37 | CONFIG_PACKET=y | ||
38 | CONFIG_UNIX=y | ||
39 | CONFIG_XFRM_USER=m | ||
40 | CONFIG_XFRM_SUB_POLICY=y | ||
41 | CONFIG_NET_KEY=m | ||
42 | CONFIG_INET=y | ||
43 | CONFIG_IP_MULTICAST=y | ||
44 | CONFIG_IP_PNP=y | ||
45 | CONFIG_IP_PNP_DHCP=y | ||
46 | CONFIG_IP_PNP_BOOTP=y | ||
47 | CONFIG_IP_PNP_RARP=y | ||
48 | CONFIG_NET_IPIP=m | ||
49 | CONFIG_IP_MROUTE=y | ||
50 | CONFIG_IP_PIMSM_V1=y | ||
51 | CONFIG_IP_PIMSM_V2=y | ||
52 | CONFIG_SYN_COOKIES=y | ||
53 | CONFIG_INET_AH=m | ||
54 | CONFIG_INET_ESP=m | ||
55 | CONFIG_INET_IPCOMP=m | ||
56 | CONFIG_INET_XFRM_MODE_BEET=m | ||
57 | CONFIG_INET_DIAG=m | ||
58 | # CONFIG_IPV6 is not set | ||
59 | CONFIG_IP_DCCP=m | ||
60 | # CONFIG_IP_DCCP_CCID3 is not set | ||
61 | CONFIG_TIPC=m | ||
62 | CONFIG_LLC2=m | ||
63 | CONFIG_DNS_RESOLVER=y | ||
64 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
65 | # CONFIG_STANDALONE is not set | ||
66 | CONFIG_PARPORT=y | ||
67 | CONFIG_PARPORT_PC=y | ||
68 | CONFIG_PARPORT_PC_FIFO=y | ||
69 | CONFIG_BLK_DEV_UMEM=m | ||
70 | CONFIG_BLK_DEV_LOOP=m | ||
71 | CONFIG_BLK_DEV_CRYPTOLOOP=m | ||
72 | CONFIG_BLK_DEV_SX8=m | ||
73 | CONFIG_BLK_DEV_RAM=y | ||
74 | CONFIG_BLK_DEV_RAM_SIZE=6144 | ||
75 | CONFIG_CDROM_PKTCDVD=m | ||
76 | CONFIG_CDROM_PKTCDVD_WCACHE=y | ||
77 | CONFIG_ATA_OVER_ETH=m | ||
78 | CONFIG_IDE=y | ||
79 | CONFIG_BLK_DEV_IDECD=y | ||
80 | CONFIG_BLK_DEV_PLATFORM=y | ||
81 | CONFIG_BLK_DEV_GENERIC=y | ||
82 | CONFIG_BLK_DEV_SIIMAGE=y | ||
83 | CONFIG_SCSI=y | ||
84 | CONFIG_BLK_DEV_SD=y | ||
85 | CONFIG_CHR_DEV_ST=m | ||
86 | CONFIG_BLK_DEV_SR=m | ||
87 | CONFIG_CHR_DEV_SG=y | ||
88 | CONFIG_CHR_DEV_SCH=m | ||
89 | CONFIG_SCSI_CONSTANTS=y | ||
90 | CONFIG_SCSI_LOGGING=y | ||
91 | CONFIG_SCSI_FC_ATTRS=y | ||
92 | CONFIG_SCSI_SAS_LIBSAS=m | ||
93 | CONFIG_ISCSI_TCP=m | ||
94 | CONFIG_ISCSI_BOOT_SYSFS=m | ||
95 | CONFIG_FUSION=y | ||
96 | CONFIG_FUSION_SPI=y | ||
97 | CONFIG_FUSION_SAS=y | ||
98 | CONFIG_NETDEVICES=y | ||
99 | CONFIG_DUMMY=m | ||
100 | CONFIG_NETCONSOLE=m | ||
101 | CONFIG_TUN=y | ||
102 | CONFIG_E1000=y | ||
103 | CONFIG_PPP=m | ||
104 | CONFIG_PPP_BSDCOMP=m | ||
105 | CONFIG_PPP_DEFLATE=m | ||
106 | CONFIG_PPP_MPPE=m | ||
107 | CONFIG_PPPOE=m | ||
108 | CONFIG_PPP_ASYNC=m | ||
109 | CONFIG_PPP_SYNC_TTY=m | ||
110 | # CONFIG_WLAN is not set | ||
111 | CONFIG_INPUT_FF_MEMLESS=m | ||
112 | # CONFIG_KEYBOARD_ATKBD is not set | ||
113 | # CONFIG_KEYBOARD_HIL_OLD is not set | ||
114 | # CONFIG_KEYBOARD_HIL is not set | ||
115 | CONFIG_MOUSE_PS2=m | ||
116 | CONFIG_INPUT_MISC=y | ||
117 | CONFIG_INPUT_CM109=m | ||
118 | CONFIG_SERIO_SERPORT=m | ||
119 | CONFIG_SERIO_PARKBD=m | ||
120 | CONFIG_SERIO_GSCPS2=m | ||
121 | # CONFIG_HP_SDC is not set | ||
122 | CONFIG_SERIO_PCIPS2=m | ||
123 | CONFIG_SERIO_LIBPS2=y | ||
124 | CONFIG_SERIO_RAW=m | ||
125 | CONFIG_SERIAL_8250=y | ||
126 | # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set | ||
127 | CONFIG_SERIAL_8250_CONSOLE=y | ||
128 | CONFIG_SERIAL_8250_NR_UARTS=8 | ||
129 | CONFIG_SERIAL_8250_RUNTIME_UARTS=8 | ||
130 | CONFIG_SERIAL_8250_EXTENDED=y | ||
131 | # CONFIG_SERIAL_MUX is not set | ||
132 | CONFIG_SERIAL_JSM=m | ||
133 | CONFIG_PRINTER=y | ||
134 | CONFIG_HW_RANDOM=y | ||
135 | CONFIG_RAW_DRIVER=m | ||
136 | CONFIG_PTP_1588_CLOCK=y | ||
137 | CONFIG_SSB=m | ||
138 | CONFIG_SSB_DRIVER_PCICORE=y | ||
139 | CONFIG_AGP=y | ||
140 | CONFIG_AGP_PARISC=y | ||
141 | CONFIG_DRM=y | ||
142 | CONFIG_DRM_RADEON=y | ||
143 | CONFIG_FIRMWARE_EDID=y | ||
144 | CONFIG_FB_FOREIGN_ENDIAN=y | ||
145 | CONFIG_FB_MODE_HELPERS=y | ||
146 | CONFIG_FB_TILEBLITTING=y | ||
147 | # CONFIG_FB_STI is not set | ||
148 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
149 | # CONFIG_LCD_CLASS_DEVICE is not set | ||
150 | # CONFIG_BACKLIGHT_GENERIC is not set | ||
151 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
152 | # CONFIG_STI_CONSOLE is not set | ||
153 | CONFIG_LOGO=y | ||
154 | # CONFIG_LOGO_LINUX_MONO is not set | ||
155 | # CONFIG_LOGO_LINUX_VGA16 is not set | ||
156 | # CONFIG_LOGO_LINUX_CLUT224 is not set | ||
157 | CONFIG_SOUND=m | ||
158 | CONFIG_SND=m | ||
159 | CONFIG_SND_SEQUENCER=m | ||
160 | CONFIG_SND_SEQ_DUMMY=m | ||
161 | CONFIG_SND_MIXER_OSS=m | ||
162 | CONFIG_SND_PCM_OSS=m | ||
163 | CONFIG_SND_SEQUENCER_OSS=y | ||
164 | CONFIG_SND_VERBOSE_PRINTK=y | ||
165 | CONFIG_SND_AD1889=m | ||
166 | # CONFIG_SND_USB is not set | ||
167 | # CONFIG_SND_GSC is not set | ||
168 | CONFIG_HID_A4TECH=m | ||
169 | CONFIG_HID_APPLE=m | ||
170 | CONFIG_HID_BELKIN=m | ||
171 | CONFIG_HID_CHERRY=m | ||
172 | CONFIG_HID_CHICONY=m | ||
173 | CONFIG_HID_CYPRESS=m | ||
174 | CONFIG_HID_DRAGONRISE=m | ||
175 | CONFIG_HID_EZKEY=m | ||
176 | CONFIG_HID_KYE=m | ||
177 | CONFIG_HID_GYRATION=m | ||
178 | CONFIG_HID_TWINHAN=m | ||
179 | CONFIG_HID_KENSINGTON=m | ||
180 | CONFIG_HID_LOGITECH=m | ||
181 | CONFIG_HID_LOGITECH_DJ=m | ||
182 | CONFIG_HID_MICROSOFT=m | ||
183 | CONFIG_HID_MONTEREY=m | ||
184 | CONFIG_HID_NTRIG=m | ||
185 | CONFIG_HID_ORTEK=m | ||
186 | CONFIG_HID_PANTHERLORD=m | ||
187 | CONFIG_HID_PETALYNX=m | ||
188 | CONFIG_HID_SAMSUNG=m | ||
189 | CONFIG_HID_SUNPLUS=m | ||
190 | CONFIG_HID_GREENASIA=m | ||
191 | CONFIG_HID_SMARTJOYPLUS=m | ||
192 | CONFIG_HID_TOPSEED=m | ||
193 | CONFIG_HID_THRUSTMASTER=m | ||
194 | CONFIG_HID_ZEROPLUS=m | ||
195 | CONFIG_USB_HID=m | ||
196 | CONFIG_USB=y | ||
197 | CONFIG_USB_OHCI_HCD=y | ||
198 | CONFIG_USB_STORAGE=y | ||
199 | CONFIG_EXT2_FS=y | ||
200 | CONFIG_EXT2_FS_XATTR=y | ||
201 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
202 | CONFIG_EXT2_FS_SECURITY=y | ||
203 | CONFIG_EXT3_FS=y | ||
204 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | ||
205 | CONFIG_EXT4_FS=m | ||
206 | CONFIG_REISERFS_FS=m | ||
207 | CONFIG_REISERFS_PROC_INFO=y | ||
208 | CONFIG_XFS_FS=m | ||
209 | CONFIG_XFS_POSIX_ACL=y | ||
210 | CONFIG_QUOTA=y | ||
211 | CONFIG_QFMT_V1=m | ||
212 | CONFIG_QFMT_V2=m | ||
213 | CONFIG_AUTOFS4_FS=m | ||
214 | CONFIG_FUSE_FS=m | ||
215 | CONFIG_ISO9660_FS=y | ||
216 | CONFIG_JOLIET=y | ||
217 | CONFIG_MSDOS_FS=m | ||
218 | CONFIG_VFAT_FS=m | ||
219 | CONFIG_PROC_KCORE=y | ||
220 | CONFIG_TMPFS=y | ||
221 | CONFIG_TMPFS_XATTR=y | ||
222 | CONFIG_NFS_FS=m | ||
223 | CONFIG_NLS_CODEPAGE_437=m | ||
224 | CONFIG_NLS_CODEPAGE_737=m | ||
225 | CONFIG_NLS_CODEPAGE_775=m | ||
226 | CONFIG_NLS_CODEPAGE_850=m | ||
227 | CONFIG_NLS_CODEPAGE_852=m | ||
228 | CONFIG_NLS_CODEPAGE_855=m | ||
229 | CONFIG_NLS_CODEPAGE_857=m | ||
230 | CONFIG_NLS_CODEPAGE_860=m | ||
231 | CONFIG_NLS_CODEPAGE_861=m | ||
232 | CONFIG_NLS_CODEPAGE_862=m | ||
233 | CONFIG_NLS_CODEPAGE_863=m | ||
234 | CONFIG_NLS_CODEPAGE_864=m | ||
235 | CONFIG_NLS_CODEPAGE_865=m | ||
236 | CONFIG_NLS_CODEPAGE_866=m | ||
237 | CONFIG_NLS_CODEPAGE_869=m | ||
238 | CONFIG_NLS_CODEPAGE_936=m | ||
239 | CONFIG_NLS_CODEPAGE_950=m | ||
240 | CONFIG_NLS_CODEPAGE_932=m | ||
241 | CONFIG_NLS_CODEPAGE_949=m | ||
242 | CONFIG_NLS_CODEPAGE_874=m | ||
243 | CONFIG_NLS_ISO8859_8=m | ||
244 | CONFIG_NLS_CODEPAGE_1250=m | ||
245 | CONFIG_NLS_CODEPAGE_1251=m | ||
246 | CONFIG_NLS_ASCII=m | ||
247 | CONFIG_NLS_ISO8859_1=m | ||
248 | CONFIG_NLS_ISO8859_2=m | ||
249 | CONFIG_NLS_ISO8859_3=m | ||
250 | CONFIG_NLS_ISO8859_4=m | ||
251 | CONFIG_NLS_ISO8859_5=m | ||
252 | CONFIG_NLS_ISO8859_6=m | ||
253 | CONFIG_NLS_ISO8859_7=m | ||
254 | CONFIG_NLS_ISO8859_9=m | ||
255 | CONFIG_NLS_ISO8859_13=m | ||
256 | CONFIG_NLS_ISO8859_14=m | ||
257 | CONFIG_NLS_ISO8859_15=m | ||
258 | CONFIG_NLS_KOI8_R=m | ||
259 | CONFIG_NLS_KOI8_U=m | ||
260 | CONFIG_NLS_UTF8=m | ||
261 | CONFIG_UNUSED_SYMBOLS=y | ||
262 | CONFIG_DEBUG_FS=y | ||
263 | CONFIG_MAGIC_SYSRQ=y | ||
264 | CONFIG_DEBUG_SLAB=y | ||
265 | CONFIG_DEBUG_SLAB_LEAK=y | ||
266 | CONFIG_DEBUG_MEMORY_INIT=y | ||
267 | CONFIG_DEBUG_STACKOVERFLOW=y | ||
268 | CONFIG_LOCKUP_DETECTOR=y | ||
269 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y | ||
270 | CONFIG_PANIC_ON_OOPS=y | ||
271 | CONFIG_DEBUG_RT_MUTEXES=y | ||
272 | CONFIG_RT_MUTEX_TESTER=y | ||
273 | CONFIG_PROVE_RCU_DELAY=y | ||
274 | CONFIG_DEBUG_BLOCK_EXT_DEVT=y | ||
275 | CONFIG_LATENCYTOP=y | ||
276 | CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y | ||
277 | CONFIG_KEYS=y | ||
278 | # CONFIG_CRYPTO_HW is not set | ||
279 | CONFIG_FONTS=y | ||
diff --git a/arch/parisc/include/asm/parisc-device.h b/arch/parisc/include/asm/parisc-device.h index 9afdad6c2ffb..eaf4dc1c7294 100644 --- a/arch/parisc/include/asm/parisc-device.h +++ b/arch/parisc/include/asm/parisc-device.h | |||
@@ -23,6 +23,7 @@ struct parisc_device { | |||
23 | /* generic info returned from pdc_pat_cell_module() */ | 23 | /* generic info returned from pdc_pat_cell_module() */ |
24 | unsigned long mod_info; /* PAT specific - Misc Module info */ | 24 | unsigned long mod_info; /* PAT specific - Misc Module info */ |
25 | unsigned long pmod_loc; /* physical Module location */ | 25 | unsigned long pmod_loc; /* physical Module location */ |
26 | unsigned long mod0; | ||
26 | #endif | 27 | #endif |
27 | u64 dma_mask; /* DMA mask for I/O */ | 28 | u64 dma_mask; /* DMA mask for I/O */ |
28 | struct device dev; | 29 | struct device dev; |
@@ -61,4 +62,6 @@ parisc_get_drvdata(struct parisc_device *d) | |||
61 | 62 | ||
62 | extern struct bus_type parisc_bus_type; | 63 | extern struct bus_type parisc_bus_type; |
63 | 64 | ||
65 | int iosapic_serial_irq(struct parisc_device *dev); | ||
66 | |||
64 | #endif /*_ASM_PARISC_PARISC_DEVICE_H_*/ | 67 | #endif /*_ASM_PARISC_PARISC_DEVICE_H_*/ |
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index 2e65aa54bd10..c035673209f7 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c | |||
@@ -71,18 +71,27 @@ flush_cache_all_local(void) | |||
71 | } | 71 | } |
72 | EXPORT_SYMBOL(flush_cache_all_local); | 72 | EXPORT_SYMBOL(flush_cache_all_local); |
73 | 73 | ||
74 | /* Virtual address of pfn. */ | ||
75 | #define pfn_va(pfn) __va(PFN_PHYS(pfn)) | ||
76 | |||
74 | void | 77 | void |
75 | update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t *ptep) | 78 | update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t *ptep) |
76 | { | 79 | { |
77 | struct page *page = pte_page(*ptep); | 80 | unsigned long pfn = pte_pfn(*ptep); |
81 | struct page *page; | ||
78 | 82 | ||
79 | if (pfn_valid(page_to_pfn(page)) && page_mapping(page) && | 83 | /* We don't have pte special. As a result, we can be called with |
80 | test_bit(PG_dcache_dirty, &page->flags)) { | 84 | an invalid pfn and we don't need to flush the kernel dcache page. |
85 | This occurs with FireGL card in C8000. */ | ||
86 | if (!pfn_valid(pfn)) | ||
87 | return; | ||
81 | 88 | ||
82 | flush_kernel_dcache_page(page); | 89 | page = pfn_to_page(pfn); |
90 | if (page_mapping(page) && test_bit(PG_dcache_dirty, &page->flags)) { | ||
91 | flush_kernel_dcache_page_addr(pfn_va(pfn)); | ||
83 | clear_bit(PG_dcache_dirty, &page->flags); | 92 | clear_bit(PG_dcache_dirty, &page->flags); |
84 | } else if (parisc_requires_coherency()) | 93 | } else if (parisc_requires_coherency()) |
85 | flush_kernel_dcache_page(page); | 94 | flush_kernel_dcache_page_addr(pfn_va(pfn)); |
86 | } | 95 | } |
87 | 96 | ||
88 | void | 97 | void |
@@ -495,44 +504,42 @@ static inline pte_t *get_ptep(pgd_t *pgd, unsigned long addr) | |||
495 | 504 | ||
496 | void flush_cache_mm(struct mm_struct *mm) | 505 | void flush_cache_mm(struct mm_struct *mm) |
497 | { | 506 | { |
507 | struct vm_area_struct *vma; | ||
508 | pgd_t *pgd; | ||
509 | |||
498 | /* Flushing the whole cache on each cpu takes forever on | 510 | /* Flushing the whole cache on each cpu takes forever on |
499 | rp3440, etc. So, avoid it if the mm isn't too big. */ | 511 | rp3440, etc. So, avoid it if the mm isn't too big. */ |
500 | if (mm_total_size(mm) < parisc_cache_flush_threshold) { | 512 | if (mm_total_size(mm) >= parisc_cache_flush_threshold) { |
501 | struct vm_area_struct *vma; | 513 | flush_cache_all(); |
502 | 514 | return; | |
503 | if (mm->context == mfsp(3)) { | 515 | } |
504 | for (vma = mm->mmap; vma; vma = vma->vm_next) { | 516 | |
505 | flush_user_dcache_range_asm(vma->vm_start, | 517 | if (mm->context == mfsp(3)) { |
506 | vma->vm_end); | 518 | for (vma = mm->mmap; vma; vma = vma->vm_next) { |
507 | if (vma->vm_flags & VM_EXEC) | 519 | flush_user_dcache_range_asm(vma->vm_start, vma->vm_end); |
508 | flush_user_icache_range_asm( | 520 | if ((vma->vm_flags & VM_EXEC) == 0) |
509 | vma->vm_start, vma->vm_end); | 521 | continue; |
510 | } | 522 | flush_user_icache_range_asm(vma->vm_start, vma->vm_end); |
511 | } else { | ||
512 | pgd_t *pgd = mm->pgd; | ||
513 | |||
514 | for (vma = mm->mmap; vma; vma = vma->vm_next) { | ||
515 | unsigned long addr; | ||
516 | |||
517 | for (addr = vma->vm_start; addr < vma->vm_end; | ||
518 | addr += PAGE_SIZE) { | ||
519 | pte_t *ptep = get_ptep(pgd, addr); | ||
520 | if (ptep != NULL) { | ||
521 | pte_t pte = *ptep; | ||
522 | __flush_cache_page(vma, addr, | ||
523 | page_to_phys(pte_page(pte))); | ||
524 | } | ||
525 | } | ||
526 | } | ||
527 | } | 523 | } |
528 | return; | 524 | return; |
529 | } | 525 | } |
530 | 526 | ||
531 | #ifdef CONFIG_SMP | 527 | pgd = mm->pgd; |
532 | flush_cache_all(); | 528 | for (vma = mm->mmap; vma; vma = vma->vm_next) { |
533 | #else | 529 | unsigned long addr; |
534 | flush_cache_all_local(); | 530 | |
535 | #endif | 531 | for (addr = vma->vm_start; addr < vma->vm_end; |
532 | addr += PAGE_SIZE) { | ||
533 | unsigned long pfn; | ||
534 | pte_t *ptep = get_ptep(pgd, addr); | ||
535 | if (!ptep) | ||
536 | continue; | ||
537 | pfn = pte_pfn(*ptep); | ||
538 | if (!pfn_valid(pfn)) | ||
539 | continue; | ||
540 | __flush_cache_page(vma, addr, PFN_PHYS(pfn)); | ||
541 | } | ||
542 | } | ||
536 | } | 543 | } |
537 | 544 | ||
538 | void | 545 | void |
@@ -556,33 +563,32 @@ flush_user_icache_range(unsigned long start, unsigned long end) | |||
556 | void flush_cache_range(struct vm_area_struct *vma, | 563 | void flush_cache_range(struct vm_area_struct *vma, |
557 | unsigned long start, unsigned long end) | 564 | unsigned long start, unsigned long end) |
558 | { | 565 | { |
566 | unsigned long addr; | ||
567 | pgd_t *pgd; | ||
568 | |||
559 | BUG_ON(!vma->vm_mm->context); | 569 | BUG_ON(!vma->vm_mm->context); |
560 | 570 | ||
561 | if ((end - start) < parisc_cache_flush_threshold) { | 571 | if ((end - start) >= parisc_cache_flush_threshold) { |
562 | if (vma->vm_mm->context == mfsp(3)) { | ||
563 | flush_user_dcache_range_asm(start, end); | ||
564 | if (vma->vm_flags & VM_EXEC) | ||
565 | flush_user_icache_range_asm(start, end); | ||
566 | } else { | ||
567 | unsigned long addr; | ||
568 | pgd_t *pgd = vma->vm_mm->pgd; | ||
569 | |||
570 | for (addr = start & PAGE_MASK; addr < end; | ||
571 | addr += PAGE_SIZE) { | ||
572 | pte_t *ptep = get_ptep(pgd, addr); | ||
573 | if (ptep != NULL) { | ||
574 | pte_t pte = *ptep; | ||
575 | flush_cache_page(vma, | ||
576 | addr, pte_pfn(pte)); | ||
577 | } | ||
578 | } | ||
579 | } | ||
580 | } else { | ||
581 | #ifdef CONFIG_SMP | ||
582 | flush_cache_all(); | 572 | flush_cache_all(); |
583 | #else | 573 | return; |
584 | flush_cache_all_local(); | 574 | } |
585 | #endif | 575 | |
576 | if (vma->vm_mm->context == mfsp(3)) { | ||
577 | flush_user_dcache_range_asm(start, end); | ||
578 | if (vma->vm_flags & VM_EXEC) | ||
579 | flush_user_icache_range_asm(start, end); | ||
580 | return; | ||
581 | } | ||
582 | |||
583 | pgd = vma->vm_mm->pgd; | ||
584 | for (addr = start & PAGE_MASK; addr < end; addr += PAGE_SIZE) { | ||
585 | unsigned long pfn; | ||
586 | pte_t *ptep = get_ptep(pgd, addr); | ||
587 | if (!ptep) | ||
588 | continue; | ||
589 | pfn = pte_pfn(*ptep); | ||
590 | if (pfn_valid(pfn)) | ||
591 | __flush_cache_page(vma, addr, PFN_PHYS(pfn)); | ||
586 | } | 592 | } |
587 | } | 593 | } |
588 | 594 | ||
@@ -591,9 +597,10 @@ flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long | |||
591 | { | 597 | { |
592 | BUG_ON(!vma->vm_mm->context); | 598 | BUG_ON(!vma->vm_mm->context); |
593 | 599 | ||
594 | flush_tlb_page(vma, vmaddr); | 600 | if (pfn_valid(pfn)) { |
595 | __flush_cache_page(vma, vmaddr, page_to_phys(pfn_to_page(pfn))); | 601 | flush_tlb_page(vma, vmaddr); |
596 | 602 | __flush_cache_page(vma, vmaddr, PFN_PHYS(pfn)); | |
603 | } | ||
597 | } | 604 | } |
598 | 605 | ||
599 | #ifdef CONFIG_PARISC_TMPALIAS | 606 | #ifdef CONFIG_PARISC_TMPALIAS |
diff --git a/arch/parisc/kernel/inventory.c b/arch/parisc/kernel/inventory.c index 3295ef4a185d..f0b6722fc706 100644 --- a/arch/parisc/kernel/inventory.c +++ b/arch/parisc/kernel/inventory.c | |||
@@ -211,6 +211,7 @@ pat_query_module(ulong pcell_loc, ulong mod_index) | |||
211 | /* REVISIT: who is the consumer of this? not sure yet... */ | 211 | /* REVISIT: who is the consumer of this? not sure yet... */ |
212 | dev->mod_info = pa_pdc_cell->mod_info; /* pass to PAT_GET_ENTITY() */ | 212 | dev->mod_info = pa_pdc_cell->mod_info; /* pass to PAT_GET_ENTITY() */ |
213 | dev->pmod_loc = pa_pdc_cell->mod_location; | 213 | dev->pmod_loc = pa_pdc_cell->mod_location; |
214 | dev->mod0 = pa_pdc_cell->mod[0]; | ||
214 | 215 | ||
215 | register_parisc_device(dev); /* advertise device */ | 216 | register_parisc_device(dev); /* advertise device */ |
216 | 217 | ||
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index 940188d1942c..07349b002687 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c | |||
@@ -56,13 +56,6 @@ | |||
56 | #define A(__x) ((unsigned long)(__x)) | 56 | #define A(__x) ((unsigned long)(__x)) |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * Atomically swap in the new signal mask, and wait for a signal. | ||
60 | */ | ||
61 | #ifdef CONFIG_64BIT | ||
62 | #include "sys32.h" | ||
63 | #endif | ||
64 | |||
65 | /* | ||
66 | * Do a signal return - restore sigcontext. | 59 | * Do a signal return - restore sigcontext. |
67 | */ | 60 | */ |
68 | 61 | ||
diff --git a/arch/parisc/kernel/signal32.c b/arch/parisc/kernel/signal32.c index 33eca1b04926..6c6a271a6140 100644 --- a/arch/parisc/kernel/signal32.c +++ b/arch/parisc/kernel/signal32.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <asm/uaccess.h> | 34 | #include <asm/uaccess.h> |
35 | 35 | ||
36 | #include "signal32.h" | 36 | #include "signal32.h" |
37 | #include "sys32.h" | ||
38 | 37 | ||
39 | #define DEBUG_COMPAT_SIG 0 | 38 | #define DEBUG_COMPAT_SIG 0 |
40 | #define DEBUG_COMPAT_SIG_LEVEL 2 | 39 | #define DEBUG_COMPAT_SIG_LEVEL 2 |
diff --git a/arch/parisc/kernel/sys32.h b/arch/parisc/kernel/sys32.h deleted file mode 100644 index 60dd470f39f8..000000000000 --- a/arch/parisc/kernel/sys32.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002 Richard Hirst <rhirst at parisc-linux.org> | ||
3 | * Copyright (C) 2003 James Bottomley <jejb at parisc-linux.org> | ||
4 | * Copyright (C) 2003 Randolph Chung <tausq with parisc-linux.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef _PARISC64_KERNEL_SYS32_H | ||
21 | #define _PARISC64_KERNEL_SYS32_H | ||
22 | |||
23 | #include <linux/compat.h> | ||
24 | |||
25 | /* Call a kernel syscall which will use kernel space instead of user | ||
26 | * space for its copy_to/from_user. | ||
27 | */ | ||
28 | #define KERNEL_SYSCALL(ret, syscall, args...) \ | ||
29 | { \ | ||
30 | mm_segment_t old_fs = get_fs(); \ | ||
31 | set_fs(KERNEL_DS); \ | ||
32 | ret = syscall(args); \ | ||
33 | set_fs (old_fs); \ | ||
34 | } | ||
35 | |||
36 | #endif | ||
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c index a134ff4da12e..bb9f3b64de55 100644 --- a/arch/parisc/kernel/sys_parisc32.c +++ b/arch/parisc/kernel/sys_parisc32.c | |||
@@ -42,8 +42,6 @@ | |||
42 | #include <asm/uaccess.h> | 42 | #include <asm/uaccess.h> |
43 | #include <asm/mmu_context.h> | 43 | #include <asm/mmu_context.h> |
44 | 44 | ||
45 | #include "sys32.h" | ||
46 | |||
47 | #undef DEBUG | 45 | #undef DEBUG |
48 | 46 | ||
49 | #ifdef DEBUG | 47 | #ifdef DEBUG |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 3bf72cd2c8fc..dbd9d3c991e8 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -566,7 +566,7 @@ config SCHED_SMT | |||
566 | config PPC_DENORMALISATION | 566 | config PPC_DENORMALISATION |
567 | bool "PowerPC denormalisation exception handling" | 567 | bool "PowerPC denormalisation exception handling" |
568 | depends on PPC_BOOK3S_64 | 568 | depends on PPC_BOOK3S_64 |
569 | default "n" | 569 | default "y" if PPC_POWERNV |
570 | ---help--- | 570 | ---help--- |
571 | Add support for handling denormalisation of single precision | 571 | Add support for handling denormalisation of single precision |
572 | values. Useful for bare metal only. If unsure say Y here. | 572 | values. Useful for bare metal only. If unsure say Y here. |
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index c86fcb92358e..0e8cfd09da2f 100644 --- a/arch/powerpc/configs/ppc64_defconfig +++ b/arch/powerpc/configs/ppc64_defconfig | |||
@@ -58,7 +58,7 @@ CONFIG_SCHED_SMT=y | |||
58 | CONFIG_PPC_DENORMALISATION=y | 58 | CONFIG_PPC_DENORMALISATION=y |
59 | CONFIG_PCCARD=y | 59 | CONFIG_PCCARD=y |
60 | CONFIG_ELECTRA_CF=y | 60 | CONFIG_ELECTRA_CF=y |
61 | CONFIG_HOTPLUG_PCI=m | 61 | CONFIG_HOTPLUG_PCI=y |
62 | CONFIG_HOTPLUG_PCI_RPA=m | 62 | CONFIG_HOTPLUG_PCI_RPA=m |
63 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m | 63 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m |
64 | CONFIG_PACKET=y | 64 | CONFIG_PACKET=y |
diff --git a/arch/powerpc/configs/ppc64e_defconfig b/arch/powerpc/configs/ppc64e_defconfig index 4b20f76172e2..0085dc4642c5 100644 --- a/arch/powerpc/configs/ppc64e_defconfig +++ b/arch/powerpc/configs/ppc64e_defconfig | |||
@@ -32,7 +32,7 @@ CONFIG_IRQ_ALL_CPUS=y | |||
32 | CONFIG_SPARSEMEM_MANUAL=y | 32 | CONFIG_SPARSEMEM_MANUAL=y |
33 | CONFIG_PCI_MSI=y | 33 | CONFIG_PCI_MSI=y |
34 | CONFIG_PCCARD=y | 34 | CONFIG_PCCARD=y |
35 | CONFIG_HOTPLUG_PCI=m | 35 | CONFIG_HOTPLUG_PCI=y |
36 | CONFIG_PACKET=y | 36 | CONFIG_PACKET=y |
37 | CONFIG_UNIX=y | 37 | CONFIG_UNIX=y |
38 | CONFIG_XFRM_USER=m | 38 | CONFIG_XFRM_USER=m |
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig index bea8587c3af5..1d4b9763895d 100644 --- a/arch/powerpc/configs/pseries_defconfig +++ b/arch/powerpc/configs/pseries_defconfig | |||
@@ -53,7 +53,7 @@ CONFIG_PPC_64K_PAGES=y | |||
53 | CONFIG_PPC_SUBPAGE_PROT=y | 53 | CONFIG_PPC_SUBPAGE_PROT=y |
54 | CONFIG_SCHED_SMT=y | 54 | CONFIG_SCHED_SMT=y |
55 | CONFIG_PPC_DENORMALISATION=y | 55 | CONFIG_PPC_DENORMALISATION=y |
56 | CONFIG_HOTPLUG_PCI=m | 56 | CONFIG_HOTPLUG_PCI=y |
57 | CONFIG_HOTPLUG_PCI_RPA=m | 57 | CONFIG_HOTPLUG_PCI_RPA=m |
58 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m | 58 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m |
59 | CONFIG_PACKET=y | 59 | CONFIG_PACKET=y |
diff --git a/arch/powerpc/include/asm/perf_event_server.h b/arch/powerpc/include/asm/perf_event_server.h index 2dd7bfc459be..8b2492644754 100644 --- a/arch/powerpc/include/asm/perf_event_server.h +++ b/arch/powerpc/include/asm/perf_event_server.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <asm/hw_irq.h> | 13 | #include <asm/hw_irq.h> |
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <uapi/asm/perf_event.h> | ||
15 | 16 | ||
16 | #define MAX_HWEVENTS 8 | 17 | #define MAX_HWEVENTS 8 |
17 | #define MAX_EVENT_ALTERNATIVES 8 | 18 | #define MAX_EVENT_ALTERNATIVES 8 |
@@ -69,11 +70,6 @@ struct power_pmu { | |||
69 | #define PPMU_LIMITED_PMC_REQD 2 /* have to put this on a limited PMC */ | 70 | #define PPMU_LIMITED_PMC_REQD 2 /* have to put this on a limited PMC */ |
70 | #define PPMU_ONLY_COUNT_RUN 4 /* only counting in run state */ | 71 | #define PPMU_ONLY_COUNT_RUN 4 /* only counting in run state */ |
71 | 72 | ||
72 | /* | ||
73 | * We use the event config bit 63 as a flag to request EBB. | ||
74 | */ | ||
75 | #define EVENT_CONFIG_EBB_SHIFT 63 | ||
76 | |||
77 | extern int register_power_pmu(struct power_pmu *); | 73 | extern int register_power_pmu(struct power_pmu *); |
78 | 74 | ||
79 | struct pt_regs; | 75 | struct pt_regs; |
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 47a35b08b963..e378cccfca55 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h | |||
@@ -247,6 +247,10 @@ struct thread_struct { | |||
247 | unsigned long tm_orig_msr; /* Thread's MSR on ctx switch */ | 247 | unsigned long tm_orig_msr; /* Thread's MSR on ctx switch */ |
248 | struct pt_regs ckpt_regs; /* Checkpointed registers */ | 248 | struct pt_regs ckpt_regs; /* Checkpointed registers */ |
249 | 249 | ||
250 | unsigned long tm_tar; | ||
251 | unsigned long tm_ppr; | ||
252 | unsigned long tm_dscr; | ||
253 | |||
250 | /* | 254 | /* |
251 | * Transactional FP and VSX 0-31 register set. | 255 | * Transactional FP and VSX 0-31 register set. |
252 | * NOTE: the sense of these is the opposite of the integer ckpt_regs! | 256 | * NOTE: the sense of these is the opposite of the integer ckpt_regs! |
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index a6840e4e24f7..99222e27f173 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h | |||
@@ -254,19 +254,28 @@ | |||
254 | #define SPRN_HRMOR 0x139 /* Real mode offset register */ | 254 | #define SPRN_HRMOR 0x139 /* Real mode offset register */ |
255 | #define SPRN_HSRR0 0x13A /* Hypervisor Save/Restore 0 */ | 255 | #define SPRN_HSRR0 0x13A /* Hypervisor Save/Restore 0 */ |
256 | #define SPRN_HSRR1 0x13B /* Hypervisor Save/Restore 1 */ | 256 | #define SPRN_HSRR1 0x13B /* Hypervisor Save/Restore 1 */ |
257 | /* HFSCR and FSCR bit numbers are the same */ | ||
258 | #define FSCR_TAR_LG 8 /* Enable Target Address Register */ | ||
259 | #define FSCR_EBB_LG 7 /* Enable Event Based Branching */ | ||
260 | #define FSCR_TM_LG 5 /* Enable Transactional Memory */ | ||
261 | #define FSCR_PM_LG 4 /* Enable prob/priv access to PMU SPRs */ | ||
262 | #define FSCR_BHRB_LG 3 /* Enable Branch History Rolling Buffer*/ | ||
263 | #define FSCR_DSCR_LG 2 /* Enable Data Stream Control Register */ | ||
264 | #define FSCR_VECVSX_LG 1 /* Enable VMX/VSX */ | ||
265 | #define FSCR_FP_LG 0 /* Enable Floating Point */ | ||
257 | #define SPRN_FSCR 0x099 /* Facility Status & Control Register */ | 266 | #define SPRN_FSCR 0x099 /* Facility Status & Control Register */ |
258 | #define FSCR_TAR (1 << (63-55)) /* Enable Target Address Register */ | 267 | #define FSCR_TAR __MASK(FSCR_TAR_LG) |
259 | #define FSCR_EBB (1 << (63-56)) /* Enable Event Based Branching */ | 268 | #define FSCR_EBB __MASK(FSCR_EBB_LG) |
260 | #define FSCR_DSCR (1 << (63-61)) /* Enable Data Stream Control Register */ | 269 | #define FSCR_DSCR __MASK(FSCR_DSCR_LG) |
261 | #define SPRN_HFSCR 0xbe /* HV=1 Facility Status & Control Register */ | 270 | #define SPRN_HFSCR 0xbe /* HV=1 Facility Status & Control Register */ |
262 | #define HFSCR_TAR (1 << (63-55)) /* Enable Target Address Register */ | 271 | #define HFSCR_TAR __MASK(FSCR_TAR_LG) |
263 | #define HFSCR_EBB (1 << (63-56)) /* Enable Event Based Branching */ | 272 | #define HFSCR_EBB __MASK(FSCR_EBB_LG) |
264 | #define HFSCR_TM (1 << (63-58)) /* Enable Transactional Memory */ | 273 | #define HFSCR_TM __MASK(FSCR_TM_LG) |
265 | #define HFSCR_PM (1 << (63-60)) /* Enable prob/priv access to PMU SPRs */ | 274 | #define HFSCR_PM __MASK(FSCR_PM_LG) |
266 | #define HFSCR_BHRB (1 << (63-59)) /* Enable Branch History Rolling Buffer*/ | 275 | #define HFSCR_BHRB __MASK(FSCR_BHRB_LG) |
267 | #define HFSCR_DSCR (1 << (63-61)) /* Enable Data Stream Control Register */ | 276 | #define HFSCR_DSCR __MASK(FSCR_DSCR_LG) |
268 | #define HFSCR_VECVSX (1 << (63-62)) /* Enable VMX/VSX */ | 277 | #define HFSCR_VECVSX __MASK(FSCR_VECVSX_LG) |
269 | #define HFSCR_FP (1 << (63-63)) /* Enable Floating Point */ | 278 | #define HFSCR_FP __MASK(FSCR_FP_LG) |
270 | #define SPRN_TAR 0x32f /* Target Address Register */ | 279 | #define SPRN_TAR 0x32f /* Target Address Register */ |
271 | #define SPRN_LPCR 0x13E /* LPAR Control Register */ | 280 | #define SPRN_LPCR 0x13E /* LPAR Control Register */ |
272 | #define LPCR_VPM0 (1ul << (63-0)) | 281 | #define LPCR_VPM0 (1ul << (63-0)) |
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h index ffbaabebcdca..48cfc858abd6 100644 --- a/arch/powerpc/include/asm/smp.h +++ b/arch/powerpc/include/asm/smp.h | |||
@@ -145,6 +145,10 @@ extern void __cpu_die(unsigned int cpu); | |||
145 | #define smp_setup_cpu_maps() | 145 | #define smp_setup_cpu_maps() |
146 | static inline void inhibit_secondary_onlining(void) {} | 146 | static inline void inhibit_secondary_onlining(void) {} |
147 | static inline void uninhibit_secondary_onlining(void) {} | 147 | static inline void uninhibit_secondary_onlining(void) {} |
148 | static inline const struct cpumask *cpu_sibling_mask(int cpu) | ||
149 | { | ||
150 | return cpumask_of(cpu); | ||
151 | } | ||
148 | 152 | ||
149 | #endif /* CONFIG_SMP */ | 153 | #endif /* CONFIG_SMP */ |
150 | 154 | ||
diff --git a/arch/powerpc/include/asm/switch_to.h b/arch/powerpc/include/asm/switch_to.h index 49a13e0ef234..294c2cedcf7a 100644 --- a/arch/powerpc/include/asm/switch_to.h +++ b/arch/powerpc/include/asm/switch_to.h | |||
@@ -15,6 +15,15 @@ extern struct task_struct *__switch_to(struct task_struct *, | |||
15 | struct thread_struct; | 15 | struct thread_struct; |
16 | extern struct task_struct *_switch(struct thread_struct *prev, | 16 | extern struct task_struct *_switch(struct thread_struct *prev, |
17 | struct thread_struct *next); | 17 | struct thread_struct *next); |
18 | #ifdef CONFIG_PPC_BOOK3S_64 | ||
19 | static inline void save_tar(struct thread_struct *prev) | ||
20 | { | ||
21 | if (cpu_has_feature(CPU_FTR_ARCH_207S)) | ||
22 | prev->tar = mfspr(SPRN_TAR); | ||
23 | } | ||
24 | #else | ||
25 | static inline void save_tar(struct thread_struct *prev) {} | ||
26 | #endif | ||
18 | 27 | ||
19 | extern void giveup_fpu(struct task_struct *); | 28 | extern void giveup_fpu(struct task_struct *); |
20 | extern void load_up_fpu(void); | 29 | extern void load_up_fpu(void); |
diff --git a/arch/powerpc/include/uapi/asm/Kbuild b/arch/powerpc/include/uapi/asm/Kbuild index 5182c8622b54..48be855ef37b 100644 --- a/arch/powerpc/include/uapi/asm/Kbuild +++ b/arch/powerpc/include/uapi/asm/Kbuild | |||
@@ -20,6 +20,7 @@ header-y += mman.h | |||
20 | header-y += msgbuf.h | 20 | header-y += msgbuf.h |
21 | header-y += nvram.h | 21 | header-y += nvram.h |
22 | header-y += param.h | 22 | header-y += param.h |
23 | header-y += perf_event.h | ||
23 | header-y += poll.h | 24 | header-y += poll.h |
24 | header-y += posix_types.h | 25 | header-y += posix_types.h |
25 | header-y += ps3fb.h | 26 | header-y += ps3fb.h |
diff --git a/arch/powerpc/include/uapi/asm/perf_event.h b/arch/powerpc/include/uapi/asm/perf_event.h new file mode 100644 index 000000000000..80a4d40cf5bc --- /dev/null +++ b/arch/powerpc/include/uapi/asm/perf_event.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * Copyright 2013 Michael Ellerman, IBM Corp. | ||
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; version 2 of the | ||
7 | * License. | ||
8 | */ | ||
9 | |||
10 | #ifndef _UAPI_ASM_POWERPC_PERF_EVENT_H | ||
11 | #define _UAPI_ASM_POWERPC_PERF_EVENT_H | ||
12 | |||
13 | /* | ||
14 | * We use bit 63 of perf_event_attr.config as a flag to request EBB. | ||
15 | */ | ||
16 | #define PERF_EVENT_CONFIG_EBB_SHIFT 63 | ||
17 | |||
18 | #endif /* _UAPI_ASM_POWERPC_PERF_EVENT_H */ | ||
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index c7e8afc2ead0..8207459efe56 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -138,6 +138,9 @@ int main(void) | |||
138 | DEFINE(THREAD_TM_TFHAR, offsetof(struct thread_struct, tm_tfhar)); | 138 | DEFINE(THREAD_TM_TFHAR, offsetof(struct thread_struct, tm_tfhar)); |
139 | DEFINE(THREAD_TM_TEXASR, offsetof(struct thread_struct, tm_texasr)); | 139 | DEFINE(THREAD_TM_TEXASR, offsetof(struct thread_struct, tm_texasr)); |
140 | DEFINE(THREAD_TM_TFIAR, offsetof(struct thread_struct, tm_tfiar)); | 140 | DEFINE(THREAD_TM_TFIAR, offsetof(struct thread_struct, tm_tfiar)); |
141 | DEFINE(THREAD_TM_TAR, offsetof(struct thread_struct, tm_tar)); | ||
142 | DEFINE(THREAD_TM_PPR, offsetof(struct thread_struct, tm_ppr)); | ||
143 | DEFINE(THREAD_TM_DSCR, offsetof(struct thread_struct, tm_dscr)); | ||
141 | DEFINE(PT_CKPT_REGS, offsetof(struct thread_struct, ckpt_regs)); | 144 | DEFINE(PT_CKPT_REGS, offsetof(struct thread_struct, ckpt_regs)); |
142 | DEFINE(THREAD_TRANSACT_VR0, offsetof(struct thread_struct, | 145 | DEFINE(THREAD_TRANSACT_VR0, offsetof(struct thread_struct, |
143 | transact_vr[0])); | 146 | transact_vr[0])); |
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index ea9414c8088d..55593ee2d5aa 100644 --- a/arch/powerpc/kernel/eeh.c +++ b/arch/powerpc/kernel/eeh.c | |||
@@ -1061,7 +1061,7 @@ static const struct file_operations proc_eeh_operations = { | |||
1061 | 1061 | ||
1062 | static int __init eeh_init_proc(void) | 1062 | static int __init eeh_init_proc(void) |
1063 | { | 1063 | { |
1064 | if (machine_is(pseries)) | 1064 | if (machine_is(pseries) || machine_is(powernv)) |
1065 | proc_create("powerpc/eeh", 0, NULL, &proc_eeh_operations); | 1065 | proc_create("powerpc/eeh", 0, NULL, &proc_eeh_operations); |
1066 | return 0; | 1066 | return 0; |
1067 | } | 1067 | } |
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index ab15b8d057ad..2bd0b885b0fe 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -449,15 +449,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_DSCR) | |||
449 | 449 | ||
450 | #ifdef CONFIG_PPC_BOOK3S_64 | 450 | #ifdef CONFIG_PPC_BOOK3S_64 |
451 | BEGIN_FTR_SECTION | 451 | BEGIN_FTR_SECTION |
452 | /* | ||
453 | * Back up the TAR across context switches. Note that the TAR is not | ||
454 | * available for use in the kernel. (To provide this, the TAR should | ||
455 | * be backed up/restored on exception entry/exit instead, and be in | ||
456 | * pt_regs. FIXME, this should be in pt_regs anyway (for debug).) | ||
457 | */ | ||
458 | mfspr r0,SPRN_TAR | ||
459 | std r0,THREAD_TAR(r3) | ||
460 | |||
461 | /* Event based branch registers */ | 452 | /* Event based branch registers */ |
462 | mfspr r0, SPRN_BESCR | 453 | mfspr r0, SPRN_BESCR |
463 | std r0, THREAD_BESCR(r3) | 454 | std r0, THREAD_BESCR(r3) |
@@ -584,9 +575,34 @@ BEGIN_FTR_SECTION | |||
584 | ld r7,DSCR_DEFAULT@toc(2) | 575 | ld r7,DSCR_DEFAULT@toc(2) |
585 | ld r0,THREAD_DSCR(r4) | 576 | ld r0,THREAD_DSCR(r4) |
586 | cmpwi r6,0 | 577 | cmpwi r6,0 |
578 | li r8, FSCR_DSCR | ||
587 | bne 1f | 579 | bne 1f |
588 | ld r0,0(r7) | 580 | ld r0,0(r7) |
589 | 1: cmpd r0,r25 | 581 | b 3f |
582 | 1: | ||
583 | BEGIN_FTR_SECTION_NESTED(70) | ||
584 | mfspr r6, SPRN_FSCR | ||
585 | or r6, r6, r8 | ||
586 | mtspr SPRN_FSCR, r6 | ||
587 | BEGIN_FTR_SECTION_NESTED(69) | ||
588 | mfspr r6, SPRN_HFSCR | ||
589 | or r6, r6, r8 | ||
590 | mtspr SPRN_HFSCR, r6 | ||
591 | END_FTR_SECTION_NESTED(CPU_FTR_HVMODE, CPU_FTR_HVMODE, 69) | ||
592 | b 4f | ||
593 | END_FTR_SECTION_NESTED(CPU_FTR_ARCH_207S, CPU_FTR_ARCH_207S, 70) | ||
594 | 3: | ||
595 | BEGIN_FTR_SECTION_NESTED(70) | ||
596 | mfspr r6, SPRN_FSCR | ||
597 | andc r6, r6, r8 | ||
598 | mtspr SPRN_FSCR, r6 | ||
599 | BEGIN_FTR_SECTION_NESTED(69) | ||
600 | mfspr r6, SPRN_HFSCR | ||
601 | andc r6, r6, r8 | ||
602 | mtspr SPRN_HFSCR, r6 | ||
603 | END_FTR_SECTION_NESTED(CPU_FTR_HVMODE, CPU_FTR_HVMODE, 69) | ||
604 | END_FTR_SECTION_NESTED(CPU_FTR_ARCH_207S, CPU_FTR_ARCH_207S, 70) | ||
605 | 4: cmpd r0,r25 | ||
590 | beq 2f | 606 | beq 2f |
591 | mtspr SPRN_DSCR,r0 | 607 | mtspr SPRN_DSCR,r0 |
592 | 2: | 608 | 2: |
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 4e00d223b2e3..902ca3c6b4b6 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S | |||
@@ -848,7 +848,7 @@ hv_facility_unavailable_relon_trampoline: | |||
848 | . = 0x4f80 | 848 | . = 0x4f80 |
849 | SET_SCRATCH0(r13) | 849 | SET_SCRATCH0(r13) |
850 | EXCEPTION_PROLOG_0(PACA_EXGEN) | 850 | EXCEPTION_PROLOG_0(PACA_EXGEN) |
851 | b facility_unavailable_relon_hv | 851 | b hv_facility_unavailable_relon_hv |
852 | 852 | ||
853 | STD_RELON_EXCEPTION_PSERIES(0x5300, 0x1300, instruction_breakpoint) | 853 | STD_RELON_EXCEPTION_PSERIES(0x5300, 0x1300, instruction_breakpoint) |
854 | #ifdef CONFIG_PPC_DENORMALISATION | 854 | #ifdef CONFIG_PPC_DENORMALISATION |
@@ -1175,6 +1175,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_VSX) | |||
1175 | b .ret_from_except | 1175 | b .ret_from_except |
1176 | 1176 | ||
1177 | STD_EXCEPTION_COMMON(0xf60, facility_unavailable, .facility_unavailable_exception) | 1177 | STD_EXCEPTION_COMMON(0xf60, facility_unavailable, .facility_unavailable_exception) |
1178 | STD_EXCEPTION_COMMON(0xf80, hv_facility_unavailable, .facility_unavailable_exception) | ||
1178 | 1179 | ||
1179 | .align 7 | 1180 | .align 7 |
1180 | .globl __end_handlers | 1181 | .globl __end_handlers |
@@ -1188,7 +1189,7 @@ __end_handlers: | |||
1188 | STD_RELON_EXCEPTION_PSERIES_OOL(0xf20, altivec_unavailable) | 1189 | STD_RELON_EXCEPTION_PSERIES_OOL(0xf20, altivec_unavailable) |
1189 | STD_RELON_EXCEPTION_PSERIES_OOL(0xf40, vsx_unavailable) | 1190 | STD_RELON_EXCEPTION_PSERIES_OOL(0xf40, vsx_unavailable) |
1190 | STD_RELON_EXCEPTION_PSERIES_OOL(0xf60, facility_unavailable) | 1191 | STD_RELON_EXCEPTION_PSERIES_OOL(0xf60, facility_unavailable) |
1191 | STD_RELON_EXCEPTION_HV_OOL(0xf80, facility_unavailable) | 1192 | STD_RELON_EXCEPTION_HV_OOL(0xf80, hv_facility_unavailable) |
1192 | 1193 | ||
1193 | #if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) | 1194 | #if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) |
1194 | /* | 1195 | /* |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 2e51cde616d2..c69440cef7af 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -362,7 +362,7 @@ int arch_show_interrupts(struct seq_file *p, int prec) | |||
362 | seq_printf(p, "%10u ", per_cpu(irq_stat, j).spurious_irqs); | 362 | seq_printf(p, "%10u ", per_cpu(irq_stat, j).spurious_irqs); |
363 | seq_printf(p, " Spurious interrupts\n"); | 363 | seq_printf(p, " Spurious interrupts\n"); |
364 | 364 | ||
365 | seq_printf(p, "%*s: ", prec, "CNT"); | 365 | seq_printf(p, "%*s: ", prec, "PMI"); |
366 | for_each_online_cpu(j) | 366 | for_each_online_cpu(j) |
367 | seq_printf(p, "%10u ", per_cpu(irq_stat, j).pmu_irqs); | 367 | seq_printf(p, "%10u ", per_cpu(irq_stat, j).pmu_irqs); |
368 | seq_printf(p, " Performance monitoring interrupts\n"); | 368 | seq_printf(p, " Performance monitoring interrupts\n"); |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index c517dbe705fd..8083be20fe5e 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -600,6 +600,16 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
600 | struct ppc64_tlb_batch *batch; | 600 | struct ppc64_tlb_batch *batch; |
601 | #endif | 601 | #endif |
602 | 602 | ||
603 | /* Back up the TAR across context switches. | ||
604 | * Note that the TAR is not available for use in the kernel. (To | ||
605 | * provide this, the TAR should be backed up/restored on exception | ||
606 | * entry/exit instead, and be in pt_regs. FIXME, this should be in | ||
607 | * pt_regs anyway (for debug).) | ||
608 | * Save the TAR here before we do treclaim/trecheckpoint as these | ||
609 | * will change the TAR. | ||
610 | */ | ||
611 | save_tar(&prev->thread); | ||
612 | |||
603 | __switch_to_tm(prev); | 613 | __switch_to_tm(prev); |
604 | 614 | ||
605 | #ifdef CONFIG_SMP | 615 | #ifdef CONFIG_SMP |
diff --git a/arch/powerpc/kernel/tm.S b/arch/powerpc/kernel/tm.S index 51be8fb24803..0554d1f6d70d 100644 --- a/arch/powerpc/kernel/tm.S +++ b/arch/powerpc/kernel/tm.S | |||
@@ -233,6 +233,16 @@ dont_backup_fp: | |||
233 | std r5, _CCR(r7) | 233 | std r5, _CCR(r7) |
234 | std r6, _XER(r7) | 234 | std r6, _XER(r7) |
235 | 235 | ||
236 | |||
237 | /* ******************** TAR, PPR, DSCR ********** */ | ||
238 | mfspr r3, SPRN_TAR | ||
239 | mfspr r4, SPRN_PPR | ||
240 | mfspr r5, SPRN_DSCR | ||
241 | |||
242 | std r3, THREAD_TM_TAR(r12) | ||
243 | std r4, THREAD_TM_PPR(r12) | ||
244 | std r5, THREAD_TM_DSCR(r12) | ||
245 | |||
236 | /* MSR and flags: We don't change CRs, and we don't need to alter | 246 | /* MSR and flags: We don't change CRs, and we don't need to alter |
237 | * MSR. | 247 | * MSR. |
238 | */ | 248 | */ |
@@ -347,6 +357,16 @@ dont_restore_fp: | |||
347 | mtmsr r6 /* FP/Vec off again! */ | 357 | mtmsr r6 /* FP/Vec off again! */ |
348 | 358 | ||
349 | restore_gprs: | 359 | restore_gprs: |
360 | |||
361 | /* ******************** TAR, PPR, DSCR ********** */ | ||
362 | ld r4, THREAD_TM_TAR(r3) | ||
363 | ld r5, THREAD_TM_PPR(r3) | ||
364 | ld r6, THREAD_TM_DSCR(r3) | ||
365 | |||
366 | mtspr SPRN_TAR, r4 | ||
367 | mtspr SPRN_PPR, r5 | ||
368 | mtspr SPRN_DSCR, r6 | ||
369 | |||
350 | /* ******************** CR,LR,CCR,MSR ********** */ | 370 | /* ******************** CR,LR,CCR,MSR ********** */ |
351 | ld r3, _CTR(r7) | 371 | ld r3, _CTR(r7) |
352 | ld r4, _LINK(r7) | 372 | ld r4, _LINK(r7) |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index bf33c22e38a4..e435bc089ea3 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -44,9 +44,7 @@ | |||
44 | #include <asm/machdep.h> | 44 | #include <asm/machdep.h> |
45 | #include <asm/rtas.h> | 45 | #include <asm/rtas.h> |
46 | #include <asm/pmc.h> | 46 | #include <asm/pmc.h> |
47 | #ifdef CONFIG_PPC32 | ||
48 | #include <asm/reg.h> | 47 | #include <asm/reg.h> |
49 | #endif | ||
50 | #ifdef CONFIG_PMAC_BACKLIGHT | 48 | #ifdef CONFIG_PMAC_BACKLIGHT |
51 | #include <asm/backlight.h> | 49 | #include <asm/backlight.h> |
52 | #endif | 50 | #endif |
@@ -1296,43 +1294,54 @@ void vsx_unavailable_exception(struct pt_regs *regs) | |||
1296 | die("Unrecoverable VSX Unavailable Exception", regs, SIGABRT); | 1294 | die("Unrecoverable VSX Unavailable Exception", regs, SIGABRT); |
1297 | } | 1295 | } |
1298 | 1296 | ||
1297 | #ifdef CONFIG_PPC64 | ||
1299 | void facility_unavailable_exception(struct pt_regs *regs) | 1298 | void facility_unavailable_exception(struct pt_regs *regs) |
1300 | { | 1299 | { |
1301 | static char *facility_strings[] = { | 1300 | static char *facility_strings[] = { |
1302 | "FPU", | 1301 | [FSCR_FP_LG] = "FPU", |
1303 | "VMX/VSX", | 1302 | [FSCR_VECVSX_LG] = "VMX/VSX", |
1304 | "DSCR", | 1303 | [FSCR_DSCR_LG] = "DSCR", |
1305 | "PMU SPRs", | 1304 | [FSCR_PM_LG] = "PMU SPRs", |
1306 | "BHRB", | 1305 | [FSCR_BHRB_LG] = "BHRB", |
1307 | "TM", | 1306 | [FSCR_TM_LG] = "TM", |
1308 | "AT", | 1307 | [FSCR_EBB_LG] = "EBB", |
1309 | "EBB", | 1308 | [FSCR_TAR_LG] = "TAR", |
1310 | "TAR", | ||
1311 | }; | 1309 | }; |
1312 | char *facility, *prefix; | 1310 | char *facility = "unknown"; |
1313 | u64 value; | 1311 | u64 value; |
1312 | u8 status; | ||
1313 | bool hv; | ||
1314 | 1314 | ||
1315 | if (regs->trap == 0xf60) { | 1315 | hv = (regs->trap == 0xf80); |
1316 | value = mfspr(SPRN_FSCR); | 1316 | if (hv) |
1317 | prefix = ""; | ||
1318 | } else { | ||
1319 | value = mfspr(SPRN_HFSCR); | 1317 | value = mfspr(SPRN_HFSCR); |
1320 | prefix = "Hypervisor "; | 1318 | else |
1319 | value = mfspr(SPRN_FSCR); | ||
1320 | |||
1321 | status = value >> 56; | ||
1322 | if (status == FSCR_DSCR_LG) { | ||
1323 | /* User is acessing the DSCR. Set the inherit bit and allow | ||
1324 | * the user to set it directly in future by setting via the | ||
1325 | * H/FSCR DSCR bit. | ||
1326 | */ | ||
1327 | current->thread.dscr_inherit = 1; | ||
1328 | if (hv) | ||
1329 | mtspr(SPRN_HFSCR, value | HFSCR_DSCR); | ||
1330 | else | ||
1331 | mtspr(SPRN_FSCR, value | FSCR_DSCR); | ||
1332 | return; | ||
1321 | } | 1333 | } |
1322 | 1334 | ||
1323 | value = value >> 56; | 1335 | if ((status < ARRAY_SIZE(facility_strings)) && |
1336 | facility_strings[status]) | ||
1337 | facility = facility_strings[status]; | ||
1324 | 1338 | ||
1325 | /* We restore the interrupt state now */ | 1339 | /* We restore the interrupt state now */ |
1326 | if (!arch_irq_disabled_regs(regs)) | 1340 | if (!arch_irq_disabled_regs(regs)) |
1327 | local_irq_enable(); | 1341 | local_irq_enable(); |
1328 | 1342 | ||
1329 | if (value < ARRAY_SIZE(facility_strings)) | ||
1330 | facility = facility_strings[value]; | ||
1331 | else | ||
1332 | facility = "unknown"; | ||
1333 | |||
1334 | pr_err("%sFacility '%s' unavailable, exception at 0x%lx, MSR=%lx\n", | 1343 | pr_err("%sFacility '%s' unavailable, exception at 0x%lx, MSR=%lx\n", |
1335 | prefix, facility, regs->nip, regs->msr); | 1344 | hv ? "Hypervisor " : "", facility, regs->nip, regs->msr); |
1336 | 1345 | ||
1337 | if (user_mode(regs)) { | 1346 | if (user_mode(regs)) { |
1338 | _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); | 1347 | _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); |
@@ -1341,6 +1350,7 @@ void facility_unavailable_exception(struct pt_regs *regs) | |||
1341 | 1350 | ||
1342 | die("Unexpected facility unavailable exception", regs, SIGABRT); | 1351 | die("Unexpected facility unavailable exception", regs, SIGABRT); |
1343 | } | 1352 | } |
1353 | #endif | ||
1344 | 1354 | ||
1345 | #ifdef CONFIG_PPC_TRANSACTIONAL_MEM | 1355 | #ifdef CONFIG_PPC_TRANSACTIONAL_MEM |
1346 | 1356 | ||
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 2efa9dde741a..7629cd3eb91a 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c | |||
@@ -1809,7 +1809,7 @@ static int kvmppc_hv_setup_htab_rma(struct kvm_vcpu *vcpu) | |||
1809 | rma_size <<= PAGE_SHIFT; | 1809 | rma_size <<= PAGE_SHIFT; |
1810 | rmls = lpcr_rmls(rma_size); | 1810 | rmls = lpcr_rmls(rma_size); |
1811 | err = -EINVAL; | 1811 | err = -EINVAL; |
1812 | if (rmls < 0) { | 1812 | if ((long)rmls < 0) { |
1813 | pr_err("KVM: Can't use RMA of 0x%lx bytes\n", rma_size); | 1813 | pr_err("KVM: Can't use RMA of 0x%lx bytes\n", rma_size); |
1814 | goto out_srcu; | 1814 | goto out_srcu; |
1815 | } | 1815 | } |
@@ -1874,7 +1874,7 @@ int kvmppc_core_init_vm(struct kvm *kvm) | |||
1874 | /* Allocate the guest's logical partition ID */ | 1874 | /* Allocate the guest's logical partition ID */ |
1875 | 1875 | ||
1876 | lpid = kvmppc_alloc_lpid(); | 1876 | lpid = kvmppc_alloc_lpid(); |
1877 | if (lpid < 0) | 1877 | if ((long)lpid < 0) |
1878 | return -ENOMEM; | 1878 | return -ENOMEM; |
1879 | kvm->arch.lpid = lpid; | 1879 | kvm->arch.lpid = lpid; |
1880 | 1880 | ||
diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index 19498a567a81..c6e13d9a9e15 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm/book3s_pr.c | |||
@@ -1047,11 +1047,12 @@ struct kvm_vcpu *kvmppc_core_vcpu_create(struct kvm *kvm, unsigned int id) | |||
1047 | if (err) | 1047 | if (err) |
1048 | goto free_shadow_vcpu; | 1048 | goto free_shadow_vcpu; |
1049 | 1049 | ||
1050 | err = -ENOMEM; | ||
1050 | p = __get_free_page(GFP_KERNEL|__GFP_ZERO); | 1051 | p = __get_free_page(GFP_KERNEL|__GFP_ZERO); |
1051 | /* the real shared page fills the last 4k of our page */ | ||
1052 | vcpu->arch.shared = (void*)(p + PAGE_SIZE - 4096); | ||
1053 | if (!p) | 1052 | if (!p) |
1054 | goto uninit_vcpu; | 1053 | goto uninit_vcpu; |
1054 | /* the real shared page fills the last 4k of our page */ | ||
1055 | vcpu->arch.shared = (void *)(p + PAGE_SIZE - 4096); | ||
1055 | 1056 | ||
1056 | #ifdef CONFIG_PPC_BOOK3S_64 | 1057 | #ifdef CONFIG_PPC_BOOK3S_64 |
1057 | /* default to book3s_64 (970fx) */ | 1058 | /* default to book3s_64 (970fx) */ |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 08397217e8ac..5850798826cd 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/seq_file.h> | 27 | #include <linux/seq_file.h> |
28 | #include <linux/uaccess.h> | 28 | #include <linux/uaccess.h> |
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include <asm/cputhreads.h> | ||
30 | #include <asm/sparsemem.h> | 31 | #include <asm/sparsemem.h> |
31 | #include <asm/prom.h> | 32 | #include <asm/prom.h> |
32 | #include <asm/smp.h> | 33 | #include <asm/smp.h> |
@@ -1318,7 +1319,8 @@ static int update_cpu_associativity_changes_mask(void) | |||
1318 | } | 1319 | } |
1319 | } | 1320 | } |
1320 | if (changed) { | 1321 | if (changed) { |
1321 | cpumask_set_cpu(cpu, changes); | 1322 | cpumask_or(changes, changes, cpu_sibling_mask(cpu)); |
1323 | cpu = cpu_last_thread_sibling(cpu); | ||
1322 | } | 1324 | } |
1323 | } | 1325 | } |
1324 | 1326 | ||
@@ -1426,7 +1428,7 @@ static int update_cpu_topology(void *data) | |||
1426 | if (!data) | 1428 | if (!data) |
1427 | return -EINVAL; | 1429 | return -EINVAL; |
1428 | 1430 | ||
1429 | cpu = get_cpu(); | 1431 | cpu = smp_processor_id(); |
1430 | 1432 | ||
1431 | for (update = data; update; update = update->next) { | 1433 | for (update = data; update; update = update->next) { |
1432 | if (cpu != update->cpu) | 1434 | if (cpu != update->cpu) |
@@ -1446,12 +1448,12 @@ static int update_cpu_topology(void *data) | |||
1446 | */ | 1448 | */ |
1447 | int arch_update_cpu_topology(void) | 1449 | int arch_update_cpu_topology(void) |
1448 | { | 1450 | { |
1449 | unsigned int cpu, changed = 0; | 1451 | unsigned int cpu, sibling, changed = 0; |
1450 | struct topology_update_data *updates, *ud; | 1452 | struct topology_update_data *updates, *ud; |
1451 | unsigned int associativity[VPHN_ASSOC_BUFSIZE] = {0}; | 1453 | unsigned int associativity[VPHN_ASSOC_BUFSIZE] = {0}; |
1452 | cpumask_t updated_cpus; | 1454 | cpumask_t updated_cpus; |
1453 | struct device *dev; | 1455 | struct device *dev; |
1454 | int weight, i = 0; | 1456 | int weight, new_nid, i = 0; |
1455 | 1457 | ||
1456 | weight = cpumask_weight(&cpu_associativity_changes_mask); | 1458 | weight = cpumask_weight(&cpu_associativity_changes_mask); |
1457 | if (!weight) | 1459 | if (!weight) |
@@ -1464,19 +1466,46 @@ int arch_update_cpu_topology(void) | |||
1464 | cpumask_clear(&updated_cpus); | 1466 | cpumask_clear(&updated_cpus); |
1465 | 1467 | ||
1466 | for_each_cpu(cpu, &cpu_associativity_changes_mask) { | 1468 | for_each_cpu(cpu, &cpu_associativity_changes_mask) { |
1467 | ud = &updates[i++]; | 1469 | /* |
1468 | ud->cpu = cpu; | 1470 | * If siblings aren't flagged for changes, updates list |
1469 | vphn_get_associativity(cpu, associativity); | 1471 | * will be too short. Skip on this update and set for next |
1470 | ud->new_nid = associativity_to_nid(associativity); | 1472 | * update. |
1471 | 1473 | */ | |
1472 | if (ud->new_nid < 0 || !node_online(ud->new_nid)) | 1474 | if (!cpumask_subset(cpu_sibling_mask(cpu), |
1473 | ud->new_nid = first_online_node; | 1475 | &cpu_associativity_changes_mask)) { |
1476 | pr_info("Sibling bits not set for associativity " | ||
1477 | "change, cpu%d\n", cpu); | ||
1478 | cpumask_or(&cpu_associativity_changes_mask, | ||
1479 | &cpu_associativity_changes_mask, | ||
1480 | cpu_sibling_mask(cpu)); | ||
1481 | cpu = cpu_last_thread_sibling(cpu); | ||
1482 | continue; | ||
1483 | } | ||
1474 | 1484 | ||
1475 | ud->old_nid = numa_cpu_lookup_table[cpu]; | 1485 | /* Use associativity from first thread for all siblings */ |
1476 | cpumask_set_cpu(cpu, &updated_cpus); | 1486 | vphn_get_associativity(cpu, associativity); |
1487 | new_nid = associativity_to_nid(associativity); | ||
1488 | if (new_nid < 0 || !node_online(new_nid)) | ||
1489 | new_nid = first_online_node; | ||
1490 | |||
1491 | if (new_nid == numa_cpu_lookup_table[cpu]) { | ||
1492 | cpumask_andnot(&cpu_associativity_changes_mask, | ||
1493 | &cpu_associativity_changes_mask, | ||
1494 | cpu_sibling_mask(cpu)); | ||
1495 | cpu = cpu_last_thread_sibling(cpu); | ||
1496 | continue; | ||
1497 | } | ||
1477 | 1498 | ||
1478 | if (i < weight) | 1499 | for_each_cpu(sibling, cpu_sibling_mask(cpu)) { |
1479 | ud->next = &updates[i]; | 1500 | ud = &updates[i++]; |
1501 | ud->cpu = sibling; | ||
1502 | ud->new_nid = new_nid; | ||
1503 | ud->old_nid = numa_cpu_lookup_table[sibling]; | ||
1504 | cpumask_set_cpu(sibling, &updated_cpus); | ||
1505 | if (i < weight) | ||
1506 | ud->next = &updates[i]; | ||
1507 | } | ||
1508 | cpu = cpu_last_thread_sibling(cpu); | ||
1480 | } | 1509 | } |
1481 | 1510 | ||
1482 | stop_machine(update_cpu_topology, &updates[0], &updated_cpus); | 1511 | stop_machine(update_cpu_topology, &updates[0], &updated_cpus); |
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c index 24a45f91c65f..eeae308cf982 100644 --- a/arch/powerpc/perf/core-book3s.c +++ b/arch/powerpc/perf/core-book3s.c | |||
@@ -484,7 +484,7 @@ static bool is_ebb_event(struct perf_event *event) | |||
484 | * use bit 63 of the event code for something else if they wish. | 484 | * use bit 63 of the event code for something else if they wish. |
485 | */ | 485 | */ |
486 | return (ppmu->flags & PPMU_EBB) && | 486 | return (ppmu->flags & PPMU_EBB) && |
487 | ((event->attr.config >> EVENT_CONFIG_EBB_SHIFT) & 1); | 487 | ((event->attr.config >> PERF_EVENT_CONFIG_EBB_SHIFT) & 1); |
488 | } | 488 | } |
489 | 489 | ||
490 | static int ebb_event_check(struct perf_event *event) | 490 | static int ebb_event_check(struct perf_event *event) |
diff --git a/arch/powerpc/perf/power8-pmu.c b/arch/powerpc/perf/power8-pmu.c index 7466374d2787..2ee4a707f0df 100644 --- a/arch/powerpc/perf/power8-pmu.c +++ b/arch/powerpc/perf/power8-pmu.c | |||
@@ -118,7 +118,7 @@ | |||
118 | (EVENT_UNIT_MASK << EVENT_UNIT_SHIFT) | \ | 118 | (EVENT_UNIT_MASK << EVENT_UNIT_SHIFT) | \ |
119 | (EVENT_COMBINE_MASK << EVENT_COMBINE_SHIFT) | \ | 119 | (EVENT_COMBINE_MASK << EVENT_COMBINE_SHIFT) | \ |
120 | (EVENT_MARKED_MASK << EVENT_MARKED_SHIFT) | \ | 120 | (EVENT_MARKED_MASK << EVENT_MARKED_SHIFT) | \ |
121 | (EVENT_EBB_MASK << EVENT_CONFIG_EBB_SHIFT) | \ | 121 | (EVENT_EBB_MASK << PERF_EVENT_CONFIG_EBB_SHIFT) | \ |
122 | EVENT_PSEL_MASK) | 122 | EVENT_PSEL_MASK) |
123 | 123 | ||
124 | /* MMCRA IFM bits - POWER8 */ | 124 | /* MMCRA IFM bits - POWER8 */ |
@@ -233,10 +233,10 @@ static int power8_get_constraint(u64 event, unsigned long *maskp, unsigned long | |||
233 | pmc = (event >> EVENT_PMC_SHIFT) & EVENT_PMC_MASK; | 233 | pmc = (event >> EVENT_PMC_SHIFT) & EVENT_PMC_MASK; |
234 | unit = (event >> EVENT_UNIT_SHIFT) & EVENT_UNIT_MASK; | 234 | unit = (event >> EVENT_UNIT_SHIFT) & EVENT_UNIT_MASK; |
235 | cache = (event >> EVENT_CACHE_SEL_SHIFT) & EVENT_CACHE_SEL_MASK; | 235 | cache = (event >> EVENT_CACHE_SEL_SHIFT) & EVENT_CACHE_SEL_MASK; |
236 | ebb = (event >> EVENT_CONFIG_EBB_SHIFT) & EVENT_EBB_MASK; | 236 | ebb = (event >> PERF_EVENT_CONFIG_EBB_SHIFT) & EVENT_EBB_MASK; |
237 | 237 | ||
238 | /* Clear the EBB bit in the event, so event checks work below */ | 238 | /* Clear the EBB bit in the event, so event checks work below */ |
239 | event &= ~(EVENT_EBB_MASK << EVENT_CONFIG_EBB_SHIFT); | 239 | event &= ~(EVENT_EBB_MASK << PERF_EVENT_CONFIG_EBB_SHIFT); |
240 | 240 | ||
241 | if (pmc) { | 241 | if (pmc) { |
242 | if (pmc > 6) | 242 | if (pmc > 6) |
diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c index 9f8671a44551..6a5f2b1f32ca 100644 --- a/arch/powerpc/platforms/pseries/nvram.c +++ b/arch/powerpc/platforms/pseries/nvram.c | |||
@@ -569,35 +569,6 @@ error: | |||
569 | return ret; | 569 | return ret; |
570 | } | 570 | } |
571 | 571 | ||
572 | static int unzip_oops(char *oops_buf, char *big_buf) | ||
573 | { | ||
574 | struct oops_log_info *oops_hdr = (struct oops_log_info *)oops_buf; | ||
575 | u64 timestamp = oops_hdr->timestamp; | ||
576 | char *big_oops_data = NULL; | ||
577 | char *oops_data_buf = NULL; | ||
578 | size_t big_oops_data_sz; | ||
579 | int unzipped_len; | ||
580 | |||
581 | big_oops_data = big_buf + sizeof(struct oops_log_info); | ||
582 | big_oops_data_sz = big_oops_buf_sz - sizeof(struct oops_log_info); | ||
583 | oops_data_buf = oops_buf + sizeof(struct oops_log_info); | ||
584 | |||
585 | unzipped_len = nvram_decompress(oops_data_buf, big_oops_data, | ||
586 | oops_hdr->report_length, | ||
587 | big_oops_data_sz); | ||
588 | |||
589 | if (unzipped_len < 0) { | ||
590 | pr_err("nvram: decompression failed; returned %d\n", | ||
591 | unzipped_len); | ||
592 | return -1; | ||
593 | } | ||
594 | oops_hdr = (struct oops_log_info *)big_buf; | ||
595 | oops_hdr->version = OOPS_HDR_VERSION; | ||
596 | oops_hdr->report_length = (u16) unzipped_len; | ||
597 | oops_hdr->timestamp = timestamp; | ||
598 | return 0; | ||
599 | } | ||
600 | |||
601 | static int nvram_pstore_open(struct pstore_info *psi) | 572 | static int nvram_pstore_open(struct pstore_info *psi) |
602 | { | 573 | { |
603 | /* Reset the iterator to start reading partitions again */ | 574 | /* Reset the iterator to start reading partitions again */ |
@@ -685,10 +656,9 @@ static ssize_t nvram_pstore_read(u64 *id, enum pstore_type_id *type, | |||
685 | unsigned int err_type, id_no, size = 0; | 656 | unsigned int err_type, id_no, size = 0; |
686 | struct nvram_os_partition *part = NULL; | 657 | struct nvram_os_partition *part = NULL; |
687 | char *buff = NULL, *big_buff = NULL; | 658 | char *buff = NULL, *big_buff = NULL; |
688 | int rc, sig = 0; | 659 | int sig = 0; |
689 | loff_t p; | 660 | loff_t p; |
690 | 661 | ||
691 | read_partition: | ||
692 | read_type++; | 662 | read_type++; |
693 | 663 | ||
694 | switch (nvram_type_ids[read_type]) { | 664 | switch (nvram_type_ids[read_type]) { |
@@ -749,30 +719,46 @@ read_partition: | |||
749 | *id = id_no; | 719 | *id = id_no; |
750 | 720 | ||
751 | if (nvram_type_ids[read_type] == PSTORE_TYPE_DMESG) { | 721 | if (nvram_type_ids[read_type] == PSTORE_TYPE_DMESG) { |
722 | int length, unzipped_len; | ||
723 | size_t hdr_size; | ||
724 | |||
752 | oops_hdr = (struct oops_log_info *)buff; | 725 | oops_hdr = (struct oops_log_info *)buff; |
753 | *buf = buff + sizeof(*oops_hdr); | 726 | if (oops_hdr->version < OOPS_HDR_VERSION) { |
727 | /* Old format oops header had 2-byte record size */ | ||
728 | hdr_size = sizeof(u16); | ||
729 | length = oops_hdr->version; | ||
730 | time->tv_sec = 0; | ||
731 | time->tv_nsec = 0; | ||
732 | } else { | ||
733 | hdr_size = sizeof(*oops_hdr); | ||
734 | length = oops_hdr->report_length; | ||
735 | time->tv_sec = oops_hdr->timestamp; | ||
736 | time->tv_nsec = 0; | ||
737 | } | ||
738 | *buf = kmalloc(length, GFP_KERNEL); | ||
739 | if (*buf == NULL) | ||
740 | return -ENOMEM; | ||
741 | memcpy(*buf, buff + hdr_size, length); | ||
742 | kfree(buff); | ||
754 | 743 | ||
755 | if (err_type == ERR_TYPE_KERNEL_PANIC_GZ) { | 744 | if (err_type == ERR_TYPE_KERNEL_PANIC_GZ) { |
756 | big_buff = kmalloc(big_oops_buf_sz, GFP_KERNEL); | 745 | big_buff = kmalloc(big_oops_buf_sz, GFP_KERNEL); |
757 | if (!big_buff) | 746 | if (!big_buff) |
758 | return -ENOMEM; | 747 | return -ENOMEM; |
759 | 748 | ||
760 | rc = unzip_oops(buff, big_buff); | 749 | unzipped_len = nvram_decompress(*buf, big_buff, |
750 | length, big_oops_buf_sz); | ||
761 | 751 | ||
762 | if (rc != 0) { | 752 | if (unzipped_len < 0) { |
763 | kfree(buff); | 753 | pr_err("nvram: decompression failed, returned " |
754 | "rc %d\n", unzipped_len); | ||
764 | kfree(big_buff); | 755 | kfree(big_buff); |
765 | goto read_partition; | 756 | } else { |
757 | *buf = big_buff; | ||
758 | length = unzipped_len; | ||
766 | } | 759 | } |
767 | |||
768 | oops_hdr = (struct oops_log_info *)big_buff; | ||
769 | *buf = big_buff + sizeof(*oops_hdr); | ||
770 | kfree(buff); | ||
771 | } | 760 | } |
772 | 761 | return length; | |
773 | time->tv_sec = oops_hdr->timestamp; | ||
774 | time->tv_nsec = 0; | ||
775 | return oops_hdr->report_length; | ||
776 | } | 762 | } |
777 | 763 | ||
778 | *buf = buff; | 764 | *buf = buff; |
@@ -816,6 +802,7 @@ static int nvram_pstore_init(void) | |||
816 | static void __init nvram_init_oops_partition(int rtas_partition_exists) | 802 | static void __init nvram_init_oops_partition(int rtas_partition_exists) |
817 | { | 803 | { |
818 | int rc; | 804 | int rc; |
805 | size_t size; | ||
819 | 806 | ||
820 | rc = pseries_nvram_init_os_partition(&oops_log_partition); | 807 | rc = pseries_nvram_init_os_partition(&oops_log_partition); |
821 | if (rc != 0) { | 808 | if (rc != 0) { |
@@ -844,8 +831,9 @@ static void __init nvram_init_oops_partition(int rtas_partition_exists) | |||
844 | big_oops_buf_sz = (oops_data_sz * 100) / 45; | 831 | big_oops_buf_sz = (oops_data_sz * 100) / 45; |
845 | big_oops_buf = kmalloc(big_oops_buf_sz, GFP_KERNEL); | 832 | big_oops_buf = kmalloc(big_oops_buf_sz, GFP_KERNEL); |
846 | if (big_oops_buf) { | 833 | if (big_oops_buf) { |
847 | stream.workspace = kmalloc(zlib_deflate_workspacesize( | 834 | size = max(zlib_deflate_workspacesize(WINDOW_BITS, MEM_LEVEL), |
848 | WINDOW_BITS, MEM_LEVEL), GFP_KERNEL); | 835 | zlib_inflate_workspacesize()); |
836 | stream.workspace = kmalloc(size, GFP_KERNEL); | ||
849 | if (!stream.workspace) { | 837 | if (!stream.workspace) { |
850 | pr_err("nvram: No memory for compression workspace; " | 838 | pr_err("nvram: No memory for compression workspace; " |
851 | "skipping compression of %s partition data\n", | 839 | "skipping compression of %s partition data\n", |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 22f75b504f7f..8a4cae78f03c 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -118,6 +118,7 @@ config S390 | |||
118 | select HAVE_FUNCTION_TRACE_MCOUNT_TEST | 118 | select HAVE_FUNCTION_TRACE_MCOUNT_TEST |
119 | select HAVE_KERNEL_BZIP2 | 119 | select HAVE_KERNEL_BZIP2 |
120 | select HAVE_KERNEL_GZIP | 120 | select HAVE_KERNEL_GZIP |
121 | select HAVE_KERNEL_LZ4 | ||
121 | select HAVE_KERNEL_LZMA | 122 | select HAVE_KERNEL_LZMA |
122 | select HAVE_KERNEL_LZO | 123 | select HAVE_KERNEL_LZO |
123 | select HAVE_KERNEL_XZ | 124 | select HAVE_KERNEL_XZ |
@@ -227,11 +228,12 @@ config MARCH_Z196 | |||
227 | not work on older machines. | 228 | not work on older machines. |
228 | 229 | ||
229 | config MARCH_ZEC12 | 230 | config MARCH_ZEC12 |
230 | bool "IBM zEC12" | 231 | bool "IBM zBC12 and zEC12" |
231 | select HAVE_MARCH_ZEC12_FEATURES if 64BIT | 232 | select HAVE_MARCH_ZEC12_FEATURES if 64BIT |
232 | help | 233 | help |
233 | Select this to enable optimizations for IBM zEC12 (2827 series). The | 234 | Select this to enable optimizations for IBM zBC12 and zEC12 (2828 and |
234 | kernel will be slightly faster but will not work on older machines. | 235 | 2827 series). The kernel will be slightly faster but will not work on |
236 | older machines. | ||
235 | 237 | ||
236 | endchoice | 238 | endchoice |
237 | 239 | ||
@@ -709,6 +711,7 @@ config S390_GUEST | |||
709 | def_bool y | 711 | def_bool y |
710 | prompt "s390 support for virtio devices" | 712 | prompt "s390 support for virtio devices" |
711 | depends on 64BIT | 713 | depends on 64BIT |
714 | select TTY | ||
712 | select VIRTUALIZATION | 715 | select VIRTUALIZATION |
713 | select VIRTIO | 716 | select VIRTIO |
714 | select VIRTIO_CONSOLE | 717 | select VIRTIO_CONSOLE |
diff --git a/arch/s390/boot/compressed/Makefile b/arch/s390/boot/compressed/Makefile index 3ad8f61c9985..866ecbe670e4 100644 --- a/arch/s390/boot/compressed/Makefile +++ b/arch/s390/boot/compressed/Makefile | |||
@@ -6,9 +6,9 @@ | |||
6 | 6 | ||
7 | BITS := $(if $(CONFIG_64BIT),64,31) | 7 | BITS := $(if $(CONFIG_64BIT),64,31) |
8 | 8 | ||
9 | targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \ | 9 | targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 |
10 | vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo misc.o piggy.o \ | 10 | targets += vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.lz4 |
11 | sizes.h head$(BITS).o | 11 | targets += misc.o piggy.o sizes.h head$(BITS).o |
12 | 12 | ||
13 | KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 | 13 | KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 |
14 | KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING | 14 | KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING |
@@ -48,6 +48,7 @@ vmlinux.bin.all-y := $(obj)/vmlinux.bin | |||
48 | 48 | ||
49 | suffix-$(CONFIG_KERNEL_GZIP) := gz | 49 | suffix-$(CONFIG_KERNEL_GZIP) := gz |
50 | suffix-$(CONFIG_KERNEL_BZIP2) := bz2 | 50 | suffix-$(CONFIG_KERNEL_BZIP2) := bz2 |
51 | suffix-$(CONFIG_KERNEL_LZ4) := lz4 | ||
51 | suffix-$(CONFIG_KERNEL_LZMA) := lzma | 52 | suffix-$(CONFIG_KERNEL_LZMA) := lzma |
52 | suffix-$(CONFIG_KERNEL_LZO) := lzo | 53 | suffix-$(CONFIG_KERNEL_LZO) := lzo |
53 | suffix-$(CONFIG_KERNEL_XZ) := xz | 54 | suffix-$(CONFIG_KERNEL_XZ) := xz |
@@ -56,6 +57,8 @@ $(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) | |||
56 | $(call if_changed,gzip) | 57 | $(call if_changed,gzip) |
57 | $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) | 58 | $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) |
58 | $(call if_changed,bzip2) | 59 | $(call if_changed,bzip2) |
60 | $(obj)/vmlinux.bin.lz4: $(vmlinux.bin.all-y) | ||
61 | $(call if_changed,lz4) | ||
59 | $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) | 62 | $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) |
60 | $(call if_changed,lzma) | 63 | $(call if_changed,lzma) |
61 | $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) | 64 | $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) |
diff --git a/arch/s390/boot/compressed/misc.c b/arch/s390/boot/compressed/misc.c index c4c6a1cf221b..57cbaff1f397 100644 --- a/arch/s390/boot/compressed/misc.c +++ b/arch/s390/boot/compressed/misc.c | |||
@@ -47,6 +47,10 @@ static unsigned long free_mem_end_ptr; | |||
47 | #include "../../../../lib/decompress_bunzip2.c" | 47 | #include "../../../../lib/decompress_bunzip2.c" |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | #ifdef CONFIG_KERNEL_LZ4 | ||
51 | #include "../../../../lib/decompress_unlz4.c" | ||
52 | #endif | ||
53 | |||
50 | #ifdef CONFIG_KERNEL_LZMA | 54 | #ifdef CONFIG_KERNEL_LZMA |
51 | #include "../../../../lib/decompress_unlzma.c" | 55 | #include "../../../../lib/decompress_unlzma.c" |
52 | #endif | 56 | #endif |
diff --git a/arch/s390/include/asm/bitops.h b/arch/s390/include/asm/bitops.h index 4d8604e311f3..7d4676758733 100644 --- a/arch/s390/include/asm/bitops.h +++ b/arch/s390/include/asm/bitops.h | |||
@@ -693,7 +693,7 @@ static inline int find_next_bit_left(const unsigned long *addr, | |||
693 | size -= offset; | 693 | size -= offset; |
694 | p = addr + offset / BITS_PER_LONG; | 694 | p = addr + offset / BITS_PER_LONG; |
695 | if (bit) { | 695 | if (bit) { |
696 | set = __flo_word(0, *p & (~0UL << bit)); | 696 | set = __flo_word(0, *p & (~0UL >> bit)); |
697 | if (set >= size) | 697 | if (set >= size) |
698 | return size + offset; | 698 | return size + offset; |
699 | if (set < BITS_PER_LONG) | 699 | if (set < BITS_PER_LONG) |
diff --git a/arch/s390/include/asm/tlb.h b/arch/s390/include/asm/tlb.h index b75d7d686684..6d6d92b4ea11 100644 --- a/arch/s390/include/asm/tlb.h +++ b/arch/s390/include/asm/tlb.h | |||
@@ -32,6 +32,7 @@ struct mmu_gather { | |||
32 | struct mm_struct *mm; | 32 | struct mm_struct *mm; |
33 | struct mmu_table_batch *batch; | 33 | struct mmu_table_batch *batch; |
34 | unsigned int fullmm; | 34 | unsigned int fullmm; |
35 | unsigned long start, end; | ||
35 | }; | 36 | }; |
36 | 37 | ||
37 | struct mmu_table_batch { | 38 | struct mmu_table_batch { |
@@ -48,10 +49,13 @@ extern void tlb_remove_table(struct mmu_gather *tlb, void *table); | |||
48 | 49 | ||
49 | static inline void tlb_gather_mmu(struct mmu_gather *tlb, | 50 | static inline void tlb_gather_mmu(struct mmu_gather *tlb, |
50 | struct mm_struct *mm, | 51 | struct mm_struct *mm, |
51 | unsigned int full_mm_flush) | 52 | unsigned long start, |
53 | unsigned long end) | ||
52 | { | 54 | { |
53 | tlb->mm = mm; | 55 | tlb->mm = mm; |
54 | tlb->fullmm = full_mm_flush; | 56 | tlb->start = start; |
57 | tlb->end = end; | ||
58 | tlb->fullmm = !(start | (end+1)); | ||
55 | tlb->batch = NULL; | 59 | tlb->batch = NULL; |
56 | if (tlb->fullmm) | 60 | if (tlb->fullmm) |
57 | __tlb_flush_mm(mm); | 61 | __tlb_flush_mm(mm); |
diff --git a/arch/s390/kernel/perf_event.c b/arch/s390/kernel/perf_event.c index a6fc037671b1..500aa1029bcb 100644 --- a/arch/s390/kernel/perf_event.c +++ b/arch/s390/kernel/perf_event.c | |||
@@ -52,12 +52,13 @@ static struct kvm_s390_sie_block *sie_block(struct pt_regs *regs) | |||
52 | 52 | ||
53 | static bool is_in_guest(struct pt_regs *regs) | 53 | static bool is_in_guest(struct pt_regs *regs) |
54 | { | 54 | { |
55 | unsigned long ip = instruction_pointer(regs); | ||
56 | |||
57 | if (user_mode(regs)) | 55 | if (user_mode(regs)) |
58 | return false; | 56 | return false; |
59 | 57 | #if defined(CONFIG_KVM) || defined(CONFIG_KVM_MODULE) | |
60 | return ip == (unsigned long) &sie_exit; | 58 | return instruction_pointer(regs) == (unsigned long) &sie_exit; |
59 | #else | ||
60 | return false; | ||
61 | #endif | ||
61 | } | 62 | } |
62 | 63 | ||
63 | static unsigned long guest_is_user_mode(struct pt_regs *regs) | 64 | static unsigned long guest_is_user_mode(struct pt_regs *regs) |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 497451ec5e26..aeed8a61fa0d 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -994,6 +994,7 @@ static void __init setup_hwcaps(void) | |||
994 | strcpy(elf_platform, "z196"); | 994 | strcpy(elf_platform, "z196"); |
995 | break; | 995 | break; |
996 | case 0x2827: | 996 | case 0x2827: |
997 | case 0x2828: | ||
997 | strcpy(elf_platform, "zEC12"); | 998 | strcpy(elf_platform, "zEC12"); |
998 | break; | 999 | break; |
999 | } | 1000 | } |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index ba694d2ba51e..34c1c9a90be2 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -702,14 +702,25 @@ static int __vcpu_run(struct kvm_vcpu *vcpu) | |||
702 | return rc; | 702 | return rc; |
703 | 703 | ||
704 | vcpu->arch.sie_block->icptcode = 0; | 704 | vcpu->arch.sie_block->icptcode = 0; |
705 | preempt_disable(); | ||
706 | kvm_guest_enter(); | ||
707 | preempt_enable(); | ||
708 | VCPU_EVENT(vcpu, 6, "entering sie flags %x", | 705 | VCPU_EVENT(vcpu, 6, "entering sie flags %x", |
709 | atomic_read(&vcpu->arch.sie_block->cpuflags)); | 706 | atomic_read(&vcpu->arch.sie_block->cpuflags)); |
710 | trace_kvm_s390_sie_enter(vcpu, | 707 | trace_kvm_s390_sie_enter(vcpu, |
711 | atomic_read(&vcpu->arch.sie_block->cpuflags)); | 708 | atomic_read(&vcpu->arch.sie_block->cpuflags)); |
709 | |||
710 | /* | ||
711 | * As PF_VCPU will be used in fault handler, between guest_enter | ||
712 | * and guest_exit should be no uaccess. | ||
713 | */ | ||
714 | preempt_disable(); | ||
715 | kvm_guest_enter(); | ||
716 | preempt_enable(); | ||
712 | rc = sie64a(vcpu->arch.sie_block, vcpu->run->s.regs.gprs); | 717 | rc = sie64a(vcpu->arch.sie_block, vcpu->run->s.regs.gprs); |
718 | kvm_guest_exit(); | ||
719 | |||
720 | VCPU_EVENT(vcpu, 6, "exit sie icptcode %d", | ||
721 | vcpu->arch.sie_block->icptcode); | ||
722 | trace_kvm_s390_sie_exit(vcpu, vcpu->arch.sie_block->icptcode); | ||
723 | |||
713 | if (rc > 0) | 724 | if (rc > 0) |
714 | rc = 0; | 725 | rc = 0; |
715 | if (rc < 0) { | 726 | if (rc < 0) { |
@@ -721,10 +732,6 @@ static int __vcpu_run(struct kvm_vcpu *vcpu) | |||
721 | rc = kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); | 732 | rc = kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); |
722 | } | 733 | } |
723 | } | 734 | } |
724 | VCPU_EVENT(vcpu, 6, "exit sie icptcode %d", | ||
725 | vcpu->arch.sie_block->icptcode); | ||
726 | trace_kvm_s390_sie_exit(vcpu, vcpu->arch.sie_block->icptcode); | ||
727 | kvm_guest_exit(); | ||
728 | 735 | ||
729 | memcpy(&vcpu->run->s.regs.gprs[14], &vcpu->arch.sie_block->gg14, 16); | 736 | memcpy(&vcpu->run->s.regs.gprs[14], &vcpu->arch.sie_block->gg14, 16); |
730 | return rc; | 737 | return rc; |
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 0da3e6eb6be6..4cdc54e63ebc 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/compat.h> | 17 | #include <linux/compat.h> |
18 | #include <asm/asm-offsets.h> | 18 | #include <asm/asm-offsets.h> |
19 | #include <asm/facility.h> | ||
19 | #include <asm/current.h> | 20 | #include <asm/current.h> |
20 | #include <asm/debug.h> | 21 | #include <asm/debug.h> |
21 | #include <asm/ebcdic.h> | 22 | #include <asm/ebcdic.h> |
@@ -532,8 +533,7 @@ static int handle_pfmf(struct kvm_vcpu *vcpu) | |||
532 | return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); | 533 | return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); |
533 | 534 | ||
534 | /* Only provide non-quiescing support if the host supports it */ | 535 | /* Only provide non-quiescing support if the host supports it */ |
535 | if (vcpu->run->s.regs.gprs[reg1] & PFMF_NQ && | 536 | if (vcpu->run->s.regs.gprs[reg1] & PFMF_NQ && !test_facility(14)) |
536 | S390_lowcore.stfl_fac_list & 0x00020000) | ||
537 | return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); | 537 | return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); |
538 | 538 | ||
539 | /* No support for conditional-SSKE */ | 539 | /* No support for conditional-SSKE */ |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index ce36ea80e4f9..ad446b0c55b6 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -69,6 +69,7 @@ static void __init setup_zero_pages(void) | |||
69 | order = 2; | 69 | order = 2; |
70 | break; | 70 | break; |
71 | case 0x2827: /* zEC12 */ | 71 | case 0x2827: /* zEC12 */ |
72 | case 0x2828: /* zEC12 */ | ||
72 | default: | 73 | default: |
73 | order = 5; | 74 | order = 5; |
74 | break; | 75 | break; |
diff --git a/arch/s390/oprofile/init.c b/arch/s390/oprofile/init.c index ffeb17ce7f31..930783d2c99b 100644 --- a/arch/s390/oprofile/init.c +++ b/arch/s390/oprofile/init.c | |||
@@ -440,7 +440,7 @@ static int oprofile_hwsampler_init(struct oprofile_operations *ops) | |||
440 | switch (id.machine) { | 440 | switch (id.machine) { |
441 | case 0x2097: case 0x2098: ops->cpu_type = "s390/z10"; break; | 441 | case 0x2097: case 0x2098: ops->cpu_type = "s390/z10"; break; |
442 | case 0x2817: case 0x2818: ops->cpu_type = "s390/z196"; break; | 442 | case 0x2817: case 0x2818: ops->cpu_type = "s390/z196"; break; |
443 | case 0x2827: ops->cpu_type = "s390/zEC12"; break; | 443 | case 0x2827: case 0x2828: ops->cpu_type = "s390/zEC12"; break; |
444 | default: return -ENODEV; | 444 | default: return -ENODEV; |
445 | } | 445 | } |
446 | } | 446 | } |
diff --git a/arch/score/Kconfig b/arch/score/Kconfig index c8def8bc9020..5fc237581caf 100644 --- a/arch/score/Kconfig +++ b/arch/score/Kconfig | |||
@@ -87,6 +87,8 @@ config STACKTRACE_SUPPORT | |||
87 | 87 | ||
88 | source "init/Kconfig" | 88 | source "init/Kconfig" |
89 | 89 | ||
90 | source "kernel/Kconfig.freezer" | ||
91 | |||
90 | config MMU | 92 | config MMU |
91 | def_bool y | 93 | def_bool y |
92 | 94 | ||
diff --git a/arch/sh/configs/sh03_defconfig b/arch/sh/configs/sh03_defconfig index 2051821724c6..0cf4097b71e8 100644 --- a/arch/sh/configs/sh03_defconfig +++ b/arch/sh/configs/sh03_defconfig | |||
@@ -22,7 +22,7 @@ CONFIG_PREEMPT=y | |||
22 | CONFIG_CMDLINE_OVERWRITE=y | 22 | CONFIG_CMDLINE_OVERWRITE=y |
23 | CONFIG_CMDLINE="console=ttySC1,115200 mem=64M root=/dev/nfs" | 23 | CONFIG_CMDLINE="console=ttySC1,115200 mem=64M root=/dev/nfs" |
24 | CONFIG_PCI=y | 24 | CONFIG_PCI=y |
25 | CONFIG_HOTPLUG_PCI=m | 25 | CONFIG_HOTPLUG_PCI=y |
26 | CONFIG_BINFMT_MISC=y | 26 | CONFIG_BINFMT_MISC=y |
27 | CONFIG_NET=y | 27 | CONFIG_NET=y |
28 | CONFIG_PACKET=y | 28 | CONFIG_PACKET=y |
diff --git a/arch/sh/include/asm/tlb.h b/arch/sh/include/asm/tlb.h index e61d43d9f689..362192ed12fe 100644 --- a/arch/sh/include/asm/tlb.h +++ b/arch/sh/include/asm/tlb.h | |||
@@ -36,10 +36,12 @@ static inline void init_tlb_gather(struct mmu_gather *tlb) | |||
36 | } | 36 | } |
37 | 37 | ||
38 | static inline void | 38 | static inline void |
39 | tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned int full_mm_flush) | 39 | tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start, unsigned long end) |
40 | { | 40 | { |
41 | tlb->mm = mm; | 41 | tlb->mm = mm; |
42 | tlb->fullmm = full_mm_flush; | 42 | tlb->start = start; |
43 | tlb->end = end; | ||
44 | tlb->fullmm = !(start | (end+1)); | ||
43 | 45 | ||
44 | init_tlb_gather(tlb); | 46 | init_tlb_gather(tlb); |
45 | } | 47 | } |
diff --git a/arch/um/include/asm/tlb.h b/arch/um/include/asm/tlb.h index 4febacd1a8a1..29b0301c18aa 100644 --- a/arch/um/include/asm/tlb.h +++ b/arch/um/include/asm/tlb.h | |||
@@ -45,10 +45,12 @@ static inline void init_tlb_gather(struct mmu_gather *tlb) | |||
45 | } | 45 | } |
46 | 46 | ||
47 | static inline void | 47 | static inline void |
48 | tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned int full_mm_flush) | 48 | tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start, unsigned long end) |
49 | { | 49 | { |
50 | tlb->mm = mm; | 50 | tlb->mm = mm; |
51 | tlb->fullmm = full_mm_flush; | 51 | tlb->start = start; |
52 | tlb->end = end; | ||
53 | tlb->fullmm = !(start | (end+1)); | ||
52 | 54 | ||
53 | init_tlb_gather(tlb); | 55 | init_tlb_gather(tlb); |
54 | } | 56 | } |
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index d606463aa6d6..b7388a425f09 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c | |||
@@ -225,7 +225,7 @@ static void low_free(unsigned long size, unsigned long addr) | |||
225 | unsigned long nr_pages; | 225 | unsigned long nr_pages; |
226 | 226 | ||
227 | nr_pages = round_up(size, EFI_PAGE_SIZE) / EFI_PAGE_SIZE; | 227 | nr_pages = round_up(size, EFI_PAGE_SIZE) / EFI_PAGE_SIZE; |
228 | efi_call_phys2(sys_table->boottime->free_pages, addr, size); | 228 | efi_call_phys2(sys_table->boottime->free_pages, addr, nr_pages); |
229 | } | 229 | } |
230 | 230 | ||
231 | static void find_bits(unsigned long mask, u8 *pos, u8 *size) | 231 | static void find_bits(unsigned long mask, u8 *pos, u8 *size) |
diff --git a/arch/x86/include/asm/pgtable-2level.h b/arch/x86/include/asm/pgtable-2level.h index f2b489cf1602..3bf2dd0cf61f 100644 --- a/arch/x86/include/asm/pgtable-2level.h +++ b/arch/x86/include/asm/pgtable-2level.h | |||
@@ -55,9 +55,53 @@ static inline pmd_t native_pmdp_get_and_clear(pmd_t *xp) | |||
55 | #define native_pmdp_get_and_clear(xp) native_local_pmdp_get_and_clear(xp) | 55 | #define native_pmdp_get_and_clear(xp) native_local_pmdp_get_and_clear(xp) |
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | #ifdef CONFIG_MEM_SOFT_DIRTY | ||
59 | |||
60 | /* | ||
61 | * Bits _PAGE_BIT_PRESENT, _PAGE_BIT_FILE, _PAGE_BIT_SOFT_DIRTY and | ||
62 | * _PAGE_BIT_PROTNONE are taken, split up the 28 bits of offset | ||
63 | * into this range. | ||
64 | */ | ||
65 | #define PTE_FILE_MAX_BITS 28 | ||
66 | #define PTE_FILE_SHIFT1 (_PAGE_BIT_PRESENT + 1) | ||
67 | #define PTE_FILE_SHIFT2 (_PAGE_BIT_FILE + 1) | ||
68 | #define PTE_FILE_SHIFT3 (_PAGE_BIT_PROTNONE + 1) | ||
69 | #define PTE_FILE_SHIFT4 (_PAGE_BIT_SOFT_DIRTY + 1) | ||
70 | #define PTE_FILE_BITS1 (PTE_FILE_SHIFT2 - PTE_FILE_SHIFT1 - 1) | ||
71 | #define PTE_FILE_BITS2 (PTE_FILE_SHIFT3 - PTE_FILE_SHIFT2 - 1) | ||
72 | #define PTE_FILE_BITS3 (PTE_FILE_SHIFT4 - PTE_FILE_SHIFT3 - 1) | ||
73 | |||
74 | #define pte_to_pgoff(pte) \ | ||
75 | ((((pte).pte_low >> (PTE_FILE_SHIFT1)) \ | ||
76 | & ((1U << PTE_FILE_BITS1) - 1))) \ | ||
77 | + ((((pte).pte_low >> (PTE_FILE_SHIFT2)) \ | ||
78 | & ((1U << PTE_FILE_BITS2) - 1)) \ | ||
79 | << (PTE_FILE_BITS1)) \ | ||
80 | + ((((pte).pte_low >> (PTE_FILE_SHIFT3)) \ | ||
81 | & ((1U << PTE_FILE_BITS3) - 1)) \ | ||
82 | << (PTE_FILE_BITS1 + PTE_FILE_BITS2)) \ | ||
83 | + ((((pte).pte_low >> (PTE_FILE_SHIFT4))) \ | ||
84 | << (PTE_FILE_BITS1 + PTE_FILE_BITS2 + PTE_FILE_BITS3)) | ||
85 | |||
86 | #define pgoff_to_pte(off) \ | ||
87 | ((pte_t) { .pte_low = \ | ||
88 | ((((off)) & ((1U << PTE_FILE_BITS1) - 1)) << PTE_FILE_SHIFT1) \ | ||
89 | + ((((off) >> PTE_FILE_BITS1) \ | ||
90 | & ((1U << PTE_FILE_BITS2) - 1)) \ | ||
91 | << PTE_FILE_SHIFT2) \ | ||
92 | + ((((off) >> (PTE_FILE_BITS1 + PTE_FILE_BITS2)) \ | ||
93 | & ((1U << PTE_FILE_BITS3) - 1)) \ | ||
94 | << PTE_FILE_SHIFT3) \ | ||
95 | + ((((off) >> \ | ||
96 | (PTE_FILE_BITS1 + PTE_FILE_BITS2 + PTE_FILE_BITS3))) \ | ||
97 | << PTE_FILE_SHIFT4) \ | ||
98 | + _PAGE_FILE }) | ||
99 | |||
100 | #else /* CONFIG_MEM_SOFT_DIRTY */ | ||
101 | |||
58 | /* | 102 | /* |
59 | * Bits _PAGE_BIT_PRESENT, _PAGE_BIT_FILE and _PAGE_BIT_PROTNONE are taken, | 103 | * Bits _PAGE_BIT_PRESENT, _PAGE_BIT_FILE and _PAGE_BIT_PROTNONE are taken, |
60 | * split up the 29 bits of offset into this range: | 104 | * split up the 29 bits of offset into this range. |
61 | */ | 105 | */ |
62 | #define PTE_FILE_MAX_BITS 29 | 106 | #define PTE_FILE_MAX_BITS 29 |
63 | #define PTE_FILE_SHIFT1 (_PAGE_BIT_PRESENT + 1) | 107 | #define PTE_FILE_SHIFT1 (_PAGE_BIT_PRESENT + 1) |
@@ -88,6 +132,8 @@ static inline pmd_t native_pmdp_get_and_clear(pmd_t *xp) | |||
88 | << PTE_FILE_SHIFT3) \ | 132 | << PTE_FILE_SHIFT3) \ |
89 | + _PAGE_FILE }) | 133 | + _PAGE_FILE }) |
90 | 134 | ||
135 | #endif /* CONFIG_MEM_SOFT_DIRTY */ | ||
136 | |||
91 | /* Encode and de-code a swap entry */ | 137 | /* Encode and de-code a swap entry */ |
92 | #if _PAGE_BIT_FILE < _PAGE_BIT_PROTNONE | 138 | #if _PAGE_BIT_FILE < _PAGE_BIT_PROTNONE |
93 | #define SWP_TYPE_BITS (_PAGE_BIT_FILE - _PAGE_BIT_PRESENT - 1) | 139 | #define SWP_TYPE_BITS (_PAGE_BIT_FILE - _PAGE_BIT_PRESENT - 1) |
diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h index 4cc9f2b7cdc3..81bb91b49a88 100644 --- a/arch/x86/include/asm/pgtable-3level.h +++ b/arch/x86/include/asm/pgtable-3level.h | |||
@@ -179,6 +179,9 @@ static inline pmd_t native_pmdp_get_and_clear(pmd_t *pmdp) | |||
179 | /* | 179 | /* |
180 | * Bits 0, 6 and 7 are taken in the low part of the pte, | 180 | * Bits 0, 6 and 7 are taken in the low part of the pte, |
181 | * put the 32 bits of offset into the high part. | 181 | * put the 32 bits of offset into the high part. |
182 | * | ||
183 | * For soft-dirty tracking 11 bit is taken from | ||
184 | * the low part of pte as well. | ||
182 | */ | 185 | */ |
183 | #define pte_to_pgoff(pte) ((pte).pte_high) | 186 | #define pte_to_pgoff(pte) ((pte).pte_high) |
184 | #define pgoff_to_pte(off) \ | 187 | #define pgoff_to_pte(off) \ |
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 7dc305a46058..1c00631164c2 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
@@ -314,6 +314,36 @@ static inline pmd_t pmd_mksoft_dirty(pmd_t pmd) | |||
314 | return pmd_set_flags(pmd, _PAGE_SOFT_DIRTY); | 314 | return pmd_set_flags(pmd, _PAGE_SOFT_DIRTY); |
315 | } | 315 | } |
316 | 316 | ||
317 | static inline pte_t pte_swp_mksoft_dirty(pte_t pte) | ||
318 | { | ||
319 | return pte_set_flags(pte, _PAGE_SWP_SOFT_DIRTY); | ||
320 | } | ||
321 | |||
322 | static inline int pte_swp_soft_dirty(pte_t pte) | ||
323 | { | ||
324 | return pte_flags(pte) & _PAGE_SWP_SOFT_DIRTY; | ||
325 | } | ||
326 | |||
327 | static inline pte_t pte_swp_clear_soft_dirty(pte_t pte) | ||
328 | { | ||
329 | return pte_clear_flags(pte, _PAGE_SWP_SOFT_DIRTY); | ||
330 | } | ||
331 | |||
332 | static inline pte_t pte_file_clear_soft_dirty(pte_t pte) | ||
333 | { | ||
334 | return pte_clear_flags(pte, _PAGE_SOFT_DIRTY); | ||
335 | } | ||
336 | |||
337 | static inline pte_t pte_file_mksoft_dirty(pte_t pte) | ||
338 | { | ||
339 | return pte_set_flags(pte, _PAGE_SOFT_DIRTY); | ||
340 | } | ||
341 | |||
342 | static inline int pte_file_soft_dirty(pte_t pte) | ||
343 | { | ||
344 | return pte_flags(pte) & _PAGE_SOFT_DIRTY; | ||
345 | } | ||
346 | |||
317 | /* | 347 | /* |
318 | * Mask out unsupported bits in a present pgprot. Non-present pgprots | 348 | * Mask out unsupported bits in a present pgprot. Non-present pgprots |
319 | * can use those bits for other purposes, so leave them be. | 349 | * can use those bits for other purposes, so leave them be. |
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h index c98ac63aae48..f4843e031131 100644 --- a/arch/x86/include/asm/pgtable_types.h +++ b/arch/x86/include/asm/pgtable_types.h | |||
@@ -61,12 +61,27 @@ | |||
61 | * they do not conflict with each other. | 61 | * they do not conflict with each other. |
62 | */ | 62 | */ |
63 | 63 | ||
64 | #define _PAGE_BIT_SOFT_DIRTY _PAGE_BIT_HIDDEN | ||
65 | |||
64 | #ifdef CONFIG_MEM_SOFT_DIRTY | 66 | #ifdef CONFIG_MEM_SOFT_DIRTY |
65 | #define _PAGE_SOFT_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_HIDDEN) | 67 | #define _PAGE_SOFT_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_SOFT_DIRTY) |
66 | #else | 68 | #else |
67 | #define _PAGE_SOFT_DIRTY (_AT(pteval_t, 0)) | 69 | #define _PAGE_SOFT_DIRTY (_AT(pteval_t, 0)) |
68 | #endif | 70 | #endif |
69 | 71 | ||
72 | /* | ||
73 | * Tracking soft dirty bit when a page goes to a swap is tricky. | ||
74 | * We need a bit which can be stored in pte _and_ not conflict | ||
75 | * with swap entry format. On x86 bits 6 and 7 are *not* involved | ||
76 | * into swap entry computation, but bit 6 is used for nonlinear | ||
77 | * file mapping, so we borrow bit 7 for soft dirty tracking. | ||
78 | */ | ||
79 | #ifdef CONFIG_MEM_SOFT_DIRTY | ||
80 | #define _PAGE_SWP_SOFT_DIRTY _PAGE_PSE | ||
81 | #else | ||
82 | #define _PAGE_SWP_SOFT_DIRTY (_AT(pteval_t, 0)) | ||
83 | #endif | ||
84 | |||
70 | #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) | 85 | #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) |
71 | #define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX) | 86 | #define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX) |
72 | #else | 87 | #else |
diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h index 33692eaabab5..e3ddd7db723f 100644 --- a/arch/x86/include/asm/spinlock.h +++ b/arch/x86/include/asm/spinlock.h | |||
@@ -233,8 +233,4 @@ static inline void arch_write_unlock(arch_rwlock_t *rw) | |||
233 | #define arch_read_relax(lock) cpu_relax() | 233 | #define arch_read_relax(lock) cpu_relax() |
234 | #define arch_write_relax(lock) cpu_relax() | 234 | #define arch_write_relax(lock) cpu_relax() |
235 | 235 | ||
236 | /* The {read|write|spin}_lock() on x86 are full memory barriers. */ | ||
237 | static inline void smp_mb__after_lock(void) { } | ||
238 | #define ARCH_HAS_SMP_MB_AFTER_LOCK | ||
239 | |||
240 | #endif /* _ASM_X86_SPINLOCK_H */ | 236 | #endif /* _ASM_X86_SPINLOCK_H */ |
diff --git a/arch/x86/kernel/cpu/mcheck/mce-severity.c b/arch/x86/kernel/cpu/mcheck/mce-severity.c index e2703520d120..c370e1c4468b 100644 --- a/arch/x86/kernel/cpu/mcheck/mce-severity.c +++ b/arch/x86/kernel/cpu/mcheck/mce-severity.c | |||
@@ -111,8 +111,8 @@ static struct severity { | |||
111 | #ifdef CONFIG_MEMORY_FAILURE | 111 | #ifdef CONFIG_MEMORY_FAILURE |
112 | MCESEV( | 112 | MCESEV( |
113 | KEEP, "Action required but unaffected thread is continuable", | 113 | KEEP, "Action required but unaffected thread is continuable", |
114 | SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR), | 114 | SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR, MCI_UC_SAR|MCI_ADDR), |
115 | MCGMASK(MCG_STATUS_RIPV, MCG_STATUS_RIPV) | 115 | MCGMASK(MCG_STATUS_RIPV|MCG_STATUS_EIPV, MCG_STATUS_RIPV) |
116 | ), | 116 | ), |
117 | MCESEV( | 117 | MCESEV( |
118 | AR, "Action required: data load error in a user process", | 118 | AR, "Action required: data load error in a user process", |
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index fbc9210b45bc..a45d8d4ace10 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c | |||
@@ -2270,6 +2270,7 @@ __init int intel_pmu_init(void) | |||
2270 | case 70: | 2270 | case 70: |
2271 | case 71: | 2271 | case 71: |
2272 | case 63: | 2272 | case 63: |
2273 | case 69: | ||
2273 | x86_pmu.late_ack = true; | 2274 | x86_pmu.late_ack = true; |
2274 | memcpy(hw_cache_event_ids, snb_hw_cache_event_ids, sizeof(hw_cache_event_ids)); | 2275 | memcpy(hw_cache_event_ids, snb_hw_cache_event_ids, sizeof(hw_cache_event_ids)); |
2275 | memcpy(hw_cache_extra_regs, snb_hw_cache_extra_regs, sizeof(hw_cache_extra_regs)); | 2276 | memcpy(hw_cache_extra_regs, snb_hw_cache_extra_regs, sizeof(hw_cache_extra_regs)); |
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index cad791dbde95..1fb6c72717bd 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c | |||
@@ -314,8 +314,8 @@ static struct uncore_event_desc snbep_uncore_imc_events[] = { | |||
314 | static struct uncore_event_desc snbep_uncore_qpi_events[] = { | 314 | static struct uncore_event_desc snbep_uncore_qpi_events[] = { |
315 | INTEL_UNCORE_EVENT_DESC(clockticks, "event=0x14"), | 315 | INTEL_UNCORE_EVENT_DESC(clockticks, "event=0x14"), |
316 | INTEL_UNCORE_EVENT_DESC(txl_flits_active, "event=0x00,umask=0x06"), | 316 | INTEL_UNCORE_EVENT_DESC(txl_flits_active, "event=0x00,umask=0x06"), |
317 | INTEL_UNCORE_EVENT_DESC(drs_data, "event=0x02,umask=0x08"), | 317 | INTEL_UNCORE_EVENT_DESC(drs_data, "event=0x102,umask=0x08"), |
318 | INTEL_UNCORE_EVENT_DESC(ncb_data, "event=0x03,umask=0x04"), | 318 | INTEL_UNCORE_EVENT_DESC(ncb_data, "event=0x103,umask=0x04"), |
319 | { /* end: all zeroes */ }, | 319 | { /* end: all zeroes */ }, |
320 | }; | 320 | }; |
321 | 321 | ||
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index 94ab6b90dd3f..63bdb29b2549 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c | |||
@@ -196,15 +196,23 @@ static void __init ati_bugs_contd(int num, int slot, int func) | |||
196 | static void __init intel_remapping_check(int num, int slot, int func) | 196 | static void __init intel_remapping_check(int num, int slot, int func) |
197 | { | 197 | { |
198 | u8 revision; | 198 | u8 revision; |
199 | u16 device; | ||
199 | 200 | ||
201 | device = read_pci_config_16(num, slot, func, PCI_DEVICE_ID); | ||
200 | revision = read_pci_config_byte(num, slot, func, PCI_REVISION_ID); | 202 | revision = read_pci_config_byte(num, slot, func, PCI_REVISION_ID); |
201 | 203 | ||
202 | /* | 204 | /* |
203 | * Revision 0x13 of this chipset supports irq remapping | 205 | * Revision 13 of all triggering devices id in this quirk have |
204 | * but has an erratum that breaks its behavior, flag it as such | 206 | * a problem draining interrupts when irq remapping is enabled, |
207 | * and should be flagged as broken. Additionally revisions 0x12 | ||
208 | * and 0x22 of device id 0x3405 has this problem. | ||
205 | */ | 209 | */ |
206 | if (revision == 0x13) | 210 | if (revision == 0x13) |
207 | set_irq_remapping_broken(); | 211 | set_irq_remapping_broken(); |
212 | else if ((device == 0x3405) && | ||
213 | ((revision == 0x12) || | ||
214 | (revision == 0x22))) | ||
215 | set_irq_remapping_broken(); | ||
208 | 216 | ||
209 | } | 217 | } |
210 | 218 | ||
@@ -239,6 +247,8 @@ static struct chipset early_qrk[] __initdata = { | |||
239 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd }, | 247 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd }, |
240 | { PCI_VENDOR_ID_INTEL, 0x3403, PCI_CLASS_BRIDGE_HOST, | 248 | { PCI_VENDOR_ID_INTEL, 0x3403, PCI_CLASS_BRIDGE_HOST, |
241 | PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check }, | 249 | PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check }, |
250 | { PCI_VENDOR_ID_INTEL, 0x3405, PCI_CLASS_BRIDGE_HOST, | ||
251 | PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check }, | ||
242 | { PCI_VENDOR_ID_INTEL, 0x3406, PCI_CLASS_BRIDGE_HOST, | 252 | { PCI_VENDOR_ID_INTEL, 0x3406, PCI_CLASS_BRIDGE_HOST, |
243 | PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check }, | 253 | PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check }, |
244 | {} | 254 | {} |
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c index 202d24f0f7e7..5d576ab34403 100644 --- a/arch/x86/kernel/i387.c +++ b/arch/x86/kernel/i387.c | |||
@@ -116,7 +116,7 @@ static void mxcsr_feature_mask_init(void) | |||
116 | 116 | ||
117 | if (cpu_has_fxsr) { | 117 | if (cpu_has_fxsr) { |
118 | memset(&fx_scratch, 0, sizeof(struct i387_fxsave_struct)); | 118 | memset(&fx_scratch, 0, sizeof(struct i387_fxsave_struct)); |
119 | asm volatile("fxsave %0" : : "m" (fx_scratch)); | 119 | asm volatile("fxsave %0" : "+m" (fx_scratch)); |
120 | mask = fx_scratch.mxcsr_mask; | 120 | mask = fx_scratch.mxcsr_mask; |
121 | if (mask == 0) | 121 | if (mask == 0) |
122 | mask = 0x0000ffbf; | 122 | mask = 0x0000ffbf; |
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c index 47ebb1dbfbcb..7a0adb7ee433 100644 --- a/arch/x86/kernel/microcode_amd.c +++ b/arch/x86/kernel/microcode_amd.c | |||
@@ -220,12 +220,13 @@ int apply_microcode_amd(int cpu) | |||
220 | return 0; | 220 | return 0; |
221 | } | 221 | } |
222 | 222 | ||
223 | if (__apply_microcode_amd(mc_amd)) | 223 | if (__apply_microcode_amd(mc_amd)) { |
224 | pr_err("CPU%d: update failed for patch_level=0x%08x\n", | 224 | pr_err("CPU%d: update failed for patch_level=0x%08x\n", |
225 | cpu, mc_amd->hdr.patch_id); | 225 | cpu, mc_amd->hdr.patch_id); |
226 | else | 226 | return -1; |
227 | pr_info("CPU%d: new patch_level=0x%08x\n", cpu, | 227 | } |
228 | mc_amd->hdr.patch_id); | 228 | pr_info("CPU%d: new patch_level=0x%08x\n", cpu, |
229 | mc_amd->hdr.patch_id); | ||
229 | 230 | ||
230 | uci->cpu_sig.rev = mc_amd->hdr.patch_id; | 231 | uci->cpu_sig.rev = mc_amd->hdr.patch_id; |
231 | c->microcode = mc_amd->hdr.patch_id; | 232 | c->microcode = mc_amd->hdr.patch_id; |
diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x86/kernel/sys_x86_64.c index dbded5aedb81..48f8375e4c6b 100644 --- a/arch/x86/kernel/sys_x86_64.c +++ b/arch/x86/kernel/sys_x86_64.c | |||
@@ -101,7 +101,7 @@ static void find_start_end(unsigned long flags, unsigned long *begin, | |||
101 | *begin = new_begin; | 101 | *begin = new_begin; |
102 | } | 102 | } |
103 | } else { | 103 | } else { |
104 | *begin = TASK_UNMAPPED_BASE; | 104 | *begin = mmap_legacy_base(); |
105 | *end = TASK_SIZE; | 105 | *end = TASK_SIZE; |
106 | } | 106 | } |
107 | } | 107 | } |
diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c index 62c29a5bfe26..f63778cb2363 100644 --- a/arch/x86/mm/mmap.c +++ b/arch/x86/mm/mmap.c | |||
@@ -98,7 +98,7 @@ static unsigned long mmap_base(void) | |||
98 | * Bottom-up (legacy) layout on X86_32 did not support randomization, X86_64 | 98 | * Bottom-up (legacy) layout on X86_32 did not support randomization, X86_64 |
99 | * does, but not when emulating X86_32 | 99 | * does, but not when emulating X86_32 |
100 | */ | 100 | */ |
101 | static unsigned long mmap_legacy_base(void) | 101 | unsigned long mmap_legacy_base(void) |
102 | { | 102 | { |
103 | if (mmap_is_ia32()) | 103 | if (mmap_is_ia32()) |
104 | return TASK_UNMAPPED_BASE; | 104 | return TASK_UNMAPPED_BASE; |
diff --git a/arch/x86/platform/ce4100/ce4100.c b/arch/x86/platform/ce4100/ce4100.c index 643b8b5eee86..8244f5ec2f4c 100644 --- a/arch/x86/platform/ce4100/ce4100.c +++ b/arch/x86/platform/ce4100/ce4100.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/reboot.h> | ||
15 | #include <linux/serial_reg.h> | 16 | #include <linux/serial_reg.h> |
16 | #include <linux/serial_8250.h> | 17 | #include <linux/serial_8250.h> |
17 | #include <linux/reboot.h> | 18 | #include <linux/reboot.h> |