diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-08-14 06:14:12 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-08-14 06:14:12 -0400 |
commit | 397f09977ea350a20f20b415a9313cc790137742 (patch) | |
tree | 0e44f2f3e5804bd5c0c6f644785006b7225e3c94 /arch | |
parent | 6356bb0ad6525dae93c06478a098ed3848e9ab01 (diff) | |
parent | a4b4bedce880046feeb5b206392960f395ed02ad (diff) |
Merge tag 'amd_f15_m30' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp into x86/ras
Pull AMD F15h, model 0x30 and later enablement stuff, more specifically EDAC
support, from Borislav Petkov.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch')
55 files changed, 401 insertions, 242 deletions
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/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/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/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/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c index 159abc8842d2..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 | ||
@@ -80,8 +82,12 @@ static void __init bmips_smp_setup(void) | |||
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 | */ | 84 | */ |
83 | change_c0_brcm_cmt_intr(0xf8018000, | 85 | if (boot_cpu == 0) |
84 | (0x02 << 27) | (0x03 << 15)); | 86 | cpu_hw_intr = 0x02; |
87 | else | ||
88 | cpu_hw_intr = 0x1d; | ||
89 | |||
90 | change_c0_brcm_cmt_intr(0xf8018000, (cpu_hw_intr << 27) | (0x03 << 15)); | ||
85 | 91 | ||
86 | /* single core, 2 threads (2 pipelines) */ | 92 | /* single core, 2 threads (2 pipelines) */ |
87 | max_cpus = 2; | 93 | max_cpus = 2; |
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/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/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/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/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/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/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/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/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/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c index 3048ded1b598..59554dca96ec 100644 --- a/arch/x86/kernel/amd_nb.c +++ b/arch/x86/kernel/amd_nb.c | |||
@@ -20,6 +20,7 @@ const struct pci_device_id amd_nb_misc_ids[] = { | |||
20 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_10H_NB_MISC) }, | 20 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_10H_NB_MISC) }, |
21 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F3) }, | 21 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F3) }, |
22 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_M10H_F3) }, | 22 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_M10H_F3) }, |
23 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F3) }, | ||
23 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) }, | 24 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) }, |
24 | {} | 25 | {} |
25 | }; | 26 | }; |
@@ -27,6 +28,7 @@ EXPORT_SYMBOL(amd_nb_misc_ids); | |||
27 | 28 | ||
28 | static const struct pci_device_id amd_nb_link_ids[] = { | 29 | static const struct pci_device_id amd_nb_link_ids[] = { |
29 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) }, | 30 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) }, |
31 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F4) }, | ||
30 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F4) }, | 32 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F4) }, |
31 | {} | 33 | {} |
32 | }; | 34 | }; |
@@ -81,13 +83,20 @@ int amd_cache_northbridges(void) | |||
81 | next_northbridge(misc, amd_nb_misc_ids); | 83 | next_northbridge(misc, amd_nb_misc_ids); |
82 | node_to_amd_nb(i)->link = link = | 84 | node_to_amd_nb(i)->link = link = |
83 | next_northbridge(link, amd_nb_link_ids); | 85 | next_northbridge(link, amd_nb_link_ids); |
84 | } | 86 | } |
85 | 87 | ||
88 | /* GART present only on Fam15h upto model 0fh */ | ||
86 | if (boot_cpu_data.x86 == 0xf || boot_cpu_data.x86 == 0x10 || | 89 | if (boot_cpu_data.x86 == 0xf || boot_cpu_data.x86 == 0x10 || |
87 | boot_cpu_data.x86 == 0x15) | 90 | (boot_cpu_data.x86 == 0x15 && boot_cpu_data.x86_model < 0x10)) |
88 | amd_northbridges.flags |= AMD_NB_GART; | 91 | amd_northbridges.flags |= AMD_NB_GART; |
89 | 92 | ||
90 | /* | 93 | /* |
94 | * Check for L3 cache presence. | ||
95 | */ | ||
96 | if (!cpuid_edx(0x80000006)) | ||
97 | return 0; | ||
98 | |||
99 | /* | ||
91 | * Some CPU families support L3 Cache Index Disable. There are some | 100 | * Some CPU families support L3 Cache Index Disable. There are some |
92 | * limitations because of E382 and E388 on family 0x10. | 101 | * limitations because of E382 and E388 on family 0x10. |
93 | */ | 102 | */ |
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; |