diff options
Diffstat (limited to 'arch')
113 files changed, 892 insertions, 545 deletions
diff --git a/arch/arc/Kconfig.debug b/arch/arc/Kconfig.debug index a7fc0da25650..ff6a4b5ce927 100644 --- a/arch/arc/Kconfig.debug +++ b/arch/arc/Kconfig.debug | |||
| @@ -2,19 +2,6 @@ menu "Kernel hacking" | |||
| 2 | 2 | ||
| 3 | source "lib/Kconfig.debug" | 3 | source "lib/Kconfig.debug" |
| 4 | 4 | ||
| 5 | config EARLY_PRINTK | ||
| 6 | bool "Early printk" if EMBEDDED | ||
| 7 | default y | ||
| 8 | help | ||
| 9 | Write kernel log output directly into the VGA buffer or to a serial | ||
| 10 | port. | ||
| 11 | |||
| 12 | This is useful for kernel debugging when your machine crashes very | ||
| 13 | early before the console code is initialized. For normal operation | ||
| 14 | it is not recommended because it looks ugly and doesn't cooperate | ||
| 15 | with klogd/syslogd or the X server. You should normally N here, | ||
| 16 | unless you want to debug such a crash. | ||
| 17 | |||
| 18 | config 16KSTACKS | 5 | config 16KSTACKS |
| 19 | bool "Use 16Kb for kernel stacks instead of 8Kb" | 6 | bool "Use 16Kb for kernel stacks instead of 8Kb" |
| 20 | help | 7 | help |
diff --git a/arch/arc/include/asm/atomic.h b/arch/arc/include/asm/atomic.h index 067551b6920a..9917a45fc430 100644 --- a/arch/arc/include/asm/atomic.h +++ b/arch/arc/include/asm/atomic.h | |||
| @@ -99,7 +99,7 @@ static inline void atomic_##op(int i, atomic_t *v) \ | |||
| 99 | atomic_ops_unlock(flags); \ | 99 | atomic_ops_unlock(flags); \ |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | #define ATOMIC_OP_RETURN(op, c_op) \ | 102 | #define ATOMIC_OP_RETURN(op, c_op, asm_op) \ |
| 103 | static inline int atomic_##op##_return(int i, atomic_t *v) \ | 103 | static inline int atomic_##op##_return(int i, atomic_t *v) \ |
| 104 | { \ | 104 | { \ |
| 105 | unsigned long flags; \ | 105 | unsigned long flags; \ |
diff --git a/arch/arc/mm/cache_arc700.c b/arch/arc/mm/cache_arc700.c index 8c3a3e02ba92..12b2100db073 100644 --- a/arch/arc/mm/cache_arc700.c +++ b/arch/arc/mm/cache_arc700.c | |||
| @@ -266,7 +266,7 @@ static inline void __cache_line_loop(unsigned long paddr, unsigned long vaddr, | |||
| 266 | * Machine specific helpers for Entire D-Cache or Per Line ops | 266 | * Machine specific helpers for Entire D-Cache or Per Line ops |
| 267 | */ | 267 | */ |
| 268 | 268 | ||
| 269 | static unsigned int __before_dc_op(const int op) | 269 | static inline unsigned int __before_dc_op(const int op) |
| 270 | { | 270 | { |
| 271 | unsigned int reg = reg; | 271 | unsigned int reg = reg; |
| 272 | 272 | ||
| @@ -284,7 +284,7 @@ static unsigned int __before_dc_op(const int op) | |||
| 284 | return reg; | 284 | return reg; |
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | static void __after_dc_op(const int op, unsigned int reg) | 287 | static inline void __after_dc_op(const int op, unsigned int reg) |
| 288 | { | 288 | { |
| 289 | if (op & OP_FLUSH) /* flush / flush-n-inv both wait */ | 289 | if (op & OP_FLUSH) /* flush / flush-n-inv both wait */ |
| 290 | while (read_aux_reg(ARC_REG_DC_CTRL) & DC_CTRL_FLUSH_STATUS); | 290 | while (read_aux_reg(ARC_REG_DC_CTRL) & DC_CTRL_FLUSH_STATUS); |
diff --git a/arch/arm/boot/dts/am437x-sk-evm.dts b/arch/arm/boot/dts/am437x-sk-evm.dts index 8ae29c955c11..c17097d2c167 100644 --- a/arch/arm/boot/dts/am437x-sk-evm.dts +++ b/arch/arm/boot/dts/am437x-sk-evm.dts | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | pinctrl-0 = <&matrix_keypad_pins>; | 49 | pinctrl-0 = <&matrix_keypad_pins>; |
| 50 | 50 | ||
| 51 | debounce-delay-ms = <5>; | 51 | debounce-delay-ms = <5>; |
| 52 | col-scan-delay-us = <1500>; | 52 | col-scan-delay-us = <5>; |
| 53 | 53 | ||
| 54 | row-gpios = <&gpio5 5 GPIO_ACTIVE_HIGH /* Bank5, pin5 */ | 54 | row-gpios = <&gpio5 5 GPIO_ACTIVE_HIGH /* Bank5, pin5 */ |
| 55 | &gpio5 6 GPIO_ACTIVE_HIGH>; /* Bank5, pin6 */ | 55 | &gpio5 6 GPIO_ACTIVE_HIGH>; /* Bank5, pin6 */ |
| @@ -473,7 +473,7 @@ | |||
| 473 | interrupt-parent = <&gpio0>; | 473 | interrupt-parent = <&gpio0>; |
| 474 | interrupts = <31 0>; | 474 | interrupts = <31 0>; |
| 475 | 475 | ||
| 476 | wake-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; | 476 | reset-gpios = <&gpio1 28 GPIO_ACTIVE_LOW>; |
| 477 | 477 | ||
| 478 | touchscreen-size-x = <480>; | 478 | touchscreen-size-x = <480>; |
| 479 | touchscreen-size-y = <272>; | 479 | touchscreen-size-y = <272>; |
diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts index 15f198e4864d..7128fad991ac 100644 --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | aliases { | 18 | aliases { |
| 19 | rtc0 = &mcp_rtc; | 19 | rtc0 = &mcp_rtc; |
| 20 | rtc1 = &tps659038_rtc; | 20 | rtc1 = &tps659038_rtc; |
| 21 | rtc2 = &rtc; | ||
| 21 | }; | 22 | }; |
| 22 | 23 | ||
| 23 | memory { | 24 | memory { |
| @@ -83,7 +84,7 @@ | |||
| 83 | gpio_fan: gpio_fan { | 84 | gpio_fan: gpio_fan { |
| 84 | /* Based on 5v 500mA AFB02505HHB */ | 85 | /* Based on 5v 500mA AFB02505HHB */ |
| 85 | compatible = "gpio-fan"; | 86 | compatible = "gpio-fan"; |
| 86 | gpios = <&tps659038_gpio 1 GPIO_ACTIVE_HIGH>; | 87 | gpios = <&tps659038_gpio 2 GPIO_ACTIVE_HIGH>; |
| 87 | gpio-fan,speed-map = <0 0>, | 88 | gpio-fan,speed-map = <0 0>, |
| 88 | <13000 1>; | 89 | <13000 1>; |
| 89 | #cooling-cells = <2>; | 90 | #cooling-cells = <2>; |
| @@ -130,8 +131,8 @@ | |||
| 130 | 131 | ||
| 131 | uart3_pins_default: uart3_pins_default { | 132 | uart3_pins_default: uart3_pins_default { |
| 132 | pinctrl-single,pins = < | 133 | pinctrl-single,pins = < |
| 133 | 0x248 (PIN_INPUT_SLEW | MUX_MODE0) /* uart3_rxd.rxd */ | 134 | 0x3f8 (PIN_INPUT_SLEW | MUX_MODE2) /* uart2_ctsn.uart3_rxd */ |
| 134 | 0x24c (PIN_INPUT_SLEW | MUX_MODE0) /* uart3_txd.txd */ | 135 | 0x3fc (PIN_INPUT_SLEW | MUX_MODE1) /* uart2_rtsn.uart3_txd */ |
| 135 | >; | 136 | >; |
| 136 | }; | 137 | }; |
| 137 | 138 | ||
| @@ -455,7 +456,7 @@ | |||
| 455 | mcp_rtc: rtc@6f { | 456 | mcp_rtc: rtc@6f { |
| 456 | compatible = "microchip,mcp7941x"; | 457 | compatible = "microchip,mcp7941x"; |
| 457 | reg = <0x6f>; | 458 | reg = <0x6f>; |
| 458 | interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_LOW>; /* IRQ_SYS_1N */ | 459 | interrupts = <GIC_SPI 2 IRQ_TYPE_EDGE_RISING>; /* IRQ_SYS_1N */ |
| 459 | 460 | ||
| 460 | pinctrl-names = "default"; | 461 | pinctrl-names = "default"; |
| 461 | pinctrl-0 = <&mcp79410_pins_default>; | 462 | pinctrl-0 = <&mcp79410_pins_default>; |
| @@ -478,7 +479,7 @@ | |||
| 478 | &uart3 { | 479 | &uart3 { |
| 479 | status = "okay"; | 480 | status = "okay"; |
| 480 | interrupts-extended = <&crossbar_mpu GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, | 481 | interrupts-extended = <&crossbar_mpu GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, |
| 481 | <&dra7_pmx_core 0x248>; | 482 | <&dra7_pmx_core 0x3f8>; |
| 482 | 483 | ||
| 483 | pinctrl-names = "default"; | 484 | pinctrl-names = "default"; |
| 484 | pinctrl-0 = <&uart3_pins_default>; | 485 | pinctrl-0 = <&uart3_pins_default>; |
diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi index c675257f2377..f076ff856d8b 100644 --- a/arch/arm/boot/dts/armada-375.dtsi +++ b/arch/arm/boot/dts/armada-375.dtsi | |||
| @@ -69,7 +69,7 @@ | |||
| 69 | mainpll: mainpll { | 69 | mainpll: mainpll { |
| 70 | compatible = "fixed-clock"; | 70 | compatible = "fixed-clock"; |
| 71 | #clock-cells = <0>; | 71 | #clock-cells = <0>; |
| 72 | clock-frequency = <2000000000>; | 72 | clock-frequency = <1000000000>; |
| 73 | }; | 73 | }; |
| 74 | /* 25 MHz reference crystal */ | 74 | /* 25 MHz reference crystal */ |
| 75 | refclk: oscillator { | 75 | refclk: oscillator { |
diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi index ed2dd8ba4080..218a2acd36e5 100644 --- a/arch/arm/boot/dts/armada-38x.dtsi +++ b/arch/arm/boot/dts/armada-38x.dtsi | |||
| @@ -585,7 +585,7 @@ | |||
| 585 | mainpll: mainpll { | 585 | mainpll: mainpll { |
| 586 | compatible = "fixed-clock"; | 586 | compatible = "fixed-clock"; |
| 587 | #clock-cells = <0>; | 587 | #clock-cells = <0>; |
| 588 | clock-frequency = <2000000000>; | 588 | clock-frequency = <1000000000>; |
| 589 | }; | 589 | }; |
| 590 | 590 | ||
| 591 | /* 25 MHz reference crystal */ | 591 | /* 25 MHz reference crystal */ |
diff --git a/arch/arm/boot/dts/armada-39x.dtsi b/arch/arm/boot/dts/armada-39x.dtsi index 0e85fc15ceda..ecd1318109ba 100644 --- a/arch/arm/boot/dts/armada-39x.dtsi +++ b/arch/arm/boot/dts/armada-39x.dtsi | |||
| @@ -502,7 +502,7 @@ | |||
| 502 | mainpll: mainpll { | 502 | mainpll: mainpll { |
| 503 | compatible = "fixed-clock"; | 503 | compatible = "fixed-clock"; |
| 504 | #clock-cells = <0>; | 504 | #clock-cells = <0>; |
| 505 | clock-frequency = <2000000000>; | 505 | clock-frequency = <1000000000>; |
| 506 | }; | 506 | }; |
| 507 | }; | 507 | }; |
| 508 | }; | 508 | }; |
diff --git a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts index e3b08fb959e5..990e8a2100f0 100644 --- a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts +++ b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | |||
| @@ -105,6 +105,10 @@ | |||
| 105 | }; | 105 | }; |
| 106 | 106 | ||
| 107 | internal-regs { | 107 | internal-regs { |
| 108 | rtc@10300 { | ||
| 109 | /* No crystal connected to the internal RTC */ | ||
| 110 | status = "disabled"; | ||
| 111 | }; | ||
| 108 | serial@12000 { | 112 | serial@12000 { |
| 109 | status = "okay"; | 113 | status = "okay"; |
| 110 | }; | 114 | }; |
diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts index aae7efc09b0b..e6fa251e17b9 100644 --- a/arch/arm/boot/dts/dove-cubox.dts +++ b/arch/arm/boot/dts/dove-cubox.dts | |||
| @@ -87,6 +87,7 @@ | |||
| 87 | 87 | ||
| 88 | /* connect xtal input to 25MHz reference */ | 88 | /* connect xtal input to 25MHz reference */ |
| 89 | clocks = <&ref25>; | 89 | clocks = <&ref25>; |
| 90 | clock-names = "xtal"; | ||
| 90 | 91 | ||
| 91 | /* connect xtal input as source of pll0 and pll1 */ | 92 | /* connect xtal input as source of pll0 and pll1 */ |
| 92 | silabs,pll-source = <0 0>, <1 0>; | 93 | silabs,pll-source = <0 0>, <1 0>; |
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi index 5332b57b4950..f03a091cd076 100644 --- a/arch/arm/boot/dts/dra7.dtsi +++ b/arch/arm/boot/dts/dra7.dtsi | |||
| @@ -911,7 +911,7 @@ | |||
| 911 | ti,clock-cycles = <16>; | 911 | ti,clock-cycles = <16>; |
| 912 | 912 | ||
| 913 | reg = <0x4ae07ddc 0x4>, <0x4ae07de0 0x4>, | 913 | reg = <0x4ae07ddc 0x4>, <0x4ae07de0 0x4>, |
| 914 | <0x4ae06014 0x4>, <0x4a003b20 0x8>, | 914 | <0x4ae06014 0x4>, <0x4a003b20 0xc>, |
| 915 | <0x4ae0c158 0x4>; | 915 | <0x4ae0c158 0x4>; |
| 916 | reg-names = "setup-address", "control-address", | 916 | reg-names = "setup-address", "control-address", |
| 917 | "int-address", "efuse-address", | 917 | "int-address", "efuse-address", |
| @@ -944,7 +944,7 @@ | |||
| 944 | ti,clock-cycles = <16>; | 944 | ti,clock-cycles = <16>; |
| 945 | 945 | ||
| 946 | reg = <0x4ae07e34 0x4>, <0x4ae07e24 0x4>, | 946 | reg = <0x4ae07e34 0x4>, <0x4ae07e24 0x4>, |
| 947 | <0x4ae06010 0x4>, <0x4a0025cc 0x8>, | 947 | <0x4ae06010 0x4>, <0x4a0025cc 0xc>, |
| 948 | <0x4a002470 0x4>; | 948 | <0x4a002470 0x4>; |
| 949 | reg-names = "setup-address", "control-address", | 949 | reg-names = "setup-address", "control-address", |
| 950 | "int-address", "efuse-address", | 950 | "int-address", "efuse-address", |
| @@ -977,7 +977,7 @@ | |||
| 977 | ti,clock-cycles = <16>; | 977 | ti,clock-cycles = <16>; |
| 978 | 978 | ||
| 979 | reg = <0x4ae07e30 0x4>, <0x4ae07e20 0x4>, | 979 | reg = <0x4ae07e30 0x4>, <0x4ae07e20 0x4>, |
| 980 | <0x4ae06010 0x4>, <0x4a0025e0 0x8>, | 980 | <0x4ae06010 0x4>, <0x4a0025e0 0xc>, |
| 981 | <0x4a00246c 0x4>; | 981 | <0x4a00246c 0x4>; |
| 982 | reg-names = "setup-address", "control-address", | 982 | reg-names = "setup-address", "control-address", |
| 983 | "int-address", "efuse-address", | 983 | "int-address", "efuse-address", |
| @@ -1010,7 +1010,7 @@ | |||
| 1010 | ti,clock-cycles = <16>; | 1010 | ti,clock-cycles = <16>; |
| 1011 | 1011 | ||
| 1012 | reg = <0x4ae07de4 0x4>, <0x4ae07de8 0x4>, | 1012 | reg = <0x4ae07de4 0x4>, <0x4ae07de8 0x4>, |
| 1013 | <0x4ae06010 0x4>, <0x4a003b08 0x8>, | 1013 | <0x4ae06010 0x4>, <0x4a003b08 0xc>, |
| 1014 | <0x4ae0c154 0x4>; | 1014 | <0x4ae0c154 0x4>; |
| 1015 | reg-names = "setup-address", "control-address", | 1015 | reg-names = "setup-address", "control-address", |
| 1016 | "int-address", "efuse-address", | 1016 | "int-address", "efuse-address", |
| @@ -1203,7 +1203,7 @@ | |||
| 1203 | status = "disabled"; | 1203 | status = "disabled"; |
| 1204 | }; | 1204 | }; |
| 1205 | 1205 | ||
| 1206 | rtc@48838000 { | 1206 | rtc: rtc@48838000 { |
| 1207 | compatible = "ti,am3352-rtc"; | 1207 | compatible = "ti,am3352-rtc"; |
| 1208 | reg = <0x48838000 0x100>; | 1208 | reg = <0x48838000 0x100>; |
| 1209 | interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>, | 1209 | interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>, |
diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi index 8de12af7c276..d6b49e5b32e9 100644 --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | #include <dt-bindings/sound/samsung-i2s.h> | 10 | #include <dt-bindings/sound/samsung-i2s.h> |
| 11 | #include <dt-bindings/input/input.h> | 11 | #include <dt-bindings/input/input.h> |
| 12 | #include <dt-bindings/clock/maxim,max77686.h> | ||
| 12 | #include "exynos4412.dtsi" | 13 | #include "exynos4412.dtsi" |
| 13 | 14 | ||
| 14 | / { | 15 | / { |
| @@ -105,6 +106,8 @@ | |||
| 105 | 106 | ||
| 106 | rtc@10070000 { | 107 | rtc@10070000 { |
| 107 | status = "okay"; | 108 | status = "okay"; |
| 109 | clocks = <&clock CLK_RTC>, <&max77686 MAX77686_CLK_AP>; | ||
| 110 | clock-names = "rtc", "rtc_src"; | ||
| 108 | }; | 111 | }; |
| 109 | 112 | ||
| 110 | g2d@10800000 { | 113 | g2d@10800000 { |
diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts index 2657e842e5a5..1eca97ee4bd6 100644 --- a/arch/arm/boot/dts/exynos5250-snow.dts +++ b/arch/arm/boot/dts/exynos5250-snow.dts | |||
| @@ -567,6 +567,7 @@ | |||
| 567 | num-slots = <1>; | 567 | num-slots = <1>; |
| 568 | broken-cd; | 568 | broken-cd; |
| 569 | cap-sdio-irq; | 569 | cap-sdio-irq; |
| 570 | keep-power-in-suspend; | ||
| 570 | card-detect-delay = <200>; | 571 | card-detect-delay = <200>; |
| 571 | samsung,dw-mshc-ciu-div = <3>; | 572 | samsung,dw-mshc-ciu-div = <3>; |
| 572 | samsung,dw-mshc-sdr-timing = <2 3>; | 573 | samsung,dw-mshc-sdr-timing = <2 3>; |
diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts index 0788d08fb43e..146e71118a72 100644 --- a/arch/arm/boot/dts/exynos5420-peach-pit.dts +++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts | |||
| @@ -711,6 +711,7 @@ | |||
| 711 | num-slots = <1>; | 711 | num-slots = <1>; |
| 712 | broken-cd; | 712 | broken-cd; |
| 713 | cap-sdio-irq; | 713 | cap-sdio-irq; |
| 714 | keep-power-in-suspend; | ||
| 714 | card-detect-delay = <200>; | 715 | card-detect-delay = <200>; |
| 715 | clock-frequency = <400000000>; | 716 | clock-frequency = <400000000>; |
| 716 | samsung,dw-mshc-ciu-div = <1>; | 717 | samsung,dw-mshc-ciu-div = <1>; |
diff --git a/arch/arm/boot/dts/exynos5420-trip-points.dtsi b/arch/arm/boot/dts/exynos5420-trip-points.dtsi index 5d31fc140823..2180a0152c9b 100644 --- a/arch/arm/boot/dts/exynos5420-trip-points.dtsi +++ b/arch/arm/boot/dts/exynos5420-trip-points.dtsi | |||
| @@ -28,7 +28,7 @@ trips { | |||
| 28 | type = "active"; | 28 | type = "active"; |
| 29 | }; | 29 | }; |
| 30 | cpu-crit-0 { | 30 | cpu-crit-0 { |
| 31 | temperature = <1200000>; /* millicelsius */ | 31 | temperature = <120000>; /* millicelsius */ |
| 32 | hysteresis = <0>; /* millicelsius */ | 32 | hysteresis = <0>; /* millicelsius */ |
| 33 | type = "critical"; | 33 | type = "critical"; |
| 34 | }; | 34 | }; |
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index f67b23f303c3..45317538bbae 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi | |||
| @@ -536,6 +536,7 @@ | |||
| 536 | clock-names = "dp"; | 536 | clock-names = "dp"; |
| 537 | phys = <&dp_phy>; | 537 | phys = <&dp_phy>; |
| 538 | phy-names = "dp"; | 538 | phy-names = "dp"; |
| 539 | power-domains = <&disp_pd>; | ||
| 539 | }; | 540 | }; |
| 540 | 541 | ||
| 541 | mipi_phy: video-phy@10040714 { | 542 | mipi_phy: video-phy@10040714 { |
diff --git a/arch/arm/boot/dts/exynos5440-trip-points.dtsi b/arch/arm/boot/dts/exynos5440-trip-points.dtsi index 48adfa8f4300..356e963edf11 100644 --- a/arch/arm/boot/dts/exynos5440-trip-points.dtsi +++ b/arch/arm/boot/dts/exynos5440-trip-points.dtsi | |||
| @@ -18,7 +18,7 @@ trips { | |||
| 18 | type = "active"; | 18 | type = "active"; |
| 19 | }; | 19 | }; |
| 20 | cpu-crit-0 { | 20 | cpu-crit-0 { |
| 21 | temperature = <1050000>; /* millicelsius */ | 21 | temperature = <105000>; /* millicelsius */ |
| 22 | hysteresis = <0>; /* millicelsius */ | 22 | hysteresis = <0>; /* millicelsius */ |
| 23 | type = "critical"; | 23 | type = "critical"; |
| 24 | }; | 24 | }; |
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts index 412f41d62686..02eb8b15374f 100644 --- a/arch/arm/boot/dts/exynos5800-peach-pi.dts +++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts | |||
| @@ -674,6 +674,7 @@ | |||
| 674 | num-slots = <1>; | 674 | num-slots = <1>; |
| 675 | broken-cd; | 675 | broken-cd; |
| 676 | cap-sdio-irq; | 676 | cap-sdio-irq; |
| 677 | keep-power-in-suspend; | ||
| 677 | card-detect-delay = <200>; | 678 | card-detect-delay = <200>; |
| 678 | clock-frequency = <400000000>; | 679 | clock-frequency = <400000000>; |
| 679 | samsung,dw-mshc-ciu-div = <1>; | 680 | samsung,dw-mshc-ciu-div = <1>; |
diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts b/arch/arm/boot/dts/imx23-olinuxino.dts index 7e6eef2488e8..82045398bf1f 100644 --- a/arch/arm/boot/dts/imx23-olinuxino.dts +++ b/arch/arm/boot/dts/imx23-olinuxino.dts | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | */ | 12 | */ |
| 13 | 13 | ||
| 14 | /dts-v1/; | 14 | /dts-v1/; |
| 15 | #include <dt-bindings/gpio/gpio.h> | ||
| 15 | #include "imx23.dtsi" | 16 | #include "imx23.dtsi" |
| 16 | 17 | ||
| 17 | / { | 18 | / { |
| @@ -93,6 +94,7 @@ | |||
| 93 | 94 | ||
| 94 | ahb@80080000 { | 95 | ahb@80080000 { |
| 95 | usb0: usb@80080000 { | 96 | usb0: usb@80080000 { |
| 97 | dr_mode = "host"; | ||
| 96 | vbus-supply = <®_usb0_vbus>; | 98 | vbus-supply = <®_usb0_vbus>; |
| 97 | status = "okay"; | 99 | status = "okay"; |
| 98 | }; | 100 | }; |
| @@ -122,7 +124,7 @@ | |||
| 122 | 124 | ||
| 123 | user { | 125 | user { |
| 124 | label = "green"; | 126 | label = "green"; |
| 125 | gpios = <&gpio2 1 1>; | 127 | gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; |
| 126 | }; | 128 | }; |
| 127 | }; | 129 | }; |
| 128 | }; | 130 | }; |
diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi index e4d3aecc4ed2..677f81d9dcd5 100644 --- a/arch/arm/boot/dts/imx25.dtsi +++ b/arch/arm/boot/dts/imx25.dtsi | |||
| @@ -428,6 +428,7 @@ | |||
| 428 | 428 | ||
| 429 | pwm4: pwm@53fc8000 { | 429 | pwm4: pwm@53fc8000 { |
| 430 | compatible = "fsl,imx25-pwm", "fsl,imx27-pwm"; | 430 | compatible = "fsl,imx25-pwm", "fsl,imx27-pwm"; |
| 431 | #pwm-cells = <2>; | ||
| 431 | reg = <0x53fc8000 0x4000>; | 432 | reg = <0x53fc8000 0x4000>; |
| 432 | clocks = <&clks 108>, <&clks 52>; | 433 | clocks = <&clks 108>, <&clks 52>; |
| 433 | clock-names = "ipg", "per"; | 434 | clock-names = "ipg", "per"; |
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index 25e25f82fbae..4e073e854742 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi | |||
| @@ -913,7 +913,7 @@ | |||
| 913 | 80 81 68 69 | 913 | 80 81 68 69 |
| 914 | 70 71 72 73 | 914 | 70 71 72 73 |
| 915 | 74 75 76 77>; | 915 | 74 75 76 77>; |
| 916 | interrupt-names = "auart4-rx", "aurat4-tx", "spdif-tx", "empty", | 916 | interrupt-names = "auart4-rx", "auart4-tx", "spdif-tx", "empty", |
| 917 | "saif0", "saif1", "i2c0", "i2c1", | 917 | "saif0", "saif1", "i2c0", "i2c1", |
| 918 | "auart0-rx", "auart0-tx", "auart1-rx", "auart1-tx", | 918 | "auart0-rx", "auart0-tx", "auart1-rx", "auart1-tx", |
| 919 | "auart2-rx", "auart2-tx", "auart3-rx", "auart3-tx"; | 919 | "auart2-rx", "auart2-tx", "auart3-rx", "auart3-tx"; |
diff --git a/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi b/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi index 19cc269a08d4..1ce6133b67f5 100644 --- a/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi +++ b/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | regulator-min-microvolt = <5000000>; | 31 | regulator-min-microvolt = <5000000>; |
| 32 | regulator-max-microvolt = <5000000>; | 32 | regulator-max-microvolt = <5000000>; |
| 33 | gpio = <&gpio4 15 0>; | 33 | gpio = <&gpio4 15 0>; |
| 34 | enable-active-high; | ||
| 34 | }; | 35 | }; |
| 35 | 36 | ||
| 36 | reg_usb_h1_vbus: regulator@1 { | 37 | reg_usb_h1_vbus: regulator@1 { |
| @@ -40,6 +41,7 @@ | |||
| 40 | regulator-min-microvolt = <5000000>; | 41 | regulator-min-microvolt = <5000000>; |
| 41 | regulator-max-microvolt = <5000000>; | 42 | regulator-max-microvolt = <5000000>; |
| 42 | gpio = <&gpio1 0 0>; | 43 | gpio = <&gpio1 0 0>; |
| 44 | enable-active-high; | ||
| 43 | }; | 45 | }; |
| 44 | }; | 46 | }; |
| 45 | 47 | ||
diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi index 46b2fed7c319..3b24b12651b2 100644 --- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | |||
| @@ -185,7 +185,6 @@ | |||
| 185 | &i2c3 { | 185 | &i2c3 { |
| 186 | pinctrl-names = "default"; | 186 | pinctrl-names = "default"; |
| 187 | pinctrl-0 = <&pinctrl_i2c3>; | 187 | pinctrl-0 = <&pinctrl_i2c3>; |
| 188 | pinctrl-assert-gpios = <&gpio5 4 GPIO_ACTIVE_HIGH>; | ||
| 189 | status = "okay"; | 188 | status = "okay"; |
| 190 | 189 | ||
| 191 | max7310_a: gpio@30 { | 190 | max7310_a: gpio@30 { |
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index a29315833ecd..5c16145920ea 100644 --- a/arch/arm/boot/dts/omap3-n900.dts +++ b/arch/arm/boot/dts/omap3-n900.dts | |||
| @@ -498,6 +498,8 @@ | |||
| 498 | DRVDD-supply = <&vmmc2>; | 498 | DRVDD-supply = <&vmmc2>; |
| 499 | IOVDD-supply = <&vio>; | 499 | IOVDD-supply = <&vio>; |
| 500 | DVDD-supply = <&vio>; | 500 | DVDD-supply = <&vio>; |
| 501 | |||
| 502 | ai3x-micbias-vg = <1>; | ||
| 501 | }; | 503 | }; |
| 502 | 504 | ||
| 503 | tlv320aic3x_aux: tlv320aic3x@19 { | 505 | tlv320aic3x_aux: tlv320aic3x@19 { |
| @@ -509,6 +511,8 @@ | |||
| 509 | DRVDD-supply = <&vmmc2>; | 511 | DRVDD-supply = <&vmmc2>; |
| 510 | IOVDD-supply = <&vio>; | 512 | IOVDD-supply = <&vio>; |
| 511 | DVDD-supply = <&vio>; | 513 | DVDD-supply = <&vio>; |
| 514 | |||
| 515 | ai3x-micbias-vg = <2>; | ||
| 512 | }; | 516 | }; |
| 513 | 517 | ||
| 514 | tsl2563: tsl2563@29 { | 518 | tsl2563: tsl2563@29 { |
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index d18a90f5eca3..69a40cfc1f29 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi | |||
| @@ -456,6 +456,7 @@ | |||
| 456 | }; | 456 | }; |
| 457 | 457 | ||
| 458 | mmu_isp: mmu@480bd400 { | 458 | mmu_isp: mmu@480bd400 { |
| 459 | #iommu-cells = <0>; | ||
| 459 | compatible = "ti,omap2-iommu"; | 460 | compatible = "ti,omap2-iommu"; |
| 460 | reg = <0x480bd400 0x80>; | 461 | reg = <0x480bd400 0x80>; |
| 461 | interrupts = <24>; | 462 | interrupts = <24>; |
| @@ -464,6 +465,7 @@ | |||
| 464 | }; | 465 | }; |
| 465 | 466 | ||
| 466 | mmu_iva: mmu@5d000000 { | 467 | mmu_iva: mmu@5d000000 { |
| 468 | #iommu-cells = <0>; | ||
| 467 | compatible = "ti,omap2-iommu"; | 469 | compatible = "ti,omap2-iommu"; |
| 468 | reg = <0x5d000000 0x80>; | 470 | reg = <0x5d000000 0x80>; |
| 469 | interrupts = <28>; | 471 | interrupts = <28>; |
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi index efe5f737f39b..7d24ae0306b5 100644 --- a/arch/arm/boot/dts/omap5.dtsi +++ b/arch/arm/boot/dts/omap5.dtsi | |||
| @@ -128,7 +128,7 @@ | |||
| 128 | * hierarchy. | 128 | * hierarchy. |
| 129 | */ | 129 | */ |
| 130 | ocp { | 130 | ocp { |
| 131 | compatible = "ti,omap4-l3-noc", "simple-bus"; | 131 | compatible = "ti,omap5-l3-noc", "simple-bus"; |
| 132 | #address-cells = <1>; | 132 | #address-cells = <1>; |
| 133 | #size-cells = <1>; | 133 | #size-cells = <1>; |
| 134 | ranges; | 134 | ranges; |
diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts index 74c3212f1f11..824ddab9c3ad 100644 --- a/arch/arm/boot/dts/r8a7791-koelsch.dts +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts | |||
| @@ -545,7 +545,7 @@ | |||
| 545 | compatible = "adi,adv7511w"; | 545 | compatible = "adi,adv7511w"; |
| 546 | reg = <0x39>; | 546 | reg = <0x39>; |
| 547 | interrupt-parent = <&gpio3>; | 547 | interrupt-parent = <&gpio3>; |
| 548 | interrupts = <29 IRQ_TYPE_EDGE_FALLING>; | 548 | interrupts = <29 IRQ_TYPE_LEVEL_LOW>; |
| 549 | 549 | ||
| 550 | adi,input-depth = <8>; | 550 | adi,input-depth = <8>; |
| 551 | adi,input-colorspace = "rgb"; | 551 | adi,input-colorspace = "rgb"; |
diff --git a/arch/arm/boot/dts/ste-dbx5x0.dtsi b/arch/arm/boot/dts/ste-dbx5x0.dtsi index bfd3f1c734b8..2201cd5da3bb 100644 --- a/arch/arm/boot/dts/ste-dbx5x0.dtsi +++ b/arch/arm/boot/dts/ste-dbx5x0.dtsi | |||
| @@ -1017,23 +1017,6 @@ | |||
| 1017 | status = "disabled"; | 1017 | status = "disabled"; |
| 1018 | }; | 1018 | }; |
| 1019 | 1019 | ||
| 1020 | vmmci: regulator-gpio { | ||
| 1021 | compatible = "regulator-gpio"; | ||
| 1022 | |||
| 1023 | regulator-min-microvolt = <1800000>; | ||
| 1024 | regulator-max-microvolt = <2900000>; | ||
| 1025 | regulator-name = "mmci-reg"; | ||
| 1026 | regulator-type = "voltage"; | ||
| 1027 | |||
| 1028 | startup-delay-us = <100>; | ||
| 1029 | enable-active-high; | ||
| 1030 | |||
| 1031 | states = <1800000 0x1 | ||
| 1032 | 2900000 0x0>; | ||
| 1033 | |||
| 1034 | status = "disabled"; | ||
| 1035 | }; | ||
| 1036 | |||
| 1037 | mcde@a0350000 { | 1020 | mcde@a0350000 { |
| 1038 | compatible = "stericsson,mcde"; | 1021 | compatible = "stericsson,mcde"; |
| 1039 | reg = <0xa0350000 0x1000>, /* MCDE */ | 1022 | reg = <0xa0350000 0x1000>, /* MCDE */ |
diff --git a/arch/arm/boot/dts/ste-href.dtsi b/arch/arm/boot/dts/ste-href.dtsi index bf8f0eddc2c0..744c1e3a744d 100644 --- a/arch/arm/boot/dts/ste-href.dtsi +++ b/arch/arm/boot/dts/ste-href.dtsi | |||
| @@ -111,6 +111,21 @@ | |||
| 111 | pinctrl-1 = <&i2c3_sleep_mode>; | 111 | pinctrl-1 = <&i2c3_sleep_mode>; |
| 112 | }; | 112 | }; |
| 113 | 113 | ||
| 114 | vmmci: regulator-gpio { | ||
| 115 | compatible = "regulator-gpio"; | ||
| 116 | |||
| 117 | regulator-min-microvolt = <1800000>; | ||
| 118 | regulator-max-microvolt = <2900000>; | ||
| 119 | regulator-name = "mmci-reg"; | ||
| 120 | regulator-type = "voltage"; | ||
| 121 | |||
| 122 | startup-delay-us = <100>; | ||
| 123 | enable-active-high; | ||
| 124 | |||
| 125 | states = <1800000 0x1 | ||
| 126 | 2900000 0x0>; | ||
| 127 | }; | ||
| 128 | |||
| 114 | // External Micro SD slot | 129 | // External Micro SD slot |
| 115 | sdi0_per1@80126000 { | 130 | sdi0_per1@80126000 { |
| 116 | arm,primecell-periphid = <0x10480180>; | 131 | arm,primecell-periphid = <0x10480180>; |
diff --git a/arch/arm/boot/dts/ste-snowball.dts b/arch/arm/boot/dts/ste-snowball.dts index 206826a855c0..1bc84ebdccaa 100644 --- a/arch/arm/boot/dts/ste-snowball.dts +++ b/arch/arm/boot/dts/ste-snowball.dts | |||
| @@ -146,8 +146,21 @@ | |||
| 146 | }; | 146 | }; |
| 147 | 147 | ||
| 148 | vmmci: regulator-gpio { | 148 | vmmci: regulator-gpio { |
| 149 | compatible = "regulator-gpio"; | ||
| 150 | |||
| 149 | gpios = <&gpio7 4 0x4>; | 151 | gpios = <&gpio7 4 0x4>; |
| 150 | enable-gpio = <&gpio6 25 0x4>; | 152 | enable-gpio = <&gpio6 25 0x4>; |
| 153 | |||
| 154 | regulator-min-microvolt = <1800000>; | ||
| 155 | regulator-max-microvolt = <2900000>; | ||
| 156 | regulator-name = "mmci-reg"; | ||
| 157 | regulator-type = "voltage"; | ||
| 158 | |||
| 159 | startup-delay-us = <100>; | ||
| 160 | enable-active-high; | ||
| 161 | |||
| 162 | states = <1800000 0x1 | ||
| 163 | 2900000 0x0>; | ||
| 151 | }; | 164 | }; |
| 152 | 165 | ||
| 153 | // External Micro SD slot | 166 | // External Micro SD slot |
diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi index cf01c818b8ea..13cc7ca5e031 100644 --- a/arch/arm/boot/dts/tegra124.dtsi +++ b/arch/arm/boot/dts/tegra124.dtsi | |||
| @@ -826,7 +826,7 @@ | |||
| 826 | <&tegra_car TEGRA124_CLK_PLL_U>, | 826 | <&tegra_car TEGRA124_CLK_PLL_U>, |
| 827 | <&tegra_car TEGRA124_CLK_USBD>; | 827 | <&tegra_car TEGRA124_CLK_USBD>; |
| 828 | clock-names = "reg", "pll_u", "utmi-pads"; | 828 | clock-names = "reg", "pll_u", "utmi-pads"; |
| 829 | resets = <&tegra_car 59>, <&tegra_car 22>; | 829 | resets = <&tegra_car 22>, <&tegra_car 22>; |
| 830 | reset-names = "usb", "utmi-pads"; | 830 | reset-names = "usb", "utmi-pads"; |
| 831 | nvidia,hssync-start-delay = <0>; | 831 | nvidia,hssync-start-delay = <0>; |
| 832 | nvidia,idle-wait-delay = <17>; | 832 | nvidia,idle-wait-delay = <17>; |
| @@ -838,6 +838,7 @@ | |||
| 838 | nvidia,hssquelch-level = <2>; | 838 | nvidia,hssquelch-level = <2>; |
| 839 | nvidia,hsdiscon-level = <5>; | 839 | nvidia,hsdiscon-level = <5>; |
| 840 | nvidia,xcvr-hsslew = <12>; | 840 | nvidia,xcvr-hsslew = <12>; |
| 841 | nvidia,has-utmi-pad-registers; | ||
| 841 | status = "disabled"; | 842 | status = "disabled"; |
| 842 | }; | 843 | }; |
| 843 | 844 | ||
| @@ -862,7 +863,7 @@ | |||
| 862 | <&tegra_car TEGRA124_CLK_PLL_U>, | 863 | <&tegra_car TEGRA124_CLK_PLL_U>, |
| 863 | <&tegra_car TEGRA124_CLK_USBD>; | 864 | <&tegra_car TEGRA124_CLK_USBD>; |
| 864 | clock-names = "reg", "pll_u", "utmi-pads"; | 865 | clock-names = "reg", "pll_u", "utmi-pads"; |
| 865 | resets = <&tegra_car 22>, <&tegra_car 22>; | 866 | resets = <&tegra_car 58>, <&tegra_car 22>; |
| 866 | reset-names = "usb", "utmi-pads"; | 867 | reset-names = "usb", "utmi-pads"; |
| 867 | nvidia,hssync-start-delay = <0>; | 868 | nvidia,hssync-start-delay = <0>; |
| 868 | nvidia,idle-wait-delay = <17>; | 869 | nvidia,idle-wait-delay = <17>; |
| @@ -874,7 +875,6 @@ | |||
| 874 | nvidia,hssquelch-level = <2>; | 875 | nvidia,hssquelch-level = <2>; |
| 875 | nvidia,hsdiscon-level = <5>; | 876 | nvidia,hsdiscon-level = <5>; |
| 876 | nvidia,xcvr-hsslew = <12>; | 877 | nvidia,xcvr-hsslew = <12>; |
| 877 | nvidia,has-utmi-pad-registers; | ||
| 878 | status = "disabled"; | 878 | status = "disabled"; |
| 879 | }; | 879 | }; |
| 880 | 880 | ||
| @@ -899,7 +899,7 @@ | |||
| 899 | <&tegra_car TEGRA124_CLK_PLL_U>, | 899 | <&tegra_car TEGRA124_CLK_PLL_U>, |
| 900 | <&tegra_car TEGRA124_CLK_USBD>; | 900 | <&tegra_car TEGRA124_CLK_USBD>; |
| 901 | clock-names = "reg", "pll_u", "utmi-pads"; | 901 | clock-names = "reg", "pll_u", "utmi-pads"; |
| 902 | resets = <&tegra_car 58>, <&tegra_car 22>; | 902 | resets = <&tegra_car 59>, <&tegra_car 22>; |
| 903 | reset-names = "usb", "utmi-pads"; | 903 | reset-names = "usb", "utmi-pads"; |
| 904 | nvidia,hssync-start-delay = <0>; | 904 | nvidia,hssync-start-delay = <0>; |
| 905 | nvidia,idle-wait-delay = <17>; | 905 | nvidia,idle-wait-delay = <17>; |
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts b/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts index 7a2aeacd62c0..107395c32d82 100644 --- a/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts +++ b/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts | |||
| @@ -191,6 +191,7 @@ | |||
| 191 | compatible = "arm,cortex-a15-pmu"; | 191 | compatible = "arm,cortex-a15-pmu"; |
| 192 | interrupts = <0 68 4>, | 192 | interrupts = <0 68 4>, |
| 193 | <0 69 4>; | 193 | <0 69 4>; |
| 194 | interrupt-affinity = <&cpu0>, <&cpu1>; | ||
| 194 | }; | 195 | }; |
| 195 | 196 | ||
| 196 | oscclk6a: oscclk6a { | 197 | oscclk6a: oscclk6a { |
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca9.dts b/arch/arm/boot/dts/vexpress-v2p-ca9.dts index 23662b5a5e9d..d949facba376 100644 --- a/arch/arm/boot/dts/vexpress-v2p-ca9.dts +++ b/arch/arm/boot/dts/vexpress-v2p-ca9.dts | |||
| @@ -33,28 +33,28 @@ | |||
| 33 | #address-cells = <1>; | 33 | #address-cells = <1>; |
| 34 | #size-cells = <0>; | 34 | #size-cells = <0>; |
| 35 | 35 | ||
| 36 | cpu@0 { | 36 | A9_0: cpu@0 { |
| 37 | device_type = "cpu"; | 37 | device_type = "cpu"; |
| 38 | compatible = "arm,cortex-a9"; | 38 | compatible = "arm,cortex-a9"; |
| 39 | reg = <0>; | 39 | reg = <0>; |
| 40 | next-level-cache = <&L2>; | 40 | next-level-cache = <&L2>; |
| 41 | }; | 41 | }; |
| 42 | 42 | ||
| 43 | cpu@1 { | 43 | A9_1: cpu@1 { |
| 44 | device_type = "cpu"; | 44 | device_type = "cpu"; |
| 45 | compatible = "arm,cortex-a9"; | 45 | compatible = "arm,cortex-a9"; |
| 46 | reg = <1>; | 46 | reg = <1>; |
| 47 | next-level-cache = <&L2>; | 47 | next-level-cache = <&L2>; |
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | cpu@2 { | 50 | A9_2: cpu@2 { |
| 51 | device_type = "cpu"; | 51 | device_type = "cpu"; |
| 52 | compatible = "arm,cortex-a9"; | 52 | compatible = "arm,cortex-a9"; |
| 53 | reg = <2>; | 53 | reg = <2>; |
| 54 | next-level-cache = <&L2>; | 54 | next-level-cache = <&L2>; |
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| 57 | cpu@3 { | 57 | A9_3: cpu@3 { |
| 58 | device_type = "cpu"; | 58 | device_type = "cpu"; |
| 59 | compatible = "arm,cortex-a9"; | 59 | compatible = "arm,cortex-a9"; |
| 60 | reg = <3>; | 60 | reg = <3>; |
| @@ -170,6 +170,7 @@ | |||
| 170 | compatible = "arm,pl310-cache"; | 170 | compatible = "arm,pl310-cache"; |
| 171 | reg = <0x1e00a000 0x1000>; | 171 | reg = <0x1e00a000 0x1000>; |
| 172 | interrupts = <0 43 4>; | 172 | interrupts = <0 43 4>; |
| 173 | cache-unified; | ||
| 173 | cache-level = <2>; | 174 | cache-level = <2>; |
| 174 | arm,data-latency = <1 1 1>; | 175 | arm,data-latency = <1 1 1>; |
| 175 | arm,tag-latency = <1 1 1>; | 176 | arm,tag-latency = <1 1 1>; |
| @@ -181,6 +182,8 @@ | |||
| 181 | <0 61 4>, | 182 | <0 61 4>, |
| 182 | <0 62 4>, | 183 | <0 62 4>, |
| 183 | <0 63 4>; | 184 | <0 63 4>; |
| 185 | interrupt-affinity = <&A9_0>, <&A9_1>, <&A9_2>, <&A9_3>; | ||
| 186 | |||
| 184 | }; | 187 | }; |
| 185 | 188 | ||
| 186 | dcc { | 189 | dcc { |
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index ab86655c1f4b..0ca4a3eaf65d 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig | |||
| @@ -39,11 +39,14 @@ CONFIG_ARCH_HIP04=y | |||
| 39 | CONFIG_ARCH_KEYSTONE=y | 39 | CONFIG_ARCH_KEYSTONE=y |
| 40 | CONFIG_ARCH_MESON=y | 40 | CONFIG_ARCH_MESON=y |
| 41 | CONFIG_ARCH_MXC=y | 41 | CONFIG_ARCH_MXC=y |
| 42 | CONFIG_SOC_IMX50=y | ||
| 42 | CONFIG_SOC_IMX51=y | 43 | CONFIG_SOC_IMX51=y |
| 43 | CONFIG_SOC_IMX53=y | 44 | CONFIG_SOC_IMX53=y |
| 44 | CONFIG_SOC_IMX6Q=y | 45 | CONFIG_SOC_IMX6Q=y |
| 45 | CONFIG_SOC_IMX6SL=y | 46 | CONFIG_SOC_IMX6SL=y |
| 47 | CONFIG_SOC_IMX6SX=y | ||
| 46 | CONFIG_SOC_VF610=y | 48 | CONFIG_SOC_VF610=y |
| 49 | CONFIG_SOC_LS1021A=y | ||
| 47 | CONFIG_ARCH_OMAP3=y | 50 | CONFIG_ARCH_OMAP3=y |
| 48 | CONFIG_ARCH_OMAP4=y | 51 | CONFIG_ARCH_OMAP4=y |
| 49 | CONFIG_SOC_OMAP5=y | 52 | CONFIG_SOC_OMAP5=y |
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index 9ff7b54b2a83..3743ca221d40 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig | |||
| @@ -393,7 +393,7 @@ CONFIG_TI_EDMA=y | |||
| 393 | CONFIG_DMA_OMAP=y | 393 | CONFIG_DMA_OMAP=y |
| 394 | # CONFIG_IOMMU_SUPPORT is not set | 394 | # CONFIG_IOMMU_SUPPORT is not set |
| 395 | CONFIG_EXTCON=m | 395 | CONFIG_EXTCON=m |
| 396 | CONFIG_EXTCON_GPIO=m | 396 | CONFIG_EXTCON_USB_GPIO=m |
| 397 | CONFIG_EXTCON_PALMAS=m | 397 | CONFIG_EXTCON_PALMAS=m |
| 398 | CONFIG_TI_EMIF=m | 398 | CONFIG_TI_EMIF=m |
| 399 | CONFIG_PWM=y | 399 | CONFIG_PWM=y |
diff --git a/arch/arm/include/asm/dma-iommu.h b/arch/arm/include/asm/dma-iommu.h index 8e3fcb924db6..2ef282f96651 100644 --- a/arch/arm/include/asm/dma-iommu.h +++ b/arch/arm/include/asm/dma-iommu.h | |||
| @@ -25,7 +25,7 @@ struct dma_iommu_mapping { | |||
| 25 | }; | 25 | }; |
| 26 | 26 | ||
| 27 | struct dma_iommu_mapping * | 27 | struct dma_iommu_mapping * |
| 28 | arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, size_t size); | 28 | arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, u64 size); |
| 29 | 29 | ||
| 30 | void arm_iommu_release_mapping(struct dma_iommu_mapping *mapping); | 30 | void arm_iommu_release_mapping(struct dma_iommu_mapping *mapping); |
| 31 | 31 | ||
diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h index 2f7e6ff67d51..0b579b2f4e0e 100644 --- a/arch/arm/include/asm/xen/page.h +++ b/arch/arm/include/asm/xen/page.h | |||
| @@ -110,5 +110,6 @@ static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn) | |||
| 110 | bool xen_arch_need_swiotlb(struct device *dev, | 110 | bool xen_arch_need_swiotlb(struct device *dev, |
| 111 | unsigned long pfn, | 111 | unsigned long pfn, |
| 112 | unsigned long mfn); | 112 | unsigned long mfn); |
| 113 | unsigned long xen_get_swiotlb_free_pages(unsigned int order); | ||
| 113 | 114 | ||
| 114 | #endif /* _ASM_ARM_XEN_PAGE_H */ | 115 | #endif /* _ASM_ARM_XEN_PAGE_H */ |
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c index 91c7ba182dcd..213919ba326f 100644 --- a/arch/arm/kernel/perf_event_cpu.c +++ b/arch/arm/kernel/perf_event_cpu.c | |||
| @@ -303,12 +303,17 @@ static int probe_current_pmu(struct arm_pmu *pmu) | |||
| 303 | 303 | ||
| 304 | static int of_pmu_irq_cfg(struct platform_device *pdev) | 304 | static int of_pmu_irq_cfg(struct platform_device *pdev) |
| 305 | { | 305 | { |
| 306 | int i; | 306 | int i, irq; |
| 307 | int *irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL); | 307 | int *irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL); |
| 308 | 308 | ||
| 309 | if (!irqs) | 309 | if (!irqs) |
| 310 | return -ENOMEM; | 310 | return -ENOMEM; |
| 311 | 311 | ||
| 312 | /* Don't bother with PPIs; they're already affine */ | ||
| 313 | irq = platform_get_irq(pdev, 0); | ||
| 314 | if (irq >= 0 && irq_is_percpu(irq)) | ||
| 315 | return 0; | ||
| 316 | |||
| 312 | for (i = 0; i < pdev->num_resources; ++i) { | 317 | for (i = 0; i < pdev->num_resources; ++i) { |
| 313 | struct device_node *dn; | 318 | struct device_node *dn; |
| 314 | int cpu; | 319 | int cpu; |
| @@ -317,7 +322,7 @@ static int of_pmu_irq_cfg(struct platform_device *pdev) | |||
| 317 | i); | 322 | i); |
| 318 | if (!dn) { | 323 | if (!dn) { |
| 319 | pr_warn("Failed to parse %s/interrupt-affinity[%d]\n", | 324 | pr_warn("Failed to parse %s/interrupt-affinity[%d]\n", |
| 320 | of_node_full_name(dn), i); | 325 | of_node_full_name(pdev->dev.of_node), i); |
| 321 | break; | 326 | break; |
| 322 | } | 327 | } |
| 323 | 328 | ||
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index acd5b560b728..5f5cd562c593 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h | |||
| @@ -159,6 +159,8 @@ extern void exynos_enter_aftr(void); | |||
| 159 | 159 | ||
| 160 | extern struct cpuidle_exynos_data cpuidle_coupled_exynos_data; | 160 | extern struct cpuidle_exynos_data cpuidle_coupled_exynos_data; |
| 161 | 161 | ||
| 162 | extern void exynos_set_delayed_reset_assertion(bool enable); | ||
| 163 | |||
| 162 | extern void s5p_init_cpu(void __iomem *cpuid_addr); | 164 | extern void s5p_init_cpu(void __iomem *cpuid_addr); |
| 163 | extern unsigned int samsung_rev(void); | 165 | extern unsigned int samsung_rev(void); |
| 164 | extern void __iomem *cpu_boot_reg_base(void); | 166 | extern void __iomem *cpu_boot_reg_base(void); |
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index bcde0dd668df..5917a30eee33 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c | |||
| @@ -167,6 +167,33 @@ static void __init exynos_init_io(void) | |||
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | /* | 169 | /* |
| 170 | * Set or clear the USE_DELAYED_RESET_ASSERTION option. Used by smp code | ||
| 171 | * and suspend. | ||
| 172 | * | ||
| 173 | * This is necessary only on Exynos4 SoCs. When system is running | ||
| 174 | * USE_DELAYED_RESET_ASSERTION should be set so the ARM CLK clock down | ||
| 175 | * feature could properly detect global idle state when secondary CPU is | ||
| 176 | * powered down. | ||
| 177 | * | ||
| 178 | * However this should not be set when such system is going into suspend. | ||
| 179 | */ | ||
| 180 | void exynos_set_delayed_reset_assertion(bool enable) | ||
| 181 | { | ||
| 182 | if (of_machine_is_compatible("samsung,exynos4")) { | ||
| 183 | unsigned int tmp, core_id; | ||
| 184 | |||
| 185 | for (core_id = 0; core_id < num_possible_cpus(); core_id++) { | ||
| 186 | tmp = pmu_raw_readl(EXYNOS_ARM_CORE_OPTION(core_id)); | ||
| 187 | if (enable) | ||
| 188 | tmp |= S5P_USE_DELAYED_RESET_ASSERTION; | ||
| 189 | else | ||
| 190 | tmp &= ~(S5P_USE_DELAYED_RESET_ASSERTION); | ||
| 191 | pmu_raw_writel(tmp, EXYNOS_ARM_CORE_OPTION(core_id)); | ||
| 192 | } | ||
| 193 | } | ||
| 194 | } | ||
| 195 | |||
| 196 | /* | ||
| 170 | * Apparently, these SoCs are not able to wake-up from suspend using | 197 | * Apparently, these SoCs are not able to wake-up from suspend using |
| 171 | * the PMU. Too bad. Should they suddenly become capable of such a | 198 | * the PMU. Too bad. Should they suddenly become capable of such a |
| 172 | * feat, the matches below should be moved to suspend.c. | 199 | * feat, the matches below should be moved to suspend.c. |
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index ebd135bb0995..a825bca2a2b6 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c | |||
| @@ -34,30 +34,6 @@ | |||
| 34 | 34 | ||
| 35 | extern void exynos4_secondary_startup(void); | 35 | extern void exynos4_secondary_startup(void); |
| 36 | 36 | ||
| 37 | /* | ||
| 38 | * Set or clear the USE_DELAYED_RESET_ASSERTION option, set on Exynos4 SoCs | ||
| 39 | * during hot-(un)plugging CPUx. | ||
| 40 | * | ||
| 41 | * The feature can be cleared safely during first boot of secondary CPU. | ||
| 42 | * | ||
| 43 | * Exynos4 SoCs require setting USE_DELAYED_RESET_ASSERTION during powering | ||
| 44 | * down a CPU so the CPU idle clock down feature could properly detect global | ||
| 45 | * idle state when CPUx is off. | ||
| 46 | */ | ||
| 47 | static void exynos_set_delayed_reset_assertion(u32 core_id, bool enable) | ||
| 48 | { | ||
| 49 | if (soc_is_exynos4()) { | ||
| 50 | unsigned int tmp; | ||
| 51 | |||
| 52 | tmp = pmu_raw_readl(EXYNOS_ARM_CORE_OPTION(core_id)); | ||
| 53 | if (enable) | ||
| 54 | tmp |= S5P_USE_DELAYED_RESET_ASSERTION; | ||
| 55 | else | ||
| 56 | tmp &= ~(S5P_USE_DELAYED_RESET_ASSERTION); | ||
| 57 | pmu_raw_writel(tmp, EXYNOS_ARM_CORE_OPTION(core_id)); | ||
| 58 | } | ||
| 59 | } | ||
| 60 | |||
| 61 | #ifdef CONFIG_HOTPLUG_CPU | 37 | #ifdef CONFIG_HOTPLUG_CPU |
| 62 | static inline void cpu_leave_lowpower(u32 core_id) | 38 | static inline void cpu_leave_lowpower(u32 core_id) |
| 63 | { | 39 | { |
| @@ -73,8 +49,6 @@ static inline void cpu_leave_lowpower(u32 core_id) | |||
| 73 | : "=&r" (v) | 49 | : "=&r" (v) |
| 74 | : "Ir" (CR_C), "Ir" (0x40) | 50 | : "Ir" (CR_C), "Ir" (0x40) |
| 75 | : "cc"); | 51 | : "cc"); |
| 76 | |||
| 77 | exynos_set_delayed_reset_assertion(core_id, false); | ||
| 78 | } | 52 | } |
| 79 | 53 | ||
| 80 | static inline void platform_do_lowpower(unsigned int cpu, int *spurious) | 54 | static inline void platform_do_lowpower(unsigned int cpu, int *spurious) |
| @@ -87,14 +61,6 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) | |||
| 87 | /* Turn the CPU off on next WFI instruction. */ | 61 | /* Turn the CPU off on next WFI instruction. */ |
| 88 | exynos_cpu_power_down(core_id); | 62 | exynos_cpu_power_down(core_id); |
| 89 | 63 | ||
| 90 | /* | ||
| 91 | * Exynos4 SoCs require setting | ||
| 92 | * USE_DELAYED_RESET_ASSERTION so the CPU idle | ||
| 93 | * clock down feature could properly detect | ||
| 94 | * global idle state when CPUx is off. | ||
| 95 | */ | ||
| 96 | exynos_set_delayed_reset_assertion(core_id, true); | ||
| 97 | |||
| 98 | wfi(); | 64 | wfi(); |
| 99 | 65 | ||
| 100 | if (pen_release == core_id) { | 66 | if (pen_release == core_id) { |
| @@ -371,9 +337,6 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
| 371 | udelay(10); | 337 | udelay(10); |
| 372 | } | 338 | } |
| 373 | 339 | ||
| 374 | /* No harm if this is called during first boot of secondary CPU */ | ||
| 375 | exynos_set_delayed_reset_assertion(core_id, false); | ||
| 376 | |||
| 377 | /* | 340 | /* |
| 378 | * now the secondary core is starting up let it run its | 341 | * now the secondary core is starting up let it run its |
| 379 | * calibrations, then wait for it to finish | 342 | * calibrations, then wait for it to finish |
| @@ -420,6 +383,8 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus) | |||
| 420 | 383 | ||
| 421 | exynos_sysram_init(); | 384 | exynos_sysram_init(); |
| 422 | 385 | ||
| 386 | exynos_set_delayed_reset_assertion(true); | ||
| 387 | |||
| 423 | if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) | 388 | if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) |
| 424 | scu_enable(scu_base_addr()); | 389 | scu_enable(scu_base_addr()); |
| 425 | 390 | ||
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c index cbe56b35aea0..a9686535f9ed 100644 --- a/arch/arm/mach-exynos/pm_domains.c +++ b/arch/arm/mach-exynos/pm_domains.c | |||
| @@ -188,7 +188,7 @@ no_clk: | |||
| 188 | args.np = np; | 188 | args.np = np; |
| 189 | args.args_count = 0; | 189 | args.args_count = 0; |
| 190 | child_domain = of_genpd_get_from_provider(&args); | 190 | child_domain = of_genpd_get_from_provider(&args); |
| 191 | if (!child_domain) | 191 | if (IS_ERR(child_domain)) |
| 192 | continue; | 192 | continue; |
| 193 | 193 | ||
| 194 | if (of_parse_phandle_with_args(np, "power-domains", | 194 | if (of_parse_phandle_with_args(np, "power-domains", |
| @@ -196,7 +196,7 @@ no_clk: | |||
| 196 | continue; | 196 | continue; |
| 197 | 197 | ||
| 198 | parent_domain = of_genpd_get_from_provider(&args); | 198 | parent_domain = of_genpd_get_from_provider(&args); |
| 199 | if (!parent_domain) | 199 | if (IS_ERR(parent_domain)) |
| 200 | continue; | 200 | continue; |
| 201 | 201 | ||
| 202 | if (pm_genpd_add_subdomain(parent_domain, child_domain)) | 202 | if (pm_genpd_add_subdomain(parent_domain, child_domain)) |
diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index 3e6aea7f83af..c0b6dccbf7bd 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c | |||
| @@ -342,6 +342,8 @@ static void exynos_pm_enter_sleep_mode(void) | |||
| 342 | 342 | ||
| 343 | static void exynos_pm_prepare(void) | 343 | static void exynos_pm_prepare(void) |
| 344 | { | 344 | { |
| 345 | exynos_set_delayed_reset_assertion(false); | ||
| 346 | |||
| 345 | /* Set wake-up mask registers */ | 347 | /* Set wake-up mask registers */ |
| 346 | exynos_pm_set_wakeup_mask(); | 348 | exynos_pm_set_wakeup_mask(); |
| 347 | 349 | ||
| @@ -482,6 +484,7 @@ early_wakeup: | |||
| 482 | 484 | ||
| 483 | /* Clear SLEEP mode set in INFORM1 */ | 485 | /* Clear SLEEP mode set in INFORM1 */ |
| 484 | pmu_raw_writel(0x0, S5P_INFORM1); | 486 | pmu_raw_writel(0x0, S5P_INFORM1); |
| 487 | exynos_set_delayed_reset_assertion(true); | ||
| 485 | } | 488 | } |
| 486 | 489 | ||
| 487 | static void exynos3250_pm_resume(void) | 490 | static void exynos3250_pm_resume(void) |
| @@ -723,8 +726,10 @@ void __init exynos_pm_init(void) | |||
| 723 | return; | 726 | return; |
| 724 | } | 727 | } |
| 725 | 728 | ||
| 726 | if (WARN_ON(!of_find_property(np, "interrupt-controller", NULL))) | 729 | if (WARN_ON(!of_find_property(np, "interrupt-controller", NULL))) { |
| 727 | pr_warn("Outdated DT detected, suspend/resume will NOT work\n"); | 730 | pr_warn("Outdated DT detected, suspend/resume will NOT work\n"); |
| 731 | return; | ||
| 732 | } | ||
| 728 | 733 | ||
| 729 | pm_data = (const struct exynos_pm_data *) match->data; | 734 | pm_data = (const struct exynos_pm_data *) match->data; |
| 730 | 735 | ||
diff --git a/arch/arm/mach-gemini/common.h b/arch/arm/mach-gemini/common.h index 38a45260a7c8..dd883698ff7e 100644 --- a/arch/arm/mach-gemini/common.h +++ b/arch/arm/mach-gemini/common.h | |||
| @@ -12,6 +12,8 @@ | |||
| 12 | #ifndef __GEMINI_COMMON_H__ | 12 | #ifndef __GEMINI_COMMON_H__ |
| 13 | #define __GEMINI_COMMON_H__ | 13 | #define __GEMINI_COMMON_H__ |
| 14 | 14 | ||
| 15 | #include <linux/reboot.h> | ||
| 16 | |||
| 15 | struct mtd_partition; | 17 | struct mtd_partition; |
| 16 | 18 | ||
| 17 | extern void gemini_map_io(void); | 19 | extern void gemini_map_io(void); |
| @@ -26,6 +28,6 @@ extern int platform_register_pflash(unsigned int size, | |||
| 26 | struct mtd_partition *parts, | 28 | struct mtd_partition *parts, |
| 27 | unsigned int nr_parts); | 29 | unsigned int nr_parts); |
| 28 | 30 | ||
| 29 | extern void gemini_restart(char mode, const char *cmd); | 31 | extern void gemini_restart(enum reboot_mode mode, const char *cmd); |
| 30 | 32 | ||
| 31 | #endif /* __GEMINI_COMMON_H__ */ | 33 | #endif /* __GEMINI_COMMON_H__ */ |
diff --git a/arch/arm/mach-gemini/reset.c b/arch/arm/mach-gemini/reset.c index b26659759e27..21a6d6d4f9c4 100644 --- a/arch/arm/mach-gemini/reset.c +++ b/arch/arm/mach-gemini/reset.c | |||
| @@ -14,7 +14,9 @@ | |||
| 14 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
| 15 | #include <mach/global_reg.h> | 15 | #include <mach/global_reg.h> |
| 16 | 16 | ||
| 17 | void gemini_restart(char mode, const char *cmd) | 17 | #include "common.h" |
| 18 | |||
| 19 | void gemini_restart(enum reboot_mode mode, const char *cmd) | ||
| 18 | { | 20 | { |
| 19 | __raw_writel(RESET_GLOBAL | RESET_CPU1, | 21 | __raw_writel(RESET_GLOBAL | RESET_CPU1, |
| 20 | IO_ADDRESS(GEMINI_GLOBAL_BASE) + GLOBAL_RESET); | 22 | IO_ADDRESS(GEMINI_GLOBAL_BASE) + GLOBAL_RESET); |
diff --git a/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c b/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c index fb8d4a2ad48c..a5edd7d60266 100644 --- a/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c +++ b/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2010 Pengutronix, Wolfram Sang <w.sang@pengutronix.de> | 2 | * Copyright (C) 2010 Pengutronix, Wolfram Sang <kernel@pengutronix.de> |
| 3 | * | 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it under | 4 | * This program is free software; you can redistribute it and/or modify it under |
| 5 | * the terms of the GNU General Public License version 2 as published by the | 5 | * the terms of the GNU General Public License version 2 as published by the |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 355b08936871..752969ff9de0 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
| @@ -171,6 +171,12 @@ | |||
| 171 | */ | 171 | */ |
| 172 | #define LINKS_PER_OCP_IF 2 | 172 | #define LINKS_PER_OCP_IF 2 |
| 173 | 173 | ||
| 174 | /* | ||
| 175 | * Address offset (in bytes) between the reset control and the reset | ||
| 176 | * status registers: 4 bytes on OMAP4 | ||
| 177 | */ | ||
| 178 | #define OMAP4_RST_CTRL_ST_OFFSET 4 | ||
| 179 | |||
| 174 | /** | 180 | /** |
| 175 | * struct omap_hwmod_soc_ops - fn ptrs for some SoC-specific operations | 181 | * struct omap_hwmod_soc_ops - fn ptrs for some SoC-specific operations |
| 176 | * @enable_module: function to enable a module (via MODULEMODE) | 182 | * @enable_module: function to enable a module (via MODULEMODE) |
| @@ -3016,10 +3022,12 @@ static int _omap4_deassert_hardreset(struct omap_hwmod *oh, | |||
| 3016 | if (ohri->st_shift) | 3022 | if (ohri->st_shift) |
| 3017 | pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n", | 3023 | pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n", |
| 3018 | oh->name, ohri->name); | 3024 | oh->name, ohri->name); |
| 3019 | return omap_prm_deassert_hardreset(ohri->rst_shift, 0, | 3025 | return omap_prm_deassert_hardreset(ohri->rst_shift, ohri->rst_shift, |
| 3020 | oh->clkdm->pwrdm.ptr->prcm_partition, | 3026 | oh->clkdm->pwrdm.ptr->prcm_partition, |
| 3021 | oh->clkdm->pwrdm.ptr->prcm_offs, | 3027 | oh->clkdm->pwrdm.ptr->prcm_offs, |
| 3022 | oh->prcm.omap4.rstctrl_offs, 0); | 3028 | oh->prcm.omap4.rstctrl_offs, |
| 3029 | oh->prcm.omap4.rstctrl_offs + | ||
| 3030 | OMAP4_RST_CTRL_ST_OFFSET); | ||
| 3023 | } | 3031 | } |
| 3024 | 3032 | ||
| 3025 | /** | 3033 | /** |
| @@ -3048,27 +3056,6 @@ static int _omap4_is_hardreset_asserted(struct omap_hwmod *oh, | |||
| 3048 | } | 3056 | } |
| 3049 | 3057 | ||
| 3050 | /** | 3058 | /** |
| 3051 | * _am33xx_assert_hardreset - call AM33XX PRM hardreset fn with hwmod args | ||
| 3052 | * @oh: struct omap_hwmod * to assert hardreset | ||
| 3053 | * @ohri: hardreset line data | ||
| 3054 | * | ||
| 3055 | * Call am33xx_prminst_assert_hardreset() with parameters extracted | ||
| 3056 | * from the hwmod @oh and the hardreset line data @ohri. Only | ||
| 3057 | * intended for use as an soc_ops function pointer. Passes along the | ||
| 3058 | * return value from am33xx_prminst_assert_hardreset(). XXX This | ||
| 3059 | * function is scheduled for removal when the PRM code is moved into | ||
| 3060 | * drivers/. | ||
| 3061 | */ | ||
| 3062 | static int _am33xx_assert_hardreset(struct omap_hwmod *oh, | ||
| 3063 | struct omap_hwmod_rst_info *ohri) | ||
| 3064 | |||
| 3065 | { | ||
| 3066 | return omap_prm_assert_hardreset(ohri->rst_shift, 0, | ||
| 3067 | oh->clkdm->pwrdm.ptr->prcm_offs, | ||
| 3068 | oh->prcm.omap4.rstctrl_offs); | ||
| 3069 | } | ||
| 3070 | |||
| 3071 | /** | ||
| 3072 | * _am33xx_deassert_hardreset - call AM33XX PRM hardreset fn with hwmod args | 3059 | * _am33xx_deassert_hardreset - call AM33XX PRM hardreset fn with hwmod args |
| 3073 | * @oh: struct omap_hwmod * to deassert hardreset | 3060 | * @oh: struct omap_hwmod * to deassert hardreset |
| 3074 | * @ohri: hardreset line data | 3061 | * @ohri: hardreset line data |
| @@ -3083,32 +3070,13 @@ static int _am33xx_assert_hardreset(struct omap_hwmod *oh, | |||
| 3083 | static int _am33xx_deassert_hardreset(struct omap_hwmod *oh, | 3070 | static int _am33xx_deassert_hardreset(struct omap_hwmod *oh, |
| 3084 | struct omap_hwmod_rst_info *ohri) | 3071 | struct omap_hwmod_rst_info *ohri) |
| 3085 | { | 3072 | { |
| 3086 | return omap_prm_deassert_hardreset(ohri->rst_shift, ohri->st_shift, 0, | 3073 | return omap_prm_deassert_hardreset(ohri->rst_shift, ohri->st_shift, |
| 3074 | oh->clkdm->pwrdm.ptr->prcm_partition, | ||
| 3087 | oh->clkdm->pwrdm.ptr->prcm_offs, | 3075 | oh->clkdm->pwrdm.ptr->prcm_offs, |
| 3088 | oh->prcm.omap4.rstctrl_offs, | 3076 | oh->prcm.omap4.rstctrl_offs, |
| 3089 | oh->prcm.omap4.rstst_offs); | 3077 | oh->prcm.omap4.rstst_offs); |
| 3090 | } | 3078 | } |
| 3091 | 3079 | ||
| 3092 | /** | ||
| 3093 | * _am33xx_is_hardreset_asserted - call AM33XX PRM hardreset fn with hwmod args | ||
| 3094 | * @oh: struct omap_hwmod * to test hardreset | ||
| 3095 | * @ohri: hardreset line data | ||
| 3096 | * | ||
| 3097 | * Call am33xx_prminst_is_hardreset_asserted() with parameters | ||
| 3098 | * extracted from the hwmod @oh and the hardreset line data @ohri. | ||
| 3099 | * Only intended for use as an soc_ops function pointer. Passes along | ||
| 3100 | * the return value from am33xx_prminst_is_hardreset_asserted(). XXX | ||
| 3101 | * This function is scheduled for removal when the PRM code is moved | ||
| 3102 | * into drivers/. | ||
| 3103 | */ | ||
| 3104 | static int _am33xx_is_hardreset_asserted(struct omap_hwmod *oh, | ||
| 3105 | struct omap_hwmod_rst_info *ohri) | ||
| 3106 | { | ||
| 3107 | return omap_prm_is_hardreset_asserted(ohri->rst_shift, 0, | ||
| 3108 | oh->clkdm->pwrdm.ptr->prcm_offs, | ||
| 3109 | oh->prcm.omap4.rstctrl_offs); | ||
| 3110 | } | ||
| 3111 | |||
| 3112 | /* Public functions */ | 3080 | /* Public functions */ |
| 3113 | 3081 | ||
| 3114 | u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs) | 3082 | u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs) |
| @@ -3908,21 +3876,13 @@ void __init omap_hwmod_init(void) | |||
| 3908 | soc_ops.init_clkdm = _init_clkdm; | 3876 | soc_ops.init_clkdm = _init_clkdm; |
| 3909 | soc_ops.update_context_lost = _omap4_update_context_lost; | 3877 | soc_ops.update_context_lost = _omap4_update_context_lost; |
| 3910 | soc_ops.get_context_lost = _omap4_get_context_lost; | 3878 | soc_ops.get_context_lost = _omap4_get_context_lost; |
| 3911 | } else if (soc_is_am43xx()) { | 3879 | } else if (cpu_is_ti816x() || soc_is_am33xx() || soc_is_am43xx()) { |
| 3912 | soc_ops.enable_module = _omap4_enable_module; | 3880 | soc_ops.enable_module = _omap4_enable_module; |
| 3913 | soc_ops.disable_module = _omap4_disable_module; | 3881 | soc_ops.disable_module = _omap4_disable_module; |
| 3914 | soc_ops.wait_target_ready = _omap4_wait_target_ready; | 3882 | soc_ops.wait_target_ready = _omap4_wait_target_ready; |
| 3915 | soc_ops.assert_hardreset = _omap4_assert_hardreset; | 3883 | soc_ops.assert_hardreset = _omap4_assert_hardreset; |
| 3916 | soc_ops.deassert_hardreset = _omap4_deassert_hardreset; | ||
| 3917 | soc_ops.is_hardreset_asserted = _omap4_is_hardreset_asserted; | ||
| 3918 | soc_ops.init_clkdm = _init_clkdm; | ||
| 3919 | } else if (cpu_is_ti816x() || soc_is_am33xx()) { | ||
| 3920 | soc_ops.enable_module = _omap4_enable_module; | ||
| 3921 | soc_ops.disable_module = _omap4_disable_module; | ||
| 3922 | soc_ops.wait_target_ready = _omap4_wait_target_ready; | ||
| 3923 | soc_ops.assert_hardreset = _am33xx_assert_hardreset; | ||
| 3924 | soc_ops.deassert_hardreset = _am33xx_deassert_hardreset; | 3884 | soc_ops.deassert_hardreset = _am33xx_deassert_hardreset; |
| 3925 | soc_ops.is_hardreset_asserted = _am33xx_is_hardreset_asserted; | 3885 | soc_ops.is_hardreset_asserted = _omap4_is_hardreset_asserted; |
| 3926 | soc_ops.init_clkdm = _init_clkdm; | 3886 | soc_ops.init_clkdm = _init_clkdm; |
| 3927 | } else { | 3887 | } else { |
| 3928 | WARN(1, "omap_hwmod: unknown SoC type\n"); | 3888 | WARN(1, "omap_hwmod: unknown SoC type\n"); |
diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c index e2223148ba4d..17e8004fc20f 100644 --- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c | |||
| @@ -544,6 +544,44 @@ static struct omap_hwmod am43xx_hdq1w_hwmod = { | |||
| 544 | }, | 544 | }, |
| 545 | }; | 545 | }; |
| 546 | 546 | ||
| 547 | static struct omap_hwmod_class_sysconfig am43xx_vpfe_sysc = { | ||
| 548 | .rev_offs = 0x0, | ||
| 549 | .sysc_offs = 0x104, | ||
| 550 | .sysc_flags = SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE, | ||
| 551 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 552 | MSTANDBY_FORCE | MSTANDBY_SMART | MSTANDBY_NO), | ||
| 553 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
| 554 | }; | ||
| 555 | |||
| 556 | static struct omap_hwmod_class am43xx_vpfe_hwmod_class = { | ||
| 557 | .name = "vpfe", | ||
| 558 | .sysc = &am43xx_vpfe_sysc, | ||
| 559 | }; | ||
| 560 | |||
| 561 | static struct omap_hwmod am43xx_vpfe0_hwmod = { | ||
| 562 | .name = "vpfe0", | ||
| 563 | .class = &am43xx_vpfe_hwmod_class, | ||
| 564 | .clkdm_name = "l3s_clkdm", | ||
| 565 | .prcm = { | ||
| 566 | .omap4 = { | ||
| 567 | .modulemode = MODULEMODE_SWCTRL, | ||
| 568 | .clkctrl_offs = AM43XX_CM_PER_VPFE0_CLKCTRL_OFFSET, | ||
| 569 | }, | ||
| 570 | }, | ||
| 571 | }; | ||
| 572 | |||
| 573 | static struct omap_hwmod am43xx_vpfe1_hwmod = { | ||
| 574 | .name = "vpfe1", | ||
| 575 | .class = &am43xx_vpfe_hwmod_class, | ||
| 576 | .clkdm_name = "l3s_clkdm", | ||
| 577 | .prcm = { | ||
| 578 | .omap4 = { | ||
| 579 | .modulemode = MODULEMODE_SWCTRL, | ||
| 580 | .clkctrl_offs = AM43XX_CM_PER_VPFE1_CLKCTRL_OFFSET, | ||
| 581 | }, | ||
| 582 | }, | ||
| 583 | }; | ||
| 584 | |||
| 547 | /* Interfaces */ | 585 | /* Interfaces */ |
| 548 | static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = { | 586 | static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = { |
| 549 | .master = &am33xx_l3_main_hwmod, | 587 | .master = &am33xx_l3_main_hwmod, |
| @@ -825,6 +863,34 @@ static struct omap_hwmod_ocp_if am43xx_l4_ls__hdq1w = { | |||
| 825 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 863 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 826 | }; | 864 | }; |
| 827 | 865 | ||
| 866 | static struct omap_hwmod_ocp_if am43xx_l3__vpfe0 = { | ||
| 867 | .master = &am43xx_vpfe0_hwmod, | ||
| 868 | .slave = &am33xx_l3_main_hwmod, | ||
| 869 | .clk = "l3_gclk", | ||
| 870 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 871 | }; | ||
| 872 | |||
| 873 | static struct omap_hwmod_ocp_if am43xx_l3__vpfe1 = { | ||
| 874 | .master = &am43xx_vpfe1_hwmod, | ||
| 875 | .slave = &am33xx_l3_main_hwmod, | ||
| 876 | .clk = "l3_gclk", | ||
| 877 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 878 | }; | ||
| 879 | |||
| 880 | static struct omap_hwmod_ocp_if am43xx_l4_ls__vpfe0 = { | ||
| 881 | .master = &am33xx_l4_ls_hwmod, | ||
| 882 | .slave = &am43xx_vpfe0_hwmod, | ||
| 883 | .clk = "l4ls_gclk", | ||
| 884 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 885 | }; | ||
| 886 | |||
| 887 | static struct omap_hwmod_ocp_if am43xx_l4_ls__vpfe1 = { | ||
| 888 | .master = &am33xx_l4_ls_hwmod, | ||
| 889 | .slave = &am43xx_vpfe1_hwmod, | ||
| 890 | .clk = "l4ls_gclk", | ||
| 891 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 892 | }; | ||
| 893 | |||
| 828 | static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { | 894 | static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { |
| 829 | &am33xx_l4_wkup__synctimer, | 895 | &am33xx_l4_wkup__synctimer, |
| 830 | &am43xx_l4_ls__timer8, | 896 | &am43xx_l4_ls__timer8, |
| @@ -925,6 +991,10 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { | |||
| 925 | &am43xx_l4_ls__dss_dispc, | 991 | &am43xx_l4_ls__dss_dispc, |
| 926 | &am43xx_l4_ls__dss_rfbi, | 992 | &am43xx_l4_ls__dss_rfbi, |
| 927 | &am43xx_l4_ls__hdq1w, | 993 | &am43xx_l4_ls__hdq1w, |
| 994 | &am43xx_l3__vpfe0, | ||
| 995 | &am43xx_l3__vpfe1, | ||
| 996 | &am43xx_l4_ls__vpfe0, | ||
| 997 | &am43xx_l4_ls__vpfe1, | ||
| 928 | NULL, | 998 | NULL, |
| 929 | }; | 999 | }; |
| 930 | 1000 | ||
diff --git a/arch/arm/mach-omap2/prcm43xx.h b/arch/arm/mach-omap2/prcm43xx.h index 48df3b55057e..d0261996db6d 100644 --- a/arch/arm/mach-omap2/prcm43xx.h +++ b/arch/arm/mach-omap2/prcm43xx.h | |||
| @@ -144,5 +144,6 @@ | |||
| 144 | #define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET 0x05C0 | 144 | #define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET 0x05C0 |
| 145 | #define AM43XX_CM_PER_DSS_CLKCTRL_OFFSET 0x0a20 | 145 | #define AM43XX_CM_PER_DSS_CLKCTRL_OFFSET 0x0a20 |
| 146 | #define AM43XX_CM_PER_HDQ1W_CLKCTRL_OFFSET 0x04a0 | 146 | #define AM43XX_CM_PER_HDQ1W_CLKCTRL_OFFSET 0x04a0 |
| 147 | 147 | #define AM43XX_CM_PER_VPFE0_CLKCTRL_OFFSET 0x0068 | |
| 148 | #define AM43XX_CM_PER_VPFE1_CLKCTRL_OFFSET 0x0070 | ||
| 148 | #endif | 149 | #endif |
diff --git a/arch/arm/mach-omap2/prm-regbits-34xx.h b/arch/arm/mach-omap2/prm-regbits-34xx.h index cbefbd7cfdb5..661d753df584 100644 --- a/arch/arm/mach-omap2/prm-regbits-34xx.h +++ b/arch/arm/mach-omap2/prm-regbits-34xx.h | |||
| @@ -112,6 +112,7 @@ | |||
| 112 | #define OMAP3430_VC_CMD_ONLP_SHIFT 16 | 112 | #define OMAP3430_VC_CMD_ONLP_SHIFT 16 |
| 113 | #define OMAP3430_VC_CMD_RET_SHIFT 8 | 113 | #define OMAP3430_VC_CMD_RET_SHIFT 8 |
| 114 | #define OMAP3430_VC_CMD_OFF_SHIFT 0 | 114 | #define OMAP3430_VC_CMD_OFF_SHIFT 0 |
| 115 | #define OMAP3430_SREN_MASK (1 << 4) | ||
| 115 | #define OMAP3430_HSEN_MASK (1 << 3) | 116 | #define OMAP3430_HSEN_MASK (1 << 3) |
| 116 | #define OMAP3430_MCODE_MASK (0x7 << 0) | 117 | #define OMAP3430_MCODE_MASK (0x7 << 0) |
| 117 | #define OMAP3430_VALID_MASK (1 << 24) | 118 | #define OMAP3430_VALID_MASK (1 << 24) |
diff --git a/arch/arm/mach-omap2/prm-regbits-44xx.h b/arch/arm/mach-omap2/prm-regbits-44xx.h index b1c7a33e00e7..e794828dee55 100644 --- a/arch/arm/mach-omap2/prm-regbits-44xx.h +++ b/arch/arm/mach-omap2/prm-regbits-44xx.h | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #define OMAP4430_GLOBAL_WARM_SW_RST_SHIFT 1 | 35 | #define OMAP4430_GLOBAL_WARM_SW_RST_SHIFT 1 |
| 36 | #define OMAP4430_GLOBAL_WUEN_MASK (1 << 16) | 36 | #define OMAP4430_GLOBAL_WUEN_MASK (1 << 16) |
| 37 | #define OMAP4430_HSMCODE_MASK (0x7 << 0) | 37 | #define OMAP4430_HSMCODE_MASK (0x7 << 0) |
| 38 | #define OMAP4430_SRMODEEN_MASK (1 << 4) | ||
| 38 | #define OMAP4430_HSMODEEN_MASK (1 << 3) | 39 | #define OMAP4430_HSMODEEN_MASK (1 << 3) |
| 39 | #define OMAP4430_HSSCLL_SHIFT 24 | 40 | #define OMAP4430_HSSCLL_SHIFT 24 |
| 40 | #define OMAP4430_ICEPICK_RST_SHIFT 9 | 41 | #define OMAP4430_ICEPICK_RST_SHIFT 9 |
diff --git a/arch/arm/mach-omap2/prminst44xx.c b/arch/arm/mach-omap2/prminst44xx.c index c4859c4d3646..d0b15dbafa2e 100644 --- a/arch/arm/mach-omap2/prminst44xx.c +++ b/arch/arm/mach-omap2/prminst44xx.c | |||
| @@ -87,12 +87,6 @@ u32 omap4_prminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, s16 inst, | |||
| 87 | return v; | 87 | return v; |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | /* | ||
| 91 | * Address offset (in bytes) between the reset control and the reset | ||
| 92 | * status registers: 4 bytes on OMAP4 | ||
| 93 | */ | ||
| 94 | #define OMAP4_RST_CTRL_ST_OFFSET 4 | ||
| 95 | |||
| 96 | /** | 90 | /** |
| 97 | * omap4_prminst_is_hardreset_asserted - read the HW reset line state of | 91 | * omap4_prminst_is_hardreset_asserted - read the HW reset line state of |
| 98 | * submodules contained in the hwmod module | 92 | * submodules contained in the hwmod module |
| @@ -141,11 +135,11 @@ int omap4_prminst_assert_hardreset(u8 shift, u8 part, s16 inst, | |||
| 141 | * omap4_prminst_deassert_hardreset - deassert a submodule hardreset line and | 135 | * omap4_prminst_deassert_hardreset - deassert a submodule hardreset line and |
| 142 | * wait | 136 | * wait |
| 143 | * @shift: register bit shift corresponding to the reset line to deassert | 137 | * @shift: register bit shift corresponding to the reset line to deassert |
| 144 | * @st_shift: status bit offset, not used for OMAP4+ | 138 | * @st_shift: status bit offset corresponding to the reset line |
| 145 | * @part: PRM partition | 139 | * @part: PRM partition |
| 146 | * @inst: PRM instance offset | 140 | * @inst: PRM instance offset |
| 147 | * @rstctrl_offs: reset register offset | 141 | * @rstctrl_offs: reset register offset |
| 148 | * @st_offs: reset status register offset, not used for OMAP4+ | 142 | * @rstst_offs: reset status register offset |
| 149 | * | 143 | * |
| 150 | * Some IPs like dsp, ipu or iva contain processors that require an HW | 144 | * Some IPs like dsp, ipu or iva contain processors that require an HW |
| 151 | * reset line to be asserted / deasserted in order to fully enable the | 145 | * reset line to be asserted / deasserted in order to fully enable the |
| @@ -157,11 +151,11 @@ int omap4_prminst_assert_hardreset(u8 shift, u8 part, s16 inst, | |||
| 157 | * of reset, or -EBUSY if the submodule did not exit reset promptly. | 151 | * of reset, or -EBUSY if the submodule did not exit reset promptly. |
| 158 | */ | 152 | */ |
| 159 | int omap4_prminst_deassert_hardreset(u8 shift, u8 st_shift, u8 part, s16 inst, | 153 | int omap4_prminst_deassert_hardreset(u8 shift, u8 st_shift, u8 part, s16 inst, |
| 160 | u16 rstctrl_offs, u16 st_offs) | 154 | u16 rstctrl_offs, u16 rstst_offs) |
| 161 | { | 155 | { |
| 162 | int c; | 156 | int c; |
| 163 | u32 mask = 1 << shift; | 157 | u32 mask = 1 << shift; |
| 164 | u16 rstst_offs = rstctrl_offs + OMAP4_RST_CTRL_ST_OFFSET; | 158 | u32 st_mask = 1 << st_shift; |
| 165 | 159 | ||
| 166 | /* Check the current status to avoid de-asserting the line twice */ | 160 | /* Check the current status to avoid de-asserting the line twice */ |
| 167 | if (omap4_prminst_is_hardreset_asserted(shift, part, inst, | 161 | if (omap4_prminst_is_hardreset_asserted(shift, part, inst, |
| @@ -169,13 +163,13 @@ int omap4_prminst_deassert_hardreset(u8 shift, u8 st_shift, u8 part, s16 inst, | |||
| 169 | return -EEXIST; | 163 | return -EEXIST; |
| 170 | 164 | ||
| 171 | /* Clear the reset status by writing 1 to the status bit */ | 165 | /* Clear the reset status by writing 1 to the status bit */ |
| 172 | omap4_prminst_rmw_inst_reg_bits(0xffffffff, mask, part, inst, | 166 | omap4_prminst_rmw_inst_reg_bits(0xffffffff, st_mask, part, inst, |
| 173 | rstst_offs); | 167 | rstst_offs); |
| 174 | /* de-assert the reset control line */ | 168 | /* de-assert the reset control line */ |
| 175 | omap4_prminst_rmw_inst_reg_bits(mask, 0, part, inst, rstctrl_offs); | 169 | omap4_prminst_rmw_inst_reg_bits(mask, 0, part, inst, rstctrl_offs); |
| 176 | /* wait the status to be set */ | 170 | /* wait the status to be set */ |
| 177 | omap_test_timeout(omap4_prminst_is_hardreset_asserted(shift, part, inst, | 171 | omap_test_timeout(omap4_prminst_is_hardreset_asserted(st_shift, part, |
| 178 | rstst_offs), | 172 | inst, rstst_offs), |
| 179 | MAX_MODULE_HARDRESET_WAIT, c); | 173 | MAX_MODULE_HARDRESET_WAIT, c); |
| 180 | 174 | ||
| 181 | return (c == MAX_MODULE_HARDRESET_WAIT) ? -EBUSY : 0; | 175 | return (c == MAX_MODULE_HARDRESET_WAIT) ? -EBUSY : 0; |
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index cef67af9e9b8..cac46d852da1 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
| @@ -298,14 +298,11 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, | |||
| 298 | if (IS_ERR(src)) | 298 | if (IS_ERR(src)) |
| 299 | return PTR_ERR(src); | 299 | return PTR_ERR(src); |
| 300 | 300 | ||
| 301 | if (clk_get_parent(timer->fclk) != src) { | 301 | r = clk_set_parent(timer->fclk, src); |
| 302 | r = clk_set_parent(timer->fclk, src); | 302 | if (r < 0) { |
| 303 | if (r < 0) { | 303 | pr_warn("%s: %s cannot set source\n", __func__, oh->name); |
| 304 | pr_warn("%s: %s cannot set source\n", __func__, | 304 | clk_put(src); |
| 305 | oh->name); | 305 | return r; |
| 306 | clk_put(src); | ||
| 307 | return r; | ||
| 308 | } | ||
| 309 | } | 306 | } |
| 310 | 307 | ||
| 311 | clk_put(src); | 308 | clk_put(src); |
diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c index be9ef834fa81..076fd20d7e5a 100644 --- a/arch/arm/mach-omap2/vc.c +++ b/arch/arm/mach-omap2/vc.c | |||
| @@ -316,7 +316,8 @@ static void __init omap3_vc_init_pmic_signaling(struct voltagedomain *voltdm) | |||
| 316 | * idle. And we can also scale voltages to zero for off-idle. | 316 | * idle. And we can also scale voltages to zero for off-idle. |
| 317 | * Note that no actual voltage scaling during off-idle will | 317 | * Note that no actual voltage scaling during off-idle will |
| 318 | * happen unless the board specific twl4030 PMIC scripts are | 318 | * happen unless the board specific twl4030 PMIC scripts are |
| 319 | * loaded. | 319 | * loaded. See also omap_vc_i2c_init for comments regarding |
| 320 | * erratum i531. | ||
| 320 | */ | 321 | */ |
| 321 | val = voltdm->read(OMAP3_PRM_VOLTCTRL_OFFSET); | 322 | val = voltdm->read(OMAP3_PRM_VOLTCTRL_OFFSET); |
| 322 | if (!(val & OMAP3430_PRM_VOLTCTRL_SEL_OFF)) { | 323 | if (!(val & OMAP3430_PRM_VOLTCTRL_SEL_OFF)) { |
| @@ -704,9 +705,16 @@ static void __init omap_vc_i2c_init(struct voltagedomain *voltdm) | |||
| 704 | return; | 705 | return; |
| 705 | } | 706 | } |
| 706 | 707 | ||
| 708 | /* | ||
| 709 | * Note that for omap3 OMAP3430_SREN_MASK clears SREN to work around | ||
| 710 | * erratum i531 "Extra Power Consumed When Repeated Start Operation | ||
| 711 | * Mode Is Enabled on I2C Interface Dedicated for Smart Reflex (I2C4)". | ||
| 712 | * Otherwise I2C4 eventually leads into about 23mW extra power being | ||
| 713 | * consumed even during off idle using VMODE. | ||
| 714 | */ | ||
| 707 | i2c_high_speed = voltdm->pmic->i2c_high_speed; | 715 | i2c_high_speed = voltdm->pmic->i2c_high_speed; |
| 708 | if (i2c_high_speed) | 716 | if (i2c_high_speed) |
| 709 | voltdm->rmw(vc->common->i2c_cfg_hsen_mask, | 717 | voltdm->rmw(vc->common->i2c_cfg_clear_mask, |
| 710 | vc->common->i2c_cfg_hsen_mask, | 718 | vc->common->i2c_cfg_hsen_mask, |
| 711 | vc->common->i2c_cfg_reg); | 719 | vc->common->i2c_cfg_reg); |
| 712 | 720 | ||
diff --git a/arch/arm/mach-omap2/vc.h b/arch/arm/mach-omap2/vc.h index cdbdd78e755e..89b83b7ff3ec 100644 --- a/arch/arm/mach-omap2/vc.h +++ b/arch/arm/mach-omap2/vc.h | |||
| @@ -34,6 +34,7 @@ struct voltagedomain; | |||
| 34 | * @cmd_ret_shift: RET field shift in PRM_VC_CMD_VAL_* register | 34 | * @cmd_ret_shift: RET field shift in PRM_VC_CMD_VAL_* register |
| 35 | * @cmd_off_shift: OFF field shift in PRM_VC_CMD_VAL_* register | 35 | * @cmd_off_shift: OFF field shift in PRM_VC_CMD_VAL_* register |
| 36 | * @i2c_cfg_reg: I2C configuration register offset | 36 | * @i2c_cfg_reg: I2C configuration register offset |
| 37 | * @i2c_cfg_clear_mask: high-speed mode bit clear mask in I2C config register | ||
| 37 | * @i2c_cfg_hsen_mask: high-speed mode bit field mask in I2C config register | 38 | * @i2c_cfg_hsen_mask: high-speed mode bit field mask in I2C config register |
| 38 | * @i2c_mcode_mask: MCODE field mask for I2C config register | 39 | * @i2c_mcode_mask: MCODE field mask for I2C config register |
| 39 | * | 40 | * |
| @@ -52,6 +53,7 @@ struct omap_vc_common { | |||
| 52 | u8 cmd_ret_shift; | 53 | u8 cmd_ret_shift; |
| 53 | u8 cmd_off_shift; | 54 | u8 cmd_off_shift; |
| 54 | u8 i2c_cfg_reg; | 55 | u8 i2c_cfg_reg; |
| 56 | u8 i2c_cfg_clear_mask; | ||
| 55 | u8 i2c_cfg_hsen_mask; | 57 | u8 i2c_cfg_hsen_mask; |
| 56 | u8 i2c_mcode_mask; | 58 | u8 i2c_mcode_mask; |
| 57 | }; | 59 | }; |
diff --git a/arch/arm/mach-omap2/vc3xxx_data.c b/arch/arm/mach-omap2/vc3xxx_data.c index 75bc4aa22b3a..71d74c9172c1 100644 --- a/arch/arm/mach-omap2/vc3xxx_data.c +++ b/arch/arm/mach-omap2/vc3xxx_data.c | |||
| @@ -40,6 +40,7 @@ static struct omap_vc_common omap3_vc_common = { | |||
| 40 | .cmd_onlp_shift = OMAP3430_VC_CMD_ONLP_SHIFT, | 40 | .cmd_onlp_shift = OMAP3430_VC_CMD_ONLP_SHIFT, |
| 41 | .cmd_ret_shift = OMAP3430_VC_CMD_RET_SHIFT, | 41 | .cmd_ret_shift = OMAP3430_VC_CMD_RET_SHIFT, |
| 42 | .cmd_off_shift = OMAP3430_VC_CMD_OFF_SHIFT, | 42 | .cmd_off_shift = OMAP3430_VC_CMD_OFF_SHIFT, |
| 43 | .i2c_cfg_clear_mask = OMAP3430_SREN_MASK | OMAP3430_HSEN_MASK, | ||
| 43 | .i2c_cfg_hsen_mask = OMAP3430_HSEN_MASK, | 44 | .i2c_cfg_hsen_mask = OMAP3430_HSEN_MASK, |
| 44 | .i2c_cfg_reg = OMAP3_PRM_VC_I2C_CFG_OFFSET, | 45 | .i2c_cfg_reg = OMAP3_PRM_VC_I2C_CFG_OFFSET, |
| 45 | .i2c_mcode_mask = OMAP3430_MCODE_MASK, | 46 | .i2c_mcode_mask = OMAP3430_MCODE_MASK, |
diff --git a/arch/arm/mach-omap2/vc44xx_data.c b/arch/arm/mach-omap2/vc44xx_data.c index 085e5d6a04fd..2abd5fa8a697 100644 --- a/arch/arm/mach-omap2/vc44xx_data.c +++ b/arch/arm/mach-omap2/vc44xx_data.c | |||
| @@ -42,6 +42,7 @@ static const struct omap_vc_common omap4_vc_common = { | |||
| 42 | .cmd_ret_shift = OMAP4430_RET_SHIFT, | 42 | .cmd_ret_shift = OMAP4430_RET_SHIFT, |
| 43 | .cmd_off_shift = OMAP4430_OFF_SHIFT, | 43 | .cmd_off_shift = OMAP4430_OFF_SHIFT, |
| 44 | .i2c_cfg_reg = OMAP4_PRM_VC_CFG_I2C_MODE_OFFSET, | 44 | .i2c_cfg_reg = OMAP4_PRM_VC_CFG_I2C_MODE_OFFSET, |
| 45 | .i2c_cfg_clear_mask = OMAP4430_SRMODEEN_MASK | OMAP4430_HSMODEEN_MASK, | ||
| 45 | .i2c_cfg_hsen_mask = OMAP4430_HSMODEEN_MASK, | 46 | .i2c_cfg_hsen_mask = OMAP4430_HSMODEEN_MASK, |
| 46 | .i2c_mcode_mask = OMAP4430_HSMCODE_MASK, | 47 | .i2c_mcode_mask = OMAP4430_HSMCODE_MASK, |
| 47 | }; | 48 | }; |
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index 8896e71586f5..f09683687963 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
| @@ -691,4 +691,13 @@ config SHARPSL_PM_MAX1111 | |||
| 691 | config PXA310_ULPI | 691 | config PXA310_ULPI |
| 692 | bool | 692 | bool |
| 693 | 693 | ||
| 694 | config PXA_SYSTEMS_CPLDS | ||
| 695 | tristate "Motherboard cplds" | ||
| 696 | default ARCH_LUBBOCK || MACH_MAINSTONE | ||
| 697 | help | ||
| 698 | This driver supports the Lubbock and Mainstone multifunction chip | ||
| 699 | found on the pxa25x development platform system (Lubbock) and pxa27x | ||
| 700 | development platform system (Mainstone). This IO board supports the | ||
| 701 | interrupts handling, ethernet controller, flash chips, etc ... | ||
| 702 | |||
| 694 | endif | 703 | endif |
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index eb0bf7678a99..4087d334ecdf 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile | |||
| @@ -90,4 +90,5 @@ obj-$(CONFIG_MACH_RAUMFELD_CONNECTOR) += raumfeld.o | |||
| 90 | obj-$(CONFIG_MACH_RAUMFELD_SPEAKER) += raumfeld.o | 90 | obj-$(CONFIG_MACH_RAUMFELD_SPEAKER) += raumfeld.o |
| 91 | obj-$(CONFIG_MACH_ZIPIT2) += z2.o | 91 | obj-$(CONFIG_MACH_ZIPIT2) += z2.o |
| 92 | 92 | ||
| 93 | obj-$(CONFIG_PXA_SYSTEMS_CPLDS) += pxa_cplds_irqs.o | ||
| 93 | obj-$(CONFIG_TOSA_BT) += tosa-bt.o | 94 | obj-$(CONFIG_TOSA_BT) += tosa-bt.o |
diff --git a/arch/arm/mach-pxa/include/mach/lubbock.h b/arch/arm/mach-pxa/include/mach/lubbock.h index 958cd6af9384..1eecf794acd2 100644 --- a/arch/arm/mach-pxa/include/mach/lubbock.h +++ b/arch/arm/mach-pxa/include/mach/lubbock.h | |||
| @@ -37,7 +37,9 @@ | |||
| 37 | #define LUB_GP __LUB_REG(LUBBOCK_FPGA_PHYS + 0x100) | 37 | #define LUB_GP __LUB_REG(LUBBOCK_FPGA_PHYS + 0x100) |
| 38 | 38 | ||
| 39 | /* Board specific IRQs */ | 39 | /* Board specific IRQs */ |
| 40 | #define LUBBOCK_IRQ(x) (IRQ_BOARD_START + (x)) | 40 | #define LUBBOCK_NR_IRQS IRQ_BOARD_START |
| 41 | |||
| 42 | #define LUBBOCK_IRQ(x) (LUBBOCK_NR_IRQS + (x)) | ||
| 41 | #define LUBBOCK_SD_IRQ LUBBOCK_IRQ(0) | 43 | #define LUBBOCK_SD_IRQ LUBBOCK_IRQ(0) |
| 42 | #define LUBBOCK_SA1111_IRQ LUBBOCK_IRQ(1) | 44 | #define LUBBOCK_SA1111_IRQ LUBBOCK_IRQ(1) |
| 43 | #define LUBBOCK_USB_IRQ LUBBOCK_IRQ(2) /* usb connect */ | 45 | #define LUBBOCK_USB_IRQ LUBBOCK_IRQ(2) /* usb connect */ |
| @@ -47,8 +49,7 @@ | |||
| 47 | #define LUBBOCK_USB_DISC_IRQ LUBBOCK_IRQ(6) /* usb disconnect */ | 49 | #define LUBBOCK_USB_DISC_IRQ LUBBOCK_IRQ(6) /* usb disconnect */ |
| 48 | #define LUBBOCK_LAST_IRQ LUBBOCK_IRQ(6) | 50 | #define LUBBOCK_LAST_IRQ LUBBOCK_IRQ(6) |
| 49 | 51 | ||
| 50 | #define LUBBOCK_SA1111_IRQ_BASE (IRQ_BOARD_START + 16) | 52 | #define LUBBOCK_SA1111_IRQ_BASE (LUBBOCK_NR_IRQS + 32) |
| 51 | #define LUBBOCK_NR_IRQS (IRQ_BOARD_START + 16 + 55) | ||
| 52 | 53 | ||
| 53 | #ifndef __ASSEMBLY__ | 54 | #ifndef __ASSEMBLY__ |
| 54 | extern void lubbock_set_misc_wr(unsigned int mask, unsigned int set); | 55 | extern void lubbock_set_misc_wr(unsigned int mask, unsigned int set); |
diff --git a/arch/arm/mach-pxa/include/mach/mainstone.h b/arch/arm/mach-pxa/include/mach/mainstone.h index 1bfc4e822a41..e82a7d31104e 100644 --- a/arch/arm/mach-pxa/include/mach/mainstone.h +++ b/arch/arm/mach-pxa/include/mach/mainstone.h | |||
| @@ -120,7 +120,9 @@ | |||
| 120 | #define MST_PCMCIA_PWR_VCC_50 0x4 /* voltage VCC = 5.0V */ | 120 | #define MST_PCMCIA_PWR_VCC_50 0x4 /* voltage VCC = 5.0V */ |
| 121 | 121 | ||
| 122 | /* board specific IRQs */ | 122 | /* board specific IRQs */ |
| 123 | #define MAINSTONE_IRQ(x) (IRQ_BOARD_START + (x)) | 123 | #define MAINSTONE_NR_IRQS IRQ_BOARD_START |
| 124 | |||
| 125 | #define MAINSTONE_IRQ(x) (MAINSTONE_NR_IRQS + (x)) | ||
| 124 | #define MAINSTONE_MMC_IRQ MAINSTONE_IRQ(0) | 126 | #define MAINSTONE_MMC_IRQ MAINSTONE_IRQ(0) |
| 125 | #define MAINSTONE_USIM_IRQ MAINSTONE_IRQ(1) | 127 | #define MAINSTONE_USIM_IRQ MAINSTONE_IRQ(1) |
| 126 | #define MAINSTONE_USBC_IRQ MAINSTONE_IRQ(2) | 128 | #define MAINSTONE_USBC_IRQ MAINSTONE_IRQ(2) |
| @@ -136,6 +138,4 @@ | |||
| 136 | #define MAINSTONE_S1_STSCHG_IRQ MAINSTONE_IRQ(14) | 138 | #define MAINSTONE_S1_STSCHG_IRQ MAINSTONE_IRQ(14) |
| 137 | #define MAINSTONE_S1_IRQ MAINSTONE_IRQ(15) | 139 | #define MAINSTONE_S1_IRQ MAINSTONE_IRQ(15) |
| 138 | 140 | ||
| 139 | #define MAINSTONE_NR_IRQS (IRQ_BOARD_START + 16) | ||
| 140 | |||
| 141 | #endif | 141 | #endif |
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index d8a1be619f21..4ac9ab80d24b 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
| 13 | */ | 13 | */ |
| 14 | #include <linux/gpio.h> | 14 | #include <linux/gpio.h> |
| 15 | #include <linux/gpio/machine.h> | ||
| 15 | #include <linux/module.h> | 16 | #include <linux/module.h> |
| 16 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
| 17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
| @@ -123,84 +124,6 @@ void lubbock_set_misc_wr(unsigned int mask, unsigned int set) | |||
| 123 | } | 124 | } |
| 124 | EXPORT_SYMBOL(lubbock_set_misc_wr); | 125 | EXPORT_SYMBOL(lubbock_set_misc_wr); |
| 125 | 126 | ||
| 126 | static unsigned long lubbock_irq_enabled; | ||
| 127 | |||
| 128 | static void lubbock_mask_irq(struct irq_data *d) | ||
| 129 | { | ||
| 130 | int lubbock_irq = (d->irq - LUBBOCK_IRQ(0)); | ||
| 131 | LUB_IRQ_MASK_EN = (lubbock_irq_enabled &= ~(1 << lubbock_irq)); | ||
| 132 | } | ||
| 133 | |||
| 134 | static void lubbock_unmask_irq(struct irq_data *d) | ||
| 135 | { | ||
| 136 | int lubbock_irq = (d->irq - LUBBOCK_IRQ(0)); | ||
| 137 | /* the irq can be acknowledged only if deasserted, so it's done here */ | ||
| 138 | LUB_IRQ_SET_CLR &= ~(1 << lubbock_irq); | ||
| 139 | LUB_IRQ_MASK_EN = (lubbock_irq_enabled |= (1 << lubbock_irq)); | ||
| 140 | } | ||
| 141 | |||
| 142 | static struct irq_chip lubbock_irq_chip = { | ||
| 143 | .name = "FPGA", | ||
| 144 | .irq_ack = lubbock_mask_irq, | ||
| 145 | .irq_mask = lubbock_mask_irq, | ||
| 146 | .irq_unmask = lubbock_unmask_irq, | ||
| 147 | }; | ||
| 148 | |||
| 149 | static void lubbock_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
| 150 | { | ||
| 151 | unsigned long pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled; | ||
| 152 | do { | ||
| 153 | /* clear our parent irq */ | ||
| 154 | desc->irq_data.chip->irq_ack(&desc->irq_data); | ||
| 155 | if (likely(pending)) { | ||
| 156 | irq = LUBBOCK_IRQ(0) + __ffs(pending); | ||
| 157 | generic_handle_irq(irq); | ||
| 158 | } | ||
| 159 | pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled; | ||
| 160 | } while (pending); | ||
| 161 | } | ||
| 162 | |||
| 163 | static void __init lubbock_init_irq(void) | ||
| 164 | { | ||
| 165 | int irq; | ||
| 166 | |||
| 167 | pxa25x_init_irq(); | ||
| 168 | |||
| 169 | /* setup extra lubbock irqs */ | ||
| 170 | for (irq = LUBBOCK_IRQ(0); irq <= LUBBOCK_LAST_IRQ; irq++) { | ||
| 171 | irq_set_chip_and_handler(irq, &lubbock_irq_chip, | ||
| 172 | handle_level_irq); | ||
| 173 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
| 174 | } | ||
| 175 | |||
| 176 | irq_set_chained_handler(PXA_GPIO_TO_IRQ(0), lubbock_irq_handler); | ||
| 177 | irq_set_irq_type(PXA_GPIO_TO_IRQ(0), IRQ_TYPE_EDGE_FALLING); | ||
| 178 | } | ||
| 179 | |||
| 180 | #ifdef CONFIG_PM | ||
| 181 | |||
| 182 | static void lubbock_irq_resume(void) | ||
| 183 | { | ||
| 184 | LUB_IRQ_MASK_EN = lubbock_irq_enabled; | ||
| 185 | } | ||
| 186 | |||
| 187 | static struct syscore_ops lubbock_irq_syscore_ops = { | ||
| 188 | .resume = lubbock_irq_resume, | ||
| 189 | }; | ||
| 190 | |||
| 191 | static int __init lubbock_irq_device_init(void) | ||
| 192 | { | ||
| 193 | if (machine_is_lubbock()) { | ||
| 194 | register_syscore_ops(&lubbock_irq_syscore_ops); | ||
| 195 | return 0; | ||
| 196 | } | ||
| 197 | return -ENODEV; | ||
| 198 | } | ||
| 199 | |||
| 200 | device_initcall(lubbock_irq_device_init); | ||
| 201 | |||
| 202 | #endif | ||
| 203 | |||
| 204 | static int lubbock_udc_is_connected(void) | 127 | static int lubbock_udc_is_connected(void) |
| 205 | { | 128 | { |
| 206 | return (LUB_MISC_RD & (1 << 9)) == 0; | 129 | return (LUB_MISC_RD & (1 << 9)) == 0; |
| @@ -383,11 +306,38 @@ static struct platform_device lubbock_flash_device[2] = { | |||
| 383 | }, | 306 | }, |
| 384 | }; | 307 | }; |
| 385 | 308 | ||
| 309 | static struct resource lubbock_cplds_resources[] = { | ||
| 310 | [0] = { | ||
| 311 | .start = LUBBOCK_FPGA_PHYS + 0xc0, | ||
| 312 | .end = LUBBOCK_FPGA_PHYS + 0xe0 - 1, | ||
| 313 | .flags = IORESOURCE_MEM, | ||
| 314 | }, | ||
| 315 | [1] = { | ||
| 316 | .start = PXA_GPIO_TO_IRQ(0), | ||
| 317 | .end = PXA_GPIO_TO_IRQ(0), | ||
| 318 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, | ||
| 319 | }, | ||
| 320 | [2] = { | ||
| 321 | .start = LUBBOCK_IRQ(0), | ||
| 322 | .end = LUBBOCK_IRQ(6), | ||
| 323 | .flags = IORESOURCE_IRQ, | ||
| 324 | }, | ||
| 325 | }; | ||
| 326 | |||
| 327 | static struct platform_device lubbock_cplds_device = { | ||
| 328 | .name = "pxa_cplds_irqs", | ||
| 329 | .id = -1, | ||
| 330 | .resource = &lubbock_cplds_resources[0], | ||
| 331 | .num_resources = 3, | ||
| 332 | }; | ||
| 333 | |||
| 334 | |||
| 386 | static struct platform_device *devices[] __initdata = { | 335 | static struct platform_device *devices[] __initdata = { |
| 387 | &sa1111_device, | 336 | &sa1111_device, |
| 388 | &smc91x_device, | 337 | &smc91x_device, |
| 389 | &lubbock_flash_device[0], | 338 | &lubbock_flash_device[0], |
| 390 | &lubbock_flash_device[1], | 339 | &lubbock_flash_device[1], |
| 340 | &lubbock_cplds_device, | ||
| 391 | }; | 341 | }; |
| 392 | 342 | ||
| 393 | static struct pxafb_mode_info sharp_lm8v31_mode = { | 343 | static struct pxafb_mode_info sharp_lm8v31_mode = { |
| @@ -648,7 +598,7 @@ MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform (aka Lubbock)") | |||
| 648 | /* Maintainer: MontaVista Software Inc. */ | 598 | /* Maintainer: MontaVista Software Inc. */ |
| 649 | .map_io = lubbock_map_io, | 599 | .map_io = lubbock_map_io, |
| 650 | .nr_irqs = LUBBOCK_NR_IRQS, | 600 | .nr_irqs = LUBBOCK_NR_IRQS, |
| 651 | .init_irq = lubbock_init_irq, | 601 | .init_irq = pxa25x_init_irq, |
| 652 | .handle_irq = pxa25x_handle_irq, | 602 | .handle_irq = pxa25x_handle_irq, |
| 653 | .init_time = pxa_timer_init, | 603 | .init_time = pxa_timer_init, |
| 654 | .init_machine = lubbock_init, | 604 | .init_machine = lubbock_init, |
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 78b84c0dfc79..2c0658cf6be2 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | * published by the Free Software Foundation. | 13 | * published by the Free Software Foundation. |
| 14 | */ | 14 | */ |
| 15 | #include <linux/gpio.h> | 15 | #include <linux/gpio.h> |
| 16 | #include <linux/gpio/machine.h> | ||
| 16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
| 17 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
| 18 | #include <linux/syscore_ops.h> | 19 | #include <linux/syscore_ops.h> |
| @@ -122,92 +123,6 @@ static unsigned long mainstone_pin_config[] = { | |||
| 122 | GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH, | 123 | GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH, |
| 123 | }; | 124 | }; |
| 124 | 125 | ||
| 125 | static unsigned long mainstone_irq_enabled; | ||
| 126 | |||
| 127 | static void mainstone_mask_irq(struct irq_data *d) | ||
| 128 | { | ||
| 129 | int mainstone_irq = (d->irq - MAINSTONE_IRQ(0)); | ||
| 130 | MST_INTMSKENA = (mainstone_irq_enabled &= ~(1 << mainstone_irq)); | ||
| 131 | } | ||
| 132 | |||
| 133 | static void mainstone_unmask_irq(struct irq_data *d) | ||
| 134 | { | ||
| 135 | int mainstone_irq = (d->irq - MAINSTONE_IRQ(0)); | ||
| 136 | /* the irq can be acknowledged only if deasserted, so it's done here */ | ||
| 137 | MST_INTSETCLR &= ~(1 << mainstone_irq); | ||
| 138 | MST_INTMSKENA = (mainstone_irq_enabled |= (1 << mainstone_irq)); | ||
| 139 | } | ||
| 140 | |||
| 141 | static struct irq_chip mainstone_irq_chip = { | ||
| 142 | .name = "FPGA", | ||
| 143 | .irq_ack = mainstone_mask_irq, | ||
| 144 | .irq_mask = mainstone_mask_irq, | ||
| 145 | .irq_unmask = mainstone_unmask_irq, | ||
| 146 | }; | ||
| 147 | |||
| 148 | static void mainstone_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
| 149 | { | ||
| 150 | unsigned long pending = MST_INTSETCLR & mainstone_irq_enabled; | ||
| 151 | do { | ||
| 152 | /* clear useless edge notification */ | ||
| 153 | desc->irq_data.chip->irq_ack(&desc->irq_data); | ||
| 154 | if (likely(pending)) { | ||
| 155 | irq = MAINSTONE_IRQ(0) + __ffs(pending); | ||
| 156 | generic_handle_irq(irq); | ||
| 157 | } | ||
| 158 | pending = MST_INTSETCLR & mainstone_irq_enabled; | ||
| 159 | } while (pending); | ||
| 160 | } | ||
| 161 | |||
| 162 | static void __init mainstone_init_irq(void) | ||
| 163 | { | ||
| 164 | int irq; | ||
| 165 | |||
| 166 | pxa27x_init_irq(); | ||
| 167 | |||
| 168 | /* setup extra Mainstone irqs */ | ||
| 169 | for(irq = MAINSTONE_IRQ(0); irq <= MAINSTONE_IRQ(15); irq++) { | ||
| 170 | irq_set_chip_and_handler(irq, &mainstone_irq_chip, | ||
| 171 | handle_level_irq); | ||
| 172 | if (irq == MAINSTONE_IRQ(10) || irq == MAINSTONE_IRQ(14)) | ||
| 173 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE | IRQF_NOAUTOEN); | ||
| 174 | else | ||
| 175 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
| 176 | } | ||
| 177 | set_irq_flags(MAINSTONE_IRQ(8), 0); | ||
| 178 | set_irq_flags(MAINSTONE_IRQ(12), 0); | ||
| 179 | |||
| 180 | MST_INTMSKENA = 0; | ||
| 181 | MST_INTSETCLR = 0; | ||
| 182 | |||
| 183 | irq_set_chained_handler(PXA_GPIO_TO_IRQ(0), mainstone_irq_handler); | ||
| 184 | irq_set_irq_type(PXA_GPIO_TO_IRQ(0), IRQ_TYPE_EDGE_FALLING); | ||
| 185 | } | ||
| 186 | |||
| 187 | #ifdef CONFIG_PM | ||
| 188 | |||
| 189 | static void mainstone_irq_resume(void) | ||
| 190 | { | ||
| 191 | MST_INTMSKENA = mainstone_irq_enabled; | ||
| 192 | } | ||
| 193 | |||
| 194 | static struct syscore_ops mainstone_irq_syscore_ops = { | ||
| 195 | .resume = mainstone_irq_resume, | ||
| 196 | }; | ||
| 197 | |||
| 198 | static int __init mainstone_irq_device_init(void) | ||
| 199 | { | ||
| 200 | if (machine_is_mainstone()) | ||
| 201 | register_syscore_ops(&mainstone_irq_syscore_ops); | ||
| 202 | |||
| 203 | return 0; | ||
| 204 | } | ||
| 205 | |||
| 206 | device_initcall(mainstone_irq_device_init); | ||
| 207 | |||
| 208 | #endif | ||
| 209 | |||
| 210 | |||
| 211 | static struct resource smc91x_resources[] = { | 126 | static struct resource smc91x_resources[] = { |
| 212 | [0] = { | 127 | [0] = { |
| 213 | .start = (MST_ETH_PHYS + 0x300), | 128 | .start = (MST_ETH_PHYS + 0x300), |
| @@ -487,11 +402,37 @@ static struct platform_device mst_gpio_keys_device = { | |||
| 487 | }, | 402 | }, |
| 488 | }; | 403 | }; |
| 489 | 404 | ||
| 405 | static struct resource mst_cplds_resources[] = { | ||
| 406 | [0] = { | ||
| 407 | .start = MST_FPGA_PHYS + 0xc0, | ||
| 408 | .end = MST_FPGA_PHYS + 0xe0 - 1, | ||
| 409 | .flags = IORESOURCE_MEM, | ||
| 410 | }, | ||
| 411 | [1] = { | ||
| 412 | .start = PXA_GPIO_TO_IRQ(0), | ||
| 413 | .end = PXA_GPIO_TO_IRQ(0), | ||
| 414 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, | ||
| 415 | }, | ||
| 416 | [2] = { | ||
| 417 | .start = MAINSTONE_IRQ(0), | ||
| 418 | .end = MAINSTONE_IRQ(15), | ||
| 419 | .flags = IORESOURCE_IRQ, | ||
| 420 | }, | ||
| 421 | }; | ||
| 422 | |||
| 423 | static struct platform_device mst_cplds_device = { | ||
| 424 | .name = "pxa_cplds_irqs", | ||
| 425 | .id = -1, | ||
| 426 | .resource = &mst_cplds_resources[0], | ||
| 427 | .num_resources = 3, | ||
| 428 | }; | ||
| 429 | |||
| 490 | static struct platform_device *platform_devices[] __initdata = { | 430 | static struct platform_device *platform_devices[] __initdata = { |
| 491 | &smc91x_device, | 431 | &smc91x_device, |
| 492 | &mst_flash_device[0], | 432 | &mst_flash_device[0], |
| 493 | &mst_flash_device[1], | 433 | &mst_flash_device[1], |
| 494 | &mst_gpio_keys_device, | 434 | &mst_gpio_keys_device, |
| 435 | &mst_cplds_device, | ||
| 495 | }; | 436 | }; |
| 496 | 437 | ||
| 497 | static struct pxaohci_platform_data mainstone_ohci_platform_data = { | 438 | static struct pxaohci_platform_data mainstone_ohci_platform_data = { |
| @@ -718,7 +659,7 @@ MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)") | |||
| 718 | .atag_offset = 0x100, /* BLOB boot parameter setting */ | 659 | .atag_offset = 0x100, /* BLOB boot parameter setting */ |
| 719 | .map_io = mainstone_map_io, | 660 | .map_io = mainstone_map_io, |
| 720 | .nr_irqs = MAINSTONE_NR_IRQS, | 661 | .nr_irqs = MAINSTONE_NR_IRQS, |
| 721 | .init_irq = mainstone_init_irq, | 662 | .init_irq = pxa27x_init_irq, |
| 722 | .handle_irq = pxa27x_handle_irq, | 663 | .handle_irq = pxa27x_handle_irq, |
| 723 | .init_time = pxa_timer_init, | 664 | .init_time = pxa_timer_init, |
| 724 | .init_machine = mainstone_init, | 665 | .init_machine = mainstone_init, |
diff --git a/arch/arm/mach-pxa/pxa_cplds_irqs.c b/arch/arm/mach-pxa/pxa_cplds_irqs.c new file mode 100644 index 000000000000..f1aeb54fabe3 --- /dev/null +++ b/arch/arm/mach-pxa/pxa_cplds_irqs.c | |||
| @@ -0,0 +1,200 @@ | |||
| 1 | /* | ||
| 2 | * Intel Reference Systems cplds | ||
| 3 | * | ||
| 4 | * Copyright (C) 2014 Robert Jarzmik | ||
| 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 | * Cplds motherboard driver, supporting lubbock and mainstone SoC board. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/bitops.h> | ||
| 15 | #include <linux/gpio.h> | ||
| 16 | #include <linux/gpio/consumer.h> | ||
| 17 | #include <linux/interrupt.h> | ||
| 18 | #include <linux/io.h> | ||
| 19 | #include <linux/irq.h> | ||
| 20 | #include <linux/irqdomain.h> | ||
| 21 | #include <linux/mfd/core.h> | ||
| 22 | #include <linux/module.h> | ||
| 23 | #include <linux/of_platform.h> | ||
| 24 | |||
| 25 | #define FPGA_IRQ_MASK_EN 0x0 | ||
| 26 | #define FPGA_IRQ_SET_CLR 0x10 | ||
| 27 | |||
| 28 | #define CPLDS_NB_IRQ 32 | ||
| 29 | |||
| 30 | struct cplds { | ||
| 31 | void __iomem *base; | ||
| 32 | int irq; | ||
| 33 | unsigned int irq_mask; | ||
| 34 | struct gpio_desc *gpio0; | ||
| 35 | struct irq_domain *irqdomain; | ||
| 36 | }; | ||
| 37 | |||
| 38 | static irqreturn_t cplds_irq_handler(int in_irq, void *d) | ||
| 39 | { | ||
| 40 | struct cplds *fpga = d; | ||
| 41 | unsigned long pending; | ||
| 42 | unsigned int bit; | ||
| 43 | |||
| 44 | pending = readl(fpga->base + FPGA_IRQ_SET_CLR) & fpga->irq_mask; | ||
| 45 | for_each_set_bit(bit, &pending, CPLDS_NB_IRQ) | ||
| 46 | generic_handle_irq(irq_find_mapping(fpga->irqdomain, bit)); | ||
| 47 | |||
| 48 | return IRQ_HANDLED; | ||
| 49 | } | ||
| 50 | |||
| 51 | static void cplds_irq_mask_ack(struct irq_data *d) | ||
| 52 | { | ||
| 53 | struct cplds *fpga = irq_data_get_irq_chip_data(d); | ||
| 54 | unsigned int cplds_irq = irqd_to_hwirq(d); | ||
| 55 | unsigned int set, bit = BIT(cplds_irq); | ||
| 56 | |||
| 57 | fpga->irq_mask &= ~bit; | ||
| 58 | writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN); | ||
| 59 | set = readl(fpga->base + FPGA_IRQ_SET_CLR); | ||
| 60 | writel(set & ~bit, fpga->base + FPGA_IRQ_SET_CLR); | ||
| 61 | } | ||
| 62 | |||
| 63 | static void cplds_irq_unmask(struct irq_data *d) | ||
| 64 | { | ||
| 65 | struct cplds *fpga = irq_data_get_irq_chip_data(d); | ||
| 66 | unsigned int cplds_irq = irqd_to_hwirq(d); | ||
| 67 | unsigned int bit = BIT(cplds_irq); | ||
| 68 | |||
| 69 | fpga->irq_mask |= bit; | ||
| 70 | writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN); | ||
| 71 | } | ||
| 72 | |||
| 73 | static struct irq_chip cplds_irq_chip = { | ||
| 74 | .name = "pxa_cplds", | ||
| 75 | .irq_mask_ack = cplds_irq_mask_ack, | ||
| 76 | .irq_unmask = cplds_irq_unmask, | ||
| 77 | .flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_SKIP_SET_WAKE, | ||
| 78 | }; | ||
| 79 | |||
| 80 | static int cplds_irq_domain_map(struct irq_domain *d, unsigned int irq, | ||
| 81 | irq_hw_number_t hwirq) | ||
| 82 | { | ||
| 83 | struct cplds *fpga = d->host_data; | ||
| 84 | |||
| 85 | irq_set_chip_and_handler(irq, &cplds_irq_chip, handle_level_irq); | ||
| 86 | irq_set_chip_data(irq, fpga); | ||
| 87 | |||
| 88 | return 0; | ||
| 89 | } | ||
| 90 | |||
| 91 | static const struct irq_domain_ops cplds_irq_domain_ops = { | ||
| 92 | .xlate = irq_domain_xlate_twocell, | ||
| 93 | .map = cplds_irq_domain_map, | ||
| 94 | }; | ||
| 95 | |||
| 96 | static int cplds_resume(struct platform_device *pdev) | ||
| 97 | { | ||
| 98 | struct cplds *fpga = platform_get_drvdata(pdev); | ||
| 99 | |||
| 100 | writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN); | ||
| 101 | |||
| 102 | return 0; | ||
| 103 | } | ||
| 104 | |||
| 105 | static int cplds_probe(struct platform_device *pdev) | ||
| 106 | { | ||
| 107 | struct resource *res; | ||
| 108 | struct cplds *fpga; | ||
| 109 | int ret; | ||
| 110 | unsigned int base_irq = 0; | ||
| 111 | unsigned long irqflags = 0; | ||
| 112 | |||
| 113 | fpga = devm_kzalloc(&pdev->dev, sizeof(*fpga), GFP_KERNEL); | ||
| 114 | if (!fpga) | ||
| 115 | return -ENOMEM; | ||
| 116 | |||
| 117 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | ||
| 118 | if (res) { | ||
| 119 | fpga->irq = (unsigned int)res->start; | ||
| 120 | irqflags = res->flags; | ||
| 121 | } | ||
| 122 | if (!fpga->irq) | ||
| 123 | return -ENODEV; | ||
| 124 | |||
| 125 | base_irq = platform_get_irq(pdev, 1); | ||
| 126 | if (base_irq < 0) | ||
| 127 | base_irq = 0; | ||
| 128 | |||
| 129 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
| 130 | fpga->base = devm_ioremap_resource(&pdev->dev, res); | ||
| 131 | if (IS_ERR(fpga->base)) | ||
| 132 | return PTR_ERR(fpga->base); | ||
| 133 | |||
| 134 | platform_set_drvdata(pdev, fpga); | ||
| 135 | |||
| 136 | writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN); | ||
| 137 | writel(0, fpga->base + FPGA_IRQ_SET_CLR); | ||
| 138 | |||
| 139 | ret = devm_request_irq(&pdev->dev, fpga->irq, cplds_irq_handler, | ||
| 140 | irqflags, dev_name(&pdev->dev), fpga); | ||
| 141 | if (ret == -ENOSYS) | ||
| 142 | return -EPROBE_DEFER; | ||
| 143 | |||
| 144 | if (ret) { | ||
| 145 | dev_err(&pdev->dev, "couldn't request main irq%d: %d\n", | ||
| 146 | fpga->irq, ret); | ||
| 147 | return ret; | ||
| 148 | } | ||
| 149 | |||
| 150 | irq_set_irq_wake(fpga->irq, 1); | ||
| 151 | fpga->irqdomain = irq_domain_add_linear(pdev->dev.of_node, | ||
| 152 | CPLDS_NB_IRQ, | ||
| 153 | &cplds_irq_domain_ops, fpga); | ||
| 154 | if (!fpga->irqdomain) | ||
| 155 | return -ENODEV; | ||
| 156 | |||
| 157 | if (base_irq) { | ||
| 158 | ret = irq_create_strict_mappings(fpga->irqdomain, base_irq, 0, | ||
| 159 | CPLDS_NB_IRQ); | ||
| 160 | if (ret) { | ||
| 161 | dev_err(&pdev->dev, "couldn't create the irq mapping %d..%d\n", | ||
| 162 | base_irq, base_irq + CPLDS_NB_IRQ); | ||
| 163 | return ret; | ||
| 164 | } | ||
| 165 | } | ||
| 166 | |||
| 167 | return 0; | ||
| 168 | } | ||
| 169 | |||
| 170 | static int cplds_remove(struct platform_device *pdev) | ||
| 171 | { | ||
| 172 | struct cplds *fpga = platform_get_drvdata(pdev); | ||
| 173 | |||
| 174 | irq_set_chip_and_handler(fpga->irq, NULL, NULL); | ||
| 175 | |||
| 176 | return 0; | ||
| 177 | } | ||
| 178 | |||
| 179 | static const struct of_device_id cplds_id_table[] = { | ||
| 180 | { .compatible = "intel,lubbock-cplds-irqs", }, | ||
| 181 | { .compatible = "intel,mainstone-cplds-irqs", }, | ||
| 182 | { } | ||
| 183 | }; | ||
| 184 | MODULE_DEVICE_TABLE(of, cplds_id_table); | ||
| 185 | |||
| 186 | static struct platform_driver cplds_driver = { | ||
| 187 | .driver = { | ||
| 188 | .name = "pxa_cplds_irqs", | ||
| 189 | .of_match_table = of_match_ptr(cplds_id_table), | ||
| 190 | }, | ||
| 191 | .probe = cplds_probe, | ||
| 192 | .remove = cplds_remove, | ||
| 193 | .resume = cplds_resume, | ||
| 194 | }; | ||
| 195 | |||
| 196 | module_platform_driver(cplds_driver); | ||
| 197 | |||
| 198 | MODULE_DESCRIPTION("PXA Cplds interrupts driver"); | ||
| 199 | MODULE_AUTHOR("Robert Jarzmik <robert.jarzmik@free.fr>"); | ||
| 200 | MODULE_LICENSE("GPL"); | ||
diff --git a/arch/arm/mach-rockchip/pm.c b/arch/arm/mach-rockchip/pm.c index b07d88602073..b0dcbe28f78c 100644 --- a/arch/arm/mach-rockchip/pm.c +++ b/arch/arm/mach-rockchip/pm.c | |||
| @@ -83,6 +83,13 @@ static void rk3288_slp_mode_set(int level) | |||
| 83 | SGRF_PCLK_WDT_GATE | SGRF_FAST_BOOT_EN | 83 | SGRF_PCLK_WDT_GATE | SGRF_FAST_BOOT_EN |
| 84 | | SGRF_PCLK_WDT_GATE_WRITE | SGRF_FAST_BOOT_EN_WRITE); | 84 | | SGRF_PCLK_WDT_GATE_WRITE | SGRF_FAST_BOOT_EN_WRITE); |
| 85 | 85 | ||
| 86 | /* | ||
| 87 | * The dapswjdp can not auto reset before resume, that cause it may | ||
| 88 | * access some illegal address during resume. Let's disable it before | ||
| 89 | * suspend, and the MASKROM will enable it back. | ||
| 90 | */ | ||
| 91 | regmap_write(sgrf_regmap, RK3288_SGRF_CPU_CON0, SGRF_DAPDEVICEEN_WRITE); | ||
| 92 | |||
| 86 | /* booting address of resuming system is from this register value */ | 93 | /* booting address of resuming system is from this register value */ |
| 87 | regmap_write(sgrf_regmap, RK3288_SGRF_FAST_BOOT_ADDR, | 94 | regmap_write(sgrf_regmap, RK3288_SGRF_FAST_BOOT_ADDR, |
| 88 | rk3288_bootram_phy); | 95 | rk3288_bootram_phy); |
diff --git a/arch/arm/mach-rockchip/pm.h b/arch/arm/mach-rockchip/pm.h index 03ff31d8282d..3e8d39c0c3d5 100644 --- a/arch/arm/mach-rockchip/pm.h +++ b/arch/arm/mach-rockchip/pm.h | |||
| @@ -55,6 +55,10 @@ static inline void rockchip_suspend_init(void) | |||
| 55 | #define SGRF_FAST_BOOT_EN BIT(8) | 55 | #define SGRF_FAST_BOOT_EN BIT(8) |
| 56 | #define SGRF_FAST_BOOT_EN_WRITE BIT(24) | 56 | #define SGRF_FAST_BOOT_EN_WRITE BIT(24) |
| 57 | 57 | ||
| 58 | #define RK3288_SGRF_CPU_CON0 (0x40) | ||
| 59 | #define SGRF_DAPDEVICEEN BIT(0) | ||
| 60 | #define SGRF_DAPDEVICEEN_WRITE BIT(16) | ||
| 61 | |||
| 58 | #define RK3288_CRU_MODE_CON 0x50 | 62 | #define RK3288_CRU_MODE_CON 0x50 |
| 59 | #define RK3288_CRU_SEL0_CON 0x60 | 63 | #define RK3288_CRU_SEL0_CON 0x60 |
| 60 | #define RK3288_CRU_SEL1_CON 0x64 | 64 | #define RK3288_CRU_SEL1_CON 0x64 |
diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c index d360ec044b66..b6cf3b449428 100644 --- a/arch/arm/mach-rockchip/rockchip.c +++ b/arch/arm/mach-rockchip/rockchip.c | |||
| @@ -30,11 +30,30 @@ | |||
| 30 | #include "pm.h" | 30 | #include "pm.h" |
| 31 | 31 | ||
| 32 | #define RK3288_GRF_SOC_CON0 0x244 | 32 | #define RK3288_GRF_SOC_CON0 0x244 |
| 33 | #define RK3288_TIMER6_7_PHYS 0xff810000 | ||
| 33 | 34 | ||
| 34 | static void __init rockchip_timer_init(void) | 35 | static void __init rockchip_timer_init(void) |
| 35 | { | 36 | { |
| 36 | if (of_machine_is_compatible("rockchip,rk3288")) { | 37 | if (of_machine_is_compatible("rockchip,rk3288")) { |
| 37 | struct regmap *grf; | 38 | struct regmap *grf; |
| 39 | void __iomem *reg_base; | ||
| 40 | |||
| 41 | /* | ||
| 42 | * Most/all uboot versions for rk3288 don't enable timer7 | ||
| 43 | * which is needed for the architected timer to work. | ||
| 44 | * So make sure it is running during early boot. | ||
| 45 | */ | ||
| 46 | reg_base = ioremap(RK3288_TIMER6_7_PHYS, SZ_16K); | ||
| 47 | if (reg_base) { | ||
| 48 | writel(0, reg_base + 0x30); | ||
| 49 | writel(0xffffffff, reg_base + 0x20); | ||
| 50 | writel(0xffffffff, reg_base + 0x24); | ||
| 51 | writel(1, reg_base + 0x30); | ||
| 52 | dsb(); | ||
| 53 | iounmap(reg_base); | ||
| 54 | } else { | ||
| 55 | pr_err("rockchip: could not map timer7 registers\n"); | ||
| 56 | } | ||
| 38 | 57 | ||
| 39 | /* | 58 | /* |
| 40 | * Disable auto jtag/sdmmc switching that causes issues | 59 | * Disable auto jtag/sdmmc switching that causes issues |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 09c5fe3d30c2..7e7583ddd607 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
| @@ -1878,7 +1878,7 @@ struct dma_map_ops iommu_coherent_ops = { | |||
| 1878 | * arm_iommu_attach_device function. | 1878 | * arm_iommu_attach_device function. |
| 1879 | */ | 1879 | */ |
| 1880 | struct dma_iommu_mapping * | 1880 | struct dma_iommu_mapping * |
| 1881 | arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, size_t size) | 1881 | arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, u64 size) |
| 1882 | { | 1882 | { |
| 1883 | unsigned int bits = size >> PAGE_SHIFT; | 1883 | unsigned int bits = size >> PAGE_SHIFT; |
| 1884 | unsigned int bitmap_size = BITS_TO_LONGS(bits) * sizeof(long); | 1884 | unsigned int bitmap_size = BITS_TO_LONGS(bits) * sizeof(long); |
| @@ -1886,6 +1886,10 @@ arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, size_t size) | |||
| 1886 | int extensions = 1; | 1886 | int extensions = 1; |
| 1887 | int err = -ENOMEM; | 1887 | int err = -ENOMEM; |
| 1888 | 1888 | ||
| 1889 | /* currently only 32-bit DMA address space is supported */ | ||
| 1890 | if (size > DMA_BIT_MASK(32) + 1) | ||
| 1891 | return ERR_PTR(-ERANGE); | ||
| 1892 | |||
| 1889 | if (!bitmap_size) | 1893 | if (!bitmap_size) |
| 1890 | return ERR_PTR(-EINVAL); | 1894 | return ERR_PTR(-EINVAL); |
| 1891 | 1895 | ||
| @@ -2057,13 +2061,6 @@ static bool arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 size, | |||
| 2057 | if (!iommu) | 2061 | if (!iommu) |
| 2058 | return false; | 2062 | return false; |
| 2059 | 2063 | ||
| 2060 | /* | ||
| 2061 | * currently arm_iommu_create_mapping() takes a max of size_t | ||
| 2062 | * for size param. So check this limit for now. | ||
| 2063 | */ | ||
| 2064 | if (size > SIZE_MAX) | ||
| 2065 | return false; | ||
| 2066 | |||
| 2067 | mapping = arm_iommu_create_mapping(dev->bus, dma_base, size); | 2064 | mapping = arm_iommu_create_mapping(dev->bus, dma_base, size); |
| 2068 | if (IS_ERR(mapping)) { | 2065 | if (IS_ERR(mapping)) { |
| 2069 | pr_warn("Failed to create %llu-byte IOMMU mapping for device %s\n", | 2066 | pr_warn("Failed to create %llu-byte IOMMU mapping for device %s\n", |
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S index aa0519eed698..774ef1323554 100644 --- a/arch/arm/mm/proc-arm1020.S +++ b/arch/arm/mm/proc-arm1020.S | |||
| @@ -22,8 +22,6 @@ | |||
| 22 | * | 22 | * |
| 23 | * These are the low level assembler for performing cache and TLB | 23 | * These are the low level assembler for performing cache and TLB |
| 24 | * functions on the arm1020. | 24 | * functions on the arm1020. |
| 25 | * | ||
| 26 | * CONFIG_CPU_ARM1020_CPU_IDLE -> nohlt | ||
| 27 | */ | 25 | */ |
| 28 | #include <linux/linkage.h> | 26 | #include <linux/linkage.h> |
| 29 | #include <linux/init.h> | 27 | #include <linux/init.h> |
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S index bff4c7f70fd6..ae3c27b71594 100644 --- a/arch/arm/mm/proc-arm1020e.S +++ b/arch/arm/mm/proc-arm1020e.S | |||
| @@ -22,8 +22,6 @@ | |||
| 22 | * | 22 | * |
| 23 | * These are the low level assembler for performing cache and TLB | 23 | * These are the low level assembler for performing cache and TLB |
| 24 | * functions on the arm1020e. | 24 | * functions on the arm1020e. |
| 25 | * | ||
| 26 | * CONFIG_CPU_ARM1020_CPU_IDLE -> nohlt | ||
| 27 | */ | 25 | */ |
| 28 | #include <linux/linkage.h> | 26 | #include <linux/linkage.h> |
| 29 | #include <linux/init.h> | 27 | #include <linux/init.h> |
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S index ede8c54ab4aa..32a47cc19076 100644 --- a/arch/arm/mm/proc-arm925.S +++ b/arch/arm/mm/proc-arm925.S | |||
| @@ -441,9 +441,6 @@ ENTRY(cpu_arm925_set_pte_ext) | |||
| 441 | .type __arm925_setup, #function | 441 | .type __arm925_setup, #function |
| 442 | __arm925_setup: | 442 | __arm925_setup: |
| 443 | mov r0, #0 | 443 | mov r0, #0 |
| 444 | #if defined(CONFIG_CPU_ICACHE_STREAMING_DISABLE) | ||
| 445 | orr r0,r0,#1 << 7 | ||
| 446 | #endif | ||
| 447 | 444 | ||
| 448 | /* Transparent on, D-cache clean & flush mode. See NOTE2 above */ | 445 | /* Transparent on, D-cache clean & flush mode. See NOTE2 above */ |
| 449 | orr r0,r0,#1 << 1 @ transparent mode on | 446 | orr r0,r0,#1 << 1 @ transparent mode on |
diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S index e494d6d6acbe..92e08bf37aad 100644 --- a/arch/arm/mm/proc-feroceon.S +++ b/arch/arm/mm/proc-feroceon.S | |||
| @@ -602,7 +602,6 @@ __\name\()_proc_info: | |||
| 602 | PMD_SECT_AP_WRITE | \ | 602 | PMD_SECT_AP_WRITE | \ |
| 603 | PMD_SECT_AP_READ | 603 | PMD_SECT_AP_READ |
| 604 | initfn __feroceon_setup, __\name\()_proc_info | 604 | initfn __feroceon_setup, __\name\()_proc_info |
| 605 | .long __feroceon_setup | ||
| 606 | .long cpu_arch_name | 605 | .long cpu_arch_name |
| 607 | .long cpu_elf_name | 606 | .long cpu_elf_name |
| 608 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP | 607 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP |
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index e1268f905026..e0e23582c8b4 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/arm/net/bpf_jit_32.c | |||
| @@ -54,6 +54,7 @@ | |||
| 54 | #define SEEN_DATA (1 << (BPF_MEMWORDS + 3)) | 54 | #define SEEN_DATA (1 << (BPF_MEMWORDS + 3)) |
| 55 | 55 | ||
| 56 | #define FLAG_NEED_X_RESET (1 << 0) | 56 | #define FLAG_NEED_X_RESET (1 << 0) |
| 57 | #define FLAG_IMM_OVERFLOW (1 << 1) | ||
| 57 | 58 | ||
| 58 | struct jit_ctx { | 59 | struct jit_ctx { |
| 59 | const struct bpf_prog *skf; | 60 | const struct bpf_prog *skf; |
| @@ -293,6 +294,15 @@ static u16 imm_offset(u32 k, struct jit_ctx *ctx) | |||
| 293 | /* PC in ARM mode == address of the instruction + 8 */ | 294 | /* PC in ARM mode == address of the instruction + 8 */ |
| 294 | imm = offset - (8 + ctx->idx * 4); | 295 | imm = offset - (8 + ctx->idx * 4); |
| 295 | 296 | ||
| 297 | if (imm & ~0xfff) { | ||
| 298 | /* | ||
| 299 | * literal pool is too far, signal it into flags. we | ||
| 300 | * can only detect it on the second pass unfortunately. | ||
| 301 | */ | ||
| 302 | ctx->flags |= FLAG_IMM_OVERFLOW; | ||
| 303 | return 0; | ||
| 304 | } | ||
| 305 | |||
| 296 | return imm; | 306 | return imm; |
| 297 | } | 307 | } |
| 298 | 308 | ||
| @@ -449,10 +459,21 @@ static inline void emit_udiv(u8 rd, u8 rm, u8 rn, struct jit_ctx *ctx) | |||
| 449 | return; | 459 | return; |
| 450 | } | 460 | } |
| 451 | #endif | 461 | #endif |
| 452 | if (rm != ARM_R0) | 462 | |
| 453 | emit(ARM_MOV_R(ARM_R0, rm), ctx); | 463 | /* |
| 464 | * For BPF_ALU | BPF_DIV | BPF_K instructions, rm is ARM_R4 | ||
| 465 | * (r_A) and rn is ARM_R0 (r_scratch) so load rn first into | ||
| 466 | * ARM_R1 to avoid accidentally overwriting ARM_R0 with rm | ||
| 467 | * before using it as a source for ARM_R1. | ||
| 468 | * | ||
| 469 | * For BPF_ALU | BPF_DIV | BPF_X rm is ARM_R4 (r_A) and rn is | ||
| 470 | * ARM_R5 (r_X) so there is no particular register overlap | ||
| 471 | * issues. | ||
| 472 | */ | ||
| 454 | if (rn != ARM_R1) | 473 | if (rn != ARM_R1) |
| 455 | emit(ARM_MOV_R(ARM_R1, rn), ctx); | 474 | emit(ARM_MOV_R(ARM_R1, rn), ctx); |
| 475 | if (rm != ARM_R0) | ||
| 476 | emit(ARM_MOV_R(ARM_R0, rm), ctx); | ||
| 456 | 477 | ||
| 457 | ctx->seen |= SEEN_CALL; | 478 | ctx->seen |= SEEN_CALL; |
| 458 | emit_mov_i(ARM_R3, (u32)jit_udiv, ctx); | 479 | emit_mov_i(ARM_R3, (u32)jit_udiv, ctx); |
| @@ -855,6 +876,14 @@ b_epilogue: | |||
| 855 | default: | 876 | default: |
| 856 | return -1; | 877 | return -1; |
| 857 | } | 878 | } |
| 879 | |||
| 880 | if (ctx->flags & FLAG_IMM_OVERFLOW) | ||
| 881 | /* | ||
| 882 | * this instruction generated an overflow when | ||
| 883 | * trying to access the literal pool, so | ||
| 884 | * delegate this filter to the kernel interpreter. | ||
| 885 | */ | ||
| 886 | return -1; | ||
| 858 | } | 887 | } |
| 859 | 888 | ||
| 860 | /* compute offsets only during the first pass */ | 889 | /* compute offsets only during the first pass */ |
| @@ -917,7 +946,14 @@ void bpf_jit_compile(struct bpf_prog *fp) | |||
| 917 | ctx.idx = 0; | 946 | ctx.idx = 0; |
| 918 | 947 | ||
| 919 | build_prologue(&ctx); | 948 | build_prologue(&ctx); |
| 920 | build_body(&ctx); | 949 | if (build_body(&ctx) < 0) { |
| 950 | #if __LINUX_ARM_ARCH__ < 7 | ||
| 951 | if (ctx.imm_count) | ||
| 952 | kfree(ctx.imms); | ||
| 953 | #endif | ||
| 954 | bpf_jit_binary_free(header); | ||
| 955 | goto out; | ||
| 956 | } | ||
| 921 | build_epilogue(&ctx); | 957 | build_epilogue(&ctx); |
| 922 | 958 | ||
| 923 | flush_icache_range((u32)ctx.target, (u32)(ctx.target + ctx.idx)); | 959 | flush_icache_range((u32)ctx.target, (u32)(ctx.target + ctx.idx)); |
diff --git a/arch/arm/xen/mm.c b/arch/arm/xen/mm.c index 793551d15f1d..498325074a06 100644 --- a/arch/arm/xen/mm.c +++ b/arch/arm/xen/mm.c | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | #include <linux/gfp.h> | 4 | #include <linux/gfp.h> |
| 5 | #include <linux/highmem.h> | 5 | #include <linux/highmem.h> |
| 6 | #include <linux/export.h> | 6 | #include <linux/export.h> |
| 7 | #include <linux/memblock.h> | ||
| 7 | #include <linux/of_address.h> | 8 | #include <linux/of_address.h> |
| 8 | #include <linux/slab.h> | 9 | #include <linux/slab.h> |
| 9 | #include <linux/types.h> | 10 | #include <linux/types.h> |
| @@ -21,6 +22,20 @@ | |||
| 21 | #include <asm/xen/hypercall.h> | 22 | #include <asm/xen/hypercall.h> |
| 22 | #include <asm/xen/interface.h> | 23 | #include <asm/xen/interface.h> |
| 23 | 24 | ||
| 25 | unsigned long xen_get_swiotlb_free_pages(unsigned int order) | ||
| 26 | { | ||
| 27 | struct memblock_region *reg; | ||
| 28 | gfp_t flags = __GFP_NOWARN; | ||
| 29 | |||
| 30 | for_each_memblock(memory, reg) { | ||
| 31 | if (reg->base < (phys_addr_t)0xffffffff) { | ||
| 32 | flags |= __GFP_DMA; | ||
| 33 | break; | ||
| 34 | } | ||
| 35 | } | ||
| 36 | return __get_free_pages(flags, order); | ||
| 37 | } | ||
| 38 | |||
| 24 | enum dma_cache_op { | 39 | enum dma_cache_op { |
| 25 | DMA_UNMAP, | 40 | DMA_UNMAP, |
| 26 | DMA_MAP, | 41 | DMA_MAP, |
diff --git a/arch/arm64/boot/dts/arm/juno-motherboard.dtsi b/arch/arm64/boot/dts/arm/juno-motherboard.dtsi index c138b95a8356..351c95bda89e 100644 --- a/arch/arm64/boot/dts/arm/juno-motherboard.dtsi +++ b/arch/arm64/boot/dts/arm/juno-motherboard.dtsi | |||
| @@ -21,6 +21,20 @@ | |||
| 21 | clock-output-names = "juno_mb:clk25mhz"; | 21 | clock-output-names = "juno_mb:clk25mhz"; |
| 22 | }; | 22 | }; |
| 23 | 23 | ||
| 24 | v2m_refclk1mhz: refclk1mhz { | ||
| 25 | compatible = "fixed-clock"; | ||
| 26 | #clock-cells = <0>; | ||
| 27 | clock-frequency = <1000000>; | ||
| 28 | clock-output-names = "juno_mb:refclk1mhz"; | ||
| 29 | }; | ||
| 30 | |||
| 31 | v2m_refclk32khz: refclk32khz { | ||
| 32 | compatible = "fixed-clock"; | ||
| 33 | #clock-cells = <0>; | ||
| 34 | clock-frequency = <32768>; | ||
| 35 | clock-output-names = "juno_mb:refclk32khz"; | ||
| 36 | }; | ||
| 37 | |||
| 24 | motherboard { | 38 | motherboard { |
| 25 | compatible = "arm,vexpress,v2p-p1", "simple-bus"; | 39 | compatible = "arm,vexpress,v2p-p1", "simple-bus"; |
| 26 | #address-cells = <2>; /* SMB chipselect number and offset */ | 40 | #address-cells = <2>; /* SMB chipselect number and offset */ |
| @@ -66,6 +80,15 @@ | |||
| 66 | #size-cells = <1>; | 80 | #size-cells = <1>; |
| 67 | ranges = <0 3 0 0x200000>; | 81 | ranges = <0 3 0 0x200000>; |
| 68 | 82 | ||
| 83 | v2m_sysctl: sysctl@020000 { | ||
| 84 | compatible = "arm,sp810", "arm,primecell"; | ||
| 85 | reg = <0x020000 0x1000>; | ||
| 86 | clocks = <&v2m_refclk32khz>, <&v2m_refclk1mhz>, <&mb_clk24mhz>; | ||
| 87 | clock-names = "refclk", "timclk", "apb_pclk"; | ||
| 88 | #clock-cells = <1>; | ||
| 89 | clock-output-names = "timerclken0", "timerclken1", "timerclken2", "timerclken3"; | ||
| 90 | }; | ||
| 91 | |||
| 69 | mmci@050000 { | 92 | mmci@050000 { |
| 70 | compatible = "arm,pl180", "arm,primecell"; | 93 | compatible = "arm,pl180", "arm,primecell"; |
| 71 | reg = <0x050000 0x1000>; | 94 | reg = <0x050000 0x1000>; |
| @@ -106,16 +129,16 @@ | |||
| 106 | compatible = "arm,sp804", "arm,primecell"; | 129 | compatible = "arm,sp804", "arm,primecell"; |
| 107 | reg = <0x110000 0x10000>; | 130 | reg = <0x110000 0x10000>; |
| 108 | interrupts = <9>; | 131 | interrupts = <9>; |
| 109 | clocks = <&mb_clk24mhz>, <&soc_smc50mhz>; | 132 | clocks = <&v2m_sysctl 0>, <&v2m_sysctl 1>, <&mb_clk24mhz>; |
| 110 | clock-names = "timclken1", "apb_pclk"; | 133 | clock-names = "timclken1", "timclken2", "apb_pclk"; |
| 111 | }; | 134 | }; |
| 112 | 135 | ||
| 113 | v2m_timer23: timer@120000 { | 136 | v2m_timer23: timer@120000 { |
| 114 | compatible = "arm,sp804", "arm,primecell"; | 137 | compatible = "arm,sp804", "arm,primecell"; |
| 115 | reg = <0x120000 0x10000>; | 138 | reg = <0x120000 0x10000>; |
| 116 | interrupts = <9>; | 139 | interrupts = <9>; |
| 117 | clocks = <&mb_clk24mhz>, <&soc_smc50mhz>; | 140 | clocks = <&v2m_sysctl 2>, <&v2m_sysctl 3>, <&mb_clk24mhz>; |
| 118 | clock-names = "timclken1", "apb_pclk"; | 141 | clock-names = "timclken1", "timclken2", "apb_pclk"; |
| 119 | }; | 142 | }; |
| 120 | 143 | ||
| 121 | rtc@170000 { | 144 | rtc@170000 { |
diff --git a/arch/arm64/crypto/crc32-arm64.c b/arch/arm64/crypto/crc32-arm64.c index 9499199924ae..6a37c3c6b11d 100644 --- a/arch/arm64/crypto/crc32-arm64.c +++ b/arch/arm64/crypto/crc32-arm64.c | |||
| @@ -147,13 +147,21 @@ static int chksum_final(struct shash_desc *desc, u8 *out) | |||
| 147 | { | 147 | { |
| 148 | struct chksum_desc_ctx *ctx = shash_desc_ctx(desc); | 148 | struct chksum_desc_ctx *ctx = shash_desc_ctx(desc); |
| 149 | 149 | ||
| 150 | put_unaligned_le32(ctx->crc, out); | ||
| 151 | return 0; | ||
| 152 | } | ||
| 153 | |||
| 154 | static int chksumc_final(struct shash_desc *desc, u8 *out) | ||
| 155 | { | ||
| 156 | struct chksum_desc_ctx *ctx = shash_desc_ctx(desc); | ||
| 157 | |||
| 150 | put_unaligned_le32(~ctx->crc, out); | 158 | put_unaligned_le32(~ctx->crc, out); |
| 151 | return 0; | 159 | return 0; |
| 152 | } | 160 | } |
| 153 | 161 | ||
| 154 | static int __chksum_finup(u32 crc, const u8 *data, unsigned int len, u8 *out) | 162 | static int __chksum_finup(u32 crc, const u8 *data, unsigned int len, u8 *out) |
| 155 | { | 163 | { |
| 156 | put_unaligned_le32(~crc32_arm64_le_hw(crc, data, len), out); | 164 | put_unaligned_le32(crc32_arm64_le_hw(crc, data, len), out); |
| 157 | return 0; | 165 | return 0; |
| 158 | } | 166 | } |
| 159 | 167 | ||
| @@ -199,6 +207,14 @@ static int crc32_cra_init(struct crypto_tfm *tfm) | |||
| 199 | { | 207 | { |
| 200 | struct chksum_ctx *mctx = crypto_tfm_ctx(tfm); | 208 | struct chksum_ctx *mctx = crypto_tfm_ctx(tfm); |
| 201 | 209 | ||
| 210 | mctx->key = 0; | ||
| 211 | return 0; | ||
| 212 | } | ||
| 213 | |||
| 214 | static int crc32c_cra_init(struct crypto_tfm *tfm) | ||
| 215 | { | ||
| 216 | struct chksum_ctx *mctx = crypto_tfm_ctx(tfm); | ||
| 217 | |||
| 202 | mctx->key = ~0; | 218 | mctx->key = ~0; |
| 203 | return 0; | 219 | return 0; |
| 204 | } | 220 | } |
| @@ -229,7 +245,7 @@ static struct shash_alg crc32c_alg = { | |||
| 229 | .setkey = chksum_setkey, | 245 | .setkey = chksum_setkey, |
| 230 | .init = chksum_init, | 246 | .init = chksum_init, |
| 231 | .update = chksumc_update, | 247 | .update = chksumc_update, |
| 232 | .final = chksum_final, | 248 | .final = chksumc_final, |
| 233 | .finup = chksumc_finup, | 249 | .finup = chksumc_finup, |
| 234 | .digest = chksumc_digest, | 250 | .digest = chksumc_digest, |
| 235 | .descsize = sizeof(struct chksum_desc_ctx), | 251 | .descsize = sizeof(struct chksum_desc_ctx), |
| @@ -241,7 +257,7 @@ static struct shash_alg crc32c_alg = { | |||
| 241 | .cra_alignmask = 0, | 257 | .cra_alignmask = 0, |
| 242 | .cra_ctxsize = sizeof(struct chksum_ctx), | 258 | .cra_ctxsize = sizeof(struct chksum_ctx), |
| 243 | .cra_module = THIS_MODULE, | 259 | .cra_module = THIS_MODULE, |
| 244 | .cra_init = crc32_cra_init, | 260 | .cra_init = crc32c_cra_init, |
| 245 | } | 261 | } |
| 246 | }; | 262 | }; |
| 247 | 263 | ||
diff --git a/arch/arm64/crypto/sha1-ce-glue.c b/arch/arm64/crypto/sha1-ce-glue.c index 114e7cc5de8c..aefda9868627 100644 --- a/arch/arm64/crypto/sha1-ce-glue.c +++ b/arch/arm64/crypto/sha1-ce-glue.c | |||
| @@ -74,6 +74,9 @@ static int sha1_ce_finup(struct shash_desc *desc, const u8 *data, | |||
| 74 | 74 | ||
| 75 | static int sha1_ce_final(struct shash_desc *desc, u8 *out) | 75 | static int sha1_ce_final(struct shash_desc *desc, u8 *out) |
| 76 | { | 76 | { |
| 77 | struct sha1_ce_state *sctx = shash_desc_ctx(desc); | ||
| 78 | |||
| 79 | sctx->finalize = 0; | ||
| 77 | kernel_neon_begin_partial(16); | 80 | kernel_neon_begin_partial(16); |
| 78 | sha1_base_do_finalize(desc, (sha1_block_fn *)sha1_ce_transform); | 81 | sha1_base_do_finalize(desc, (sha1_block_fn *)sha1_ce_transform); |
| 79 | kernel_neon_end(); | 82 | kernel_neon_end(); |
diff --git a/arch/arm64/crypto/sha2-ce-glue.c b/arch/arm64/crypto/sha2-ce-glue.c index 1340e44c048b..7cd587564a41 100644 --- a/arch/arm64/crypto/sha2-ce-glue.c +++ b/arch/arm64/crypto/sha2-ce-glue.c | |||
| @@ -75,6 +75,9 @@ static int sha256_ce_finup(struct shash_desc *desc, const u8 *data, | |||
| 75 | 75 | ||
| 76 | static int sha256_ce_final(struct shash_desc *desc, u8 *out) | 76 | static int sha256_ce_final(struct shash_desc *desc, u8 *out) |
| 77 | { | 77 | { |
| 78 | struct sha256_ce_state *sctx = shash_desc_ctx(desc); | ||
| 79 | |||
| 80 | sctx->finalize = 0; | ||
| 78 | kernel_neon_begin_partial(28); | 81 | kernel_neon_begin_partial(28); |
| 79 | sha256_base_do_finalize(desc, (sha256_block_fn *)sha2_ce_transform); | 82 | sha256_base_do_finalize(desc, (sha256_block_fn *)sha2_ce_transform); |
| 80 | kernel_neon_end(); | 83 | kernel_neon_end(); |
diff --git a/arch/arm64/kernel/alternative.c b/arch/arm64/kernel/alternative.c index 21033bba9390..28f8365edc4c 100644 --- a/arch/arm64/kernel/alternative.c +++ b/arch/arm64/kernel/alternative.c | |||
| @@ -24,7 +24,6 @@ | |||
| 24 | #include <asm/cacheflush.h> | 24 | #include <asm/cacheflush.h> |
| 25 | #include <asm/alternative.h> | 25 | #include <asm/alternative.h> |
| 26 | #include <asm/cpufeature.h> | 26 | #include <asm/cpufeature.h> |
| 27 | #include <asm/insn.h> | ||
| 28 | #include <linux/stop_machine.h> | 27 | #include <linux/stop_machine.h> |
| 29 | 28 | ||
| 30 | extern struct alt_instr __alt_instructions[], __alt_instructions_end[]; | 29 | extern struct alt_instr __alt_instructions[], __alt_instructions_end[]; |
| @@ -34,48 +33,6 @@ struct alt_region { | |||
| 34 | struct alt_instr *end; | 33 | struct alt_instr *end; |
| 35 | }; | 34 | }; |
| 36 | 35 | ||
| 37 | /* | ||
| 38 | * Decode the imm field of a b/bl instruction, and return the byte | ||
| 39 | * offset as a signed value (so it can be used when computing a new | ||
| 40 | * branch target). | ||
| 41 | */ | ||
| 42 | static s32 get_branch_offset(u32 insn) | ||
| 43 | { | ||
| 44 | s32 imm = aarch64_insn_decode_immediate(AARCH64_INSN_IMM_26, insn); | ||
| 45 | |||
| 46 | /* sign-extend the immediate before turning it into a byte offset */ | ||
| 47 | return (imm << 6) >> 4; | ||
| 48 | } | ||
| 49 | |||
| 50 | static u32 get_alt_insn(u8 *insnptr, u8 *altinsnptr) | ||
| 51 | { | ||
| 52 | u32 insn; | ||
| 53 | |||
| 54 | aarch64_insn_read(altinsnptr, &insn); | ||
| 55 | |||
| 56 | /* Stop the world on instructions we don't support... */ | ||
| 57 | BUG_ON(aarch64_insn_is_cbz(insn)); | ||
| 58 | BUG_ON(aarch64_insn_is_cbnz(insn)); | ||
| 59 | BUG_ON(aarch64_insn_is_bcond(insn)); | ||
| 60 | /* ... and there is probably more. */ | ||
| 61 | |||
| 62 | if (aarch64_insn_is_b(insn) || aarch64_insn_is_bl(insn)) { | ||
| 63 | enum aarch64_insn_branch_type type; | ||
| 64 | unsigned long target; | ||
| 65 | |||
| 66 | if (aarch64_insn_is_b(insn)) | ||
| 67 | type = AARCH64_INSN_BRANCH_NOLINK; | ||
| 68 | else | ||
| 69 | type = AARCH64_INSN_BRANCH_LINK; | ||
| 70 | |||
| 71 | target = (unsigned long)altinsnptr + get_branch_offset(insn); | ||
| 72 | insn = aarch64_insn_gen_branch_imm((unsigned long)insnptr, | ||
| 73 | target, type); | ||
| 74 | } | ||
| 75 | |||
| 76 | return insn; | ||
| 77 | } | ||
| 78 | |||
| 79 | static int __apply_alternatives(void *alt_region) | 36 | static int __apply_alternatives(void *alt_region) |
| 80 | { | 37 | { |
| 81 | struct alt_instr *alt; | 38 | struct alt_instr *alt; |
| @@ -83,9 +40,6 @@ static int __apply_alternatives(void *alt_region) | |||
| 83 | u8 *origptr, *replptr; | 40 | u8 *origptr, *replptr; |
| 84 | 41 | ||
| 85 | for (alt = region->begin; alt < region->end; alt++) { | 42 | for (alt = region->begin; alt < region->end; alt++) { |
| 86 | u32 insn; | ||
| 87 | int i; | ||
| 88 | |||
| 89 | if (!cpus_have_cap(alt->cpufeature)) | 43 | if (!cpus_have_cap(alt->cpufeature)) |
| 90 | continue; | 44 | continue; |
| 91 | 45 | ||
| @@ -95,12 +49,7 @@ static int __apply_alternatives(void *alt_region) | |||
| 95 | 49 | ||
| 96 | origptr = (u8 *)&alt->orig_offset + alt->orig_offset; | 50 | origptr = (u8 *)&alt->orig_offset + alt->orig_offset; |
| 97 | replptr = (u8 *)&alt->alt_offset + alt->alt_offset; | 51 | replptr = (u8 *)&alt->alt_offset + alt->alt_offset; |
| 98 | 52 | memcpy(origptr, replptr, alt->alt_len); | |
| 99 | for (i = 0; i < alt->alt_len; i += sizeof(insn)) { | ||
| 100 | insn = get_alt_insn(origptr + i, replptr + i); | ||
| 101 | aarch64_insn_write(origptr + i, insn); | ||
| 102 | } | ||
| 103 | |||
| 104 | flush_icache_range((uintptr_t)origptr, | 53 | flush_icache_range((uintptr_t)origptr, |
| 105 | (uintptr_t)(origptr + alt->alt_len)); | 54 | (uintptr_t)(origptr + alt->alt_len)); |
| 106 | } | 55 | } |
diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c index 23f25acf43a9..cce18c85d2e8 100644 --- a/arch/arm64/kernel/perf_event.c +++ b/arch/arm64/kernel/perf_event.c | |||
| @@ -1315,15 +1315,15 @@ static int armpmu_device_probe(struct platform_device *pdev) | |||
| 1315 | if (!cpu_pmu) | 1315 | if (!cpu_pmu) |
| 1316 | return -ENODEV; | 1316 | return -ENODEV; |
| 1317 | 1317 | ||
| 1318 | irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL); | ||
| 1319 | if (!irqs) | ||
| 1320 | return -ENOMEM; | ||
| 1321 | |||
| 1322 | /* Don't bother with PPIs; they're already affine */ | 1318 | /* Don't bother with PPIs; they're already affine */ |
| 1323 | irq = platform_get_irq(pdev, 0); | 1319 | irq = platform_get_irq(pdev, 0); |
| 1324 | if (irq >= 0 && irq_is_percpu(irq)) | 1320 | if (irq >= 0 && irq_is_percpu(irq)) |
| 1325 | return 0; | 1321 | return 0; |
| 1326 | 1322 | ||
| 1323 | irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL); | ||
| 1324 | if (!irqs) | ||
| 1325 | return -ENOMEM; | ||
| 1326 | |||
| 1327 | for (i = 0; i < pdev->num_resources; ++i) { | 1327 | for (i = 0; i < pdev->num_resources; ++i) { |
| 1328 | struct device_node *dn; | 1328 | struct device_node *dn; |
| 1329 | int cpu; | 1329 | int cpu; |
diff --git a/arch/arm64/mm/dump.c b/arch/arm64/mm/dump.c index 74c256744b25..f3d6221cd5bd 100644 --- a/arch/arm64/mm/dump.c +++ b/arch/arm64/mm/dump.c | |||
| @@ -328,10 +328,12 @@ static int ptdump_init(void) | |||
| 328 | for (j = 0; j < pg_level[i].num; j++) | 328 | for (j = 0; j < pg_level[i].num; j++) |
| 329 | pg_level[i].mask |= pg_level[i].bits[j].mask; | 329 | pg_level[i].mask |= pg_level[i].bits[j].mask; |
| 330 | 330 | ||
| 331 | #ifdef CONFIG_SPARSEMEM_VMEMMAP | ||
| 331 | address_markers[VMEMMAP_START_NR].start_address = | 332 | address_markers[VMEMMAP_START_NR].start_address = |
| 332 | (unsigned long)virt_to_page(PAGE_OFFSET); | 333 | (unsigned long)virt_to_page(PAGE_OFFSET); |
| 333 | address_markers[VMEMMAP_END_NR].start_address = | 334 | address_markers[VMEMMAP_END_NR].start_address = |
| 334 | (unsigned long)virt_to_page(high_memory); | 335 | (unsigned long)virt_to_page(high_memory); |
| 336 | #endif | ||
| 335 | 337 | ||
| 336 | pe = debugfs_create_file("kernel_page_tables", 0400, NULL, NULL, | 338 | pe = debugfs_create_file("kernel_page_tables", 0400, NULL, NULL, |
| 337 | &ptdump_fops); | 339 | &ptdump_fops); |
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c index edba042b2325..dc6a4842683a 100644 --- a/arch/arm64/net/bpf_jit_comp.c +++ b/arch/arm64/net/bpf_jit_comp.c | |||
| @@ -487,7 +487,7 @@ emit_cond_jmp: | |||
| 487 | return -EINVAL; | 487 | return -EINVAL; |
| 488 | } | 488 | } |
| 489 | 489 | ||
| 490 | imm64 = (u64)insn1.imm << 32 | imm; | 490 | imm64 = (u64)insn1.imm << 32 | (u32)imm; |
| 491 | emit_a64_mov_i64(dst, imm64, ctx); | 491 | emit_a64_mov_i64(dst, imm64, ctx); |
| 492 | 492 | ||
| 493 | return 1; | 493 | return 1; |
diff --git a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c index ce7aea34fdf4..c18ddc74ef9a 100644 --- a/arch/m32r/kernel/smp.c +++ b/arch/m32r/kernel/smp.c | |||
| @@ -45,7 +45,7 @@ static volatile unsigned long flushcache_cpumask = 0; | |||
| 45 | /* | 45 | /* |
| 46 | * For flush_tlb_others() | 46 | * For flush_tlb_others() |
| 47 | */ | 47 | */ |
| 48 | static volatile cpumask_t flush_cpumask; | 48 | static cpumask_t flush_cpumask; |
| 49 | static struct mm_struct *flush_mm; | 49 | static struct mm_struct *flush_mm; |
| 50 | static struct vm_area_struct *flush_vma; | 50 | static struct vm_area_struct *flush_vma; |
| 51 | static volatile unsigned long flush_va; | 51 | static volatile unsigned long flush_va; |
| @@ -415,7 +415,7 @@ static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm, | |||
| 415 | */ | 415 | */ |
| 416 | send_IPI_mask(&cpumask, INVALIDATE_TLB_IPI, 0); | 416 | send_IPI_mask(&cpumask, INVALIDATE_TLB_IPI, 0); |
| 417 | 417 | ||
| 418 | while (!cpumask_empty((cpumask_t*)&flush_cpumask)) { | 418 | while (!cpumask_empty(&flush_cpumask)) { |
| 419 | /* nothing. lockup detection does not belong here */ | 419 | /* nothing. lockup detection does not belong here */ |
| 420 | mb(); | 420 | mb(); |
| 421 | } | 421 | } |
| @@ -468,7 +468,7 @@ void smp_invalidate_interrupt(void) | |||
| 468 | __flush_tlb_page(va); | 468 | __flush_tlb_page(va); |
| 469 | } | 469 | } |
| 470 | } | 470 | } |
| 471 | cpumask_clear_cpu(cpu_id, (cpumask_t*)&flush_cpumask); | 471 | cpumask_clear_cpu(cpu_id, &flush_cpumask); |
| 472 | } | 472 | } |
| 473 | 473 | ||
| 474 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 474 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 5200f649dd4e..ae2dd59050f7 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
| @@ -277,7 +277,7 @@ LDFLAGS += -m $(ld-emul) | |||
| 277 | ifdef CONFIG_MIPS | 277 | ifdef CONFIG_MIPS |
| 278 | CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \ | 278 | CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \ |
| 279 | egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \ | 279 | egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \ |
| 280 | sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/") | 280 | sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/" -e 's/\$$/&&/g') |
| 281 | ifdef CONFIG_64BIT | 281 | ifdef CONFIG_64BIT |
| 282 | CHECKFLAGS += -m64 | 282 | CHECKFLAGS += -m64 |
| 283 | endif | 283 | endif |
diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h index a594d8ed9698..f19e890b99d2 100644 --- a/arch/mips/include/asm/elf.h +++ b/arch/mips/include/asm/elf.h | |||
| @@ -304,7 +304,7 @@ do { \ | |||
| 304 | \ | 304 | \ |
| 305 | current->thread.abi = &mips_abi; \ | 305 | current->thread.abi = &mips_abi; \ |
| 306 | \ | 306 | \ |
| 307 | current->thread.fpu.fcr31 = current_cpu_data.fpu_csr31; \ | 307 | current->thread.fpu.fcr31 = boot_cpu_data.fpu_csr31; \ |
| 308 | } while (0) | 308 | } while (0) |
| 309 | 309 | ||
| 310 | #endif /* CONFIG_32BIT */ | 310 | #endif /* CONFIG_32BIT */ |
| @@ -366,7 +366,7 @@ do { \ | |||
| 366 | else \ | 366 | else \ |
| 367 | current->thread.abi = &mips_abi; \ | 367 | current->thread.abi = &mips_abi; \ |
| 368 | \ | 368 | \ |
| 369 | current->thread.fpu.fcr31 = current_cpu_data.fpu_csr31; \ | 369 | current->thread.fpu.fcr31 = boot_cpu_data.fpu_csr31; \ |
| 370 | \ | 370 | \ |
| 371 | p = personality(current->personality); \ | 371 | p = personality(current->personality); \ |
| 372 | if (p != PER_LINUX32 && p != PER_LINUX) \ | 372 | if (p != PER_LINUX32 && p != PER_LINUX) \ |
diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h index bb02fac9b4fa..2b25d1ba1ea0 100644 --- a/arch/mips/include/asm/smp.h +++ b/arch/mips/include/asm/smp.h | |||
| @@ -45,7 +45,7 @@ extern int __cpu_logical_map[NR_CPUS]; | |||
| 45 | #define SMP_DUMP 0x8 | 45 | #define SMP_DUMP 0x8 |
| 46 | #define SMP_ASK_C0COUNT 0x10 | 46 | #define SMP_ASK_C0COUNT 0x10 |
| 47 | 47 | ||
| 48 | extern volatile cpumask_t cpu_callin_map; | 48 | extern cpumask_t cpu_callin_map; |
| 49 | 49 | ||
| 50 | /* Mask of CPUs which are currently definitely operating coherently */ | 50 | /* Mask of CPUs which are currently definitely operating coherently */ |
| 51 | extern cpumask_t cpu_coherent_mask; | 51 | extern cpumask_t cpu_coherent_mask; |
diff --git a/arch/mips/kernel/elf.c b/arch/mips/kernel/elf.c index be4899f3c393..4a4d9e067c89 100644 --- a/arch/mips/kernel/elf.c +++ b/arch/mips/kernel/elf.c | |||
| @@ -76,14 +76,6 @@ int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf, | |||
| 76 | 76 | ||
| 77 | /* Lets see if this is an O32 ELF */ | 77 | /* Lets see if this is an O32 ELF */ |
| 78 | if (ehdr32->e_ident[EI_CLASS] == ELFCLASS32) { | 78 | if (ehdr32->e_ident[EI_CLASS] == ELFCLASS32) { |
| 79 | /* FR = 1 for N32 */ | ||
| 80 | if (ehdr32->e_flags & EF_MIPS_ABI2) | ||
| 81 | state->overall_fp_mode = FP_FR1; | ||
| 82 | else | ||
| 83 | /* Set a good default FPU mode for O32 */ | ||
| 84 | state->overall_fp_mode = cpu_has_mips_r6 ? | ||
| 85 | FP_FRE : FP_FR0; | ||
| 86 | |||
| 87 | if (ehdr32->e_flags & EF_MIPS_FP64) { | 79 | if (ehdr32->e_flags & EF_MIPS_FP64) { |
| 88 | /* | 80 | /* |
| 89 | * Set MIPS_ABI_FP_OLD_64 for EF_MIPS_FP64. We will override it | 81 | * Set MIPS_ABI_FP_OLD_64 for EF_MIPS_FP64. We will override it |
| @@ -104,9 +96,6 @@ int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf, | |||
| 104 | (char *)&abiflags, | 96 | (char *)&abiflags, |
| 105 | sizeof(abiflags)); | 97 | sizeof(abiflags)); |
| 106 | } else { | 98 | } else { |
| 107 | /* FR=1 is really the only option for 64-bit */ | ||
| 108 | state->overall_fp_mode = FP_FR1; | ||
| 109 | |||
| 110 | if (phdr64->p_type != PT_MIPS_ABIFLAGS) | 99 | if (phdr64->p_type != PT_MIPS_ABIFLAGS) |
| 111 | return 0; | 100 | return 0; |
| 112 | if (phdr64->p_filesz < sizeof(abiflags)) | 101 | if (phdr64->p_filesz < sizeof(abiflags)) |
| @@ -137,6 +126,7 @@ int arch_check_elf(void *_ehdr, bool has_interpreter, | |||
| 137 | struct elf32_hdr *ehdr = _ehdr; | 126 | struct elf32_hdr *ehdr = _ehdr; |
| 138 | struct mode_req prog_req, interp_req; | 127 | struct mode_req prog_req, interp_req; |
| 139 | int fp_abi, interp_fp_abi, abi0, abi1, max_abi; | 128 | int fp_abi, interp_fp_abi, abi0, abi1, max_abi; |
| 129 | bool is_mips64; | ||
| 140 | 130 | ||
| 141 | if (!config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT)) | 131 | if (!config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT)) |
| 142 | return 0; | 132 | return 0; |
| @@ -152,10 +142,22 @@ int arch_check_elf(void *_ehdr, bool has_interpreter, | |||
| 152 | abi0 = abi1 = fp_abi; | 142 | abi0 = abi1 = fp_abi; |
| 153 | } | 143 | } |
| 154 | 144 | ||
| 155 | /* ABI limits. O32 = FP_64A, N32/N64 = FP_SOFT */ | 145 | is_mips64 = (ehdr->e_ident[EI_CLASS] == ELFCLASS64) || |
| 156 | max_abi = ((ehdr->e_ident[EI_CLASS] == ELFCLASS32) && | 146 | (ehdr->e_flags & EF_MIPS_ABI2); |
| 157 | (!(ehdr->e_flags & EF_MIPS_ABI2))) ? | 147 | |
| 158 | MIPS_ABI_FP_64A : MIPS_ABI_FP_SOFT; | 148 | if (is_mips64) { |
| 149 | /* MIPS64 code always uses FR=1, thus the default is easy */ | ||
| 150 | state->overall_fp_mode = FP_FR1; | ||
| 151 | |||
| 152 | /* Disallow access to the various FPXX & FP64 ABIs */ | ||
| 153 | max_abi = MIPS_ABI_FP_SOFT; | ||
| 154 | } else { | ||
| 155 | /* Default to a mode capable of running code expecting FR=0 */ | ||
| 156 | state->overall_fp_mode = cpu_has_mips_r6 ? FP_FRE : FP_FR0; | ||
| 157 | |||
| 158 | /* Allow all ABIs we know about */ | ||
| 159 | max_abi = MIPS_ABI_FP_64A; | ||
| 160 | } | ||
| 159 | 161 | ||
| 160 | if ((abi0 > max_abi && abi0 != MIPS_ABI_FP_UNKNOWN) || | 162 | if ((abi0 > max_abi && abi0 != MIPS_ABI_FP_UNKNOWN) || |
| 161 | (abi1 > max_abi && abi1 != MIPS_ABI_FP_UNKNOWN)) | 163 | (abi1 > max_abi && abi1 != MIPS_ABI_FP_UNKNOWN)) |
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index d544e774eea6..e933a309f2ea 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c | |||
| @@ -176,7 +176,7 @@ int ptrace_setfpregs(struct task_struct *child, __u32 __user *data) | |||
| 176 | 176 | ||
| 177 | __get_user(value, data + 64); | 177 | __get_user(value, data + 64); |
| 178 | fcr31 = child->thread.fpu.fcr31; | 178 | fcr31 = child->thread.fpu.fcr31; |
| 179 | mask = current_cpu_data.fpu_msk31; | 179 | mask = boot_cpu_data.fpu_msk31; |
| 180 | child->thread.fpu.fcr31 = (value & ~mask) | (fcr31 & mask); | 180 | child->thread.fpu.fcr31 = (value & ~mask) | (fcr31 & mask); |
| 181 | 181 | ||
| 182 | /* FIR may not be written. */ | 182 | /* FIR may not be written. */ |
diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c index 7e011f95bb8e..4251d390b5b6 100644 --- a/arch/mips/kernel/smp-cps.c +++ b/arch/mips/kernel/smp-cps.c | |||
| @@ -92,7 +92,7 @@ static void __init cps_smp_setup(void) | |||
| 92 | #ifdef CONFIG_MIPS_MT_FPAFF | 92 | #ifdef CONFIG_MIPS_MT_FPAFF |
| 93 | /* If we have an FPU, enroll ourselves in the FPU-full mask */ | 93 | /* If we have an FPU, enroll ourselves in the FPU-full mask */ |
| 94 | if (cpu_has_fpu) | 94 | if (cpu_has_fpu) |
| 95 | cpu_set(0, mt_fpu_cpumask); | 95 | cpumask_set_cpu(0, &mt_fpu_cpumask); |
| 96 | #endif /* CONFIG_MIPS_MT_FPAFF */ | 96 | #endif /* CONFIG_MIPS_MT_FPAFF */ |
| 97 | } | 97 | } |
| 98 | 98 | ||
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 193ace7955fb..faa46ebd9dda 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c | |||
| @@ -43,7 +43,7 @@ | |||
| 43 | #include <asm/time.h> | 43 | #include <asm/time.h> |
| 44 | #include <asm/setup.h> | 44 | #include <asm/setup.h> |
| 45 | 45 | ||
| 46 | volatile cpumask_t cpu_callin_map; /* Bitmask of started secondaries */ | 46 | cpumask_t cpu_callin_map; /* Bitmask of started secondaries */ |
| 47 | 47 | ||
| 48 | int __cpu_number_map[NR_CPUS]; /* Map physical to logical */ | 48 | int __cpu_number_map[NR_CPUS]; /* Map physical to logical */ |
| 49 | EXPORT_SYMBOL(__cpu_number_map); | 49 | EXPORT_SYMBOL(__cpu_number_map); |
| @@ -218,8 +218,10 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle) | |||
| 218 | /* | 218 | /* |
| 219 | * Trust is futile. We should really have timeouts ... | 219 | * Trust is futile. We should really have timeouts ... |
| 220 | */ | 220 | */ |
| 221 | while (!cpumask_test_cpu(cpu, &cpu_callin_map)) | 221 | while (!cpumask_test_cpu(cpu, &cpu_callin_map)) { |
| 222 | udelay(100); | 222 | udelay(100); |
| 223 | schedule(); | ||
| 224 | } | ||
| 223 | 225 | ||
| 224 | synchronise_count_master(cpu); | 226 | synchronise_count_master(cpu); |
| 225 | return 0; | 227 | return 0; |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index ba32e48d4697..d2d1c1933bc9 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
| @@ -269,7 +269,6 @@ static void __show_regs(const struct pt_regs *regs) | |||
| 269 | */ | 269 | */ |
| 270 | printk("epc : %0*lx %pS\n", field, regs->cp0_epc, | 270 | printk("epc : %0*lx %pS\n", field, regs->cp0_epc, |
| 271 | (void *) regs->cp0_epc); | 271 | (void *) regs->cp0_epc); |
| 272 | printk(" %s\n", print_tainted()); | ||
| 273 | printk("ra : %0*lx %pS\n", field, regs->regs[31], | 272 | printk("ra : %0*lx %pS\n", field, regs->regs[31], |
| 274 | (void *) regs->regs[31]); | 273 | (void *) regs->regs[31]); |
| 275 | 274 | ||
diff --git a/arch/mips/kvm/emulate.c b/arch/mips/kvm/emulate.c index 6230f376a44e..4b50c5787e25 100644 --- a/arch/mips/kvm/emulate.c +++ b/arch/mips/kvm/emulate.c | |||
| @@ -2389,7 +2389,6 @@ enum emulation_result kvm_mips_complete_mmio_load(struct kvm_vcpu *vcpu, | |||
| 2389 | { | 2389 | { |
| 2390 | unsigned long *gpr = &vcpu->arch.gprs[vcpu->arch.io_gpr]; | 2390 | unsigned long *gpr = &vcpu->arch.gprs[vcpu->arch.io_gpr]; |
| 2391 | enum emulation_result er = EMULATE_DONE; | 2391 | enum emulation_result er = EMULATE_DONE; |
| 2392 | unsigned long curr_pc; | ||
| 2393 | 2392 | ||
| 2394 | if (run->mmio.len > sizeof(*gpr)) { | 2393 | if (run->mmio.len > sizeof(*gpr)) { |
| 2395 | kvm_err("Bad MMIO length: %d", run->mmio.len); | 2394 | kvm_err("Bad MMIO length: %d", run->mmio.len); |
| @@ -2397,11 +2396,6 @@ enum emulation_result kvm_mips_complete_mmio_load(struct kvm_vcpu *vcpu, | |||
| 2397 | goto done; | 2396 | goto done; |
| 2398 | } | 2397 | } |
| 2399 | 2398 | ||
| 2400 | /* | ||
| 2401 | * Update PC and hold onto current PC in case there is | ||
| 2402 | * an error and we want to rollback the PC | ||
| 2403 | */ | ||
| 2404 | curr_pc = vcpu->arch.pc; | ||
| 2405 | er = update_pc(vcpu, vcpu->arch.pending_load_cause); | 2399 | er = update_pc(vcpu, vcpu->arch.pending_load_cause); |
| 2406 | if (er == EMULATE_FAIL) | 2400 | if (er == EMULATE_FAIL) |
| 2407 | return er; | 2401 | return er; |
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c index d31c537ace1d..22b9b2cb9219 100644 --- a/arch/mips/math-emu/cp1emu.c +++ b/arch/mips/math-emu/cp1emu.c | |||
| @@ -889,7 +889,7 @@ static inline void cop1_cfc(struct pt_regs *xcp, struct mips_fpu_struct *ctx, | |||
| 889 | break; | 889 | break; |
| 890 | 890 | ||
| 891 | case FPCREG_RID: | 891 | case FPCREG_RID: |
| 892 | value = current_cpu_data.fpu_id; | 892 | value = boot_cpu_data.fpu_id; |
| 893 | break; | 893 | break; |
| 894 | 894 | ||
| 895 | default: | 895 | default: |
| @@ -921,7 +921,7 @@ static inline void cop1_ctc(struct pt_regs *xcp, struct mips_fpu_struct *ctx, | |||
| 921 | (void *)xcp->cp0_epc, MIPSInst_RT(ir), value); | 921 | (void *)xcp->cp0_epc, MIPSInst_RT(ir), value); |
| 922 | 922 | ||
| 923 | /* Preserve read-only bits. */ | 923 | /* Preserve read-only bits. */ |
| 924 | mask = current_cpu_data.fpu_msk31; | 924 | mask = boot_cpu_data.fpu_msk31; |
| 925 | fcr31 = (value & ~mask) | (fcr31 & mask); | 925 | fcr31 = (value & ~mask) | (fcr31 & mask); |
| 926 | break; | 926 | break; |
| 927 | 927 | ||
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index a27a088e6f9f..08318ecb803a 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c | |||
| @@ -495,7 +495,7 @@ static void r4k_tlb_configure(void) | |||
| 495 | 495 | ||
| 496 | if (cpu_has_rixi) { | 496 | if (cpu_has_rixi) { |
| 497 | /* | 497 | /* |
| 498 | * Enable the no read, no exec bits, and enable large virtual | 498 | * Enable the no read, no exec bits, and enable large physical |
| 499 | * address. | 499 | * address. |
| 500 | */ | 500 | */ |
| 501 | #ifdef CONFIG_64BIT | 501 | #ifdef CONFIG_64BIT |
diff --git a/arch/mips/sgi-ip32/ip32-platform.c b/arch/mips/sgi-ip32/ip32-platform.c index 0134db2ad0a8..5a2a82148d8d 100644 --- a/arch/mips/sgi-ip32/ip32-platform.c +++ b/arch/mips/sgi-ip32/ip32-platform.c | |||
| @@ -130,9 +130,9 @@ struct platform_device ip32_rtc_device = { | |||
| 130 | .resource = ip32_rtc_resources, | 130 | .resource = ip32_rtc_resources, |
| 131 | }; | 131 | }; |
| 132 | 132 | ||
| 133 | +static int __init sgio2_rtc_devinit(void) | 133 | static __init int sgio2_rtc_devinit(void) |
| 134 | { | 134 | { |
| 135 | return platform_device_register(&ip32_rtc_device); | 135 | return platform_device_register(&ip32_rtc_device); |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | device_initcall(sgio2_cmos_devinit); | 138 | device_initcall(sgio2_rtc_devinit); |
diff --git a/arch/parisc/include/asm/elf.h b/arch/parisc/include/asm/elf.h index 3391d061eccc..78c9fd32c554 100644 --- a/arch/parisc/include/asm/elf.h +++ b/arch/parisc/include/asm/elf.h | |||
| @@ -348,6 +348,10 @@ struct pt_regs; /* forward declaration... */ | |||
| 348 | 348 | ||
| 349 | #define ELF_HWCAP 0 | 349 | #define ELF_HWCAP 0 |
| 350 | 350 | ||
| 351 | #define STACK_RND_MASK (is_32bit_task() ? \ | ||
| 352 | 0x7ff >> (PAGE_SHIFT - 12) : \ | ||
| 353 | 0x3ffff >> (PAGE_SHIFT - 12)) | ||
| 354 | |||
| 351 | struct mm_struct; | 355 | struct mm_struct; |
| 352 | extern unsigned long arch_randomize_brk(struct mm_struct *); | 356 | extern unsigned long arch_randomize_brk(struct mm_struct *); |
| 353 | #define arch_randomize_brk arch_randomize_brk | 357 | #define arch_randomize_brk arch_randomize_brk |
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 8a488c22a99f..809905a811ed 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
| @@ -181,9 +181,12 @@ int dump_task_fpu (struct task_struct *tsk, elf_fpregset_t *r) | |||
| 181 | return 1; | 181 | return 1; |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | /* | ||
| 185 | * Copy architecture-specific thread state | ||
| 186 | */ | ||
| 184 | int | 187 | int |
| 185 | copy_thread(unsigned long clone_flags, unsigned long usp, | 188 | copy_thread(unsigned long clone_flags, unsigned long usp, |
| 186 | unsigned long arg, struct task_struct *p) | 189 | unsigned long kthread_arg, struct task_struct *p) |
| 187 | { | 190 | { |
| 188 | struct pt_regs *cregs = &(p->thread.regs); | 191 | struct pt_regs *cregs = &(p->thread.regs); |
| 189 | void *stack = task_stack_page(p); | 192 | void *stack = task_stack_page(p); |
| @@ -195,11 +198,10 @@ copy_thread(unsigned long clone_flags, unsigned long usp, | |||
| 195 | extern void * const child_return; | 198 | extern void * const child_return; |
| 196 | 199 | ||
| 197 | if (unlikely(p->flags & PF_KTHREAD)) { | 200 | if (unlikely(p->flags & PF_KTHREAD)) { |
| 201 | /* kernel thread */ | ||
| 198 | memset(cregs, 0, sizeof(struct pt_regs)); | 202 | memset(cregs, 0, sizeof(struct pt_regs)); |
| 199 | if (!usp) /* idle thread */ | 203 | if (!usp) /* idle thread */ |
| 200 | return 0; | 204 | return 0; |
| 201 | |||
| 202 | /* kernel thread */ | ||
| 203 | /* Must exit via ret_from_kernel_thread in order | 205 | /* Must exit via ret_from_kernel_thread in order |
| 204 | * to call schedule_tail() | 206 | * to call schedule_tail() |
| 205 | */ | 207 | */ |
| @@ -215,7 +217,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp, | |||
| 215 | #else | 217 | #else |
| 216 | cregs->gr[26] = usp; | 218 | cregs->gr[26] = usp; |
| 217 | #endif | 219 | #endif |
| 218 | cregs->gr[25] = arg; | 220 | cregs->gr[25] = kthread_arg; |
| 219 | } else { | 221 | } else { |
| 220 | /* user thread */ | 222 | /* user thread */ |
| 221 | /* usp must be word aligned. This also prevents users from | 223 | /* usp must be word aligned. This also prevents users from |
diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c index e1ffea2f9a0b..5aba01ac457f 100644 --- a/arch/parisc/kernel/sys_parisc.c +++ b/arch/parisc/kernel/sys_parisc.c | |||
| @@ -77,6 +77,9 @@ static unsigned long mmap_upper_limit(void) | |||
| 77 | if (stack_base > STACK_SIZE_MAX) | 77 | if (stack_base > STACK_SIZE_MAX) |
| 78 | stack_base = STACK_SIZE_MAX; | 78 | stack_base = STACK_SIZE_MAX; |
| 79 | 79 | ||
| 80 | /* Add space for stack randomization. */ | ||
| 81 | stack_base += (STACK_RND_MASK << PAGE_SHIFT); | ||
| 82 | |||
| 80 | return PAGE_ALIGN(STACK_TOP - stack_base); | 83 | return PAGE_ALIGN(STACK_TOP - stack_base); |
| 81 | } | 84 | } |
| 82 | 85 | ||
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index ef17683484e9..48304b89b601 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c | |||
| @@ -1109,6 +1109,8 @@ struct boot_params *make_boot_params(struct efi_config *c) | |||
| 1109 | if (!cmdline_ptr) | 1109 | if (!cmdline_ptr) |
| 1110 | goto fail; | 1110 | goto fail; |
| 1111 | hdr->cmd_line_ptr = (unsigned long)cmdline_ptr; | 1111 | hdr->cmd_line_ptr = (unsigned long)cmdline_ptr; |
| 1112 | /* Fill in upper bits of command line address, NOP on 32 bit */ | ||
| 1113 | boot_params->ext_cmd_line_ptr = (u64)(unsigned long)cmdline_ptr >> 32; | ||
| 1112 | 1114 | ||
| 1113 | hdr->ramdisk_image = 0; | 1115 | hdr->ramdisk_image = 0; |
| 1114 | hdr->ramdisk_size = 0; | 1116 | hdr->ramdisk_size = 0; |
diff --git a/arch/x86/include/asm/hypervisor.h b/arch/x86/include/asm/hypervisor.h index e42f758a0fbd..055ea9941dd5 100644 --- a/arch/x86/include/asm/hypervisor.h +++ b/arch/x86/include/asm/hypervisor.h | |||
| @@ -50,7 +50,7 @@ extern const struct hypervisor_x86 *x86_hyper; | |||
| 50 | /* Recognized hypervisors */ | 50 | /* Recognized hypervisors */ |
| 51 | extern const struct hypervisor_x86 x86_hyper_vmware; | 51 | extern const struct hypervisor_x86 x86_hyper_vmware; |
| 52 | extern const struct hypervisor_x86 x86_hyper_ms_hyperv; | 52 | extern const struct hypervisor_x86 x86_hyper_ms_hyperv; |
| 53 | extern const struct hypervisor_x86 x86_hyper_xen_hvm; | 53 | extern const struct hypervisor_x86 x86_hyper_xen; |
| 54 | extern const struct hypervisor_x86 x86_hyper_kvm; | 54 | extern const struct hypervisor_x86 x86_hyper_kvm; |
| 55 | 55 | ||
| 56 | extern void init_hypervisor(struct cpuinfo_x86 *c); | 56 | extern void init_hypervisor(struct cpuinfo_x86 *c); |
diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h index cf87de3fc390..64b611782ef0 100644 --- a/arch/x86/include/asm/spinlock.h +++ b/arch/x86/include/asm/spinlock.h | |||
| @@ -169,7 +169,7 @@ static inline int arch_spin_is_contended(arch_spinlock_t *lock) | |||
| 169 | struct __raw_tickets tmp = READ_ONCE(lock->tickets); | 169 | struct __raw_tickets tmp = READ_ONCE(lock->tickets); |
| 170 | 170 | ||
| 171 | tmp.head &= ~TICKET_SLOWPATH_FLAG; | 171 | tmp.head &= ~TICKET_SLOWPATH_FLAG; |
| 172 | return (tmp.tail - tmp.head) > TICKET_LOCK_INC; | 172 | return (__ticket_t)(tmp.tail - tmp.head) > TICKET_LOCK_INC; |
| 173 | } | 173 | } |
| 174 | #define arch_spin_is_contended arch_spin_is_contended | 174 | #define arch_spin_is_contended arch_spin_is_contended |
| 175 | 175 | ||
diff --git a/arch/x86/include/asm/xen/page.h b/arch/x86/include/asm/xen/page.h index 358dcd338915..c44a5d53e464 100644 --- a/arch/x86/include/asm/xen/page.h +++ b/arch/x86/include/asm/xen/page.h | |||
| @@ -269,4 +269,9 @@ static inline bool xen_arch_need_swiotlb(struct device *dev, | |||
| 269 | return false; | 269 | return false; |
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | static inline unsigned long xen_get_swiotlb_free_pages(unsigned int order) | ||
| 273 | { | ||
| 274 | return __get_free_pages(__GFP_NOWARN, order); | ||
| 275 | } | ||
| 276 | |||
| 272 | #endif /* _ASM_X86_XEN_PAGE_H */ | 277 | #endif /* _ASM_X86_XEN_PAGE_H */ |
diff --git a/arch/x86/kernel/cpu/hypervisor.c b/arch/x86/kernel/cpu/hypervisor.c index 36ce402a3fa5..d820d8eae96b 100644 --- a/arch/x86/kernel/cpu/hypervisor.c +++ b/arch/x86/kernel/cpu/hypervisor.c | |||
| @@ -27,8 +27,8 @@ | |||
| 27 | 27 | ||
| 28 | static const __initconst struct hypervisor_x86 * const hypervisors[] = | 28 | static const __initconst struct hypervisor_x86 * const hypervisors[] = |
| 29 | { | 29 | { |
| 30 | #ifdef CONFIG_XEN_PVHVM | 30 | #ifdef CONFIG_XEN |
| 31 | &x86_hyper_xen_hvm, | 31 | &x86_hyper_xen, |
| 32 | #endif | 32 | #endif |
| 33 | &x86_hyper_vmware, | 33 | &x86_hyper_vmware, |
| 34 | &x86_hyper_ms_hyperv, | 34 | &x86_hyper_ms_hyperv, |
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index 219d3fb423a1..3998131d1a68 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c | |||
| @@ -1134,7 +1134,7 @@ static __initconst const u64 slm_hw_cache_extra_regs | |||
| 1134 | [ C(LL ) ] = { | 1134 | [ C(LL ) ] = { |
| 1135 | [ C(OP_READ) ] = { | 1135 | [ C(OP_READ) ] = { |
| 1136 | [ C(RESULT_ACCESS) ] = SLM_DMND_READ|SLM_LLC_ACCESS, | 1136 | [ C(RESULT_ACCESS) ] = SLM_DMND_READ|SLM_LLC_ACCESS, |
| 1137 | [ C(RESULT_MISS) ] = SLM_DMND_READ|SLM_LLC_MISS, | 1137 | [ C(RESULT_MISS) ] = 0, |
| 1138 | }, | 1138 | }, |
| 1139 | [ C(OP_WRITE) ] = { | 1139 | [ C(OP_WRITE) ] = { |
| 1140 | [ C(RESULT_ACCESS) ] = SLM_DMND_WRITE|SLM_LLC_ACCESS, | 1140 | [ C(RESULT_ACCESS) ] = SLM_DMND_WRITE|SLM_LLC_ACCESS, |
| @@ -1184,8 +1184,7 @@ static __initconst const u64 slm_hw_cache_event_ids | |||
| 1184 | [ C(OP_READ) ] = { | 1184 | [ C(OP_READ) ] = { |
| 1185 | /* OFFCORE_RESPONSE.ANY_DATA.LOCAL_CACHE */ | 1185 | /* OFFCORE_RESPONSE.ANY_DATA.LOCAL_CACHE */ |
| 1186 | [ C(RESULT_ACCESS) ] = 0x01b7, | 1186 | [ C(RESULT_ACCESS) ] = 0x01b7, |
| 1187 | /* OFFCORE_RESPONSE.ANY_DATA.ANY_LLC_MISS */ | 1187 | [ C(RESULT_MISS) ] = 0, |
| 1188 | [ C(RESULT_MISS) ] = 0x01b7, | ||
| 1189 | }, | 1188 | }, |
| 1190 | [ C(OP_WRITE) ] = { | 1189 | [ C(OP_WRITE) ] = { |
| 1191 | /* OFFCORE_RESPONSE.ANY_RFO.LOCAL_CACHE */ | 1190 | /* OFFCORE_RESPONSE.ANY_RFO.LOCAL_CACHE */ |
| @@ -1217,7 +1216,7 @@ static __initconst const u64 slm_hw_cache_event_ids | |||
| 1217 | [ C(ITLB) ] = { | 1216 | [ C(ITLB) ] = { |
| 1218 | [ C(OP_READ) ] = { | 1217 | [ C(OP_READ) ] = { |
| 1219 | [ C(RESULT_ACCESS) ] = 0x00c0, /* INST_RETIRED.ANY_P */ | 1218 | [ C(RESULT_ACCESS) ] = 0x00c0, /* INST_RETIRED.ANY_P */ |
| 1220 | [ C(RESULT_MISS) ] = 0x0282, /* ITLB.MISSES */ | 1219 | [ C(RESULT_MISS) ] = 0x40205, /* PAGE_WALKS.I_SIDE_WALKS */ |
| 1221 | }, | 1220 | }, |
| 1222 | [ C(OP_WRITE) ] = { | 1221 | [ C(OP_WRITE) ] = { |
| 1223 | [ C(RESULT_ACCESS) ] = -1, | 1222 | [ C(RESULT_ACCESS) ] = -1, |
| @@ -2533,34 +2532,6 @@ ssize_t intel_event_sysfs_show(char *page, u64 config) | |||
| 2533 | return x86_event_sysfs_show(page, config, event); | 2532 | return x86_event_sysfs_show(page, config, event); |
| 2534 | } | 2533 | } |
| 2535 | 2534 | ||
| 2536 | static __initconst const struct x86_pmu core_pmu = { | ||
| 2537 | .name = "core", | ||
| 2538 | .handle_irq = x86_pmu_handle_irq, | ||
| 2539 | .disable_all = x86_pmu_disable_all, | ||
| 2540 | .enable_all = core_pmu_enable_all, | ||
| 2541 | .enable = core_pmu_enable_event, | ||
| 2542 | .disable = x86_pmu_disable_event, | ||
| 2543 | .hw_config = x86_pmu_hw_config, | ||
| 2544 | .schedule_events = x86_schedule_events, | ||
| 2545 | .eventsel = MSR_ARCH_PERFMON_EVENTSEL0, | ||
| 2546 | .perfctr = MSR_ARCH_PERFMON_PERFCTR0, | ||
| 2547 | .event_map = intel_pmu_event_map, | ||
| 2548 | .max_events = ARRAY_SIZE(intel_perfmon_event_map), | ||
| 2549 | .apic = 1, | ||
| 2550 | /* | ||
| 2551 | * Intel PMCs cannot be accessed sanely above 32 bit width, | ||
| 2552 | * so we install an artificial 1<<31 period regardless of | ||
| 2553 | * the generic event period: | ||
| 2554 | */ | ||
| 2555 | .max_period = (1ULL << 31) - 1, | ||
| 2556 | .get_event_constraints = intel_get_event_constraints, | ||
| 2557 | .put_event_constraints = intel_put_event_constraints, | ||
| 2558 | .event_constraints = intel_core_event_constraints, | ||
| 2559 | .guest_get_msrs = core_guest_get_msrs, | ||
| 2560 | .format_attrs = intel_arch_formats_attr, | ||
| 2561 | .events_sysfs_show = intel_event_sysfs_show, | ||
| 2562 | }; | ||
| 2563 | |||
| 2564 | struct intel_shared_regs *allocate_shared_regs(int cpu) | 2535 | struct intel_shared_regs *allocate_shared_regs(int cpu) |
| 2565 | { | 2536 | { |
| 2566 | struct intel_shared_regs *regs; | 2537 | struct intel_shared_regs *regs; |
| @@ -2743,6 +2714,44 @@ static struct attribute *intel_arch3_formats_attr[] = { | |||
| 2743 | NULL, | 2714 | NULL, |
| 2744 | }; | 2715 | }; |
| 2745 | 2716 | ||
| 2717 | static __initconst const struct x86_pmu core_pmu = { | ||
| 2718 | .name = "core", | ||
| 2719 | .handle_irq = x86_pmu_handle_irq, | ||
| 2720 | .disable_all = x86_pmu_disable_all, | ||
| 2721 | .enable_all = core_pmu_enable_all, | ||
| 2722 | .enable = core_pmu_enable_event, | ||
| 2723 | .disable = x86_pmu_disable_event, | ||
| 2724 | .hw_config = x86_pmu_hw_config, | ||
| 2725 | .schedule_events = x86_schedule_events, | ||
| 2726 | .eventsel = MSR_ARCH_PERFMON_EVENTSEL0, | ||
| 2727 | .perfctr = MSR_ARCH_PERFMON_PERFCTR0, | ||
| 2728 | .event_map = intel_pmu_event_map, | ||
| 2729 | .max_events = ARRAY_SIZE(intel_perfmon_event_map), | ||
| 2730 | .apic = 1, | ||
| 2731 | /* | ||
| 2732 | * Intel PMCs cannot be accessed sanely above 32-bit width, | ||
| 2733 | * so we install an artificial 1<<31 period regardless of | ||
| 2734 | * the generic event period: | ||
| 2735 | */ | ||
| 2736 | .max_period = (1ULL<<31) - 1, | ||
| 2737 | .get_event_constraints = intel_get_event_constraints, | ||
| 2738 | .put_event_constraints = intel_put_event_constraints, | ||
| 2739 | .event_constraints = intel_core_event_constraints, | ||
| 2740 | .guest_get_msrs = core_guest_get_msrs, | ||
| 2741 | .format_attrs = intel_arch_formats_attr, | ||
| 2742 | .events_sysfs_show = intel_event_sysfs_show, | ||
| 2743 | |||
| 2744 | /* | ||
| 2745 | * Virtual (or funny metal) CPU can define x86_pmu.extra_regs | ||
| 2746 | * together with PMU version 1 and thus be using core_pmu with | ||
| 2747 | * shared_regs. We need following callbacks here to allocate | ||
| 2748 | * it properly. | ||
| 2749 | */ | ||
| 2750 | .cpu_prepare = intel_pmu_cpu_prepare, | ||
| 2751 | .cpu_starting = intel_pmu_cpu_starting, | ||
| 2752 | .cpu_dying = intel_pmu_cpu_dying, | ||
| 2753 | }; | ||
| 2754 | |||
| 2746 | static __initconst const struct x86_pmu intel_pmu = { | 2755 | static __initconst const struct x86_pmu intel_pmu = { |
| 2747 | .name = "Intel", | 2756 | .name = "Intel", |
| 2748 | .handle_irq = intel_pmu_handle_irq, | 2757 | .handle_irq = intel_pmu_handle_irq, |
diff --git a/arch/x86/kernel/cpu/perf_event_intel_rapl.c b/arch/x86/kernel/cpu/perf_event_intel_rapl.c index 999289b94025..358c54ad20d4 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_rapl.c +++ b/arch/x86/kernel/cpu/perf_event_intel_rapl.c | |||
| @@ -722,6 +722,7 @@ static int __init rapl_pmu_init(void) | |||
| 722 | break; | 722 | break; |
| 723 | case 60: /* Haswell */ | 723 | case 60: /* Haswell */ |
| 724 | case 69: /* Haswell-Celeron */ | 724 | case 69: /* Haswell-Celeron */ |
| 725 | case 61: /* Broadwell */ | ||
| 725 | rapl_cntr_mask = RAPL_IDX_HSW; | 726 | rapl_cntr_mask = RAPL_IDX_HSW; |
| 726 | rapl_pmu_events_group.attrs = rapl_events_hsw_attr; | 727 | rapl_pmu_events_group.attrs = rapl_events_hsw_attr; |
| 727 | break; | 728 | break; |
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c b/arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c index 3001015b755c..4562e9e22c60 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c | |||
| @@ -1,6 +1,13 @@ | |||
| 1 | /* Nehalem/SandBridge/Haswell uncore support */ | 1 | /* Nehalem/SandBridge/Haswell uncore support */ |
| 2 | #include "perf_event_intel_uncore.h" | 2 | #include "perf_event_intel_uncore.h" |
| 3 | 3 | ||
| 4 | /* Uncore IMC PCI IDs */ | ||
| 5 | #define PCI_DEVICE_ID_INTEL_SNB_IMC 0x0100 | ||
| 6 | #define PCI_DEVICE_ID_INTEL_IVB_IMC 0x0154 | ||
| 7 | #define PCI_DEVICE_ID_INTEL_IVB_E3_IMC 0x0150 | ||
| 8 | #define PCI_DEVICE_ID_INTEL_HSW_IMC 0x0c00 | ||
| 9 | #define PCI_DEVICE_ID_INTEL_HSW_U_IMC 0x0a04 | ||
| 10 | |||
| 4 | /* SNB event control */ | 11 | /* SNB event control */ |
| 5 | #define SNB_UNC_CTL_EV_SEL_MASK 0x000000ff | 12 | #define SNB_UNC_CTL_EV_SEL_MASK 0x000000ff |
| 6 | #define SNB_UNC_CTL_UMASK_MASK 0x0000ff00 | 13 | #define SNB_UNC_CTL_UMASK_MASK 0x0000ff00 |
| @@ -472,6 +479,10 @@ static const struct pci_device_id hsw_uncore_pci_ids[] = { | |||
| 472 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HSW_IMC), | 479 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HSW_IMC), |
| 473 | .driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0), | 480 | .driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0), |
| 474 | }, | 481 | }, |
| 482 | { /* IMC */ | ||
| 483 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HSW_U_IMC), | ||
| 484 | .driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0), | ||
| 485 | }, | ||
| 475 | { /* end: all zeroes */ }, | 486 | { /* end: all zeroes */ }, |
| 476 | }; | 487 | }; |
| 477 | 488 | ||
| @@ -502,6 +513,7 @@ static const struct imc_uncore_pci_dev desktop_imc_pci_ids[] = { | |||
| 502 | IMC_DEV(IVB_IMC, &ivb_uncore_pci_driver), /* 3rd Gen Core processor */ | 513 | IMC_DEV(IVB_IMC, &ivb_uncore_pci_driver), /* 3rd Gen Core processor */ |
| 503 | IMC_DEV(IVB_E3_IMC, &ivb_uncore_pci_driver), /* Xeon E3-1200 v2/3rd Gen Core processor */ | 514 | IMC_DEV(IVB_E3_IMC, &ivb_uncore_pci_driver), /* Xeon E3-1200 v2/3rd Gen Core processor */ |
| 504 | IMC_DEV(HSW_IMC, &hsw_uncore_pci_driver), /* 4th Gen Core Processor */ | 515 | IMC_DEV(HSW_IMC, &hsw_uncore_pci_driver), /* 4th Gen Core Processor */ |
| 516 | IMC_DEV(HSW_U_IMC, &hsw_uncore_pci_driver), /* 4th Gen Core ULT Mobile Processor */ | ||
| 505 | { /* end marker */ } | 517 | { /* end marker */ } |
| 506 | }; | 518 | }; |
| 507 | 519 | ||
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 8213da62b1b7..6e338e3b1dc0 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
| @@ -57,7 +57,7 @@ __visible DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, cpu_tss) = { | |||
| 57 | .io_bitmap = { [0 ... IO_BITMAP_LONGS] = ~0 }, | 57 | .io_bitmap = { [0 ... IO_BITMAP_LONGS] = ~0 }, |
| 58 | #endif | 58 | #endif |
| 59 | }; | 59 | }; |
| 60 | EXPORT_PER_CPU_SYMBOL_GPL(cpu_tss); | 60 | EXPORT_PER_CPU_SYMBOL(cpu_tss); |
| 61 | 61 | ||
| 62 | #ifdef CONFIG_X86_64 | 62 | #ifdef CONFIG_X86_64 |
| 63 | static DEFINE_PER_CPU(unsigned char, is_idle); | 63 | static DEFINE_PER_CPU(unsigned char, is_idle); |
| @@ -156,11 +156,13 @@ void flush_thread(void) | |||
| 156 | /* FPU state will be reallocated lazily at the first use. */ | 156 | /* FPU state will be reallocated lazily at the first use. */ |
| 157 | drop_fpu(tsk); | 157 | drop_fpu(tsk); |
| 158 | free_thread_xstate(tsk); | 158 | free_thread_xstate(tsk); |
| 159 | } else if (!used_math()) { | 159 | } else { |
| 160 | /* kthread execs. TODO: cleanup this horror. */ | 160 | if (!tsk_used_math(tsk)) { |
| 161 | if (WARN_ON(init_fpu(tsk))) | 161 | /* kthread execs. TODO: cleanup this horror. */ |
| 162 | force_sig(SIGKILL, tsk); | 162 | if (WARN_ON(init_fpu(tsk))) |
| 163 | user_fpu_begin(); | 163 | force_sig(SIGKILL, tsk); |
| 164 | user_fpu_begin(); | ||
| 165 | } | ||
| 164 | restore_init_xstate(); | 166 | restore_init_xstate(); |
| 165 | } | 167 | } |
| 166 | } | 168 | } |
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 5ead4d6cf3a7..70e7444c6835 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
| @@ -351,18 +351,20 @@ int arch_ioremap_pmd_supported(void) | |||
| 351 | */ | 351 | */ |
| 352 | void *xlate_dev_mem_ptr(phys_addr_t phys) | 352 | void *xlate_dev_mem_ptr(phys_addr_t phys) |
| 353 | { | 353 | { |
| 354 | void *addr; | 354 | unsigned long start = phys & PAGE_MASK; |
| 355 | unsigned long start = phys & PAGE_MASK; | 355 | unsigned long offset = phys & ~PAGE_MASK; |
| 356 | unsigned long vaddr; | ||
| 356 | 357 | ||
| 357 | /* If page is RAM, we can use __va. Otherwise ioremap and unmap. */ | 358 | /* If page is RAM, we can use __va. Otherwise ioremap and unmap. */ |
| 358 | if (page_is_ram(start >> PAGE_SHIFT)) | 359 | if (page_is_ram(start >> PAGE_SHIFT)) |
| 359 | return __va(phys); | 360 | return __va(phys); |
| 360 | 361 | ||
| 361 | addr = (void __force *)ioremap_cache(start, PAGE_SIZE); | 362 | vaddr = (unsigned long)ioremap_cache(start, PAGE_SIZE); |
| 362 | if (addr) | 363 | /* Only add the offset on success and return NULL if the ioremap() failed: */ |
| 363 | addr = (void *)((unsigned long)addr | (phys & ~PAGE_MASK)); | 364 | if (vaddr) |
| 365 | vaddr += offset; | ||
| 364 | 366 | ||
| 365 | return addr; | 367 | return (void *)vaddr; |
| 366 | } | 368 | } |
| 367 | 369 | ||
| 368 | void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr) | 370 | void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr) |
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c index 987514396c1e..99f76103c6b7 100644 --- a/arch/x86/net/bpf_jit_comp.c +++ b/arch/x86/net/bpf_jit_comp.c | |||
| @@ -559,6 +559,13 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image, | |||
| 559 | if (is_ereg(dst_reg)) | 559 | if (is_ereg(dst_reg)) |
| 560 | EMIT1(0x41); | 560 | EMIT1(0x41); |
| 561 | EMIT3(0xC1, add_1reg(0xC8, dst_reg), 8); | 561 | EMIT3(0xC1, add_1reg(0xC8, dst_reg), 8); |
| 562 | |||
| 563 | /* emit 'movzwl eax, ax' */ | ||
| 564 | if (is_ereg(dst_reg)) | ||
| 565 | EMIT3(0x45, 0x0F, 0xB7); | ||
| 566 | else | ||
| 567 | EMIT2(0x0F, 0xB7); | ||
| 568 | EMIT1(add_2reg(0xC0, dst_reg, dst_reg)); | ||
| 562 | break; | 569 | break; |
| 563 | case 32: | 570 | case 32: |
| 564 | /* emit 'bswap eax' to swap lower 4 bytes */ | 571 | /* emit 'bswap eax' to swap lower 4 bytes */ |
| @@ -577,6 +584,27 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image, | |||
| 577 | break; | 584 | break; |
| 578 | 585 | ||
| 579 | case BPF_ALU | BPF_END | BPF_FROM_LE: | 586 | case BPF_ALU | BPF_END | BPF_FROM_LE: |
| 587 | switch (imm32) { | ||
| 588 | case 16: | ||
| 589 | /* emit 'movzwl eax, ax' to zero extend 16-bit | ||
| 590 | * into 64 bit | ||
| 591 | */ | ||
| 592 | if (is_ereg(dst_reg)) | ||
| 593 | EMIT3(0x45, 0x0F, 0xB7); | ||
| 594 | else | ||
| 595 | EMIT2(0x0F, 0xB7); | ||
| 596 | EMIT1(add_2reg(0xC0, dst_reg, dst_reg)); | ||
| 597 | break; | ||
| 598 | case 32: | ||
| 599 | /* emit 'mov eax, eax' to clear upper 32-bits */ | ||
| 600 | if (is_ereg(dst_reg)) | ||
| 601 | EMIT1(0x45); | ||
| 602 | EMIT2(0x89, add_2reg(0xC0, dst_reg, dst_reg)); | ||
| 603 | break; | ||
| 604 | case 64: | ||
| 605 | /* nop */ | ||
| 606 | break; | ||
| 607 | } | ||
| 580 | break; | 608 | break; |
| 581 | 609 | ||
| 582 | /* ST: *(u8*)(dst_reg + off) = imm */ | 610 | /* ST: *(u8*)(dst_reg + off) = imm */ |
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index e4695985f9de..d93963340c3c 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
| @@ -325,6 +325,26 @@ static void release_pci_root_info(struct pci_host_bridge *bridge) | |||
| 325 | kfree(info); | 325 | kfree(info); |
| 326 | } | 326 | } |
| 327 | 327 | ||
| 328 | /* | ||
| 329 | * An IO port or MMIO resource assigned to a PCI host bridge may be | ||
| 330 | * consumed by the host bridge itself or available to its child | ||
| 331 | * bus/devices. The ACPI specification defines a bit (Producer/Consumer) | ||
| 332 | * to tell whether the resource is consumed by the host bridge itself, | ||
| 333 | * but firmware hasn't used that bit consistently, so we can't rely on it. | ||
| 334 | * | ||
| 335 | * On x86 and IA64 platforms, all IO port and MMIO resources are assumed | ||
| 336 | * to be available to child bus/devices except one special case: | ||
| 337 | * IO port [0xCF8-0xCFF] is consumed by the host bridge itself | ||
| 338 | * to access PCI configuration space. | ||
| 339 | * | ||
| 340 | * So explicitly filter out PCI CFG IO ports[0xCF8-0xCFF]. | ||
| 341 | */ | ||
| 342 | static bool resource_is_pcicfg_ioport(struct resource *res) | ||
| 343 | { | ||
| 344 | return (res->flags & IORESOURCE_IO) && | ||
| 345 | res->start == 0xCF8 && res->end == 0xCFF; | ||
| 346 | } | ||
| 347 | |||
| 328 | static void probe_pci_root_info(struct pci_root_info *info, | 348 | static void probe_pci_root_info(struct pci_root_info *info, |
| 329 | struct acpi_device *device, | 349 | struct acpi_device *device, |
| 330 | int busnum, int domain, | 350 | int busnum, int domain, |
| @@ -346,8 +366,8 @@ static void probe_pci_root_info(struct pci_root_info *info, | |||
| 346 | "no IO and memory resources present in _CRS\n"); | 366 | "no IO and memory resources present in _CRS\n"); |
| 347 | else | 367 | else |
| 348 | resource_list_for_each_entry_safe(entry, tmp, list) { | 368 | resource_list_for_each_entry_safe(entry, tmp, list) { |
| 349 | if ((entry->res->flags & IORESOURCE_WINDOW) == 0 || | 369 | if ((entry->res->flags & IORESOURCE_DISABLED) || |
| 350 | (entry->res->flags & IORESOURCE_DISABLED)) | 370 | resource_is_pcicfg_ioport(entry->res)) |
| 351 | resource_list_destroy_entry(entry); | 371 | resource_list_destroy_entry(entry); |
| 352 | else | 372 | else |
| 353 | entry->res->name = info->name; | 373 | entry->res->name = info->name; |
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile index 275a3a8b78af..e97032069f88 100644 --- a/arch/x86/vdso/Makefile +++ b/arch/x86/vdso/Makefile | |||
| @@ -51,7 +51,7 @@ VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \ | |||
| 51 | $(obj)/vdso64.so.dbg: $(src)/vdso.lds $(vobjs) FORCE | 51 | $(obj)/vdso64.so.dbg: $(src)/vdso.lds $(vobjs) FORCE |
| 52 | $(call if_changed,vdso) | 52 | $(call if_changed,vdso) |
| 53 | 53 | ||
| 54 | HOST_EXTRACFLAGS += -I$(srctree)/tools/include -I$(srctree)/include/uapi | 54 | HOST_EXTRACFLAGS += -I$(srctree)/tools/include -I$(srctree)/include/uapi -I$(srctree)/arch/x86/include/uapi |
| 55 | hostprogs-y += vdso2c | 55 | hostprogs-y += vdso2c |
| 56 | 56 | ||
| 57 | quiet_cmd_vdso2c = VDSO2C $@ | 57 | quiet_cmd_vdso2c = VDSO2C $@ |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 94578efd3067..46957ead3060 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
| @@ -1760,6 +1760,9 @@ static struct notifier_block xen_hvm_cpu_notifier = { | |||
| 1760 | 1760 | ||
| 1761 | static void __init xen_hvm_guest_init(void) | 1761 | static void __init xen_hvm_guest_init(void) |
| 1762 | { | 1762 | { |
| 1763 | if (xen_pv_domain()) | ||
| 1764 | return; | ||
| 1765 | |||
| 1763 | init_hvm_pv_info(); | 1766 | init_hvm_pv_info(); |
| 1764 | 1767 | ||
| 1765 | xen_hvm_init_shared_info(); | 1768 | xen_hvm_init_shared_info(); |
| @@ -1775,6 +1778,7 @@ static void __init xen_hvm_guest_init(void) | |||
| 1775 | xen_hvm_init_time_ops(); | 1778 | xen_hvm_init_time_ops(); |
| 1776 | xen_hvm_init_mmu_ops(); | 1779 | xen_hvm_init_mmu_ops(); |
| 1777 | } | 1780 | } |
| 1781 | #endif | ||
| 1778 | 1782 | ||
| 1779 | static bool xen_nopv = false; | 1783 | static bool xen_nopv = false; |
| 1780 | static __init int xen_parse_nopv(char *arg) | 1784 | static __init int xen_parse_nopv(char *arg) |
| @@ -1784,14 +1788,11 @@ static __init int xen_parse_nopv(char *arg) | |||
| 1784 | } | 1788 | } |
| 1785 | early_param("xen_nopv", xen_parse_nopv); | 1789 | early_param("xen_nopv", xen_parse_nopv); |
| 1786 | 1790 | ||
| 1787 | static uint32_t __init xen_hvm_platform(void) | 1791 | static uint32_t __init xen_platform(void) |
| 1788 | { | 1792 | { |
| 1789 | if (xen_nopv) | 1793 | if (xen_nopv) |
| 1790 | return 0; | 1794 | return 0; |
| 1791 | 1795 | ||
| 1792 | if (xen_pv_domain()) | ||
| 1793 | return 0; | ||
| 1794 | |||
| 1795 | return xen_cpuid_base(); | 1796 | return xen_cpuid_base(); |
| 1796 | } | 1797 | } |
| 1797 | 1798 | ||
| @@ -1809,11 +1810,19 @@ bool xen_hvm_need_lapic(void) | |||
| 1809 | } | 1810 | } |
| 1810 | EXPORT_SYMBOL_GPL(xen_hvm_need_lapic); | 1811 | EXPORT_SYMBOL_GPL(xen_hvm_need_lapic); |
| 1811 | 1812 | ||
| 1812 | const struct hypervisor_x86 x86_hyper_xen_hvm __refconst = { | 1813 | static void xen_set_cpu_features(struct cpuinfo_x86 *c) |
| 1813 | .name = "Xen HVM", | 1814 | { |
| 1814 | .detect = xen_hvm_platform, | 1815 | if (xen_pv_domain()) |
| 1816 | clear_cpu_bug(c, X86_BUG_SYSRET_SS_ATTRS); | ||
| 1817 | } | ||
| 1818 | |||
| 1819 | const struct hypervisor_x86 x86_hyper_xen = { | ||
| 1820 | .name = "Xen", | ||
| 1821 | .detect = xen_platform, | ||
| 1822 | #ifdef CONFIG_XEN_PVHVM | ||
| 1815 | .init_platform = xen_hvm_guest_init, | 1823 | .init_platform = xen_hvm_guest_init, |
| 1824 | #endif | ||
| 1816 | .x2apic_available = xen_x2apic_para_available, | 1825 | .x2apic_available = xen_x2apic_para_available, |
| 1826 | .set_cpu_features = xen_set_cpu_features, | ||
| 1817 | }; | 1827 | }; |
| 1818 | EXPORT_SYMBOL(x86_hyper_xen_hvm); | 1828 | EXPORT_SYMBOL(x86_hyper_xen); |
| 1819 | #endif | ||
diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c index d9497698645a..53b4c0811f4f 100644 --- a/arch/x86/xen/suspend.c +++ b/arch/x86/xen/suspend.c | |||
| @@ -88,7 +88,17 @@ static void xen_vcpu_notify_restore(void *data) | |||
| 88 | tick_resume_local(); | 88 | tick_resume_local(); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | static void xen_vcpu_notify_suspend(void *data) | ||
| 92 | { | ||
| 93 | tick_suspend_local(); | ||
| 94 | } | ||
| 95 | |||
| 91 | void xen_arch_resume(void) | 96 | void xen_arch_resume(void) |
| 92 | { | 97 | { |
| 93 | on_each_cpu(xen_vcpu_notify_restore, NULL, 1); | 98 | on_each_cpu(xen_vcpu_notify_restore, NULL, 1); |
| 94 | } | 99 | } |
| 100 | |||
| 101 | void xen_arch_suspend(void) | ||
| 102 | { | ||
| 103 | on_each_cpu(xen_vcpu_notify_suspend, NULL, 1); | ||
| 104 | } | ||
