diff options
Diffstat (limited to 'arch')
97 files changed, 621 insertions, 387 deletions
diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts index 00044026ef1f..9b82facb2561 100644 --- a/arch/arm/boot/dts/armada-370-db.dts +++ b/arch/arm/boot/dts/armada-370-db.dts | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | 26 | ||
| 27 | memory { | 27 | memory { |
| 28 | device_type = "memory"; | 28 | device_type = "memory"; |
| 29 | reg = <0x00000000 0x20000000>; /* 512 MB */ | 29 | reg = <0x00000000 0x40000000>; /* 1 GB */ |
| 30 | }; | 30 | }; |
| 31 | 31 | ||
| 32 | soc { | 32 | soc { |
diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi index 271855a6e224..e041f42ed711 100644 --- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi | |||
| @@ -50,27 +50,25 @@ | |||
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | gpio0: gpio@d0018100 { | 52 | gpio0: gpio@d0018100 { |
| 53 | compatible = "marvell,armadaxp-gpio"; | 53 | compatible = "marvell,orion-gpio"; |
| 54 | reg = <0xd0018100 0x40>, | 54 | reg = <0xd0018100 0x40>; |
| 55 | <0xd0018800 0x30>; | ||
| 56 | ngpios = <32>; | 55 | ngpios = <32>; |
| 57 | gpio-controller; | 56 | gpio-controller; |
| 58 | #gpio-cells = <2>; | 57 | #gpio-cells = <2>; |
| 59 | interrupt-controller; | 58 | interrupt-controller; |
| 60 | #interrupts-cells = <2>; | 59 | #interrupts-cells = <2>; |
| 61 | interrupts = <16>, <17>, <18>, <19>; | 60 | interrupts = <82>, <83>, <84>, <85>; |
| 62 | }; | 61 | }; |
| 63 | 62 | ||
| 64 | gpio1: gpio@d0018140 { | 63 | gpio1: gpio@d0018140 { |
| 65 | compatible = "marvell,armadaxp-gpio"; | 64 | compatible = "marvell,orion-gpio"; |
| 66 | reg = <0xd0018140 0x40>, | 65 | reg = <0xd0018140 0x40>; |
| 67 | <0xd0018840 0x30>; | ||
| 68 | ngpios = <17>; | 66 | ngpios = <17>; |
| 69 | gpio-controller; | 67 | gpio-controller; |
| 70 | #gpio-cells = <2>; | 68 | #gpio-cells = <2>; |
| 71 | interrupt-controller; | 69 | interrupt-controller; |
| 72 | #interrupts-cells = <2>; | 70 | #interrupts-cells = <2>; |
| 73 | interrupts = <20>, <21>, <22>; | 71 | interrupts = <87>, <88>, <89>; |
| 74 | }; | 72 | }; |
| 75 | }; | 73 | }; |
| 76 | }; | 74 | }; |
diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi index 1c1937dbce73..9e23bd8c9536 100644 --- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi | |||
| @@ -51,39 +51,36 @@ | |||
| 51 | }; | 51 | }; |
| 52 | 52 | ||
| 53 | gpio0: gpio@d0018100 { | 53 | gpio0: gpio@d0018100 { |
| 54 | compatible = "marvell,armadaxp-gpio"; | 54 | compatible = "marvell,orion-gpio"; |
| 55 | reg = <0xd0018100 0x40>, | 55 | reg = <0xd0018100 0x40>; |
| 56 | <0xd0018800 0x30>; | ||
| 57 | ngpios = <32>; | 56 | ngpios = <32>; |
| 58 | gpio-controller; | 57 | gpio-controller; |
| 59 | #gpio-cells = <2>; | 58 | #gpio-cells = <2>; |
| 60 | interrupt-controller; | 59 | interrupt-controller; |
| 61 | #interrupts-cells = <2>; | 60 | #interrupts-cells = <2>; |
| 62 | interrupts = <16>, <17>, <18>, <19>; | 61 | interrupts = <82>, <83>, <84>, <85>; |
| 63 | }; | 62 | }; |
| 64 | 63 | ||
| 65 | gpio1: gpio@d0018140 { | 64 | gpio1: gpio@d0018140 { |
| 66 | compatible = "marvell,armadaxp-gpio"; | 65 | compatible = "marvell,orion-gpio"; |
| 67 | reg = <0xd0018140 0x40>, | 66 | reg = <0xd0018140 0x40>; |
| 68 | <0xd0018840 0x30>; | ||
| 69 | ngpios = <32>; | 67 | ngpios = <32>; |
| 70 | gpio-controller; | 68 | gpio-controller; |
| 71 | #gpio-cells = <2>; | 69 | #gpio-cells = <2>; |
| 72 | interrupt-controller; | 70 | interrupt-controller; |
| 73 | #interrupts-cells = <2>; | 71 | #interrupts-cells = <2>; |
| 74 | interrupts = <20>, <21>, <22>, <23>; | 72 | interrupts = <87>, <88>, <89>, <90>; |
| 75 | }; | 73 | }; |
| 76 | 74 | ||
| 77 | gpio2: gpio@d0018180 { | 75 | gpio2: gpio@d0018180 { |
| 78 | compatible = "marvell,armadaxp-gpio"; | 76 | compatible = "marvell,orion-gpio"; |
| 79 | reg = <0xd0018180 0x40>, | 77 | reg = <0xd0018180 0x40>; |
| 80 | <0xd0018870 0x30>; | ||
| 81 | ngpios = <3>; | 78 | ngpios = <3>; |
| 82 | gpio-controller; | 79 | gpio-controller; |
| 83 | #gpio-cells = <2>; | 80 | #gpio-cells = <2>; |
| 84 | interrupt-controller; | 81 | interrupt-controller; |
| 85 | #interrupts-cells = <2>; | 82 | #interrupts-cells = <2>; |
| 86 | interrupts = <24>; | 83 | interrupts = <91>; |
| 87 | }; | 84 | }; |
| 88 | 85 | ||
| 89 | ethernet@d0034000 { | 86 | ethernet@d0034000 { |
diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi index 4905cf3a5ef8..965966110e38 100644 --- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi | |||
| @@ -66,39 +66,36 @@ | |||
| 66 | }; | 66 | }; |
| 67 | 67 | ||
| 68 | gpio0: gpio@d0018100 { | 68 | gpio0: gpio@d0018100 { |
| 69 | compatible = "marvell,armadaxp-gpio"; | 69 | compatible = "marvell,orion-gpio"; |
| 70 | reg = <0xd0018100 0x40>, | 70 | reg = <0xd0018100 0x40>; |
| 71 | <0xd0018800 0x30>; | ||
| 72 | ngpios = <32>; | 71 | ngpios = <32>; |
| 73 | gpio-controller; | 72 | gpio-controller; |
| 74 | #gpio-cells = <2>; | 73 | #gpio-cells = <2>; |
| 75 | interrupt-controller; | 74 | interrupt-controller; |
| 76 | #interrupts-cells = <2>; | 75 | #interrupts-cells = <2>; |
| 77 | interrupts = <16>, <17>, <18>, <19>; | 76 | interrupts = <82>, <83>, <84>, <85>; |
| 78 | }; | 77 | }; |
| 79 | 78 | ||
| 80 | gpio1: gpio@d0018140 { | 79 | gpio1: gpio@d0018140 { |
| 81 | compatible = "marvell,armadaxp-gpio"; | 80 | compatible = "marvell,orion-gpio"; |
| 82 | reg = <0xd0018140 0x40>, | 81 | reg = <0xd0018140 0x40>; |
| 83 | <0xd0018840 0x30>; | ||
| 84 | ngpios = <32>; | 82 | ngpios = <32>; |
| 85 | gpio-controller; | 83 | gpio-controller; |
| 86 | #gpio-cells = <2>; | 84 | #gpio-cells = <2>; |
| 87 | interrupt-controller; | 85 | interrupt-controller; |
| 88 | #interrupts-cells = <2>; | 86 | #interrupts-cells = <2>; |
| 89 | interrupts = <20>, <21>, <22>, <23>; | 87 | interrupts = <87>, <88>, <89>, <90>; |
| 90 | }; | 88 | }; |
| 91 | 89 | ||
| 92 | gpio2: gpio@d0018180 { | 90 | gpio2: gpio@d0018180 { |
| 93 | compatible = "marvell,armadaxp-gpio"; | 91 | compatible = "marvell,orion-gpio"; |
| 94 | reg = <0xd0018180 0x40>, | 92 | reg = <0xd0018180 0x40>; |
| 95 | <0xd0018870 0x30>; | ||
| 96 | ngpios = <3>; | 93 | ngpios = <3>; |
| 97 | gpio-controller; | 94 | gpio-controller; |
| 98 | #gpio-cells = <2>; | 95 | #gpio-cells = <2>; |
| 99 | interrupt-controller; | 96 | interrupt-controller; |
| 100 | #interrupts-cells = <2>; | 97 | #interrupts-cells = <2>; |
| 101 | interrupts = <24>; | 98 | interrupts = <91>; |
| 102 | }; | 99 | }; |
| 103 | 100 | ||
| 104 | ethernet@d0034000 { | 101 | ethernet@d0034000 { |
diff --git a/arch/arm/boot/dts/at91rm9200.dtsi b/arch/arm/boot/dts/at91rm9200.dtsi index e154f242c680..222047f1ece9 100644 --- a/arch/arm/boot/dts/at91rm9200.dtsi +++ b/arch/arm/boot/dts/at91rm9200.dtsi | |||
| @@ -336,8 +336,8 @@ | |||
| 336 | 336 | ||
| 337 | i2c@0 { | 337 | i2c@0 { |
| 338 | compatible = "i2c-gpio"; | 338 | compatible = "i2c-gpio"; |
| 339 | gpios = <&pioA 23 0 /* sda */ | 339 | gpios = <&pioA 25 0 /* sda */ |
| 340 | &pioA 24 0 /* scl */ | 340 | &pioA 26 0 /* scl */ |
| 341 | >; | 341 | >; |
| 342 | i2c-gpio,sda-open-drain; | 342 | i2c-gpio,sda-open-drain; |
| 343 | i2c-gpio,scl-open-drain; | 343 | i2c-gpio,scl-open-drain; |
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi index 3a47cf952146..8ecca6948d81 100644 --- a/arch/arm/boot/dts/at91sam9x5.dtsi +++ b/arch/arm/boot/dts/at91sam9x5.dtsi | |||
| @@ -143,6 +143,11 @@ | |||
| 143 | atmel,pins = | 143 | atmel,pins = |
| 144 | <0 3 0x1 0x0>; /* PA3 periph A */ | 144 | <0 3 0x1 0x0>; /* PA3 periph A */ |
| 145 | }; | 145 | }; |
| 146 | |||
| 147 | pinctrl_usart0_sck: usart0_sck-0 { | ||
| 148 | atmel,pins = | ||
| 149 | <0 4 0x1 0x0>; /* PA4 periph A */ | ||
| 150 | }; | ||
| 146 | }; | 151 | }; |
| 147 | 152 | ||
| 148 | usart1 { | 153 | usart1 { |
| @@ -154,12 +159,17 @@ | |||
| 154 | 159 | ||
| 155 | pinctrl_usart1_rts: usart1_rts-0 { | 160 | pinctrl_usart1_rts: usart1_rts-0 { |
| 156 | atmel,pins = | 161 | atmel,pins = |
| 157 | <3 27 0x3 0x0>; /* PC27 periph C */ | 162 | <2 27 0x3 0x0>; /* PC27 periph C */ |
| 158 | }; | 163 | }; |
| 159 | 164 | ||
| 160 | pinctrl_usart1_cts: usart1_cts-0 { | 165 | pinctrl_usart1_cts: usart1_cts-0 { |
| 161 | atmel,pins = | 166 | atmel,pins = |
| 162 | <3 28 0x3 0x0>; /* PC28 periph C */ | 167 | <2 28 0x3 0x0>; /* PC28 periph C */ |
| 168 | }; | ||
| 169 | |||
| 170 | pinctrl_usart1_sck: usart1_sck-0 { | ||
| 171 | atmel,pins = | ||
| 172 | <2 28 0x3 0x0>; /* PC29 periph C */ | ||
| 163 | }; | 173 | }; |
| 164 | }; | 174 | }; |
| 165 | 175 | ||
| @@ -172,46 +182,56 @@ | |||
| 172 | 182 | ||
| 173 | pinctrl_uart2_rts: uart2_rts-0 { | 183 | pinctrl_uart2_rts: uart2_rts-0 { |
| 174 | atmel,pins = | 184 | atmel,pins = |
| 175 | <0 0 0x2 0x0>; /* PB0 periph B */ | 185 | <1 0 0x2 0x0>; /* PB0 periph B */ |
| 176 | }; | 186 | }; |
| 177 | 187 | ||
| 178 | pinctrl_uart2_cts: uart2_cts-0 { | 188 | pinctrl_uart2_cts: uart2_cts-0 { |
| 179 | atmel,pins = | 189 | atmel,pins = |
| 180 | <0 1 0x2 0x0>; /* PB1 periph B */ | 190 | <1 1 0x2 0x0>; /* PB1 periph B */ |
| 191 | }; | ||
| 192 | |||
| 193 | pinctrl_usart2_sck: usart2_sck-0 { | ||
| 194 | atmel,pins = | ||
| 195 | <1 2 0x2 0x0>; /* PB2 periph B */ | ||
| 181 | }; | 196 | }; |
| 182 | }; | 197 | }; |
| 183 | 198 | ||
| 184 | usart3 { | 199 | usart3 { |
| 185 | pinctrl_uart3: usart3-0 { | 200 | pinctrl_uart3: usart3-0 { |
| 186 | atmel,pins = | 201 | atmel,pins = |
| 187 | <3 23 0x2 0x1 /* PC22 periph B with pullup */ | 202 | <2 23 0x2 0x1 /* PC22 periph B with pullup */ |
| 188 | 3 23 0x2 0x0>; /* PC23 periph B */ | 203 | 2 23 0x2 0x0>; /* PC23 periph B */ |
| 189 | }; | 204 | }; |
| 190 | 205 | ||
| 191 | pinctrl_usart3_rts: usart3_rts-0 { | 206 | pinctrl_usart3_rts: usart3_rts-0 { |
| 192 | atmel,pins = | 207 | atmel,pins = |
| 193 | <3 24 0x2 0x0>; /* PC24 periph B */ | 208 | <2 24 0x2 0x0>; /* PC24 periph B */ |
| 194 | }; | 209 | }; |
| 195 | 210 | ||
| 196 | pinctrl_usart3_cts: usart3_cts-0 { | 211 | pinctrl_usart3_cts: usart3_cts-0 { |
| 197 | atmel,pins = | 212 | atmel,pins = |
| 198 | <3 25 0x2 0x0>; /* PC25 periph B */ | 213 | <2 25 0x2 0x0>; /* PC25 periph B */ |
| 214 | }; | ||
| 215 | |||
| 216 | pinctrl_usart3_sck: usart3_sck-0 { | ||
| 217 | atmel,pins = | ||
| 218 | <2 26 0x2 0x0>; /* PC26 periph B */ | ||
| 199 | }; | 219 | }; |
| 200 | }; | 220 | }; |
| 201 | 221 | ||
| 202 | uart0 { | 222 | uart0 { |
| 203 | pinctrl_uart0: uart0-0 { | 223 | pinctrl_uart0: uart0-0 { |
| 204 | atmel,pins = | 224 | atmel,pins = |
| 205 | <3 8 0x3 0x0 /* PC8 periph C */ | 225 | <2 8 0x3 0x0 /* PC8 periph C */ |
| 206 | 3 9 0x3 0x1>; /* PC9 periph C with pullup */ | 226 | 2 9 0x3 0x1>; /* PC9 periph C with pullup */ |
| 207 | }; | 227 | }; |
| 208 | }; | 228 | }; |
| 209 | 229 | ||
| 210 | uart1 { | 230 | uart1 { |
| 211 | pinctrl_uart1: uart1-0 { | 231 | pinctrl_uart1: uart1-0 { |
| 212 | atmel,pins = | 232 | atmel,pins = |
| 213 | <3 16 0x3 0x0 /* PC16 periph C */ | 233 | <2 16 0x3 0x0 /* PC16 periph C */ |
| 214 | 3 17 0x3 0x1>; /* PC17 periph C with pullup */ | 234 | 2 17 0x3 0x1>; /* PC17 periph C with pullup */ |
| 215 | }; | 235 | }; |
| 216 | }; | 236 | }; |
| 217 | 237 | ||
| @@ -240,14 +260,14 @@ | |||
| 240 | 260 | ||
| 241 | pinctrl_macb0_rmii_mii: macb0_rmii_mii-0 { | 261 | pinctrl_macb0_rmii_mii: macb0_rmii_mii-0 { |
| 242 | atmel,pins = | 262 | atmel,pins = |
| 243 | <1 8 0x1 0x0 /* PA8 periph A */ | 263 | <1 8 0x1 0x0 /* PB8 periph A */ |
| 244 | 1 11 0x1 0x0 /* PA11 periph A */ | 264 | 1 11 0x1 0x0 /* PB11 periph A */ |
| 245 | 1 12 0x1 0x0 /* PA12 periph A */ | 265 | 1 12 0x1 0x0 /* PB12 periph A */ |
| 246 | 1 13 0x1 0x0 /* PA13 periph A */ | 266 | 1 13 0x1 0x0 /* PB13 periph A */ |
| 247 | 1 14 0x1 0x0 /* PA14 periph A */ | 267 | 1 14 0x1 0x0 /* PB14 periph A */ |
| 248 | 1 15 0x1 0x0 /* PA15 periph A */ | 268 | 1 15 0x1 0x0 /* PB15 periph A */ |
| 249 | 1 16 0x1 0x0 /* PA16 periph A */ | 269 | 1 16 0x1 0x0 /* PB16 periph A */ |
| 250 | 1 17 0x1 0x0>; /* PA17 periph A */ | 270 | 1 17 0x1 0x0>; /* PB17 periph A */ |
| 251 | }; | 271 | }; |
| 252 | }; | 272 | }; |
| 253 | 273 | ||
diff --git a/arch/arm/boot/dts/cros5250-common.dtsi b/arch/arm/boot/dts/cros5250-common.dtsi index fddd17417433..46c098017036 100644 --- a/arch/arm/boot/dts/cros5250-common.dtsi +++ b/arch/arm/boot/dts/cros5250-common.dtsi | |||
| @@ -96,8 +96,8 @@ | |||
| 96 | fifo-depth = <0x80>; | 96 | fifo-depth = <0x80>; |
| 97 | card-detect-delay = <200>; | 97 | card-detect-delay = <200>; |
| 98 | samsung,dw-mshc-ciu-div = <3>; | 98 | samsung,dw-mshc-ciu-div = <3>; |
| 99 | samsung,dw-mshc-sdr-timing = <2 3 3>; | 99 | samsung,dw-mshc-sdr-timing = <2 3>; |
| 100 | samsung,dw-mshc-ddr-timing = <1 2 3>; | 100 | samsung,dw-mshc-ddr-timing = <1 2>; |
| 101 | 101 | ||
| 102 | slot@0 { | 102 | slot@0 { |
| 103 | reg = <0>; | 103 | reg = <0>; |
| @@ -120,8 +120,8 @@ | |||
| 120 | fifo-depth = <0x80>; | 120 | fifo-depth = <0x80>; |
| 121 | card-detect-delay = <200>; | 121 | card-detect-delay = <200>; |
| 122 | samsung,dw-mshc-ciu-div = <3>; | 122 | samsung,dw-mshc-ciu-div = <3>; |
| 123 | samsung,dw-mshc-sdr-timing = <2 3 3>; | 123 | samsung,dw-mshc-sdr-timing = <2 3>; |
| 124 | samsung,dw-mshc-ddr-timing = <1 2 3>; | 124 | samsung,dw-mshc-ddr-timing = <1 2>; |
| 125 | 125 | ||
| 126 | slot@0 { | 126 | slot@0 { |
| 127 | reg = <0>; | 127 | reg = <0>; |
| @@ -141,8 +141,8 @@ | |||
| 141 | fifo-depth = <0x80>; | 141 | fifo-depth = <0x80>; |
| 142 | card-detect-delay = <200>; | 142 | card-detect-delay = <200>; |
| 143 | samsung,dw-mshc-ciu-div = <3>; | 143 | samsung,dw-mshc-ciu-div = <3>; |
| 144 | samsung,dw-mshc-sdr-timing = <2 3 3>; | 144 | samsung,dw-mshc-sdr-timing = <2 3>; |
| 145 | samsung,dw-mshc-ddr-timing = <1 2 3>; | 145 | samsung,dw-mshc-ddr-timing = <1 2>; |
| 146 | 146 | ||
| 147 | slot@0 { | 147 | slot@0 { |
| 148 | reg = <0>; | 148 | reg = <0>; |
diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts index fed7d3f9f431..cdee96fca6e2 100644 --- a/arch/arm/boot/dts/dove-cubox.dts +++ b/arch/arm/boot/dts/dove-cubox.dts | |||
| @@ -26,10 +26,15 @@ | |||
| 26 | }; | 26 | }; |
| 27 | 27 | ||
| 28 | &uart0 { status = "okay"; }; | 28 | &uart0 { status = "okay"; }; |
| 29 | &sdio0 { status = "okay"; }; | ||
| 30 | &sata0 { status = "okay"; }; | 29 | &sata0 { status = "okay"; }; |
| 31 | &i2c0 { status = "okay"; }; | 30 | &i2c0 { status = "okay"; }; |
| 32 | 31 | ||
| 32 | &sdio0 { | ||
| 33 | status = "okay"; | ||
| 34 | /* sdio0 card detect is connected to wrong pin on CuBox */ | ||
| 35 | cd-gpios = <&gpio0 12 1>; | ||
| 36 | }; | ||
| 37 | |||
| 33 | &spi0 { | 38 | &spi0 { |
| 34 | status = "okay"; | 39 | status = "okay"; |
| 35 | 40 | ||
| @@ -42,9 +47,14 @@ | |||
| 42 | }; | 47 | }; |
| 43 | 48 | ||
| 44 | &pinctrl { | 49 | &pinctrl { |
| 45 | pinctrl-0 = <&pmx_gpio_18>; | 50 | pinctrl-0 = <&pmx_gpio_12 &pmx_gpio_18>; |
| 46 | pinctrl-names = "default"; | 51 | pinctrl-names = "default"; |
| 47 | 52 | ||
| 53 | pmx_gpio_12: pmx-gpio-12 { | ||
| 54 | marvell,pins = "mpp12"; | ||
| 55 | marvell,function = "gpio"; | ||
| 56 | }; | ||
| 57 | |||
| 48 | pmx_gpio_18: pmx-gpio-18 { | 58 | pmx_gpio_18: pmx-gpio-18 { |
| 49 | marvell,pins = "mpp18"; | 59 | marvell,pins = "mpp18"; |
| 50 | marvell,function = "gpio"; | 60 | marvell,function = "gpio"; |
diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts index 942d5761ca97..e05b18f3c33d 100644 --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts | |||
| @@ -115,8 +115,8 @@ | |||
| 115 | fifo-depth = <0x80>; | 115 | fifo-depth = <0x80>; |
| 116 | card-detect-delay = <200>; | 116 | card-detect-delay = <200>; |
| 117 | samsung,dw-mshc-ciu-div = <3>; | 117 | samsung,dw-mshc-ciu-div = <3>; |
| 118 | samsung,dw-mshc-sdr-timing = <2 3 3>; | 118 | samsung,dw-mshc-sdr-timing = <2 3>; |
| 119 | samsung,dw-mshc-ddr-timing = <1 2 3>; | 119 | samsung,dw-mshc-ddr-timing = <1 2>; |
| 120 | 120 | ||
| 121 | slot@0 { | 121 | slot@0 { |
| 122 | reg = <0>; | 122 | reg = <0>; |
| @@ -139,8 +139,8 @@ | |||
| 139 | fifo-depth = <0x80>; | 139 | fifo-depth = <0x80>; |
| 140 | card-detect-delay = <200>; | 140 | card-detect-delay = <200>; |
| 141 | samsung,dw-mshc-ciu-div = <3>; | 141 | samsung,dw-mshc-ciu-div = <3>; |
| 142 | samsung,dw-mshc-sdr-timing = <2 3 3>; | 142 | samsung,dw-mshc-sdr-timing = <2 3>; |
| 143 | samsung,dw-mshc-ddr-timing = <1 2 3>; | 143 | samsung,dw-mshc-ddr-timing = <1 2>; |
| 144 | 144 | ||
| 145 | slot@0 { | 145 | slot@0 { |
| 146 | reg = <0>; | 146 | reg = <0>; |
diff --git a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi index 9bc6785ad228..77d21abfcdf7 100644 --- a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi +++ b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | /include/ "kirkwood.dtsi" | 1 | /include/ "kirkwood.dtsi" |
| 2 | /include/ "kirkwood-6281.dtsi" | ||
| 2 | 3 | ||
| 3 | / { | 4 | / { |
| 4 | chosen { | 5 | chosen { |
| @@ -6,6 +7,21 @@ | |||
| 6 | }; | 7 | }; |
| 7 | 8 | ||
| 8 | ocp@f1000000 { | 9 | ocp@f1000000 { |
| 10 | pinctrl: pinctrl@10000 { | ||
| 11 | pinctrl-0 = < &pmx_spi &pmx_twsi0 &pmx_uart0 | ||
| 12 | &pmx_ns2_sata0 &pmx_ns2_sata1>; | ||
| 13 | pinctrl-names = "default"; | ||
| 14 | |||
| 15 | pmx_ns2_sata0: pmx-ns2-sata0 { | ||
| 16 | marvell,pins = "mpp21"; | ||
| 17 | marvell,function = "sata0"; | ||
| 18 | }; | ||
| 19 | pmx_ns2_sata1: pmx-ns2-sata1 { | ||
| 20 | marvell,pins = "mpp20"; | ||
| 21 | marvell,function = "sata1"; | ||
| 22 | }; | ||
| 23 | }; | ||
| 24 | |||
| 9 | serial@12000 { | 25 | serial@12000 { |
| 10 | clock-frequency = <166666667>; | 26 | clock-frequency = <166666667>; |
| 11 | status = "okay"; | 27 | status = "okay"; |
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi index 110d6cbb795b..d6ab442b7011 100644 --- a/arch/arm/boot/dts/kirkwood.dtsi +++ b/arch/arm/boot/dts/kirkwood.dtsi | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | reg = <0x10100 0x40>; | 36 | reg = <0x10100 0x40>; |
| 37 | ngpios = <32>; | 37 | ngpios = <32>; |
| 38 | interrupt-controller; | 38 | interrupt-controller; |
| 39 | #interrupt-cells = <2>; | ||
| 39 | interrupts = <35>, <36>, <37>, <38>; | 40 | interrupts = <35>, <36>, <37>, <38>; |
| 40 | }; | 41 | }; |
| 41 | 42 | ||
| @@ -46,6 +47,7 @@ | |||
| 46 | reg = <0x10140 0x40>; | 47 | reg = <0x10140 0x40>; |
| 47 | ngpios = <18>; | 48 | ngpios = <18>; |
| 48 | interrupt-controller; | 49 | interrupt-controller; |
| 50 | #interrupt-cells = <2>; | ||
| 49 | interrupts = <39>, <40>, <41>; | 51 | interrupts = <39>, <40>, <41>; |
| 50 | }; | 52 | }; |
| 51 | 53 | ||
diff --git a/arch/arm/boot/dts/kizbox.dts b/arch/arm/boot/dts/kizbox.dts index e8814fe0e277..b4dc3ed9a3ec 100644 --- a/arch/arm/boot/dts/kizbox.dts +++ b/arch/arm/boot/dts/kizbox.dts | |||
| @@ -48,6 +48,8 @@ | |||
| 48 | 48 | ||
| 49 | macb0: ethernet@fffc4000 { | 49 | macb0: ethernet@fffc4000 { |
| 50 | phy-mode = "mii"; | 50 | phy-mode = "mii"; |
| 51 | pinctrl-0 = <&pinctrl_macb_rmii | ||
| 52 | &pinctrl_macb_rmii_mii_alt>; | ||
| 51 | status = "okay"; | 53 | status = "okay"; |
| 52 | }; | 54 | }; |
| 53 | 55 | ||
diff --git a/arch/arm/boot/dts/sunxi.dtsi b/arch/arm/boot/dts/sunxi.dtsi index 8bbc2bfef221..8b36abea9f2e 100644 --- a/arch/arm/boot/dts/sunxi.dtsi +++ b/arch/arm/boot/dts/sunxi.dtsi | |||
| @@ -60,19 +60,21 @@ | |||
| 60 | }; | 60 | }; |
| 61 | 61 | ||
| 62 | uart0: uart@01c28000 { | 62 | uart0: uart@01c28000 { |
| 63 | compatible = "ns8250"; | 63 | compatible = "snps,dw-apb-uart"; |
| 64 | reg = <0x01c28000 0x400>; | 64 | reg = <0x01c28000 0x400>; |
| 65 | interrupts = <1>; | 65 | interrupts = <1>; |
| 66 | reg-shift = <2>; | 66 | reg-shift = <2>; |
| 67 | reg-io-width = <4>; | ||
| 67 | clock-frequency = <24000000>; | 68 | clock-frequency = <24000000>; |
| 68 | status = "disabled"; | 69 | status = "disabled"; |
| 69 | }; | 70 | }; |
| 70 | 71 | ||
| 71 | uart1: uart@01c28400 { | 72 | uart1: uart@01c28400 { |
| 72 | compatible = "ns8250"; | 73 | compatible = "snps,dw-apb-uart"; |
| 73 | reg = <0x01c28400 0x400>; | 74 | reg = <0x01c28400 0x400>; |
| 74 | interrupts = <2>; | 75 | interrupts = <2>; |
| 75 | reg-shift = <2>; | 76 | reg-shift = <2>; |
| 77 | reg-io-width = <4>; | ||
| 76 | clock-frequency = <24000000>; | 78 | clock-frequency = <24000000>; |
| 77 | status = "disabled"; | 79 | status = "disabled"; |
| 78 | }; | 80 | }; |
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts b/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts index 1fc405a9ecfb..cf8071ad22d5 100644 --- a/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts +++ b/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts | |||
| @@ -45,7 +45,6 @@ | |||
| 45 | reg = <1>; | 45 | reg = <1>; |
| 46 | }; | 46 | }; |
| 47 | 47 | ||
| 48 | /* A7s disabled till big.LITTLE patches are available... | ||
| 49 | cpu2: cpu@2 { | 48 | cpu2: cpu@2 { |
| 50 | device_type = "cpu"; | 49 | device_type = "cpu"; |
| 51 | compatible = "arm,cortex-a7"; | 50 | compatible = "arm,cortex-a7"; |
| @@ -63,7 +62,6 @@ | |||
| 63 | compatible = "arm,cortex-a7"; | 62 | compatible = "arm,cortex-a7"; |
| 64 | reg = <0x102>; | 63 | reg = <0x102>; |
| 65 | }; | 64 | }; |
| 66 | */ | ||
| 67 | }; | 65 | }; |
| 68 | 66 | ||
| 69 | memory@80000000 { | 67 | memory@80000000 { |
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig index b175577d7abb..1ea959019fcd 100644 --- a/arch/arm/configs/at91_dt_defconfig +++ b/arch/arm/configs/at91_dt_defconfig | |||
| @@ -19,6 +19,7 @@ CONFIG_SOC_AT91SAM9260=y | |||
| 19 | CONFIG_SOC_AT91SAM9263=y | 19 | CONFIG_SOC_AT91SAM9263=y |
| 20 | CONFIG_SOC_AT91SAM9G45=y | 20 | CONFIG_SOC_AT91SAM9G45=y |
| 21 | CONFIG_SOC_AT91SAM9X5=y | 21 | CONFIG_SOC_AT91SAM9X5=y |
| 22 | CONFIG_SOC_AT91SAM9N12=y | ||
| 22 | CONFIG_MACH_AT91SAM_DT=y | 23 | CONFIG_MACH_AT91SAM_DT=y |
| 23 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y | 24 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y |
| 24 | CONFIG_AT91_TIMER_HZ=128 | 25 | CONFIG_AT91_TIMER_HZ=128 |
| @@ -31,7 +32,7 @@ CONFIG_ZBOOT_ROM_TEXT=0x0 | |||
| 31 | CONFIG_ZBOOT_ROM_BSS=0x0 | 32 | CONFIG_ZBOOT_ROM_BSS=0x0 |
| 32 | CONFIG_ARM_APPENDED_DTB=y | 33 | CONFIG_ARM_APPENDED_DTB=y |
| 33 | CONFIG_ARM_ATAG_DTB_COMPAT=y | 34 | CONFIG_ARM_ATAG_DTB_COMPAT=y |
| 34 | CONFIG_CMDLINE="mem=128M console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw" | 35 | CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw" |
| 35 | CONFIG_KEXEC=y | 36 | CONFIG_KEXEC=y |
| 36 | CONFIG_AUTO_ZRELADDR=y | 37 | CONFIG_AUTO_ZRELADDR=y |
| 37 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 38 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index 6809200c31fb..14f7c3b14632 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S | |||
| @@ -100,12 +100,14 @@ ENTRY(printch) | |||
| 100 | b 1b | 100 | b 1b |
| 101 | ENDPROC(printch) | 101 | ENDPROC(printch) |
| 102 | 102 | ||
| 103 | #ifdef CONFIG_MMU | ||
| 103 | ENTRY(debug_ll_addr) | 104 | ENTRY(debug_ll_addr) |
| 104 | addruart r2, r3, ip | 105 | addruart r2, r3, ip |
| 105 | str r2, [r0] | 106 | str r2, [r0] |
| 106 | str r3, [r1] | 107 | str r3, [r1] |
| 107 | mov pc, lr | 108 | mov pc, lr |
| 108 | ENDPROC(debug_ll_addr) | 109 | ENDPROC(debug_ll_addr) |
| 110 | #endif | ||
| 109 | 111 | ||
| 110 | #else | 112 | #else |
| 111 | 113 | ||
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 4eee351f4668..486a15ae9011 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
| @@ -246,6 +246,7 @@ __create_page_tables: | |||
| 246 | 246 | ||
| 247 | /* | 247 | /* |
| 248 | * Then map boot params address in r2 if specified. | 248 | * Then map boot params address in r2 if specified. |
| 249 | * We map 2 sections in case the ATAGs/DTB crosses a section boundary. | ||
| 249 | */ | 250 | */ |
| 250 | mov r0, r2, lsr #SECTION_SHIFT | 251 | mov r0, r2, lsr #SECTION_SHIFT |
| 251 | movs r0, r0, lsl #SECTION_SHIFT | 252 | movs r0, r0, lsl #SECTION_SHIFT |
| @@ -253,6 +254,8 @@ __create_page_tables: | |||
| 253 | addne r3, r3, #PAGE_OFFSET | 254 | addne r3, r3, #PAGE_OFFSET |
| 254 | addne r3, r4, r3, lsr #(SECTION_SHIFT - PMD_ORDER) | 255 | addne r3, r4, r3, lsr #(SECTION_SHIFT - PMD_ORDER) |
| 255 | orrne r6, r7, r0 | 256 | orrne r6, r7, r0 |
| 257 | strne r6, [r3], #1 << PMD_ORDER | ||
| 258 | addne r6, r6, #1 << SECTION_SHIFT | ||
| 256 | strne r6, [r3] | 259 | strne r6, [r3] |
| 257 | 260 | ||
| 258 | #ifdef CONFIG_DEBUG_LL | 261 | #ifdef CONFIG_DEBUG_LL |
| @@ -331,7 +334,7 @@ ENTRY(secondary_startup) | |||
| 331 | * as it has already been validated by the primary processor. | 334 | * as it has already been validated by the primary processor. |
| 332 | */ | 335 | */ |
| 333 | #ifdef CONFIG_ARM_VIRT_EXT | 336 | #ifdef CONFIG_ARM_VIRT_EXT |
| 334 | bl __hyp_stub_install | 337 | bl __hyp_stub_install_secondary |
| 335 | #endif | 338 | #endif |
| 336 | safe_svcmode_maskall r9 | 339 | safe_svcmode_maskall r9 |
| 337 | 340 | ||
diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S index 65b2417aebce..1315c4ccfa56 100644 --- a/arch/arm/kernel/hyp-stub.S +++ b/arch/arm/kernel/hyp-stub.S | |||
| @@ -99,7 +99,7 @@ ENTRY(__hyp_stub_install_secondary) | |||
| 99 | * immediately. | 99 | * immediately. |
| 100 | */ | 100 | */ |
| 101 | compare_cpu_mode_with_primary r4, r5, r6, r7 | 101 | compare_cpu_mode_with_primary r4, r5, r6, r7 |
| 102 | bxne lr | 102 | movne pc, lr |
| 103 | 103 | ||
| 104 | /* | 104 | /* |
| 105 | * Once we have given up on one CPU, we do not try to install the | 105 | * Once we have given up on one CPU, we do not try to install the |
| @@ -111,7 +111,7 @@ ENTRY(__hyp_stub_install_secondary) | |||
| 111 | */ | 111 | */ |
| 112 | 112 | ||
| 113 | cmp r4, #HYP_MODE | 113 | cmp r4, #HYP_MODE |
| 114 | bxne lr @ give up if the CPU is not in HYP mode | 114 | movne pc, lr @ give up if the CPU is not in HYP mode |
| 115 | 115 | ||
| 116 | /* | 116 | /* |
| 117 | * Configure HSCTLR to set correct exception endianness/instruction set | 117 | * Configure HSCTLR to set correct exception endianness/instruction set |
| @@ -120,7 +120,8 @@ ENTRY(__hyp_stub_install_secondary) | |||
| 120 | * Eventually, CPU-specific code might be needed -- assume not for now | 120 | * Eventually, CPU-specific code might be needed -- assume not for now |
| 121 | * | 121 | * |
| 122 | * This code relies on the "eret" instruction to synchronize the | 122 | * This code relies on the "eret" instruction to synchronize the |
| 123 | * various coprocessor accesses. | 123 | * various coprocessor accesses. This is done when we switch to SVC |
| 124 | * (see safe_svcmode_maskall). | ||
| 124 | */ | 125 | */ |
| 125 | @ Now install the hypervisor stub: | 126 | @ Now install the hypervisor stub: |
| 126 | adr r7, __hyp_stub_vectors | 127 | adr r7, __hyp_stub_vectors |
| @@ -155,14 +156,7 @@ THUMB( orr r7, #(1 << 30) ) @ HSCTLR.TE | |||
| 155 | 1: | 156 | 1: |
| 156 | #endif | 157 | #endif |
| 157 | 158 | ||
| 158 | bic r7, r4, #MODE_MASK | 159 | bx lr @ The boot CPU mode is left in r4. |
| 159 | orr r7, r7, #SVC_MODE | ||
| 160 | THUMB( orr r7, r7, #PSR_T_BIT ) | ||
| 161 | msr spsr_cxsf, r7 @ This is SPSR_hyp. | ||
| 162 | |||
| 163 | __MSR_ELR_HYP(14) @ msr elr_hyp, lr | ||
| 164 | __ERET @ return, switching to SVC mode | ||
| 165 | @ The boot CPU mode is left in r4. | ||
| 166 | ENDPROC(__hyp_stub_install_secondary) | 160 | ENDPROC(__hyp_stub_install_secondary) |
| 167 | 161 | ||
| 168 | __hyp_stub_do_trap: | 162 | __hyp_stub_do_trap: |
| @@ -200,7 +194,7 @@ ENDPROC(__hyp_get_vectors) | |||
| 200 | @ fall through | 194 | @ fall through |
| 201 | ENTRY(__hyp_set_vectors) | 195 | ENTRY(__hyp_set_vectors) |
| 202 | __HVC(0) | 196 | __HVC(0) |
| 203 | bx lr | 197 | mov pc, lr |
| 204 | ENDPROC(__hyp_set_vectors) | 198 | ENDPROC(__hyp_set_vectors) |
| 205 | 199 | ||
| 206 | #ifndef ZIMAGE | 200 | #ifndef ZIMAGE |
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index 9ee866ce0478..4b678478cf95 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c | |||
| @@ -105,6 +105,8 @@ static void __init soc_detect(u32 dbgu_base) | |||
| 105 | switch (socid) { | 105 | switch (socid) { |
| 106 | case ARCH_ID_AT91RM9200: | 106 | case ARCH_ID_AT91RM9200: |
| 107 | at91_soc_initdata.type = AT91_SOC_RM9200; | 107 | at91_soc_initdata.type = AT91_SOC_RM9200; |
| 108 | if (at91_soc_initdata.subtype == AT91_SOC_SUBTYPE_NONE) | ||
| 109 | at91_soc_initdata.subtype = AT91_SOC_RM9200_BGA; | ||
| 108 | at91_boot_soc = at91rm9200_soc; | 110 | at91_boot_soc = at91rm9200_soc; |
| 109 | break; | 111 | break; |
| 110 | 112 | ||
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 3e628fd7a674..0a2349dc7018 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
| @@ -851,6 +851,7 @@ config SOC_IMX6Q | |||
| 851 | select HAVE_CAN_FLEXCAN if CAN | 851 | select HAVE_CAN_FLEXCAN if CAN |
| 852 | select HAVE_IMX_GPC | 852 | select HAVE_IMX_GPC |
| 853 | select HAVE_IMX_MMDC | 853 | select HAVE_IMX_MMDC |
| 854 | select HAVE_IMX_SRC | ||
| 854 | select HAVE_SMP | 855 | select HAVE_SMP |
| 855 | select MFD_SYSCON | 856 | select MFD_SYSCON |
| 856 | select PINCTRL | 857 | select PINCTRL |
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 7f2c10c7413a..c0c4e723b7f5 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
| @@ -436,6 +436,9 @@ int __init mx6q_clocks_init(void) | |||
| 436 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) | 436 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) |
| 437 | clk_prepare_enable(clk[clks_init_on[i]]); | 437 | clk_prepare_enable(clk[clks_init_on[i]]); |
| 438 | 438 | ||
| 439 | /* Set initial power mode */ | ||
| 440 | imx6q_set_lpm(WAIT_CLOCKED); | ||
| 441 | |||
| 439 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); | 442 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); |
| 440 | base = of_iomap(np, 0); | 443 | base = of_iomap(np, 0); |
| 441 | WARN_ON(!base); | 444 | WARN_ON(!base); |
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index 7191ab4434e5..fa36fb84ab19 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h | |||
| @@ -142,6 +142,7 @@ extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode); | |||
| 142 | extern void imx6q_clock_map_io(void); | 142 | extern void imx6q_clock_map_io(void); |
| 143 | 143 | ||
| 144 | extern void imx_cpu_die(unsigned int cpu); | 144 | extern void imx_cpu_die(unsigned int cpu); |
| 145 | extern int imx_cpu_kill(unsigned int cpu); | ||
| 145 | 146 | ||
| 146 | #ifdef CONFIG_PM | 147 | #ifdef CONFIG_PM |
| 147 | extern void imx6q_pm_init(void); | 148 | extern void imx6q_pm_init(void); |
diff --git a/arch/arm/mach-imx/devices/platform-imx-fb.c b/arch/arm/mach-imx/devices/platform-imx-fb.c index 10b0ed39f07f..25a47c616b2d 100644 --- a/arch/arm/mach-imx/devices/platform-imx-fb.c +++ b/arch/arm/mach-imx/devices/platform-imx-fb.c | |||
| @@ -54,7 +54,7 @@ struct platform_device *__init imx_add_imx_fb( | |||
| 54 | .flags = IORESOURCE_IRQ, | 54 | .flags = IORESOURCE_IRQ, |
| 55 | }, | 55 | }, |
| 56 | }; | 56 | }; |
| 57 | return imx_add_platform_device_dmamask("imx-fb", 0, | 57 | return imx_add_platform_device_dmamask(data->devid, 0, |
| 58 | res, ARRAY_SIZE(res), | 58 | res, ARRAY_SIZE(res), |
| 59 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | 59 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); |
| 60 | } | 60 | } |
diff --git a/arch/arm/mach-imx/hotplug.c b/arch/arm/mach-imx/hotplug.c index 3dec962b0770..7bc5fe15dda2 100644 --- a/arch/arm/mach-imx/hotplug.c +++ b/arch/arm/mach-imx/hotplug.c | |||
| @@ -46,9 +46,11 @@ static inline void cpu_enter_lowpower(void) | |||
| 46 | void imx_cpu_die(unsigned int cpu) | 46 | void imx_cpu_die(unsigned int cpu) |
| 47 | { | 47 | { |
| 48 | cpu_enter_lowpower(); | 48 | cpu_enter_lowpower(); |
| 49 | imx_enable_cpu(cpu, false); | 49 | cpu_do_idle(); |
| 50 | } | ||
| 50 | 51 | ||
| 51 | /* spin here until hardware takes it down */ | 52 | int imx_cpu_kill(unsigned int cpu) |
| 52 | while (1) | 53 | { |
| 53 | ; | 54 | imx_enable_cpu(cpu, false); |
| 55 | return 1; | ||
| 54 | } | 56 | } |
diff --git a/arch/arm/mach-imx/iram.h b/arch/arm/mach-imx/iram.h deleted file mode 100644 index 022690c33702..000000000000 --- a/arch/arm/mach-imx/iram.h +++ /dev/null | |||
| @@ -1,41 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU General Public License | ||
| 6 | * as published by the Free Software Foundation; either version 2 | ||
| 7 | * of the License, or (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
| 17 | * MA 02110-1301, USA. | ||
| 18 | */ | ||
| 19 | #include <linux/errno.h> | ||
| 20 | |||
| 21 | #ifdef CONFIG_IRAM_ALLOC | ||
| 22 | |||
| 23 | int __init iram_init(unsigned long base, unsigned long size); | ||
| 24 | void __iomem *iram_alloc(unsigned int size, unsigned long *dma_addr); | ||
| 25 | void iram_free(unsigned long dma_addr, unsigned int size); | ||
| 26 | |||
| 27 | #else | ||
| 28 | |||
| 29 | static inline int __init iram_init(unsigned long base, unsigned long size) | ||
| 30 | { | ||
| 31 | return -ENOMEM; | ||
| 32 | } | ||
| 33 | |||
| 34 | static inline void __iomem *iram_alloc(unsigned int size, unsigned long *dma_addr) | ||
| 35 | { | ||
| 36 | return NULL; | ||
| 37 | } | ||
| 38 | |||
| 39 | static inline void iram_free(unsigned long base, unsigned long size) {} | ||
| 40 | |||
| 41 | #endif | ||
diff --git a/arch/arm/mach-imx/iram_alloc.c b/arch/arm/mach-imx/iram_alloc.c index 6c80424f678e..e05cf407db65 100644 --- a/arch/arm/mach-imx/iram_alloc.c +++ b/arch/arm/mach-imx/iram_alloc.c | |||
| @@ -22,8 +22,7 @@ | |||
| 22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
| 23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
| 24 | #include <linux/genalloc.h> | 24 | #include <linux/genalloc.h> |
| 25 | 25 | #include "linux/platform_data/imx-iram.h" | |
| 26 | #include "iram.h" | ||
| 27 | 26 | ||
| 28 | static unsigned long iram_phys_base; | 27 | static unsigned long iram_phys_base; |
| 29 | static void __iomem *iram_virt_base; | 28 | static void __iomem *iram_virt_base; |
diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c index 3777b805b76b..66fae885c842 100644 --- a/arch/arm/mach-imx/platsmp.c +++ b/arch/arm/mach-imx/platsmp.c | |||
| @@ -92,5 +92,6 @@ struct smp_operations imx_smp_ops __initdata = { | |||
| 92 | .smp_boot_secondary = imx_boot_secondary, | 92 | .smp_boot_secondary = imx_boot_secondary, |
| 93 | #ifdef CONFIG_HOTPLUG_CPU | 93 | #ifdef CONFIG_HOTPLUG_CPU |
| 94 | .cpu_die = imx_cpu_die, | 94 | .cpu_die = imx_cpu_die, |
| 95 | .cpu_kill = imx_cpu_kill, | ||
| 95 | #endif | 96 | #endif |
| 96 | }; | 97 | }; |
diff --git a/arch/arm/mach-imx/pm-imx6q.c b/arch/arm/mach-imx/pm-imx6q.c index a17543da602d..ee42d20cba19 100644 --- a/arch/arm/mach-imx/pm-imx6q.c +++ b/arch/arm/mach-imx/pm-imx6q.c | |||
| @@ -41,6 +41,7 @@ static int imx6q_pm_enter(suspend_state_t state) | |||
| 41 | cpu_suspend(0, imx6q_suspend_finish); | 41 | cpu_suspend(0, imx6q_suspend_finish); |
| 42 | imx_smp_prepare(); | 42 | imx_smp_prepare(); |
| 43 | imx_gpc_post_resume(); | 43 | imx_gpc_post_resume(); |
| 44 | imx6q_set_lpm(WAIT_CLOCKED); | ||
| 44 | break; | 45 | break; |
| 45 | default: | 46 | default: |
| 46 | return -EINVAL; | 47 | return -EINVAL; |
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index be50e795536d..e7fcea7f3300 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c | |||
| @@ -475,13 +475,12 @@ int __init pci_v3_setup(int nr, struct pci_sys_data *sys) | |||
| 475 | { | 475 | { |
| 476 | int ret = 0; | 476 | int ret = 0; |
| 477 | 477 | ||
| 478 | if (!ap_syscon_base) | ||
| 479 | return -EINVAL; | ||
| 480 | |||
| 478 | if (nr == 0) { | 481 | if (nr == 0) { |
| 479 | sys->mem_offset = PHYS_PCI_MEM_BASE; | 482 | sys->mem_offset = PHYS_PCI_MEM_BASE; |
| 480 | ret = pci_v3_setup_resources(sys); | 483 | ret = pci_v3_setup_resources(sys); |
| 481 | /* Remap the Integrator system controller */ | ||
| 482 | ap_syscon_base = ioremap(INTEGRATOR_SC_BASE, 0x100); | ||
| 483 | if (!ap_syscon_base) | ||
| 484 | return -EINVAL; | ||
| 485 | } | 484 | } |
| 486 | 485 | ||
| 487 | return ret; | 486 | return ret; |
| @@ -497,6 +496,13 @@ void __init pci_v3_preinit(void) | |||
| 497 | unsigned int temp; | 496 | unsigned int temp; |
| 498 | int ret; | 497 | int ret; |
| 499 | 498 | ||
| 499 | /* Remap the Integrator system controller */ | ||
| 500 | ap_syscon_base = ioremap(INTEGRATOR_SC_BASE, 0x100); | ||
| 501 | if (!ap_syscon_base) { | ||
| 502 | pr_err("unable to remap the AP syscon for PCIv3\n"); | ||
| 503 | return; | ||
| 504 | } | ||
| 505 | |||
| 500 | pcibios_min_mem = 0x00100000; | 506 | pcibios_min_mem = 0x00100000; |
| 501 | 507 | ||
| 502 | /* | 508 | /* |
diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c index 8821720ab5a4..f4632a809f68 100644 --- a/arch/arm/mach-kirkwood/board-ns2.c +++ b/arch/arm/mach-kirkwood/board-ns2.c | |||
| @@ -18,47 +18,11 @@ | |||
| 18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
| 19 | #include <linux/of.h> | 19 | #include <linux/of.h> |
| 20 | #include "common.h" | 20 | #include "common.h" |
| 21 | #include "mpp.h" | ||
| 22 | 21 | ||
| 23 | static struct mv643xx_eth_platform_data ns2_ge00_data = { | 22 | static struct mv643xx_eth_platform_data ns2_ge00_data = { |
| 24 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | 23 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), |
| 25 | }; | 24 | }; |
| 26 | 25 | ||
| 27 | static unsigned int ns2_mpp_config[] __initdata = { | ||
| 28 | MPP0_SPI_SCn, | ||
| 29 | MPP1_SPI_MOSI, | ||
| 30 | MPP2_SPI_SCK, | ||
| 31 | MPP3_SPI_MISO, | ||
| 32 | MPP4_NF_IO6, | ||
| 33 | MPP5_NF_IO7, | ||
| 34 | MPP6_SYSRST_OUTn, | ||
| 35 | MPP7_GPO, /* Fan speed (bit 1) */ | ||
| 36 | MPP8_TW0_SDA, | ||
| 37 | MPP9_TW0_SCK, | ||
| 38 | MPP10_UART0_TXD, | ||
| 39 | MPP11_UART0_RXD, | ||
| 40 | MPP12_GPO, /* Red led */ | ||
| 41 | MPP14_GPIO, /* USB fuse */ | ||
| 42 | MPP16_GPIO, /* SATA 0 power */ | ||
| 43 | MPP17_GPIO, /* SATA 1 power */ | ||
| 44 | MPP18_NF_IO0, | ||
| 45 | MPP19_NF_IO1, | ||
| 46 | MPP20_SATA1_ACTn, | ||
| 47 | MPP21_SATA0_ACTn, | ||
| 48 | MPP22_GPIO, /* Fan speed (bit 0) */ | ||
| 49 | MPP23_GPIO, /* Fan power */ | ||
| 50 | MPP24_GPIO, /* USB mode select */ | ||
| 51 | MPP25_GPIO, /* Fan rotation fail */ | ||
| 52 | MPP26_GPIO, /* USB device vbus */ | ||
| 53 | MPP28_GPIO, /* USB enable host vbus */ | ||
| 54 | MPP29_GPIO, /* Blue led (slow register) */ | ||
| 55 | MPP30_GPIO, /* Blue led (command register) */ | ||
| 56 | MPP31_GPIO, /* Board power off */ | ||
| 57 | MPP32_GPIO, /* Power button (0 = Released, 1 = Pushed) */ | ||
| 58 | MPP33_GPO, /* Fan speed (bit 2) */ | ||
| 59 | 0 | ||
| 60 | }; | ||
| 61 | |||
| 62 | #define NS2_GPIO_POWER_OFF 31 | 26 | #define NS2_GPIO_POWER_OFF 31 |
| 63 | 27 | ||
| 64 | static void ns2_power_off(void) | 28 | static void ns2_power_off(void) |
| @@ -71,8 +35,6 @@ void __init ns2_init(void) | |||
| 71 | /* | 35 | /* |
| 72 | * Basic setup. Needs to be called early. | 36 | * Basic setup. Needs to be called early. |
| 73 | */ | 37 | */ |
| 74 | kirkwood_mpp_conf(ns2_mpp_config); | ||
| 75 | |||
| 76 | if (of_machine_is_compatible("lacie,netspace_lite_v2") || | 38 | if (of_machine_is_compatible("lacie,netspace_lite_v2") || |
| 77 | of_machine_is_compatible("lacie,netspace_mini_v2")) | 39 | of_machine_is_compatible("lacie,netspace_mini_v2")) |
| 78 | ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); | 40 | ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); |
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile index 5dcb369b58aa..99df4df680fd 100644 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ | 1 | ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ |
| 2 | -I$(srctree)/arch/arm/plat-orion/include | 2 | -I$(srctree)/arch/arm/plat-orion/include |
| 3 | 3 | ||
| 4 | AFLAGS_coherency_ll.o := -Wa,-march=armv7-a | ||
| 5 | |||
| 4 | obj-y += system-controller.o | 6 | obj-y += system-controller.o |
| 5 | obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o irq-armada-370-xp.o addr-map.o coherency.o coherency_ll.o pmsu.o | 7 | obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o irq-armada-370-xp.o addr-map.o coherency.o coherency_ll.o pmsu.o |
| 6 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o | 8 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 5c8e9cee2c2e..769c1feee1c4 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
| @@ -397,6 +397,12 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
| 397 | OMAP_PULL_ENA), | 397 | OMAP_PULL_ENA), |
| 398 | OMAP4_MUX(ABE_MCBSP1_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | 398 | OMAP4_MUX(ABE_MCBSP1_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 399 | 399 | ||
| 400 | /* UART2 - BT/FM/GPS shared transport */ | ||
| 401 | OMAP4_MUX(UART2_CTS, OMAP_PIN_INPUT | OMAP_MUX_MODE0), | ||
| 402 | OMAP4_MUX(UART2_RTS, OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), | ||
| 403 | OMAP4_MUX(UART2_RX, OMAP_PIN_INPUT | OMAP_MUX_MODE0), | ||
| 404 | OMAP4_MUX(UART2_TX, OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), | ||
| 405 | |||
| 400 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 406 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
| 401 | }; | 407 | }; |
| 402 | 408 | ||
diff --git a/arch/arm/mach-omap2/cclock2420_data.c b/arch/arm/mach-omap2/cclock2420_data.c index 7e5febe456d9..ab7e952d2070 100644 --- a/arch/arm/mach-omap2/cclock2420_data.c +++ b/arch/arm/mach-omap2/cclock2420_data.c | |||
| @@ -1935,6 +1935,8 @@ int __init omap2420_clk_init(void) | |||
| 1935 | omap2_init_clk_hw_omap_clocks(c->lk.clk); | 1935 | omap2_init_clk_hw_omap_clocks(c->lk.clk); |
| 1936 | } | 1936 | } |
| 1937 | 1937 | ||
| 1938 | omap2xxx_clkt_vps_late_init(); | ||
| 1939 | |||
| 1938 | omap2_clk_disable_autoidle_all(); | 1940 | omap2_clk_disable_autoidle_all(); |
| 1939 | 1941 | ||
| 1940 | omap2_clk_enable_init_clocks(enable_init_clks, | 1942 | omap2_clk_enable_init_clocks(enable_init_clks, |
diff --git a/arch/arm/mach-omap2/cclock2430_data.c b/arch/arm/mach-omap2/cclock2430_data.c index eda079b96c6a..eb3dab68d536 100644 --- a/arch/arm/mach-omap2/cclock2430_data.c +++ b/arch/arm/mach-omap2/cclock2430_data.c | |||
| @@ -2050,6 +2050,8 @@ int __init omap2430_clk_init(void) | |||
| 2050 | omap2_init_clk_hw_omap_clocks(c->lk.clk); | 2050 | omap2_init_clk_hw_omap_clocks(c->lk.clk); |
| 2051 | } | 2051 | } |
| 2052 | 2052 | ||
| 2053 | omap2xxx_clkt_vps_late_init(); | ||
| 2054 | |||
| 2053 | omap2_clk_disable_autoidle_all(); | 2055 | omap2_clk_disable_autoidle_all(); |
| 2054 | 2056 | ||
| 2055 | omap2_clk_enable_init_clocks(enable_init_clks, | 2057 | omap2_clk_enable_init_clocks(enable_init_clks, |
diff --git a/arch/arm/mach-omap2/cclock44xx_data.c b/arch/arm/mach-omap2/cclock44xx_data.c index 5789a5e25563..a2cc046b47f4 100644 --- a/arch/arm/mach-omap2/cclock44xx_data.c +++ b/arch/arm/mach-omap2/cclock44xx_data.c | |||
| @@ -2026,14 +2026,13 @@ int __init omap4xxx_clk_init(void) | |||
| 2026 | * On OMAP4460 the ABE DPLL fails to turn on if in idle low-power | 2026 | * On OMAP4460 the ABE DPLL fails to turn on if in idle low-power |
| 2027 | * state when turning the ABE clock domain. Workaround this by | 2027 | * state when turning the ABE clock domain. Workaround this by |
| 2028 | * locking the ABE DPLL on boot. | 2028 | * locking the ABE DPLL on boot. |
| 2029 | * Lock the ABE DPLL in any case to avoid issues with audio. | ||
| 2029 | */ | 2030 | */ |
| 2030 | if (cpu_is_omap446x()) { | 2031 | rc = clk_set_parent(&abe_dpll_refclk_mux_ck, &sys_32k_ck); |
| 2031 | rc = clk_set_parent(&abe_dpll_refclk_mux_ck, &sys_32k_ck); | 2032 | if (!rc) |
| 2032 | if (!rc) | 2033 | rc = clk_set_rate(&dpll_abe_ck, OMAP4_DPLL_ABE_DEFFREQ); |
| 2033 | rc = clk_set_rate(&dpll_abe_ck, OMAP4_DPLL_ABE_DEFFREQ); | 2034 | if (rc) |
| 2034 | if (rc) | 2035 | pr_err("%s: failed to configure ABE DPLL!\n", __func__); |
| 2035 | pr_err("%s: failed to configure ABE DPLL!\n", __func__); | ||
| 2036 | } | ||
| 2037 | 2036 | ||
| 2038 | return 0; | 2037 | return 0; |
| 2039 | } | 2038 | } |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 5e304d0719a2..626f3ea3142f 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
| @@ -639,7 +639,7 @@ static int count_ocp2scp_devices(struct omap_ocp2scp_dev *ocp2scp_dev) | |||
| 639 | return cnt; | 639 | return cnt; |
| 640 | } | 640 | } |
| 641 | 641 | ||
| 642 | static void omap_init_ocp2scp(void) | 642 | static void __init omap_init_ocp2scp(void) |
| 643 | { | 643 | { |
| 644 | struct omap_hwmod *oh; | 644 | struct omap_hwmod *oh; |
| 645 | struct platform_device *pdev; | 645 | struct platform_device *pdev; |
diff --git a/arch/arm/mach-omap2/drm.c b/arch/arm/mach-omap2/drm.c index 4c7566c7e24a..2a2cfa88ddbf 100644 --- a/arch/arm/mach-omap2/drm.c +++ b/arch/arm/mach-omap2/drm.c | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #include <linux/dma-mapping.h> | 25 | #include <linux/dma-mapping.h> |
| 26 | #include <linux/platform_data/omap_drm.h> | 26 | #include <linux/platform_data/omap_drm.h> |
| 27 | 27 | ||
| 28 | #include "soc.h" | ||
| 28 | #include "omap_device.h" | 29 | #include "omap_device.h" |
| 29 | #include "omap_hwmod.h" | 30 | #include "omap_hwmod.h" |
| 30 | 31 | ||
| @@ -56,7 +57,7 @@ static int __init omap_init_drm(void) | |||
| 56 | oh->name); | 57 | oh->name); |
| 57 | } | 58 | } |
| 58 | 59 | ||
| 59 | platform_data.omaprev = GET_OMAP_REVISION(); | 60 | platform_data.omaprev = GET_OMAP_TYPE; |
| 60 | 61 | ||
| 61 | return platform_device_register(&omap_drm_device); | 62 | return platform_device_register(&omap_drm_device); |
| 62 | 63 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 129d5081ed15..793f54ac7d14 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
| @@ -2132,8 +2132,12 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = { | |||
| 2132 | * currently reset very early during boot, before I2C is | 2132 | * currently reset very early during boot, before I2C is |
| 2133 | * available, so it doesn't seem that we have any choice in | 2133 | * available, so it doesn't seem that we have any choice in |
| 2134 | * the kernel other than to avoid resetting it. | 2134 | * the kernel other than to avoid resetting it. |
| 2135 | * | ||
| 2136 | * Also, McPDM needs to be configured to NO_IDLE mode when it | ||
| 2137 | * is in used otherwise vital clocks will be gated which | ||
| 2138 | * results 'slow motion' audio playback. | ||
| 2135 | */ | 2139 | */ |
| 2136 | .flags = HWMOD_EXT_OPT_MAIN_CLK, | 2140 | .flags = HWMOD_EXT_OPT_MAIN_CLK | HWMOD_SWSUP_SIDLE, |
| 2137 | .mpu_irqs = omap44xx_mcpdm_irqs, | 2141 | .mpu_irqs = omap44xx_mcpdm_irqs, |
| 2138 | .sdma_reqs = omap44xx_mcpdm_sdma_reqs, | 2142 | .sdma_reqs = omap44xx_mcpdm_sdma_reqs, |
| 2139 | .main_clk = "mcpdm_fck", | 2143 | .main_clk = "mcpdm_fck", |
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 691aa674665a..b8ad6e632bb8 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
| @@ -165,15 +165,11 @@ static struct device_node * __init omap_get_timer_dt(struct of_device_id *match, | |||
| 165 | struct device_node *np; | 165 | struct device_node *np; |
| 166 | 166 | ||
| 167 | for_each_matching_node(np, match) { | 167 | for_each_matching_node(np, match) { |
| 168 | if (!of_device_is_available(np)) { | 168 | if (!of_device_is_available(np)) |
| 169 | of_node_put(np); | ||
| 170 | continue; | 169 | continue; |
| 171 | } | ||
| 172 | 170 | ||
| 173 | if (property && !of_get_property(np, property, NULL)) { | 171 | if (property && !of_get_property(np, property, NULL)) |
| 174 | of_node_put(np); | ||
| 175 | continue; | 172 | continue; |
| 176 | } | ||
| 177 | 173 | ||
| 178 | of_add_property(np, &device_disabled); | 174 | of_add_property(np, &device_disabled); |
| 179 | return np; | 175 | return np; |
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c index 553059f51841..755c0bb119f4 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c | |||
| @@ -47,7 +47,7 @@ static struct spi_board_info wm1253_devs[] = { | |||
| 47 | .bus_num = 0, | 47 | .bus_num = 0, |
| 48 | .chip_select = 0, | 48 | .chip_select = 0, |
| 49 | .mode = SPI_MODE_0, | 49 | .mode = SPI_MODE_0, |
| 50 | .irq = S3C_EINT(5), | 50 | .irq = S3C_EINT(4), |
| 51 | .controller_data = &wm0010_spi_csinfo, | 51 | .controller_data = &wm0010_spi_csinfo, |
| 52 | .platform_data = &wm0010_pdata, | 52 | .platform_data = &wm0010_pdata, |
| 53 | }, | 53 | }, |
diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c index 7feb426fc202..d2e1a16690bd 100644 --- a/arch/arm/mach-s3c64xx/pm.c +++ b/arch/arm/mach-s3c64xx/pm.c | |||
| @@ -338,8 +338,10 @@ int __init s3c64xx_pm_init(void) | |||
| 338 | for (i = 0; i < ARRAY_SIZE(s3c64xx_pm_domains); i++) | 338 | for (i = 0; i < ARRAY_SIZE(s3c64xx_pm_domains); i++) |
| 339 | pm_genpd_init(&s3c64xx_pm_domains[i]->pd, NULL, false); | 339 | pm_genpd_init(&s3c64xx_pm_domains[i]->pd, NULL, false); |
| 340 | 340 | ||
| 341 | #ifdef CONFIG_S3C_DEV_FB | ||
| 341 | if (dev_get_platdata(&s3c_device_fb.dev)) | 342 | if (dev_get_platdata(&s3c_device_fb.dev)) |
| 342 | pm_genpd_add_device(&s3c64xx_pm_f.pd, &s3c_device_fb.dev); | 343 | pm_genpd_add_device(&s3c64xx_pm_f.pd, &s3c_device_fb.dev); |
| 344 | #endif | ||
| 343 | 345 | ||
| 344 | return 0; | 346 | return 0; |
| 345 | } | 347 | } |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 6b2fb87c8698..076c26d43864 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
| @@ -774,25 +774,27 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset, | |||
| 774 | size_t size, enum dma_data_direction dir, | 774 | size_t size, enum dma_data_direction dir, |
| 775 | void (*op)(const void *, size_t, int)) | 775 | void (*op)(const void *, size_t, int)) |
| 776 | { | 776 | { |
| 777 | unsigned long pfn; | ||
| 778 | size_t left = size; | ||
| 779 | |||
| 780 | pfn = page_to_pfn(page) + offset / PAGE_SIZE; | ||
| 781 | offset %= PAGE_SIZE; | ||
| 782 | |||
| 777 | /* | 783 | /* |
| 778 | * A single sg entry may refer to multiple physically contiguous | 784 | * A single sg entry may refer to multiple physically contiguous |
| 779 | * pages. But we still need to process highmem pages individually. | 785 | * pages. But we still need to process highmem pages individually. |
| 780 | * If highmem is not configured then the bulk of this loop gets | 786 | * If highmem is not configured then the bulk of this loop gets |
| 781 | * optimized out. | 787 | * optimized out. |
| 782 | */ | 788 | */ |
| 783 | size_t left = size; | ||
| 784 | do { | 789 | do { |
| 785 | size_t len = left; | 790 | size_t len = left; |
| 786 | void *vaddr; | 791 | void *vaddr; |
| 787 | 792 | ||
| 793 | page = pfn_to_page(pfn); | ||
| 794 | |||
| 788 | if (PageHighMem(page)) { | 795 | if (PageHighMem(page)) { |
| 789 | if (len + offset > PAGE_SIZE) { | 796 | if (len + offset > PAGE_SIZE) |
| 790 | if (offset >= PAGE_SIZE) { | ||
| 791 | page += offset / PAGE_SIZE; | ||
| 792 | offset %= PAGE_SIZE; | ||
| 793 | } | ||
| 794 | len = PAGE_SIZE - offset; | 797 | len = PAGE_SIZE - offset; |
| 795 | } | ||
| 796 | vaddr = kmap_high_get(page); | 798 | vaddr = kmap_high_get(page); |
| 797 | if (vaddr) { | 799 | if (vaddr) { |
| 798 | vaddr += offset; | 800 | vaddr += offset; |
| @@ -809,7 +811,7 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset, | |||
| 809 | op(vaddr, len, dir); | 811 | op(vaddr, len, dir); |
| 810 | } | 812 | } |
| 811 | offset = 0; | 813 | offset = 0; |
| 812 | page++; | 814 | pfn++; |
| 813 | left -= len; | 815 | left -= len; |
| 814 | } while (left); | 816 | } while (left); |
| 815 | } | 817 | } |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 9f0610243bd6..ce328c7f5c94 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
| @@ -283,7 +283,7 @@ static struct mem_type mem_types[] = { | |||
| 283 | }, | 283 | }, |
| 284 | [MT_MEMORY_SO] = { | 284 | [MT_MEMORY_SO] = { |
| 285 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | | 285 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | |
| 286 | L_PTE_MT_UNCACHED, | 286 | L_PTE_MT_UNCACHED | L_PTE_XN, |
| 287 | .prot_l1 = PMD_TYPE_TABLE, | 287 | .prot_l1 = PMD_TYPE_TABLE, |
| 288 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_S | | 288 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_S | |
| 289 | PMD_SECT_UNCACHED | PMD_SECT_XN, | 289 | PMD_SECT_UNCACHED | PMD_SECT_XN, |
diff --git a/arch/arm/plat-versatile/headsmp.S b/arch/arm/plat-versatile/headsmp.S index dd703ef09b8d..b178d44e9eaa 100644 --- a/arch/arm/plat-versatile/headsmp.S +++ b/arch/arm/plat-versatile/headsmp.S | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | */ | 20 | */ |
| 21 | ENTRY(versatile_secondary_startup) | 21 | ENTRY(versatile_secondary_startup) |
| 22 | mrc p15, 0, r0, c0, c0, 5 | 22 | mrc p15, 0, r0, c0, c0, 5 |
| 23 | and r0, r0, #15 | 23 | bic r0, #0xff000000 |
| 24 | adr r4, 1f | 24 | adr r4, 1f |
| 25 | ldmia r4, {r5, r6} | 25 | ldmia r4, {r5, r6} |
| 26 | sub r4, r4, r5 | 26 | sub r4, r4, r5 |
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S index cc926c985981..323ce1a62bbf 100644 --- a/arch/arm/vfp/entry.S +++ b/arch/arm/vfp/entry.S | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | @ IRQs disabled. | 22 | @ IRQs disabled. |
| 23 | @ | 23 | @ |
| 24 | ENTRY(do_vfp) | 24 | ENTRY(do_vfp) |
| 25 | #ifdef CONFIG_PREEMPT | 25 | #ifdef CONFIG_PREEMPT_COUNT |
| 26 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count | 26 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count |
| 27 | add r11, r4, #1 @ increment it | 27 | add r11, r4, #1 @ increment it |
| 28 | str r11, [r10, #TI_PREEMPT] | 28 | str r11, [r10, #TI_PREEMPT] |
| @@ -35,7 +35,7 @@ ENTRY(do_vfp) | |||
| 35 | ENDPROC(do_vfp) | 35 | ENDPROC(do_vfp) |
| 36 | 36 | ||
| 37 | ENTRY(vfp_null_entry) | 37 | ENTRY(vfp_null_entry) |
| 38 | #ifdef CONFIG_PREEMPT | 38 | #ifdef CONFIG_PREEMPT_COUNT |
| 39 | get_thread_info r10 | 39 | get_thread_info r10 |
| 40 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count | 40 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count |
| 41 | sub r11, r4, #1 @ decrement it | 41 | sub r11, r4, #1 @ decrement it |
| @@ -53,7 +53,7 @@ ENDPROC(vfp_null_entry) | |||
| 53 | 53 | ||
| 54 | __INIT | 54 | __INIT |
| 55 | ENTRY(vfp_testing_entry) | 55 | ENTRY(vfp_testing_entry) |
| 56 | #ifdef CONFIG_PREEMPT | 56 | #ifdef CONFIG_PREEMPT_COUNT |
| 57 | get_thread_info r10 | 57 | get_thread_info r10 |
| 58 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count | 58 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count |
| 59 | sub r11, r4, #1 @ decrement it | 59 | sub r11, r4, #1 @ decrement it |
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S index ea0349f63586..dd5e56f95f3f 100644 --- a/arch/arm/vfp/vfphw.S +++ b/arch/arm/vfp/vfphw.S | |||
| @@ -168,7 +168,7 @@ vfp_hw_state_valid: | |||
| 168 | @ else it's one 32-bit instruction, so | 168 | @ else it's one 32-bit instruction, so |
| 169 | @ always subtract 4 from the following | 169 | @ always subtract 4 from the following |
| 170 | @ instruction address. | 170 | @ instruction address. |
| 171 | #ifdef CONFIG_PREEMPT | 171 | #ifdef CONFIG_PREEMPT_COUNT |
| 172 | get_thread_info r10 | 172 | get_thread_info r10 |
| 173 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count | 173 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count |
| 174 | sub r11, r4, #1 @ decrement it | 174 | sub r11, r4, #1 @ decrement it |
| @@ -192,7 +192,7 @@ look_for_VFP_exceptions: | |||
| 192 | @ not recognised by VFP | 192 | @ not recognised by VFP |
| 193 | 193 | ||
| 194 | DBGSTR "not VFP" | 194 | DBGSTR "not VFP" |
| 195 | #ifdef CONFIG_PREEMPT | 195 | #ifdef CONFIG_PREEMPT_COUNT |
| 196 | get_thread_info r10 | 196 | get_thread_info r10 |
| 197 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count | 197 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count |
| 198 | sub r11, r4, #1 @ decrement it | 198 | sub r11, r4, #1 @ decrement it |
diff --git a/arch/mips/bcm47xx/Kconfig b/arch/mips/bcm47xx/Kconfig index d7af29f1fcf0..ba611927749b 100644 --- a/arch/mips/bcm47xx/Kconfig +++ b/arch/mips/bcm47xx/Kconfig | |||
| @@ -8,8 +8,10 @@ config BCM47XX_SSB | |||
| 8 | select SSB_DRIVER_EXTIF | 8 | select SSB_DRIVER_EXTIF |
| 9 | select SSB_EMBEDDED | 9 | select SSB_EMBEDDED |
| 10 | select SSB_B43_PCI_BRIDGE if PCI | 10 | select SSB_B43_PCI_BRIDGE if PCI |
| 11 | select SSB_DRIVER_PCICORE if PCI | ||
| 11 | select SSB_PCICORE_HOSTMODE if PCI | 12 | select SSB_PCICORE_HOSTMODE if PCI |
| 12 | select SSB_DRIVER_GPIO | 13 | select SSB_DRIVER_GPIO |
| 14 | select GPIOLIB | ||
| 13 | default y | 15 | default y |
| 14 | help | 16 | help |
| 15 | Add support for old Broadcom BCM47xx boards with Sonics Silicon Backplane support. | 17 | Add support for old Broadcom BCM47xx boards with Sonics Silicon Backplane support. |
| @@ -25,6 +27,7 @@ config BCM47XX_BCMA | |||
| 25 | select BCMA_HOST_PCI if PCI | 27 | select BCMA_HOST_PCI if PCI |
| 26 | select BCMA_DRIVER_PCI_HOSTMODE if PCI | 28 | select BCMA_DRIVER_PCI_HOSTMODE if PCI |
| 27 | select BCMA_DRIVER_GPIO | 29 | select BCMA_DRIVER_GPIO |
| 30 | select GPIOLIB | ||
| 28 | default y | 31 | default y |
| 29 | help | 32 | help |
| 30 | Add support for new Broadcom BCM47xx boards with Broadcom specific Advanced Microcontroller Bus. | 33 | Add support for new Broadcom BCM47xx boards with Broadcom specific Advanced Microcontroller Bus. |
diff --git a/arch/mips/cavium-octeon/executive/cvmx-l2c.c b/arch/mips/cavium-octeon/executive/cvmx-l2c.c index 9f883bf76953..33b72144db31 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-l2c.c +++ b/arch/mips/cavium-octeon/executive/cvmx-l2c.c | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | * measurement, and debugging facilities. | 30 | * measurement, and debugging facilities. |
| 31 | */ | 31 | */ |
| 32 | 32 | ||
| 33 | #include <linux/compiler.h> | ||
| 33 | #include <linux/irqflags.h> | 34 | #include <linux/irqflags.h> |
| 34 | #include <asm/octeon/cvmx.h> | 35 | #include <asm/octeon/cvmx.h> |
| 35 | #include <asm/octeon/cvmx-l2c.h> | 36 | #include <asm/octeon/cvmx-l2c.h> |
| @@ -285,22 +286,22 @@ uint64_t cvmx_l2c_read_perf(uint32_t counter) | |||
| 285 | */ | 286 | */ |
| 286 | static void fault_in(uint64_t addr, int len) | 287 | static void fault_in(uint64_t addr, int len) |
| 287 | { | 288 | { |
| 288 | volatile char *ptr; | 289 | char *ptr; |
| 289 | volatile char dummy; | 290 | |
| 290 | /* | 291 | /* |
| 291 | * Adjust addr and length so we get all cache lines even for | 292 | * Adjust addr and length so we get all cache lines even for |
| 292 | * small ranges spanning two cache lines. | 293 | * small ranges spanning two cache lines. |
| 293 | */ | 294 | */ |
| 294 | len += addr & CVMX_CACHE_LINE_MASK; | 295 | len += addr & CVMX_CACHE_LINE_MASK; |
| 295 | addr &= ~CVMX_CACHE_LINE_MASK; | 296 | addr &= ~CVMX_CACHE_LINE_MASK; |
| 296 | ptr = (volatile char *)cvmx_phys_to_ptr(addr); | 297 | ptr = cvmx_phys_to_ptr(addr); |
| 297 | /* | 298 | /* |
| 298 | * Invalidate L1 cache to make sure all loads result in data | 299 | * Invalidate L1 cache to make sure all loads result in data |
| 299 | * being in L2. | 300 | * being in L2. |
| 300 | */ | 301 | */ |
| 301 | CVMX_DCACHE_INVALIDATE; | 302 | CVMX_DCACHE_INVALIDATE; |
| 302 | while (len > 0) { | 303 | while (len > 0) { |
| 303 | dummy += *ptr; | 304 | ACCESS_ONCE(*ptr); |
| 304 | len -= CVMX_CACHE_LINE_SIZE; | 305 | len -= CVMX_CACHE_LINE_SIZE; |
| 305 | ptr += CVMX_CACHE_LINE_SIZE; | 306 | ptr += CVMX_CACHE_LINE_SIZE; |
| 306 | } | 307 | } |
diff --git a/arch/mips/include/asm/dsp.h b/arch/mips/include/asm/dsp.h index e9bfc0813c72..7bfad0520e25 100644 --- a/arch/mips/include/asm/dsp.h +++ b/arch/mips/include/asm/dsp.h | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | #include <asm/mipsregs.h> | 16 | #include <asm/mipsregs.h> |
| 17 | 17 | ||
| 18 | #define DSP_DEFAULT 0x00000000 | 18 | #define DSP_DEFAULT 0x00000000 |
| 19 | #define DSP_MASK 0x3ff | 19 | #define DSP_MASK 0x3f |
| 20 | 20 | ||
| 21 | #define __enable_dsp_hazard() \ | 21 | #define __enable_dsp_hazard() \ |
| 22 | do { \ | 22 | do { \ |
diff --git a/arch/mips/include/asm/inst.h b/arch/mips/include/asm/inst.h index ab84064283db..33c34adbecfa 100644 --- a/arch/mips/include/asm/inst.h +++ b/arch/mips/include/asm/inst.h | |||
| @@ -353,6 +353,7 @@ union mips_instruction { | |||
| 353 | struct u_format u_format; | 353 | struct u_format u_format; |
| 354 | struct c_format c_format; | 354 | struct c_format c_format; |
| 355 | struct r_format r_format; | 355 | struct r_format r_format; |
| 356 | struct p_format p_format; | ||
| 356 | struct f_format f_format; | 357 | struct f_format f_format; |
| 357 | struct ma_format ma_format; | 358 | struct ma_format ma_format; |
| 358 | struct b_format b_format; | 359 | struct b_format b_format; |
diff --git a/arch/mips/include/asm/mach-pnx833x/war.h b/arch/mips/include/asm/mach-pnx833x/war.h index edaa06d9d492..e410df4e1b3a 100644 --- a/arch/mips/include/asm/mach-pnx833x/war.h +++ b/arch/mips/include/asm/mach-pnx833x/war.h | |||
| @@ -21,4 +21,4 @@ | |||
| 21 | #define R10000_LLSC_WAR 0 | 21 | #define R10000_LLSC_WAR 0 |
| 22 | #define MIPS34K_MISSED_ITLB_WAR 0 | 22 | #define MIPS34K_MISSED_ITLB_WAR 0 |
| 23 | 23 | ||
| 24 | #endif /* __ASM_MIPS_MACH_PNX8550_WAR_H */ | 24 | #endif /* __ASM_MIPS_MACH_PNX833X_WAR_H */ |
diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h index c63191055e69..013d5f781263 100644 --- a/arch/mips/include/asm/pgtable-64.h +++ b/arch/mips/include/asm/pgtable-64.h | |||
| @@ -230,6 +230,7 @@ static inline void pud_clear(pud_t *pudp) | |||
| 230 | #else | 230 | #else |
| 231 | #define pte_pfn(x) ((unsigned long)((x).pte >> _PFN_SHIFT)) | 231 | #define pte_pfn(x) ((unsigned long)((x).pte >> _PFN_SHIFT)) |
| 232 | #define pfn_pte(pfn, prot) __pte(((pfn) << _PFN_SHIFT) | pgprot_val(prot)) | 232 | #define pfn_pte(pfn, prot) __pte(((pfn) << _PFN_SHIFT) | pgprot_val(prot)) |
| 233 | #define pfn_pmd(pfn, prot) __pmd(((pfn) << _PFN_SHIFT) | pgprot_val(prot)) | ||
| 233 | #endif | 234 | #endif |
| 234 | 235 | ||
| 235 | #define __pgd_offset(address) pgd_index(address) | 236 | #define __pgd_offset(address) pgd_index(address) |
diff --git a/arch/mips/include/uapi/asm/Kbuild b/arch/mips/include/uapi/asm/Kbuild index a1a0452ac185..77d4fb33f75a 100644 --- a/arch/mips/include/uapi/asm/Kbuild +++ b/arch/mips/include/uapi/asm/Kbuild | |||
| @@ -3,6 +3,7 @@ include include/uapi/asm-generic/Kbuild.asm | |||
| 3 | 3 | ||
| 4 | header-y += auxvec.h | 4 | header-y += auxvec.h |
| 5 | header-y += bitsperlong.h | 5 | header-y += bitsperlong.h |
| 6 | header-y += break.h | ||
| 6 | header-y += byteorder.h | 7 | header-y += byteorder.h |
| 7 | header-y += cachectl.h | 8 | header-y += cachectl.h |
| 8 | header-y += errno.h | 9 | header-y += errno.h |
diff --git a/arch/mips/include/asm/break.h b/arch/mips/include/uapi/asm/break.h index 9161e684cb4c..9161e684cb4c 100644 --- a/arch/mips/include/asm/break.h +++ b/arch/mips/include/uapi/asm/break.h | |||
diff --git a/arch/mips/kernel/ftrace.c b/arch/mips/kernel/ftrace.c index 6a2d758dd8e9..83fa1460e294 100644 --- a/arch/mips/kernel/ftrace.c +++ b/arch/mips/kernel/ftrace.c | |||
| @@ -25,6 +25,12 @@ | |||
| 25 | #define MCOUNT_OFFSET_INSNS 4 | 25 | #define MCOUNT_OFFSET_INSNS 4 |
| 26 | #endif | 26 | #endif |
| 27 | 27 | ||
| 28 | /* Arch override because MIPS doesn't need to run this from stop_machine() */ | ||
| 29 | void arch_ftrace_update_code(int command) | ||
| 30 | { | ||
| 31 | ftrace_modify_all_code(command); | ||
| 32 | } | ||
| 33 | |||
| 28 | /* | 34 | /* |
| 29 | * Check if the address is in kernel space | 35 | * Check if the address is in kernel space |
| 30 | * | 36 | * |
| @@ -89,6 +95,24 @@ static int ftrace_modify_code(unsigned long ip, unsigned int new_code) | |||
| 89 | return 0; | 95 | return 0; |
| 90 | } | 96 | } |
| 91 | 97 | ||
| 98 | #ifndef CONFIG_64BIT | ||
| 99 | static int ftrace_modify_code_2(unsigned long ip, unsigned int new_code1, | ||
| 100 | unsigned int new_code2) | ||
| 101 | { | ||
| 102 | int faulted; | ||
| 103 | |||
| 104 | safe_store_code(new_code1, ip, faulted); | ||
| 105 | if (unlikely(faulted)) | ||
| 106 | return -EFAULT; | ||
| 107 | ip += 4; | ||
| 108 | safe_store_code(new_code2, ip, faulted); | ||
| 109 | if (unlikely(faulted)) | ||
| 110 | return -EFAULT; | ||
| 111 | flush_icache_range(ip, ip + 8); /* original ip + 12 */ | ||
| 112 | return 0; | ||
| 113 | } | ||
| 114 | #endif | ||
| 115 | |||
| 92 | /* | 116 | /* |
| 93 | * The details about the calling site of mcount on MIPS | 117 | * The details about the calling site of mcount on MIPS |
| 94 | * | 118 | * |
| @@ -131,8 +155,18 @@ int ftrace_make_nop(struct module *mod, | |||
| 131 | * needed. | 155 | * needed. |
| 132 | */ | 156 | */ |
| 133 | new = in_kernel_space(ip) ? INSN_NOP : INSN_B_1F; | 157 | new = in_kernel_space(ip) ? INSN_NOP : INSN_B_1F; |
| 134 | 158 | #ifdef CONFIG_64BIT | |
| 135 | return ftrace_modify_code(ip, new); | 159 | return ftrace_modify_code(ip, new); |
| 160 | #else | ||
| 161 | /* | ||
| 162 | * On 32 bit MIPS platforms, gcc adds a stack adjust | ||
| 163 | * instruction in the delay slot after the branch to | ||
| 164 | * mcount and expects mcount to restore the sp on return. | ||
| 165 | * This is based on a legacy API and does nothing but | ||
| 166 | * waste instructions so it's being removed at runtime. | ||
| 167 | */ | ||
| 168 | return ftrace_modify_code_2(ip, new, INSN_NOP); | ||
| 169 | #endif | ||
| 136 | } | 170 | } |
| 137 | 171 | ||
| 138 | int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) | 172 | int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) |
diff --git a/arch/mips/kernel/mcount.S b/arch/mips/kernel/mcount.S index 4c968e7efb74..165867673357 100644 --- a/arch/mips/kernel/mcount.S +++ b/arch/mips/kernel/mcount.S | |||
| @@ -46,9 +46,8 @@ | |||
| 46 | PTR_L a5, PT_R9(sp) | 46 | PTR_L a5, PT_R9(sp) |
| 47 | PTR_L a6, PT_R10(sp) | 47 | PTR_L a6, PT_R10(sp) |
| 48 | PTR_L a7, PT_R11(sp) | 48 | PTR_L a7, PT_R11(sp) |
| 49 | PTR_ADDIU sp, PT_SIZE | ||
| 50 | #else | 49 | #else |
| 51 | PTR_ADDIU sp, (PT_SIZE + 8) | 50 | PTR_ADDIU sp, PT_SIZE |
| 52 | #endif | 51 | #endif |
| 53 | .endm | 52 | .endm |
| 54 | 53 | ||
| @@ -69,7 +68,9 @@ NESTED(ftrace_caller, PT_SIZE, ra) | |||
| 69 | .globl _mcount | 68 | .globl _mcount |
| 70 | _mcount: | 69 | _mcount: |
| 71 | b ftrace_stub | 70 | b ftrace_stub |
| 72 | nop | 71 | addiu sp,sp,8 |
| 72 | |||
| 73 | /* When tracing is activated, it calls ftrace_caller+8 (aka here) */ | ||
| 73 | lw t1, function_trace_stop | 74 | lw t1, function_trace_stop |
| 74 | bnez t1, ftrace_stub | 75 | bnez t1, ftrace_stub |
| 75 | nop | 76 | nop |
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index eec690af6581..147cec19621d 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c | |||
| @@ -705,7 +705,7 @@ static int vpe_run(struct vpe * v) | |||
| 705 | 705 | ||
| 706 | printk(KERN_WARNING | 706 | printk(KERN_WARNING |
| 707 | "VPE loader: TC %d is already in use.\n", | 707 | "VPE loader: TC %d is already in use.\n", |
| 708 | t->index); | 708 | v->tc->index); |
| 709 | return -ENOEXEC; | 709 | return -ENOEXEC; |
| 710 | } | 710 | } |
| 711 | } else { | 711 | } else { |
diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c index f36acd1b3808..a7935bf0fecb 100644 --- a/arch/mips/lantiq/irq.c +++ b/arch/mips/lantiq/irq.c | |||
| @@ -408,7 +408,7 @@ int __init icu_of_init(struct device_node *node, struct device_node *parent) | |||
| 408 | #endif | 408 | #endif |
| 409 | 409 | ||
| 410 | /* tell oprofile which irq to use */ | 410 | /* tell oprofile which irq to use */ |
| 411 | cp0_perfcount_irq = LTQ_PERF_IRQ; | 411 | cp0_perfcount_irq = irq_create_mapping(ltq_domain, LTQ_PERF_IRQ); |
| 412 | 412 | ||
| 413 | /* | 413 | /* |
| 414 | * if the timer irq is not one of the mips irqs we need to | 414 | * if the timer irq is not one of the mips irqs we need to |
diff --git a/arch/mips/lib/delay.c b/arch/mips/lib/delay.c index dc81ca8dc0dd..288f7954988d 100644 --- a/arch/mips/lib/delay.c +++ b/arch/mips/lib/delay.c | |||
| @@ -21,7 +21,7 @@ void __delay(unsigned long loops) | |||
| 21 | " .set noreorder \n" | 21 | " .set noreorder \n" |
| 22 | " .align 3 \n" | 22 | " .align 3 \n" |
| 23 | "1: bnez %0, 1b \n" | 23 | "1: bnez %0, 1b \n" |
| 24 | #if __SIZEOF_LONG__ == 4 | 24 | #if BITS_PER_LONG == 32 |
| 25 | " subu %0, 1 \n" | 25 | " subu %0, 1 \n" |
| 26 | #else | 26 | #else |
| 27 | " dsubu %0, 1 \n" | 27 | " dsubu %0, 1 \n" |
diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c index 7657fd21cd3f..cacfd31e8ec9 100644 --- a/arch/mips/mm/ioremap.c +++ b/arch/mips/mm/ioremap.c | |||
| @@ -190,9 +190,3 @@ void __iounmap(const volatile void __iomem *addr) | |||
| 190 | 190 | ||
| 191 | EXPORT_SYMBOL(__ioremap); | 191 | EXPORT_SYMBOL(__ioremap); |
| 192 | EXPORT_SYMBOL(__iounmap); | 192 | EXPORT_SYMBOL(__iounmap); |
| 193 | |||
| 194 | int __virt_addr_valid(const volatile void *kaddr) | ||
| 195 | { | ||
| 196 | return pfn_valid(PFN_DOWN(virt_to_phys(kaddr))); | ||
| 197 | } | ||
| 198 | EXPORT_SYMBOL_GPL(__virt_addr_valid); | ||
diff --git a/arch/mips/mm/mmap.c b/arch/mips/mm/mmap.c index d9be7540a6be..7e5fe2790d8a 100644 --- a/arch/mips/mm/mmap.c +++ b/arch/mips/mm/mmap.c | |||
| @@ -192,3 +192,9 @@ unsigned long arch_randomize_brk(struct mm_struct *mm) | |||
| 192 | 192 | ||
| 193 | return ret; | 193 | return ret; |
| 194 | } | 194 | } |
| 195 | |||
| 196 | int __virt_addr_valid(const volatile void *kaddr) | ||
| 197 | { | ||
| 198 | return pfn_valid(PFN_DOWN(virt_to_phys(kaddr))); | ||
| 199 | } | ||
| 200 | EXPORT_SYMBOL_GPL(__virt_addr_valid); | ||
diff --git a/arch/mips/netlogic/xlr/setup.c b/arch/mips/netlogic/xlr/setup.c index 4e7f49d3d5a8..c5ce6992ac4c 100644 --- a/arch/mips/netlogic/xlr/setup.c +++ b/arch/mips/netlogic/xlr/setup.c | |||
| @@ -193,8 +193,11 @@ static void nlm_init_node(void) | |||
| 193 | 193 | ||
| 194 | void __init prom_init(void) | 194 | void __init prom_init(void) |
| 195 | { | 195 | { |
| 196 | int i, *argv, *envp; /* passed as 32 bit ptrs */ | 196 | int *argv, *envp; /* passed as 32 bit ptrs */ |
| 197 | struct psb_info *prom_infop; | 197 | struct psb_info *prom_infop; |
| 198 | #ifdef CONFIG_SMP | ||
| 199 | int i; | ||
| 200 | #endif | ||
| 198 | 201 | ||
| 199 | /* truncate to 32 bit and sign extend all args */ | 202 | /* truncate to 32 bit and sign extend all args */ |
| 200 | argv = (int *)(long)(int)fw_arg1; | 203 | argv = (int *)(long)(int)fw_arg1; |
diff --git a/arch/mips/pci/pci-ar71xx.c b/arch/mips/pci/pci-ar71xx.c index 1552522b8718..6eaa4f2d0e38 100644 --- a/arch/mips/pci/pci-ar71xx.c +++ b/arch/mips/pci/pci-ar71xx.c | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | #include <asm/mach-ath79/pci.h> | 24 | #include <asm/mach-ath79/pci.h> |
| 25 | 25 | ||
| 26 | #define AR71XX_PCI_MEM_BASE 0x10000000 | 26 | #define AR71XX_PCI_MEM_BASE 0x10000000 |
| 27 | #define AR71XX_PCI_MEM_SIZE 0x08000000 | 27 | #define AR71XX_PCI_MEM_SIZE 0x07000000 |
| 28 | 28 | ||
| 29 | #define AR71XX_PCI_WIN0_OFFS 0x10000000 | 29 | #define AR71XX_PCI_WIN0_OFFS 0x10000000 |
| 30 | #define AR71XX_PCI_WIN1_OFFS 0x11000000 | 30 | #define AR71XX_PCI_WIN1_OFFS 0x11000000 |
diff --git a/arch/mips/pci/pci-ar724x.c b/arch/mips/pci/pci-ar724x.c index 86d77a666458..c11c75be2d7e 100644 --- a/arch/mips/pci/pci-ar724x.c +++ b/arch/mips/pci/pci-ar724x.c | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #define AR724X_PCI_CTRL_SIZE 0x100 | 21 | #define AR724X_PCI_CTRL_SIZE 0x100 |
| 22 | 22 | ||
| 23 | #define AR724X_PCI_MEM_BASE 0x10000000 | 23 | #define AR724X_PCI_MEM_BASE 0x10000000 |
| 24 | #define AR724X_PCI_MEM_SIZE 0x08000000 | 24 | #define AR724X_PCI_MEM_SIZE 0x04000000 |
| 25 | 25 | ||
| 26 | #define AR724X_PCI_REG_RESET 0x18 | 26 | #define AR724X_PCI_REG_RESET 0x18 |
| 27 | #define AR724X_PCI_REG_INT_STATUS 0x4c | 27 | #define AR724X_PCI_REG_INT_STATUS 0x4c |
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index d22e73e4618b..e514de57a125 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
| @@ -439,6 +439,8 @@ ret_from_fork: | |||
| 439 | ret_from_kernel_thread: | 439 | ret_from_kernel_thread: |
| 440 | REST_NVGPRS(r1) | 440 | REST_NVGPRS(r1) |
| 441 | bl schedule_tail | 441 | bl schedule_tail |
| 442 | li r3,0 | ||
| 443 | stw r3,0(r1) | ||
| 442 | mtlr r14 | 444 | mtlr r14 |
| 443 | mr r3,r15 | 445 | mr r3,r15 |
| 444 | PPC440EP_ERR42 | 446 | PPC440EP_ERR42 |
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index b310a0573625..3d990d3bd8ba 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
| @@ -664,6 +664,19 @@ resume_kernel: | |||
| 664 | ld r4,TI_FLAGS(r9) | 664 | ld r4,TI_FLAGS(r9) |
| 665 | andi. r0,r4,_TIF_NEED_RESCHED | 665 | andi. r0,r4,_TIF_NEED_RESCHED |
| 666 | bne 1b | 666 | bne 1b |
| 667 | |||
| 668 | /* | ||
| 669 | * arch_local_irq_restore() from preempt_schedule_irq above may | ||
| 670 | * enable hard interrupt but we really should disable interrupts | ||
| 671 | * when we return from the interrupt, and so that we don't get | ||
| 672 | * interrupted after loading SRR0/1. | ||
| 673 | */ | ||
| 674 | #ifdef CONFIG_PPC_BOOK3E | ||
| 675 | wrteei 0 | ||
| 676 | #else | ||
| 677 | ld r10,PACAKMSR(r13) /* Get kernel MSR without EE */ | ||
| 678 | mtmsrd r10,1 /* Update machine state */ | ||
| 679 | #endif /* CONFIG_PPC_BOOK3E */ | ||
| 667 | #endif /* CONFIG_PREEMPT */ | 680 | #endif /* CONFIG_PREEMPT */ |
| 668 | 681 | ||
| 669 | .globl fast_exc_return_irq | 682 | .globl fast_exc_return_irq |
diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c index c470a40b29f5..a7bc7521c064 100644 --- a/arch/powerpc/kernel/kgdb.c +++ b/arch/powerpc/kernel/kgdb.c | |||
| @@ -154,12 +154,12 @@ static int kgdb_handle_breakpoint(struct pt_regs *regs) | |||
| 154 | static int kgdb_singlestep(struct pt_regs *regs) | 154 | static int kgdb_singlestep(struct pt_regs *regs) |
| 155 | { | 155 | { |
| 156 | struct thread_info *thread_info, *exception_thread_info; | 156 | struct thread_info *thread_info, *exception_thread_info; |
| 157 | struct thread_info *backup_current_thread_info = \ | 157 | struct thread_info *backup_current_thread_info; |
| 158 | (struct thread_info *)kmalloc(sizeof(struct thread_info), GFP_KERNEL); | ||
| 159 | 158 | ||
| 160 | if (user_mode(regs)) | 159 | if (user_mode(regs)) |
| 161 | return 0; | 160 | return 0; |
| 162 | 161 | ||
| 162 | backup_current_thread_info = (struct thread_info *)kmalloc(sizeof(struct thread_info), GFP_KERNEL); | ||
| 163 | /* | 163 | /* |
| 164 | * On Book E and perhaps other processors, singlestep is handled on | 164 | * On Book E and perhaps other processors, singlestep is handled on |
| 165 | * the critical exception stack. This causes current_thread_info() | 165 | * the critical exception stack. This causes current_thread_info() |
| @@ -185,6 +185,7 @@ static int kgdb_singlestep(struct pt_regs *regs) | |||
| 185 | /* Restore current_thread_info lastly. */ | 185 | /* Restore current_thread_info lastly. */ |
| 186 | memcpy(exception_thread_info, backup_current_thread_info, sizeof *thread_info); | 186 | memcpy(exception_thread_info, backup_current_thread_info, sizeof *thread_info); |
| 187 | 187 | ||
| 188 | kfree(backup_current_thread_info); | ||
| 188 | return 1; | 189 | return 1; |
| 189 | } | 190 | } |
| 190 | 191 | ||
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 6f6b1cccc916..127361e093f4 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
| @@ -494,10 +494,15 @@ void timer_interrupt(struct pt_regs * regs) | |||
| 494 | set_dec(DECREMENTER_MAX); | 494 | set_dec(DECREMENTER_MAX); |
| 495 | 495 | ||
| 496 | /* Some implementations of hotplug will get timer interrupts while | 496 | /* Some implementations of hotplug will get timer interrupts while |
| 497 | * offline, just ignore these | 497 | * offline, just ignore these and we also need to set |
| 498 | * decrementers_next_tb as MAX to make sure __check_irq_replay | ||
| 499 | * don't replay timer interrupt when return, otherwise we'll trap | ||
| 500 | * here infinitely :( | ||
| 498 | */ | 501 | */ |
| 499 | if (!cpu_online(smp_processor_id())) | 502 | if (!cpu_online(smp_processor_id())) { |
| 503 | *next_tb = ~(u64)0; | ||
| 500 | return; | 504 | return; |
| 505 | } | ||
| 501 | 506 | ||
| 502 | /* Conditionally hard-enable interrupts now that the DEC has been | 507 | /* Conditionally hard-enable interrupts now that the DEC has been |
| 503 | * bumped to its maximum value | 508 | * bumped to its maximum value |
diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index b0855e5d8905..9d9cddc5b346 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | #define OP_31_XOP_TRAP 4 | 39 | #define OP_31_XOP_TRAP 4 |
| 40 | #define OP_31_XOP_LWZX 23 | 40 | #define OP_31_XOP_LWZX 23 |
| 41 | #define OP_31_XOP_TRAP_64 68 | 41 | #define OP_31_XOP_TRAP_64 68 |
| 42 | #define OP_31_XOP_DCBF 86 | ||
| 42 | #define OP_31_XOP_LBZX 87 | 43 | #define OP_31_XOP_LBZX 87 |
| 43 | #define OP_31_XOP_STWX 151 | 44 | #define OP_31_XOP_STWX 151 |
| 44 | #define OP_31_XOP_STBX 215 | 45 | #define OP_31_XOP_STBX 215 |
| @@ -374,6 +375,7 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu) | |||
| 374 | emulated = kvmppc_emulate_mtspr(vcpu, sprn, rs); | 375 | emulated = kvmppc_emulate_mtspr(vcpu, sprn, rs); |
| 375 | break; | 376 | break; |
| 376 | 377 | ||
| 378 | case OP_31_XOP_DCBF: | ||
| 377 | case OP_31_XOP_DCBI: | 379 | case OP_31_XOP_DCBI: |
| 378 | /* Do nothing. The guest is performing dcbi because | 380 | /* Do nothing. The guest is performing dcbi because |
| 379 | * hardware DMA is not snooped by the dcache, but | 381 | * hardware DMA is not snooped by the dcache, but |
diff --git a/arch/powerpc/mm/hash_low_64.S b/arch/powerpc/mm/hash_low_64.S index 56585086413a..7443481a315c 100644 --- a/arch/powerpc/mm/hash_low_64.S +++ b/arch/powerpc/mm/hash_low_64.S | |||
| @@ -115,11 +115,13 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT) | |||
| 115 | sldi r29,r5,SID_SHIFT - VPN_SHIFT | 115 | sldi r29,r5,SID_SHIFT - VPN_SHIFT |
| 116 | rldicl r28,r3,64 - VPN_SHIFT,64 - (SID_SHIFT - VPN_SHIFT) | 116 | rldicl r28,r3,64 - VPN_SHIFT,64 - (SID_SHIFT - VPN_SHIFT) |
| 117 | or r29,r28,r29 | 117 | or r29,r28,r29 |
| 118 | 118 | /* | |
| 119 | /* Calculate hash value for primary slot and store it in r28 */ | 119 | * Calculate hash value for primary slot and store it in r28 |
| 120 | rldicl r5,r5,0,25 /* vsid & 0x0000007fffffffff */ | 120 | * r3 = va, r5 = vsid |
| 121 | rldicl r0,r3,64-12,48 /* (ea >> 12) & 0xffff */ | 121 | * r0 = (va >> 12) & ((1ul << (28 - 12)) -1) |
| 122 | xor r28,r5,r0 | 122 | */ |
| 123 | rldicl r0,r3,64-12,48 | ||
| 124 | xor r28,r5,r0 /* hash */ | ||
| 123 | b 4f | 125 | b 4f |
| 124 | 126 | ||
| 125 | 3: /* Calc vpn and put it in r29 */ | 127 | 3: /* Calc vpn and put it in r29 */ |
| @@ -130,11 +132,12 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT) | |||
| 130 | /* | 132 | /* |
| 131 | * calculate hash value for primary slot and | 133 | * calculate hash value for primary slot and |
| 132 | * store it in r28 for 1T segment | 134 | * store it in r28 for 1T segment |
| 135 | * r3 = va, r5 = vsid | ||
| 133 | */ | 136 | */ |
| 134 | rldic r28,r5,25,25 /* (vsid << 25) & 0x7fffffffff */ | 137 | sldi r28,r5,25 /* vsid << 25 */ |
| 135 | clrldi r5,r5,40 /* vsid & 0xffffff */ | 138 | /* r0 = (va >> 12) & ((1ul << (40 - 12)) -1) */ |
| 136 | rldicl r0,r3,64-12,36 /* (ea >> 12) & 0xfffffff */ | 139 | rldicl r0,r3,64-12,36 |
| 137 | xor r28,r28,r5 | 140 | xor r28,r28,r5 /* vsid ^ ( vsid << 25) */ |
| 138 | xor r28,r28,r0 /* hash */ | 141 | xor r28,r28,r0 /* hash */ |
| 139 | 142 | ||
| 140 | /* Convert linux PTE bits into HW equivalents */ | 143 | /* Convert linux PTE bits into HW equivalents */ |
| @@ -407,11 +410,13 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT) | |||
| 407 | */ | 410 | */ |
| 408 | rldicl r28,r3,64 - VPN_SHIFT,64 - (SID_SHIFT - VPN_SHIFT) | 411 | rldicl r28,r3,64 - VPN_SHIFT,64 - (SID_SHIFT - VPN_SHIFT) |
| 409 | or r29,r28,r29 | 412 | or r29,r28,r29 |
| 410 | 413 | /* | |
| 411 | /* Calculate hash value for primary slot and store it in r28 */ | 414 | * Calculate hash value for primary slot and store it in r28 |
| 412 | rldicl r5,r5,0,25 /* vsid & 0x0000007fffffffff */ | 415 | * r3 = va, r5 = vsid |
| 413 | rldicl r0,r3,64-12,48 /* (ea >> 12) & 0xffff */ | 416 | * r0 = (va >> 12) & ((1ul << (28 - 12)) -1) |
| 414 | xor r28,r5,r0 | 417 | */ |
| 418 | rldicl r0,r3,64-12,48 | ||
| 419 | xor r28,r5,r0 /* hash */ | ||
| 415 | b 4f | 420 | b 4f |
| 416 | 421 | ||
| 417 | 3: /* Calc vpn and put it in r29 */ | 422 | 3: /* Calc vpn and put it in r29 */ |
| @@ -426,11 +431,12 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT) | |||
| 426 | /* | 431 | /* |
| 427 | * Calculate hash value for primary slot and | 432 | * Calculate hash value for primary slot and |
| 428 | * store it in r28 for 1T segment | 433 | * store it in r28 for 1T segment |
| 434 | * r3 = va, r5 = vsid | ||
| 429 | */ | 435 | */ |
| 430 | rldic r28,r5,25,25 /* (vsid << 25) & 0x7fffffffff */ | 436 | sldi r28,r5,25 /* vsid << 25 */ |
| 431 | clrldi r5,r5,40 /* vsid & 0xffffff */ | 437 | /* r0 = (va >> 12) & ((1ul << (40 - 12)) -1) */ |
| 432 | rldicl r0,r3,64-12,36 /* (ea >> 12) & 0xfffffff */ | 438 | rldicl r0,r3,64-12,36 |
| 433 | xor r28,r28,r5 | 439 | xor r28,r28,r5 /* vsid ^ ( vsid << 25) */ |
| 434 | xor r28,r28,r0 /* hash */ | 440 | xor r28,r28,r0 /* hash */ |
| 435 | 441 | ||
| 436 | /* Convert linux PTE bits into HW equivalents */ | 442 | /* Convert linux PTE bits into HW equivalents */ |
| @@ -752,25 +758,27 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT) | |||
| 752 | rldicl r28,r3,64 - VPN_SHIFT,64 - (SID_SHIFT - VPN_SHIFT) | 758 | rldicl r28,r3,64 - VPN_SHIFT,64 - (SID_SHIFT - VPN_SHIFT) |
| 753 | or r29,r28,r29 | 759 | or r29,r28,r29 |
| 754 | 760 | ||
| 755 | /* Calculate hash value for primary slot and store it in r28 */ | 761 | /* Calculate hash value for primary slot and store it in r28 |
| 756 | rldicl r5,r5,0,25 /* vsid & 0x0000007fffffffff */ | 762 | * r3 = va, r5 = vsid |
| 757 | rldicl r0,r3,64-16,52 /* (ea >> 16) & 0xfff */ | 763 | * r0 = (va >> 16) & ((1ul << (28 - 16)) -1) |
| 758 | xor r28,r5,r0 | 764 | */ |
| 765 | rldicl r0,r3,64-16,52 | ||
| 766 | xor r28,r5,r0 /* hash */ | ||
| 759 | b 4f | 767 | b 4f |
| 760 | 768 | ||
| 761 | 3: /* Calc vpn and put it in r29 */ | 769 | 3: /* Calc vpn and put it in r29 */ |
| 762 | sldi r29,r5,SID_SHIFT_1T - VPN_SHIFT | 770 | sldi r29,r5,SID_SHIFT_1T - VPN_SHIFT |
| 763 | rldicl r28,r3,64 - VPN_SHIFT,64 - (SID_SHIFT_1T - VPN_SHIFT) | 771 | rldicl r28,r3,64 - VPN_SHIFT,64 - (SID_SHIFT_1T - VPN_SHIFT) |
| 764 | or r29,r28,r29 | 772 | or r29,r28,r29 |
| 765 | |||
| 766 | /* | 773 | /* |
| 767 | * calculate hash value for primary slot and | 774 | * calculate hash value for primary slot and |
| 768 | * store it in r28 for 1T segment | 775 | * store it in r28 for 1T segment |
| 776 | * r3 = va, r5 = vsid | ||
| 769 | */ | 777 | */ |
| 770 | rldic r28,r5,25,25 /* (vsid << 25) & 0x7fffffffff */ | 778 | sldi r28,r5,25 /* vsid << 25 */ |
| 771 | clrldi r5,r5,40 /* vsid & 0xffffff */ | 779 | /* r0 = (va >> 16) & ((1ul << (40 - 16)) -1) */ |
| 772 | rldicl r0,r3,64-16,40 /* (ea >> 16) & 0xffffff */ | 780 | rldicl r0,r3,64-16,40 |
| 773 | xor r28,r28,r5 | 781 | xor r28,r28,r5 /* vsid ^ ( vsid << 25) */ |
| 774 | xor r28,r28,r0 /* hash */ | 782 | xor r28,r28,r0 /* hash */ |
| 775 | 783 | ||
| 776 | /* Convert linux PTE bits into HW equivalents */ | 784 | /* Convert linux PTE bits into HW equivalents */ |
diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c index 315f9495e9b2..f444b94935f5 100644 --- a/arch/powerpc/oprofile/op_model_power4.c +++ b/arch/powerpc/oprofile/op_model_power4.c | |||
| @@ -52,7 +52,7 @@ static int power7_marked_instr_event(u64 mmcr1) | |||
| 52 | for (pmc = 0; pmc < 4; pmc++) { | 52 | for (pmc = 0; pmc < 4; pmc++) { |
| 53 | psel = mmcr1 & (OPROFILE_PM_PMCSEL_MSK | 53 | psel = mmcr1 & (OPROFILE_PM_PMCSEL_MSK |
| 54 | << (OPROFILE_MAX_PMC_NUM - pmc) | 54 | << (OPROFILE_MAX_PMC_NUM - pmc) |
| 55 | * OPROFILE_MAX_PMC_NUM); | 55 | * OPROFILE_PMSEL_FIELD_WIDTH); |
| 56 | psel = (psel >> ((OPROFILE_MAX_PMC_NUM - pmc) | 56 | psel = (psel >> ((OPROFILE_MAX_PMC_NUM - pmc) |
| 57 | * OPROFILE_PMSEL_FIELD_WIDTH)) & ~1ULL; | 57 | * OPROFILE_PMSEL_FIELD_WIDTH)) & ~1ULL; |
| 58 | unit = mmcr1 & (OPROFILE_PM_UNIT_MSK | 58 | unit = mmcr1 & (OPROFILE_PM_UNIT_MSK |
diff --git a/arch/powerpc/platforms/pasemi/cpufreq.c b/arch/powerpc/platforms/pasemi/cpufreq.c index 95d00173029f..890f30e70f98 100644 --- a/arch/powerpc/platforms/pasemi/cpufreq.c +++ b/arch/powerpc/platforms/pasemi/cpufreq.c | |||
| @@ -236,6 +236,13 @@ out: | |||
| 236 | 236 | ||
| 237 | static int pas_cpufreq_cpu_exit(struct cpufreq_policy *policy) | 237 | static int pas_cpufreq_cpu_exit(struct cpufreq_policy *policy) |
| 238 | { | 238 | { |
| 239 | /* | ||
| 240 | * We don't support CPU hotplug. Don't unmap after the system | ||
| 241 | * has already made it to a running state. | ||
| 242 | */ | ||
| 243 | if (system_state != SYSTEM_BOOTING) | ||
| 244 | return 0; | ||
| 245 | |||
| 239 | if (sdcasr_mapbase) | 246 | if (sdcasr_mapbase) |
| 240 | iounmap(sdcasr_mapbase); | 247 | iounmap(sdcasr_mapbase); |
| 241 | if (sdcpwr_mapbase) | 248 | if (sdcpwr_mapbase) |
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index c1d7930a82f4..098adbb62660 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
| @@ -1365,6 +1365,18 @@ static inline void pmdp_invalidate(struct vm_area_struct *vma, | |||
| 1365 | __pmd_idte(address, pmdp); | 1365 | __pmd_idte(address, pmdp); |
| 1366 | } | 1366 | } |
| 1367 | 1367 | ||
| 1368 | #define __HAVE_ARCH_PMDP_SET_WRPROTECT | ||
| 1369 | static inline void pmdp_set_wrprotect(struct mm_struct *mm, | ||
| 1370 | unsigned long address, pmd_t *pmdp) | ||
| 1371 | { | ||
| 1372 | pmd_t pmd = *pmdp; | ||
| 1373 | |||
| 1374 | if (pmd_write(pmd)) { | ||
| 1375 | __pmd_idte(address, pmdp); | ||
| 1376 | set_pmd_at(mm, address, pmdp, pmd_wrprotect(pmd)); | ||
| 1377 | } | ||
| 1378 | } | ||
| 1379 | |||
| 1368 | static inline pmd_t mk_pmd_phys(unsigned long physpage, pgprot_t pgprot) | 1380 | static inline pmd_t mk_pmd_phys(unsigned long physpage, pgprot_t pgprot) |
| 1369 | { | 1381 | { |
| 1370 | pmd_t __pmd; | 1382 | pmd_t __pmd; |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 79795af59810..225543bf45a5 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
| @@ -2138,6 +2138,7 @@ config OLPC_XO1_RTC | |||
| 2138 | config OLPC_XO1_SCI | 2138 | config OLPC_XO1_SCI |
| 2139 | bool "OLPC XO-1 SCI extras" | 2139 | bool "OLPC XO-1 SCI extras" |
| 2140 | depends on OLPC && OLPC_XO1_PM | 2140 | depends on OLPC && OLPC_XO1_PM |
| 2141 | depends on INPUT=y | ||
| 2141 | select POWER_SUPPLY | 2142 | select POWER_SUPPLY |
| 2142 | select GPIO_CS5535 | 2143 | select GPIO_CS5535 |
| 2143 | select MFD_CORE | 2144 | select MFD_CORE |
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index ccce0ed67dde..379814bc41e3 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile | |||
| @@ -71,7 +71,7 @@ GCOV_PROFILE := n | |||
| 71 | $(obj)/bzImage: asflags-y := $(SVGA_MODE) | 71 | $(obj)/bzImage: asflags-y := $(SVGA_MODE) |
| 72 | 72 | ||
| 73 | quiet_cmd_image = BUILD $@ | 73 | quiet_cmd_image = BUILD $@ |
| 74 | cmd_image = $(obj)/tools/build $(obj)/setup.bin $(obj)/vmlinux.bin > $@ | 74 | cmd_image = $(obj)/tools/build $(obj)/setup.bin $(obj)/vmlinux.bin $(obj)/zoffset.h > $@ |
| 75 | 75 | ||
| 76 | $(obj)/bzImage: $(obj)/setup.bin $(obj)/vmlinux.bin $(obj)/tools/build FORCE | 76 | $(obj)/bzImage: $(obj)/setup.bin $(obj)/vmlinux.bin $(obj)/tools/build FORCE |
| 77 | $(call if_changed,image) | 77 | $(call if_changed,image) |
| @@ -92,7 +92,7 @@ targets += voffset.h | |||
| 92 | $(obj)/voffset.h: vmlinux FORCE | 92 | $(obj)/voffset.h: vmlinux FORCE |
| 93 | $(call if_changed,voffset) | 93 | $(call if_changed,voffset) |
| 94 | 94 | ||
| 95 | sed-zoffset := -e 's/^\([0-9a-fA-F]*\) . \(startup_32\|input_data\|_end\|z_.*\)$$/\#define ZO_\2 0x\1/p' | 95 | sed-zoffset := -e 's/^\([0-9a-fA-F]*\) . \(startup_32\|startup_64\|efi_pe_entry\|efi_stub_entry\|input_data\|_end\|z_.*\)$$/\#define ZO_\2 0x\1/p' |
| 96 | 96 | ||
| 97 | quiet_cmd_zoffset = ZOFFSET $@ | 97 | quiet_cmd_zoffset = ZOFFSET $@ |
| 98 | cmd_zoffset = $(NM) $< | sed -n $(sed-zoffset) > $@ | 98 | cmd_zoffset = $(NM) $< | sed -n $(sed-zoffset) > $@ |
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index 18e329ca108e..f8fa41190c35 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c | |||
| @@ -256,10 +256,10 @@ static efi_status_t setup_efi_pci(struct boot_params *params) | |||
| 256 | int i; | 256 | int i; |
| 257 | struct setup_data *data; | 257 | struct setup_data *data; |
| 258 | 258 | ||
| 259 | data = (struct setup_data *)params->hdr.setup_data; | 259 | data = (struct setup_data *)(unsigned long)params->hdr.setup_data; |
| 260 | 260 | ||
| 261 | while (data && data->next) | 261 | while (data && data->next) |
| 262 | data = (struct setup_data *)data->next; | 262 | data = (struct setup_data *)(unsigned long)data->next; |
| 263 | 263 | ||
| 264 | status = efi_call_phys5(sys_table->boottime->locate_handle, | 264 | status = efi_call_phys5(sys_table->boottime->locate_handle, |
| 265 | EFI_LOCATE_BY_PROTOCOL, &pci_proto, | 265 | EFI_LOCATE_BY_PROTOCOL, &pci_proto, |
| @@ -295,16 +295,18 @@ static efi_status_t setup_efi_pci(struct boot_params *params) | |||
| 295 | if (!pci) | 295 | if (!pci) |
| 296 | continue; | 296 | continue; |
| 297 | 297 | ||
| 298 | #ifdef CONFIG_X86_64 | ||
| 298 | status = efi_call_phys4(pci->attributes, pci, | 299 | status = efi_call_phys4(pci->attributes, pci, |
| 299 | EfiPciIoAttributeOperationGet, 0, | 300 | EfiPciIoAttributeOperationGet, 0, |
| 300 | &attributes); | 301 | &attributes); |
| 301 | 302 | #else | |
| 303 | status = efi_call_phys5(pci->attributes, pci, | ||
| 304 | EfiPciIoAttributeOperationGet, 0, 0, | ||
| 305 | &attributes); | ||
| 306 | #endif | ||
| 302 | if (status != EFI_SUCCESS) | 307 | if (status != EFI_SUCCESS) |
| 303 | continue; | 308 | continue; |
| 304 | 309 | ||
| 305 | if (!(attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM)) | ||
| 306 | continue; | ||
| 307 | |||
| 308 | if (!pci->romimage || !pci->romsize) | 310 | if (!pci->romimage || !pci->romsize) |
| 309 | continue; | 311 | continue; |
| 310 | 312 | ||
| @@ -345,9 +347,9 @@ static efi_status_t setup_efi_pci(struct boot_params *params) | |||
| 345 | memcpy(rom->romdata, pci->romimage, pci->romsize); | 347 | memcpy(rom->romdata, pci->romimage, pci->romsize); |
| 346 | 348 | ||
| 347 | if (data) | 349 | if (data) |
| 348 | data->next = (uint64_t)rom; | 350 | data->next = (unsigned long)rom; |
| 349 | else | 351 | else |
| 350 | params->hdr.setup_data = (uint64_t)rom; | 352 | params->hdr.setup_data = (unsigned long)rom; |
| 351 | 353 | ||
| 352 | data = (struct setup_data *)rom; | 354 | data = (struct setup_data *)rom; |
| 353 | 355 | ||
| @@ -432,10 +434,9 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto, | |||
| 432 | * Once we've found a GOP supporting ConOut, | 434 | * Once we've found a GOP supporting ConOut, |
| 433 | * don't bother looking any further. | 435 | * don't bother looking any further. |
| 434 | */ | 436 | */ |
| 437 | first_gop = gop; | ||
| 435 | if (conout_found) | 438 | if (conout_found) |
| 436 | break; | 439 | break; |
| 437 | |||
| 438 | first_gop = gop; | ||
| 439 | } | 440 | } |
| 440 | } | 441 | } |
| 441 | 442 | ||
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S index aa4aaf1b2380..1e3184f6072f 100644 --- a/arch/x86/boot/compressed/head_32.S +++ b/arch/x86/boot/compressed/head_32.S | |||
| @@ -35,11 +35,11 @@ ENTRY(startup_32) | |||
| 35 | #ifdef CONFIG_EFI_STUB | 35 | #ifdef CONFIG_EFI_STUB |
| 36 | jmp preferred_addr | 36 | jmp preferred_addr |
| 37 | 37 | ||
| 38 | .balign 0x10 | ||
| 39 | /* | 38 | /* |
| 40 | * We don't need the return address, so set up the stack so | 39 | * We don't need the return address, so set up the stack so |
| 41 | * efi_main() can find its arugments. | 40 | * efi_main() can find its arguments. |
| 42 | */ | 41 | */ |
| 42 | ENTRY(efi_pe_entry) | ||
| 43 | add $0x4, %esp | 43 | add $0x4, %esp |
| 44 | 44 | ||
| 45 | call make_boot_params | 45 | call make_boot_params |
| @@ -50,8 +50,10 @@ ENTRY(startup_32) | |||
| 50 | pushl %eax | 50 | pushl %eax |
| 51 | pushl %esi | 51 | pushl %esi |
| 52 | pushl %ecx | 52 | pushl %ecx |
| 53 | sub $0x4, %esp | ||
| 53 | 54 | ||
| 54 | .org 0x30,0x90 | 55 | ENTRY(efi_stub_entry) |
| 56 | add $0x4, %esp | ||
| 55 | call efi_main | 57 | call efi_main |
| 56 | cmpl $0, %eax | 58 | cmpl $0, %eax |
| 57 | movl %eax, %esi | 59 | movl %eax, %esi |
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S index 2c4b171eec33..f5d1aaa0dec8 100644 --- a/arch/x86/boot/compressed/head_64.S +++ b/arch/x86/boot/compressed/head_64.S | |||
| @@ -201,12 +201,12 @@ ENTRY(startup_64) | |||
| 201 | */ | 201 | */ |
| 202 | #ifdef CONFIG_EFI_STUB | 202 | #ifdef CONFIG_EFI_STUB |
| 203 | /* | 203 | /* |
| 204 | * The entry point for the PE/COFF executable is 0x210, so only | 204 | * The entry point for the PE/COFF executable is efi_pe_entry, so |
| 205 | * legacy boot loaders will execute this jmp. | 205 | * only legacy boot loaders will execute this jmp. |
| 206 | */ | 206 | */ |
| 207 | jmp preferred_addr | 207 | jmp preferred_addr |
| 208 | 208 | ||
| 209 | .org 0x210 | 209 | ENTRY(efi_pe_entry) |
| 210 | mov %rcx, %rdi | 210 | mov %rcx, %rdi |
| 211 | mov %rdx, %rsi | 211 | mov %rdx, %rsi |
| 212 | pushq %rdi | 212 | pushq %rdi |
| @@ -218,7 +218,7 @@ ENTRY(startup_64) | |||
| 218 | popq %rsi | 218 | popq %rsi |
| 219 | popq %rdi | 219 | popq %rdi |
| 220 | 220 | ||
| 221 | .org 0x230,0x90 | 221 | ENTRY(efi_stub_entry) |
| 222 | call efi_main | 222 | call efi_main |
| 223 | movq %rax,%rsi | 223 | movq %rax,%rsi |
| 224 | cmpq $0,%rax | 224 | cmpq $0,%rax |
diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S index 8c132a625b94..944ce595f767 100644 --- a/arch/x86/boot/header.S +++ b/arch/x86/boot/header.S | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <asm/e820.h> | 21 | #include <asm/e820.h> |
| 22 | #include <asm/page_types.h> | 22 | #include <asm/page_types.h> |
| 23 | #include <asm/setup.h> | 23 | #include <asm/setup.h> |
| 24 | #include <asm/bootparam.h> | ||
| 24 | #include "boot.h" | 25 | #include "boot.h" |
| 25 | #include "voffset.h" | 26 | #include "voffset.h" |
| 26 | #include "zoffset.h" | 27 | #include "zoffset.h" |
| @@ -255,6 +256,9 @@ section_table: | |||
| 255 | # header, from the old boot sector. | 256 | # header, from the old boot sector. |
| 256 | 257 | ||
| 257 | .section ".header", "a" | 258 | .section ".header", "a" |
| 259 | .globl sentinel | ||
| 260 | sentinel: .byte 0xff, 0xff /* Used to detect broken loaders */ | ||
| 261 | |||
| 258 | .globl hdr | 262 | .globl hdr |
| 259 | hdr: | 263 | hdr: |
| 260 | setup_sects: .byte 0 /* Filled in by build.c */ | 264 | setup_sects: .byte 0 /* Filled in by build.c */ |
| @@ -279,7 +283,7 @@ _start: | |||
| 279 | # Part 2 of the header, from the old setup.S | 283 | # Part 2 of the header, from the old setup.S |
| 280 | 284 | ||
| 281 | .ascii "HdrS" # header signature | 285 | .ascii "HdrS" # header signature |
| 282 | .word 0x020b # header version number (>= 0x0105) | 286 | .word 0x020c # header version number (>= 0x0105) |
| 283 | # or else old loadlin-1.5 will fail) | 287 | # or else old loadlin-1.5 will fail) |
| 284 | .globl realmode_swtch | 288 | .globl realmode_swtch |
| 285 | realmode_swtch: .word 0, 0 # default_switch, SETUPSEG | 289 | realmode_swtch: .word 0, 0 # default_switch, SETUPSEG |
| @@ -297,13 +301,7 @@ type_of_loader: .byte 0 # 0 means ancient bootloader, newer | |||
| 297 | 301 | ||
| 298 | # flags, unused bits must be zero (RFU) bit within loadflags | 302 | # flags, unused bits must be zero (RFU) bit within loadflags |
| 299 | loadflags: | 303 | loadflags: |
| 300 | LOADED_HIGH = 1 # If set, the kernel is loaded high | 304 | .byte LOADED_HIGH # The kernel is to be loaded high |
| 301 | CAN_USE_HEAP = 0x80 # If set, the loader also has set | ||
| 302 | # heap_end_ptr to tell how much | ||
| 303 | # space behind setup.S can be used for | ||
| 304 | # heap purposes. | ||
| 305 | # Only the loader knows what is free | ||
| 306 | .byte LOADED_HIGH | ||
| 307 | 305 | ||
| 308 | setup_move_size: .word 0x8000 # size to move, when setup is not | 306 | setup_move_size: .word 0x8000 # size to move, when setup is not |
| 309 | # loaded at 0x90000. We will move setup | 307 | # loaded at 0x90000. We will move setup |
| @@ -369,7 +367,23 @@ relocatable_kernel: .byte 1 | |||
| 369 | relocatable_kernel: .byte 0 | 367 | relocatable_kernel: .byte 0 |
| 370 | #endif | 368 | #endif |
| 371 | min_alignment: .byte MIN_KERNEL_ALIGN_LG2 # minimum alignment | 369 | min_alignment: .byte MIN_KERNEL_ALIGN_LG2 # minimum alignment |
| 372 | pad3: .word 0 | 370 | |
| 371 | xloadflags: | ||
| 372 | #ifdef CONFIG_X86_64 | ||
| 373 | # define XLF0 XLF_KERNEL_64 /* 64-bit kernel */ | ||
| 374 | #else | ||
| 375 | # define XLF0 0 | ||
| 376 | #endif | ||
| 377 | #ifdef CONFIG_EFI_STUB | ||
| 378 | # ifdef CONFIG_X86_64 | ||
| 379 | # define XLF23 XLF_EFI_HANDOVER_64 /* 64-bit EFI handover ok */ | ||
| 380 | # else | ||
| 381 | # define XLF23 XLF_EFI_HANDOVER_32 /* 32-bit EFI handover ok */ | ||
| 382 | # endif | ||
| 383 | #else | ||
| 384 | # define XLF23 0 | ||
| 385 | #endif | ||
| 386 | .word XLF0 | XLF23 | ||
| 373 | 387 | ||
| 374 | cmdline_size: .long COMMAND_LINE_SIZE-1 #length of the command line, | 388 | cmdline_size: .long COMMAND_LINE_SIZE-1 #length of the command line, |
| 375 | #added with boot protocol | 389 | #added with boot protocol |
| @@ -397,8 +411,13 @@ pref_address: .quad LOAD_PHYSICAL_ADDR # preferred load addr | |||
| 397 | #define INIT_SIZE VO_INIT_SIZE | 411 | #define INIT_SIZE VO_INIT_SIZE |
| 398 | #endif | 412 | #endif |
| 399 | init_size: .long INIT_SIZE # kernel initialization size | 413 | init_size: .long INIT_SIZE # kernel initialization size |
| 400 | handover_offset: .long 0x30 # offset to the handover | 414 | handover_offset: |
| 415 | #ifdef CONFIG_EFI_STUB | ||
| 416 | .long 0x30 # offset to the handover | ||
| 401 | # protocol entry point | 417 | # protocol entry point |
| 418 | #else | ||
| 419 | .long 0 | ||
| 420 | #endif | ||
| 402 | 421 | ||
| 403 | # End of setup header ##################################################### | 422 | # End of setup header ##################################################### |
| 404 | 423 | ||
diff --git a/arch/x86/boot/setup.ld b/arch/x86/boot/setup.ld index 03c0683636b6..96a6c7563538 100644 --- a/arch/x86/boot/setup.ld +++ b/arch/x86/boot/setup.ld | |||
| @@ -13,7 +13,7 @@ SECTIONS | |||
| 13 | .bstext : { *(.bstext) } | 13 | .bstext : { *(.bstext) } |
| 14 | .bsdata : { *(.bsdata) } | 14 | .bsdata : { *(.bsdata) } |
| 15 | 15 | ||
| 16 | . = 497; | 16 | . = 495; |
| 17 | .header : { *(.header) } | 17 | .header : { *(.header) } |
| 18 | .entrytext : { *(.entrytext) } | 18 | .entrytext : { *(.entrytext) } |
| 19 | .inittext : { *(.inittext) } | 19 | .inittext : { *(.inittext) } |
diff --git a/arch/x86/boot/tools/build.c b/arch/x86/boot/tools/build.c index 4b8e165ee572..94c544650020 100644 --- a/arch/x86/boot/tools/build.c +++ b/arch/x86/boot/tools/build.c | |||
| @@ -52,6 +52,10 @@ int is_big_kernel; | |||
| 52 | 52 | ||
| 53 | #define PECOFF_RELOC_RESERVE 0x20 | 53 | #define PECOFF_RELOC_RESERVE 0x20 |
| 54 | 54 | ||
| 55 | unsigned long efi_stub_entry; | ||
| 56 | unsigned long efi_pe_entry; | ||
| 57 | unsigned long startup_64; | ||
| 58 | |||
| 55 | /*----------------------------------------------------------------------*/ | 59 | /*----------------------------------------------------------------------*/ |
| 56 | 60 | ||
| 57 | static const u32 crctab32[] = { | 61 | static const u32 crctab32[] = { |
| @@ -132,7 +136,7 @@ static void die(const char * str, ...) | |||
| 132 | 136 | ||
| 133 | static void usage(void) | 137 | static void usage(void) |
| 134 | { | 138 | { |
| 135 | die("Usage: build setup system [> image]"); | 139 | die("Usage: build setup system [zoffset.h] [> image]"); |
| 136 | } | 140 | } |
| 137 | 141 | ||
| 138 | #ifdef CONFIG_EFI_STUB | 142 | #ifdef CONFIG_EFI_STUB |
| @@ -206,30 +210,54 @@ static void update_pecoff_text(unsigned int text_start, unsigned int file_sz) | |||
| 206 | */ | 210 | */ |
| 207 | put_unaligned_le32(file_sz - 512, &buf[pe_header + 0x1c]); | 211 | put_unaligned_le32(file_sz - 512, &buf[pe_header + 0x1c]); |
| 208 | 212 | ||
| 209 | #ifdef CONFIG_X86_32 | ||
| 210 | /* | 213 | /* |
| 211 | * Address of entry point. | 214 | * Address of entry point for PE/COFF executable |
| 212 | * | ||
| 213 | * The EFI stub entry point is +16 bytes from the start of | ||
| 214 | * the .text section. | ||
| 215 | */ | 215 | */ |
| 216 | put_unaligned_le32(text_start + 16, &buf[pe_header + 0x28]); | 216 | put_unaligned_le32(text_start + efi_pe_entry, &buf[pe_header + 0x28]); |
| 217 | #else | ||
| 218 | /* | ||
| 219 | * Address of entry point. startup_32 is at the beginning and | ||
| 220 | * the 64-bit entry point (startup_64) is always 512 bytes | ||
| 221 | * after. The EFI stub entry point is 16 bytes after that, as | ||
| 222 | * the first instruction allows legacy loaders to jump over | ||
| 223 | * the EFI stub initialisation | ||
| 224 | */ | ||
| 225 | put_unaligned_le32(text_start + 528, &buf[pe_header + 0x28]); | ||
| 226 | #endif /* CONFIG_X86_32 */ | ||
| 227 | 217 | ||
| 228 | update_pecoff_section_header(".text", text_start, text_sz); | 218 | update_pecoff_section_header(".text", text_start, text_sz); |
| 229 | } | 219 | } |
| 230 | 220 | ||
| 231 | #endif /* CONFIG_EFI_STUB */ | 221 | #endif /* CONFIG_EFI_STUB */ |
| 232 | 222 | ||
| 223 | |||
| 224 | /* | ||
| 225 | * Parse zoffset.h and find the entry points. We could just #include zoffset.h | ||
| 226 | * but that would mean tools/build would have to be rebuilt every time. It's | ||
| 227 | * not as if parsing it is hard... | ||
| 228 | */ | ||
| 229 | #define PARSE_ZOFS(p, sym) do { \ | ||
| 230 | if (!strncmp(p, "#define ZO_" #sym " ", 11+sizeof(#sym))) \ | ||
| 231 | sym = strtoul(p + 11 + sizeof(#sym), NULL, 16); \ | ||
| 232 | } while (0) | ||
| 233 | |||
| 234 | static void parse_zoffset(char *fname) | ||
| 235 | { | ||
| 236 | FILE *file; | ||
| 237 | char *p; | ||
| 238 | int c; | ||
| 239 | |||
| 240 | file = fopen(fname, "r"); | ||
| 241 | if (!file) | ||
| 242 | die("Unable to open `%s': %m", fname); | ||
| 243 | c = fread(buf, 1, sizeof(buf) - 1, file); | ||
| 244 | if (ferror(file)) | ||
| 245 | die("read-error on `zoffset.h'"); | ||
| 246 | buf[c] = 0; | ||
| 247 | |||
| 248 | p = (char *)buf; | ||
| 249 | |||
| 250 | while (p && *p) { | ||
| 251 | PARSE_ZOFS(p, efi_stub_entry); | ||
| 252 | PARSE_ZOFS(p, efi_pe_entry); | ||
| 253 | PARSE_ZOFS(p, startup_64); | ||
| 254 | |||
| 255 | p = strchr(p, '\n'); | ||
| 256 | while (p && (*p == '\r' || *p == '\n')) | ||
| 257 | p++; | ||
| 258 | } | ||
| 259 | } | ||
| 260 | |||
| 233 | int main(int argc, char ** argv) | 261 | int main(int argc, char ** argv) |
| 234 | { | 262 | { |
| 235 | unsigned int i, sz, setup_sectors; | 263 | unsigned int i, sz, setup_sectors; |
| @@ -241,7 +269,19 @@ int main(int argc, char ** argv) | |||
| 241 | void *kernel; | 269 | void *kernel; |
| 242 | u32 crc = 0xffffffffUL; | 270 | u32 crc = 0xffffffffUL; |
| 243 | 271 | ||
| 244 | if (argc != 3) | 272 | /* Defaults for old kernel */ |
| 273 | #ifdef CONFIG_X86_32 | ||
| 274 | efi_pe_entry = 0x10; | ||
| 275 | efi_stub_entry = 0x30; | ||
| 276 | #else | ||
| 277 | efi_pe_entry = 0x210; | ||
| 278 | efi_stub_entry = 0x230; | ||
| 279 | startup_64 = 0x200; | ||
| 280 | #endif | ||
| 281 | |||
| 282 | if (argc == 4) | ||
| 283 | parse_zoffset(argv[3]); | ||
| 284 | else if (argc != 3) | ||
| 245 | usage(); | 285 | usage(); |
| 246 | 286 | ||
| 247 | /* Copy the setup code */ | 287 | /* Copy the setup code */ |
| @@ -299,6 +339,11 @@ int main(int argc, char ** argv) | |||
| 299 | 339 | ||
| 300 | #ifdef CONFIG_EFI_STUB | 340 | #ifdef CONFIG_EFI_STUB |
| 301 | update_pecoff_text(setup_sectors * 512, sz + i + ((sys_size * 16) - sz)); | 341 | update_pecoff_text(setup_sectors * 512, sz + i + ((sys_size * 16) - sz)); |
| 342 | |||
| 343 | #ifdef CONFIG_X86_64 /* Yes, this is really how we defined it :( */ | ||
| 344 | efi_stub_entry -= 0x200; | ||
| 345 | #endif | ||
| 346 | put_unaligned_le32(efi_stub_entry, &buf[0x264]); | ||
| 302 | #endif | 347 | #endif |
| 303 | 348 | ||
| 304 | crc = partial_crc32(buf, i, crc); | 349 | crc = partial_crc32(buf, i, crc); |
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h index 6e8fdf5ad113..28677c55113f 100644 --- a/arch/x86/include/asm/efi.h +++ b/arch/x86/include/asm/efi.h | |||
| @@ -94,6 +94,7 @@ extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size, | |||
| 94 | #endif /* CONFIG_X86_32 */ | 94 | #endif /* CONFIG_X86_32 */ |
| 95 | 95 | ||
| 96 | extern int add_efi_memmap; | 96 | extern int add_efi_memmap; |
| 97 | extern unsigned long x86_efi_facility; | ||
| 97 | extern void efi_set_executable(efi_memory_desc_t *md, bool executable); | 98 | extern void efi_set_executable(efi_memory_desc_t *md, bool executable); |
| 98 | extern int efi_memblock_x86_reserve_range(void); | 99 | extern int efi_memblock_x86_reserve_range(void); |
| 99 | extern void efi_call_phys_prelog(void); | 100 | extern void efi_call_phys_prelog(void); |
diff --git a/arch/x86/include/asm/uv/uv.h b/arch/x86/include/asm/uv/uv.h index b47c2a82ff15..062921ef34e9 100644 --- a/arch/x86/include/asm/uv/uv.h +++ b/arch/x86/include/asm/uv/uv.h | |||
| @@ -16,7 +16,7 @@ extern void uv_system_init(void); | |||
| 16 | extern const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask, | 16 | extern const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask, |
| 17 | struct mm_struct *mm, | 17 | struct mm_struct *mm, |
| 18 | unsigned long start, | 18 | unsigned long start, |
| 19 | unsigned end, | 19 | unsigned long end, |
| 20 | unsigned int cpu); | 20 | unsigned int cpu); |
| 21 | 21 | ||
| 22 | #else /* X86_UV */ | 22 | #else /* X86_UV */ |
diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h index 92862cd90201..c15ddaf90710 100644 --- a/arch/x86/include/uapi/asm/bootparam.h +++ b/arch/x86/include/uapi/asm/bootparam.h | |||
| @@ -1,6 +1,31 @@ | |||
| 1 | #ifndef _ASM_X86_BOOTPARAM_H | 1 | #ifndef _ASM_X86_BOOTPARAM_H |
| 2 | #define _ASM_X86_BOOTPARAM_H | 2 | #define _ASM_X86_BOOTPARAM_H |
| 3 | 3 | ||
| 4 | /* setup_data types */ | ||
| 5 | #define SETUP_NONE 0 | ||
| 6 | #define SETUP_E820_EXT 1 | ||
| 7 | #define SETUP_DTB 2 | ||
| 8 | #define SETUP_PCI 3 | ||
| 9 | |||
| 10 | /* ram_size flags */ | ||
| 11 | #define RAMDISK_IMAGE_START_MASK 0x07FF | ||
| 12 | #define RAMDISK_PROMPT_FLAG 0x8000 | ||
| 13 | #define RAMDISK_LOAD_FLAG 0x4000 | ||
| 14 | |||
| 15 | /* loadflags */ | ||
| 16 | #define LOADED_HIGH (1<<0) | ||
| 17 | #define QUIET_FLAG (1<<5) | ||
| 18 | #define KEEP_SEGMENTS (1<<6) | ||
| 19 | #define CAN_USE_HEAP (1<<7) | ||
| 20 | |||
| 21 | /* xloadflags */ | ||
| 22 | #define XLF_KERNEL_64 (1<<0) | ||
| 23 | #define XLF_CAN_BE_LOADED_ABOVE_4G (1<<1) | ||
| 24 | #define XLF_EFI_HANDOVER_32 (1<<2) | ||
| 25 | #define XLF_EFI_HANDOVER_64 (1<<3) | ||
| 26 | |||
| 27 | #ifndef __ASSEMBLY__ | ||
| 28 | |||
| 4 | #include <linux/types.h> | 29 | #include <linux/types.h> |
| 5 | #include <linux/screen_info.h> | 30 | #include <linux/screen_info.h> |
| 6 | #include <linux/apm_bios.h> | 31 | #include <linux/apm_bios.h> |
| @@ -9,12 +34,6 @@ | |||
| 9 | #include <asm/ist.h> | 34 | #include <asm/ist.h> |
| 10 | #include <video/edid.h> | 35 | #include <video/edid.h> |
| 11 | 36 | ||
| 12 | /* setup data types */ | ||
| 13 | #define SETUP_NONE 0 | ||
| 14 | #define SETUP_E820_EXT 1 | ||
| 15 | #define SETUP_DTB 2 | ||
| 16 | #define SETUP_PCI 3 | ||
| 17 | |||
| 18 | /* extensible setup data list node */ | 37 | /* extensible setup data list node */ |
| 19 | struct setup_data { | 38 | struct setup_data { |
| 20 | __u64 next; | 39 | __u64 next; |
| @@ -28,9 +47,6 @@ struct setup_header { | |||
| 28 | __u16 root_flags; | 47 | __u16 root_flags; |
| 29 | __u32 syssize; | 48 | __u32 syssize; |
| 30 | __u16 ram_size; | 49 | __u16 ram_size; |
| 31 | #define RAMDISK_IMAGE_START_MASK 0x07FF | ||
| 32 | #define RAMDISK_PROMPT_FLAG 0x8000 | ||
| 33 | #define RAMDISK_LOAD_FLAG 0x4000 | ||
| 34 | __u16 vid_mode; | 50 | __u16 vid_mode; |
| 35 | __u16 root_dev; | 51 | __u16 root_dev; |
| 36 | __u16 boot_flag; | 52 | __u16 boot_flag; |
| @@ -42,10 +58,6 @@ struct setup_header { | |||
| 42 | __u16 kernel_version; | 58 | __u16 kernel_version; |
| 43 | __u8 type_of_loader; | 59 | __u8 type_of_loader; |
| 44 | __u8 loadflags; | 60 | __u8 loadflags; |
| 45 | #define LOADED_HIGH (1<<0) | ||
| 46 | #define QUIET_FLAG (1<<5) | ||
| 47 | #define KEEP_SEGMENTS (1<<6) | ||
| 48 | #define CAN_USE_HEAP (1<<7) | ||
| 49 | __u16 setup_move_size; | 61 | __u16 setup_move_size; |
| 50 | __u32 code32_start; | 62 | __u32 code32_start; |
| 51 | __u32 ramdisk_image; | 63 | __u32 ramdisk_image; |
| @@ -58,7 +70,8 @@ struct setup_header { | |||
| 58 | __u32 initrd_addr_max; | 70 | __u32 initrd_addr_max; |
| 59 | __u32 kernel_alignment; | 71 | __u32 kernel_alignment; |
| 60 | __u8 relocatable_kernel; | 72 | __u8 relocatable_kernel; |
| 61 | __u8 _pad2[3]; | 73 | __u8 min_alignment; |
| 74 | __u16 xloadflags; | ||
| 62 | __u32 cmdline_size; | 75 | __u32 cmdline_size; |
| 63 | __u32 hardware_subarch; | 76 | __u32 hardware_subarch; |
| 64 | __u64 hardware_subarch_data; | 77 | __u64 hardware_subarch_data; |
| @@ -106,7 +119,10 @@ struct boot_params { | |||
| 106 | __u8 hd1_info[16]; /* obsolete! */ /* 0x090 */ | 119 | __u8 hd1_info[16]; /* obsolete! */ /* 0x090 */ |
| 107 | struct sys_desc_table sys_desc_table; /* 0x0a0 */ | 120 | struct sys_desc_table sys_desc_table; /* 0x0a0 */ |
| 108 | struct olpc_ofw_header olpc_ofw_header; /* 0x0b0 */ | 121 | struct olpc_ofw_header olpc_ofw_header; /* 0x0b0 */ |
| 109 | __u8 _pad4[128]; /* 0x0c0 */ | 122 | __u32 ext_ramdisk_image; /* 0x0c0 */ |
| 123 | __u32 ext_ramdisk_size; /* 0x0c4 */ | ||
| 124 | __u32 ext_cmd_line_ptr; /* 0x0c8 */ | ||
| 125 | __u8 _pad4[116]; /* 0x0cc */ | ||
| 110 | struct edid_info edid_info; /* 0x140 */ | 126 | struct edid_info edid_info; /* 0x140 */ |
| 111 | struct efi_info efi_info; /* 0x1c0 */ | 127 | struct efi_info efi_info; /* 0x1c0 */ |
| 112 | __u32 alt_mem_k; /* 0x1e0 */ | 128 | __u32 alt_mem_k; /* 0x1e0 */ |
| @@ -115,7 +131,20 @@ struct boot_params { | |||
| 115 | __u8 eddbuf_entries; /* 0x1e9 */ | 131 | __u8 eddbuf_entries; /* 0x1e9 */ |
| 116 | __u8 edd_mbr_sig_buf_entries; /* 0x1ea */ | 132 | __u8 edd_mbr_sig_buf_entries; /* 0x1ea */ |
| 117 | __u8 kbd_status; /* 0x1eb */ | 133 | __u8 kbd_status; /* 0x1eb */ |
| 118 | __u8 _pad6[5]; /* 0x1ec */ | 134 | __u8 _pad5[3]; /* 0x1ec */ |
| 135 | /* | ||
| 136 | * The sentinel is set to a nonzero value (0xff) in header.S. | ||
| 137 | * | ||
| 138 | * A bootloader is supposed to only take setup_header and put | ||
| 139 | * it into a clean boot_params buffer. If it turns out that | ||
| 140 | * it is clumsy or too generous with the buffer, it most | ||
| 141 | * probably will pick up the sentinel variable too. The fact | ||
| 142 | * that this variable then is still 0xff will let kernel | ||
| 143 | * know that some variables in boot_params are invalid and | ||
| 144 | * kernel should zero out certain portions of boot_params. | ||
| 145 | */ | ||
| 146 | __u8 sentinel; /* 0x1ef */ | ||
| 147 | __u8 _pad6[1]; /* 0x1f0 */ | ||
| 119 | struct setup_header hdr; /* setup header */ /* 0x1f1 */ | 148 | struct setup_header hdr; /* setup header */ /* 0x1f1 */ |
| 120 | __u8 _pad7[0x290-0x1f1-sizeof(struct setup_header)]; | 149 | __u8 _pad7[0x290-0x1f1-sizeof(struct setup_header)]; |
| 121 | __u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX]; /* 0x290 */ | 150 | __u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX]; /* 0x290 */ |
| @@ -134,6 +163,6 @@ enum { | |||
| 134 | X86_NR_SUBARCHS, | 163 | X86_NR_SUBARCHS, |
| 135 | }; | 164 | }; |
| 136 | 165 | ||
| 137 | 166 | #endif /* __ASSEMBLY__ */ | |
| 138 | 167 | ||
| 139 | #endif /* _ASM_X86_BOOTPARAM_H */ | 168 | #endif /* _ASM_X86_BOOTPARAM_H */ |
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index 93b9e1181f83..4914e94ad6e8 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c | |||
| @@ -2019,7 +2019,10 @@ __init int intel_pmu_init(void) | |||
| 2019 | break; | 2019 | break; |
| 2020 | 2020 | ||
| 2021 | case 28: /* Atom */ | 2021 | case 28: /* Atom */ |
| 2022 | case 54: /* Cedariew */ | 2022 | case 38: /* Lincroft */ |
| 2023 | case 39: /* Penwell */ | ||
| 2024 | case 53: /* Cloverview */ | ||
| 2025 | case 54: /* Cedarview */ | ||
| 2023 | memcpy(hw_cache_event_ids, atom_hw_cache_event_ids, | 2026 | memcpy(hw_cache_event_ids, atom_hw_cache_event_ids, |
| 2024 | sizeof(hw_cache_event_ids)); | 2027 | sizeof(hw_cache_event_ids)); |
| 2025 | 2028 | ||
| @@ -2084,6 +2087,7 @@ __init int intel_pmu_init(void) | |||
| 2084 | pr_cont("SandyBridge events, "); | 2087 | pr_cont("SandyBridge events, "); |
| 2085 | break; | 2088 | break; |
| 2086 | case 58: /* IvyBridge */ | 2089 | case 58: /* IvyBridge */ |
| 2090 | case 62: /* IvyBridge EP */ | ||
| 2087 | memcpy(hw_cache_event_ids, snb_hw_cache_event_ids, | 2091 | memcpy(hw_cache_event_ids, snb_hw_cache_event_ids, |
| 2088 | sizeof(hw_cache_event_ids)); | 2092 | sizeof(hw_cache_event_ids)); |
| 2089 | memcpy(hw_cache_extra_regs, snb_hw_cache_extra_regs, | 2093 | memcpy(hw_cache_extra_regs, snb_hw_cache_extra_regs, |
diff --git a/arch/x86/kernel/cpu/perf_event_p6.c b/arch/x86/kernel/cpu/perf_event_p6.c index f2af39f5dc3d..4820c232a0b9 100644 --- a/arch/x86/kernel/cpu/perf_event_p6.c +++ b/arch/x86/kernel/cpu/perf_event_p6.c | |||
| @@ -19,7 +19,7 @@ static const u64 p6_perfmon_event_map[] = | |||
| 19 | 19 | ||
| 20 | }; | 20 | }; |
| 21 | 21 | ||
| 22 | static __initconst u64 p6_hw_cache_event_ids | 22 | static u64 p6_hw_cache_event_ids |
| 23 | [PERF_COUNT_HW_CACHE_MAX] | 23 | [PERF_COUNT_HW_CACHE_MAX] |
| 24 | [PERF_COUNT_HW_CACHE_OP_MAX] | 24 | [PERF_COUNT_HW_CACHE_OP_MAX] |
| 25 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = | 25 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = |
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 07a7a04529bc..cb3c591339aa 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
| @@ -1781,6 +1781,7 @@ first_nmi: | |||
| 1781 | * Leave room for the "copied" frame | 1781 | * Leave room for the "copied" frame |
| 1782 | */ | 1782 | */ |
| 1783 | subq $(5*8), %rsp | 1783 | subq $(5*8), %rsp |
| 1784 | CFI_ADJUST_CFA_OFFSET 5*8 | ||
| 1784 | 1785 | ||
| 1785 | /* Copy the stack frame to the Saved frame */ | 1786 | /* Copy the stack frame to the Saved frame */ |
| 1786 | .rept 5 | 1787 | .rept 5 |
| @@ -1863,10 +1864,8 @@ end_repeat_nmi: | |||
| 1863 | nmi_swapgs: | 1864 | nmi_swapgs: |
| 1864 | SWAPGS_UNSAFE_STACK | 1865 | SWAPGS_UNSAFE_STACK |
| 1865 | nmi_restore: | 1866 | nmi_restore: |
| 1866 | RESTORE_ALL 8 | 1867 | /* Pop the extra iret frame at once */ |
| 1867 | 1868 | RESTORE_ALL 6*8 | |
| 1868 | /* Pop the extra iret frame */ | ||
| 1869 | addq $(5*8), %rsp | ||
| 1870 | 1869 | ||
| 1871 | /* Clear the NMI executing stack variable */ | 1870 | /* Clear the NMI executing stack variable */ |
| 1872 | movq $0, 5*8(%rsp) | 1871 | movq $0, 5*8(%rsp) |
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index 8e7f6556028f..c8932c79e78b 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S | |||
| @@ -300,6 +300,12 @@ ENTRY(startup_32_smp) | |||
| 300 | leal -__PAGE_OFFSET(%ecx),%esp | 300 | leal -__PAGE_OFFSET(%ecx),%esp |
| 301 | 301 | ||
| 302 | default_entry: | 302 | default_entry: |
| 303 | #define CR0_STATE (X86_CR0_PE | X86_CR0_MP | X86_CR0_ET | \ | ||
| 304 | X86_CR0_NE | X86_CR0_WP | X86_CR0_AM | \ | ||
| 305 | X86_CR0_PG) | ||
| 306 | movl $(CR0_STATE & ~X86_CR0_PG),%eax | ||
| 307 | movl %eax,%cr0 | ||
| 308 | |||
| 303 | /* | 309 | /* |
| 304 | * New page tables may be in 4Mbyte page mode and may | 310 | * New page tables may be in 4Mbyte page mode and may |
| 305 | * be using the global pages. | 311 | * be using the global pages. |
| @@ -364,8 +370,7 @@ default_entry: | |||
| 364 | */ | 370 | */ |
| 365 | movl $pa(initial_page_table), %eax | 371 | movl $pa(initial_page_table), %eax |
| 366 | movl %eax,%cr3 /* set the page table pointer.. */ | 372 | movl %eax,%cr3 /* set the page table pointer.. */ |
| 367 | movl %cr0,%eax | 373 | movl $CR0_STATE,%eax |
| 368 | orl $X86_CR0_PG,%eax | ||
| 369 | movl %eax,%cr0 /* ..and set paging (PG) bit */ | 374 | movl %eax,%cr0 /* ..and set paging (PG) bit */ |
| 370 | ljmp $__BOOT_CS,$1f /* Clear prefetch and normalize %eip */ | 375 | ljmp $__BOOT_CS,$1f /* Clear prefetch and normalize %eip */ |
| 371 | 1: | 376 | 1: |
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c index a7c5661f8496..4929502c1372 100644 --- a/arch/x86/kernel/msr.c +++ b/arch/x86/kernel/msr.c | |||
| @@ -174,6 +174,9 @@ static int msr_open(struct inode *inode, struct file *file) | |||
| 174 | unsigned int cpu; | 174 | unsigned int cpu; |
| 175 | struct cpuinfo_x86 *c; | 175 | struct cpuinfo_x86 *c; |
| 176 | 176 | ||
| 177 | if (!capable(CAP_SYS_RAWIO)) | ||
| 178 | return -EPERM; | ||
| 179 | |||
| 177 | cpu = iminor(file->f_path.dentry->d_inode); | 180 | cpu = iminor(file->f_path.dentry->d_inode); |
| 178 | if (cpu >= nr_cpu_ids || !cpu_online(cpu)) | 181 | if (cpu >= nr_cpu_ids || !cpu_online(cpu)) |
| 179 | return -ENXIO; /* No such CPU */ | 182 | return -ENXIO; /* No such CPU */ |
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 0f5dec5c80e0..872079a67e4d 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
| @@ -56,7 +56,7 @@ struct device x86_dma_fallback_dev = { | |||
| 56 | EXPORT_SYMBOL(x86_dma_fallback_dev); | 56 | EXPORT_SYMBOL(x86_dma_fallback_dev); |
| 57 | 57 | ||
| 58 | /* Number of entries preallocated for DMA-API debugging */ | 58 | /* Number of entries preallocated for DMA-API debugging */ |
| 59 | #define PREALLOC_DMA_DEBUG_ENTRIES 32768 | 59 | #define PREALLOC_DMA_DEBUG_ENTRIES 65536 |
| 60 | 60 | ||
| 61 | int dma_set_mask(struct device *dev, u64 mask) | 61 | int dma_set_mask(struct device *dev, u64 mask) |
| 62 | { | 62 | { |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 4e8ba39eaf0f..76fa1e9a2b39 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
| @@ -584,7 +584,7 @@ static void native_machine_emergency_restart(void) | |||
| 584 | break; | 584 | break; |
| 585 | 585 | ||
| 586 | case BOOT_EFI: | 586 | case BOOT_EFI: |
| 587 | if (efi_enabled) | 587 | if (efi_enabled(EFI_RUNTIME_SERVICES)) |
| 588 | efi.reset_system(reboot_mode ? | 588 | efi.reset_system(reboot_mode ? |
| 589 | EFI_RESET_WARM : | 589 | EFI_RESET_WARM : |
| 590 | EFI_RESET_COLD, | 590 | EFI_RESET_COLD, |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 00f6c1472b85..8b24289cc10c 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
| @@ -807,15 +807,15 @@ void __init setup_arch(char **cmdline_p) | |||
| 807 | #ifdef CONFIG_EFI | 807 | #ifdef CONFIG_EFI |
| 808 | if (!strncmp((char *)&boot_params.efi_info.efi_loader_signature, | 808 | if (!strncmp((char *)&boot_params.efi_info.efi_loader_signature, |
| 809 | "EL32", 4)) { | 809 | "EL32", 4)) { |
| 810 | efi_enabled = 1; | 810 | set_bit(EFI_BOOT, &x86_efi_facility); |
| 811 | efi_64bit = false; | ||
| 812 | } else if (!strncmp((char *)&boot_params.efi_info.efi_loader_signature, | 811 | } else if (!strncmp((char *)&boot_params.efi_info.efi_loader_signature, |
| 813 | "EL64", 4)) { | 812 | "EL64", 4)) { |
| 814 | efi_enabled = 1; | 813 | set_bit(EFI_BOOT, &x86_efi_facility); |
| 815 | efi_64bit = true; | 814 | set_bit(EFI_64BIT, &x86_efi_facility); |
| 816 | } | 815 | } |
| 817 | if (efi_enabled && efi_memblock_x86_reserve_range()) | 816 | |
| 818 | efi_enabled = 0; | 817 | if (efi_enabled(EFI_BOOT)) |
| 818 | efi_memblock_x86_reserve_range(); | ||
| 819 | #endif | 819 | #endif |
| 820 | 820 | ||
| 821 | x86_init.oem.arch_setup(); | 821 | x86_init.oem.arch_setup(); |
| @@ -888,7 +888,7 @@ void __init setup_arch(char **cmdline_p) | |||
| 888 | 888 | ||
| 889 | finish_e820_parsing(); | 889 | finish_e820_parsing(); |
| 890 | 890 | ||
| 891 | if (efi_enabled) | 891 | if (efi_enabled(EFI_BOOT)) |
| 892 | efi_init(); | 892 | efi_init(); |
| 893 | 893 | ||
| 894 | dmi_scan_machine(); | 894 | dmi_scan_machine(); |
| @@ -971,7 +971,7 @@ void __init setup_arch(char **cmdline_p) | |||
| 971 | * The EFI specification says that boot service code won't be called | 971 | * The EFI specification says that boot service code won't be called |
| 972 | * after ExitBootServices(). This is, in fact, a lie. | 972 | * after ExitBootServices(). This is, in fact, a lie. |
| 973 | */ | 973 | */ |
| 974 | if (efi_enabled) | 974 | if (efi_enabled(EFI_MEMMAP)) |
| 975 | efi_reserve_boot_services(); | 975 | efi_reserve_boot_services(); |
| 976 | 976 | ||
| 977 | /* preallocate 4k for mptable mpc */ | 977 | /* preallocate 4k for mptable mpc */ |
| @@ -1114,7 +1114,7 @@ void __init setup_arch(char **cmdline_p) | |||
| 1114 | 1114 | ||
| 1115 | #ifdef CONFIG_VT | 1115 | #ifdef CONFIG_VT |
| 1116 | #if defined(CONFIG_VGA_CONSOLE) | 1116 | #if defined(CONFIG_VGA_CONSOLE) |
| 1117 | if (!efi_enabled || (efi_mem_type(0xa0000) != EFI_CONVENTIONAL_MEMORY)) | 1117 | if (!efi_enabled(EFI_BOOT) || (efi_mem_type(0xa0000) != EFI_CONVENTIONAL_MEMORY)) |
| 1118 | conswitchp = &vga_con; | 1118 | conswitchp = &vga_con; |
| 1119 | #elif defined(CONFIG_DUMMY_CONSOLE) | 1119 | #elif defined(CONFIG_DUMMY_CONSOLE) |
| 1120 | conswitchp = &dummy_con; | 1120 | conswitchp = &dummy_con; |
| @@ -1131,14 +1131,14 @@ void __init setup_arch(char **cmdline_p) | |||
| 1131 | register_refined_jiffies(CLOCK_TICK_RATE); | 1131 | register_refined_jiffies(CLOCK_TICK_RATE); |
| 1132 | 1132 | ||
| 1133 | #ifdef CONFIG_EFI | 1133 | #ifdef CONFIG_EFI |
| 1134 | /* Once setup is done above, disable efi_enabled on mismatched | 1134 | /* Once setup is done above, unmap the EFI memory map on |
| 1135 | * firmware/kernel archtectures since there is no support for | 1135 | * mismatched firmware/kernel archtectures since there is no |
| 1136 | * runtime services. | 1136 | * support for runtime services. |
| 1137 | */ | 1137 | */ |
| 1138 | if (efi_enabled && IS_ENABLED(CONFIG_X86_64) != efi_64bit) { | 1138 | if (efi_enabled(EFI_BOOT) && |
| 1139 | IS_ENABLED(CONFIG_X86_64) != efi_enabled(EFI_64BIT)) { | ||
| 1139 | pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n"); | 1140 | pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n"); |
| 1140 | efi_unmap_memmap(); | 1141 | efi_unmap_memmap(); |
| 1141 | efi_enabled = 0; | ||
| 1142 | } | 1142 | } |
| 1143 | #endif | 1143 | #endif |
| 1144 | } | 1144 | } |
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index ad4439145f85..77cf0090c0a3 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c | |||
| @@ -51,9 +51,6 @@ | |||
| 51 | 51 | ||
| 52 | #define EFI_DEBUG 1 | 52 | #define EFI_DEBUG 1 |
| 53 | 53 | ||
| 54 | int efi_enabled; | ||
| 55 | EXPORT_SYMBOL(efi_enabled); | ||
| 56 | |||
| 57 | struct efi __read_mostly efi = { | 54 | struct efi __read_mostly efi = { |
| 58 | .mps = EFI_INVALID_TABLE_ADDR, | 55 | .mps = EFI_INVALID_TABLE_ADDR, |
| 59 | .acpi = EFI_INVALID_TABLE_ADDR, | 56 | .acpi = EFI_INVALID_TABLE_ADDR, |
| @@ -69,19 +66,28 @@ EXPORT_SYMBOL(efi); | |||
| 69 | 66 | ||
| 70 | struct efi_memory_map memmap; | 67 | struct efi_memory_map memmap; |
| 71 | 68 | ||
| 72 | bool efi_64bit; | ||
| 73 | |||
| 74 | static struct efi efi_phys __initdata; | 69 | static struct efi efi_phys __initdata; |
| 75 | static efi_system_table_t efi_systab __initdata; | 70 | static efi_system_table_t efi_systab __initdata; |
| 76 | 71 | ||
| 77 | static inline bool efi_is_native(void) | 72 | static inline bool efi_is_native(void) |
| 78 | { | 73 | { |
| 79 | return IS_ENABLED(CONFIG_X86_64) == efi_64bit; | 74 | return IS_ENABLED(CONFIG_X86_64) == efi_enabled(EFI_64BIT); |
| 75 | } | ||
| 76 | |||
| 77 | unsigned long x86_efi_facility; | ||
| 78 | |||
| 79 | /* | ||
| 80 | * Returns 1 if 'facility' is enabled, 0 otherwise. | ||
| 81 | */ | ||
| 82 | int efi_enabled(int facility) | ||
| 83 | { | ||
| 84 | return test_bit(facility, &x86_efi_facility) != 0; | ||
| 80 | } | 85 | } |
| 86 | EXPORT_SYMBOL(efi_enabled); | ||
| 81 | 87 | ||
| 82 | static int __init setup_noefi(char *arg) | 88 | static int __init setup_noefi(char *arg) |
| 83 | { | 89 | { |
| 84 | efi_enabled = 0; | 90 | clear_bit(EFI_BOOT, &x86_efi_facility); |
| 85 | return 0; | 91 | return 0; |
| 86 | } | 92 | } |
| 87 | early_param("noefi", setup_noefi); | 93 | early_param("noefi", setup_noefi); |
| @@ -426,6 +432,7 @@ void __init efi_reserve_boot_services(void) | |||
| 426 | 432 | ||
| 427 | void __init efi_unmap_memmap(void) | 433 | void __init efi_unmap_memmap(void) |
| 428 | { | 434 | { |
| 435 | clear_bit(EFI_MEMMAP, &x86_efi_facility); | ||
| 429 | if (memmap.map) { | 436 | if (memmap.map) { |
| 430 | early_iounmap(memmap.map, memmap.nr_map * memmap.desc_size); | 437 | early_iounmap(memmap.map, memmap.nr_map * memmap.desc_size); |
| 431 | memmap.map = NULL; | 438 | memmap.map = NULL; |
| @@ -460,7 +467,7 @@ void __init efi_free_boot_services(void) | |||
| 460 | 467 | ||
| 461 | static int __init efi_systab_init(void *phys) | 468 | static int __init efi_systab_init(void *phys) |
| 462 | { | 469 | { |
| 463 | if (efi_64bit) { | 470 | if (efi_enabled(EFI_64BIT)) { |
| 464 | efi_system_table_64_t *systab64; | 471 | efi_system_table_64_t *systab64; |
| 465 | u64 tmp = 0; | 472 | u64 tmp = 0; |
| 466 | 473 | ||
| @@ -552,7 +559,7 @@ static int __init efi_config_init(u64 tables, int nr_tables) | |||
| 552 | void *config_tables, *tablep; | 559 | void *config_tables, *tablep; |
| 553 | int i, sz; | 560 | int i, sz; |
| 554 | 561 | ||
| 555 | if (efi_64bit) | 562 | if (efi_enabled(EFI_64BIT)) |
| 556 | sz = sizeof(efi_config_table_64_t); | 563 | sz = sizeof(efi_config_table_64_t); |
| 557 | else | 564 | else |
| 558 | sz = sizeof(efi_config_table_32_t); | 565 | sz = sizeof(efi_config_table_32_t); |
| @@ -572,7 +579,7 @@ static int __init efi_config_init(u64 tables, int nr_tables) | |||
| 572 | efi_guid_t guid; | 579 | efi_guid_t guid; |
| 573 | unsigned long table; | 580 | unsigned long table; |
| 574 | 581 | ||
| 575 | if (efi_64bit) { | 582 | if (efi_enabled(EFI_64BIT)) { |
| 576 | u64 table64; | 583 | u64 table64; |
| 577 | guid = ((efi_config_table_64_t *)tablep)->guid; | 584 | guid = ((efi_config_table_64_t *)tablep)->guid; |
| 578 | table64 = ((efi_config_table_64_t *)tablep)->table; | 585 | table64 = ((efi_config_table_64_t *)tablep)->table; |
| @@ -684,7 +691,6 @@ void __init efi_init(void) | |||
| 684 | if (boot_params.efi_info.efi_systab_hi || | 691 | if (boot_params.efi_info.efi_systab_hi || |
| 685 | boot_params.efi_info.efi_memmap_hi) { | 692 | boot_params.efi_info.efi_memmap_hi) { |
| 686 | pr_info("Table located above 4GB, disabling EFI.\n"); | 693 | pr_info("Table located above 4GB, disabling EFI.\n"); |
| 687 | efi_enabled = 0; | ||
| 688 | return; | 694 | return; |
| 689 | } | 695 | } |
| 690 | efi_phys.systab = (efi_system_table_t *)boot_params.efi_info.efi_systab; | 696 | efi_phys.systab = (efi_system_table_t *)boot_params.efi_info.efi_systab; |
| @@ -694,10 +700,10 @@ void __init efi_init(void) | |||
| 694 | ((__u64)boot_params.efi_info.efi_systab_hi<<32)); | 700 | ((__u64)boot_params.efi_info.efi_systab_hi<<32)); |
| 695 | #endif | 701 | #endif |
| 696 | 702 | ||
| 697 | if (efi_systab_init(efi_phys.systab)) { | 703 | if (efi_systab_init(efi_phys.systab)) |
| 698 | efi_enabled = 0; | ||
| 699 | return; | 704 | return; |
| 700 | } | 705 | |
| 706 | set_bit(EFI_SYSTEM_TABLES, &x86_efi_facility); | ||
| 701 | 707 | ||
| 702 | /* | 708 | /* |
| 703 | * Show what we know for posterity | 709 | * Show what we know for posterity |
| @@ -715,10 +721,10 @@ void __init efi_init(void) | |||
| 715 | efi.systab->hdr.revision >> 16, | 721 | efi.systab->hdr.revision >> 16, |
| 716 | efi.systab->hdr.revision & 0xffff, vendor); | 722 | efi.systab->hdr.revision & 0xffff, vendor); |
| 717 | 723 | ||
| 718 | if (efi_config_init(efi.systab->tables, efi.systab->nr_tables)) { | 724 | if (efi_config_init(efi.systab->tables, efi.systab->nr_tables)) |
| 719 | efi_enabled = 0; | ||
| 720 | return; | 725 | return; |
| 721 | } | 726 | |
| 727 | set_bit(EFI_CONFIG_TABLES, &x86_efi_facility); | ||
| 722 | 728 | ||
| 723 | /* | 729 | /* |
| 724 | * Note: We currently don't support runtime services on an EFI | 730 | * Note: We currently don't support runtime services on an EFI |
| @@ -727,15 +733,17 @@ void __init efi_init(void) | |||
| 727 | 733 | ||
| 728 | if (!efi_is_native()) | 734 | if (!efi_is_native()) |
| 729 | pr_info("No EFI runtime due to 32/64-bit mismatch with kernel\n"); | 735 | pr_info("No EFI runtime due to 32/64-bit mismatch with kernel\n"); |
| 730 | else if (efi_runtime_init()) { | 736 | else { |
| 731 | efi_enabled = 0; | 737 | if (efi_runtime_init()) |
| 732 | return; | 738 | return; |
| 739 | set_bit(EFI_RUNTIME_SERVICES, &x86_efi_facility); | ||
| 733 | } | 740 | } |
| 734 | 741 | ||
| 735 | if (efi_memmap_init()) { | 742 | if (efi_memmap_init()) |
| 736 | efi_enabled = 0; | ||
| 737 | return; | 743 | return; |
| 738 | } | 744 | |
| 745 | set_bit(EFI_MEMMAP, &x86_efi_facility); | ||
| 746 | |||
| 739 | #ifdef CONFIG_X86_32 | 747 | #ifdef CONFIG_X86_32 |
| 740 | if (efi_is_native()) { | 748 | if (efi_is_native()) { |
| 741 | x86_platform.get_wallclock = efi_get_time; | 749 | x86_platform.get_wallclock = efi_get_time; |
| @@ -941,7 +949,7 @@ void __init efi_enter_virtual_mode(void) | |||
| 941 | * | 949 | * |
| 942 | * Call EFI services through wrapper functions. | 950 | * Call EFI services through wrapper functions. |
| 943 | */ | 951 | */ |
| 944 | efi.runtime_version = efi_systab.fw_revision; | 952 | efi.runtime_version = efi_systab.hdr.revision; |
| 945 | efi.get_time = virt_efi_get_time; | 953 | efi.get_time = virt_efi_get_time; |
| 946 | efi.set_time = virt_efi_set_time; | 954 | efi.set_time = virt_efi_set_time; |
| 947 | efi.get_wakeup_time = virt_efi_get_wakeup_time; | 955 | efi.get_wakeup_time = virt_efi_get_wakeup_time; |
| @@ -969,6 +977,9 @@ u32 efi_mem_type(unsigned long phys_addr) | |||
| 969 | efi_memory_desc_t *md; | 977 | efi_memory_desc_t *md; |
| 970 | void *p; | 978 | void *p; |
| 971 | 979 | ||
| 980 | if (!efi_enabled(EFI_MEMMAP)) | ||
| 981 | return 0; | ||
| 982 | |||
| 972 | for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { | 983 | for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { |
| 973 | md = p; | 984 | md = p; |
| 974 | if ((md->phys_addr <= phys_addr) && | 985 | if ((md->phys_addr <= phys_addr) && |
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c index 95fd505dfeb6..2b2003860615 100644 --- a/arch/x86/platform/efi/efi_64.c +++ b/arch/x86/platform/efi/efi_64.c | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | #include <asm/cacheflush.h> | 38 | #include <asm/cacheflush.h> |
| 39 | #include <asm/fixmap.h> | 39 | #include <asm/fixmap.h> |
| 40 | 40 | ||
| 41 | static pgd_t save_pgd __initdata; | 41 | static pgd_t *save_pgd __initdata; |
| 42 | static unsigned long efi_flags __initdata; | 42 | static unsigned long efi_flags __initdata; |
| 43 | 43 | ||
| 44 | static void __init early_code_mapping_set_exec(int executable) | 44 | static void __init early_code_mapping_set_exec(int executable) |
| @@ -61,12 +61,20 @@ static void __init early_code_mapping_set_exec(int executable) | |||
| 61 | void __init efi_call_phys_prelog(void) | 61 | void __init efi_call_phys_prelog(void) |
| 62 | { | 62 | { |
| 63 | unsigned long vaddress; | 63 | unsigned long vaddress; |
| 64 | int pgd; | ||
| 65 | int n_pgds; | ||
| 64 | 66 | ||
| 65 | early_code_mapping_set_exec(1); | 67 | early_code_mapping_set_exec(1); |
| 66 | local_irq_save(efi_flags); | 68 | local_irq_save(efi_flags); |
| 67 | vaddress = (unsigned long)__va(0x0UL); | 69 | |
| 68 | save_pgd = *pgd_offset_k(0x0UL); | 70 | n_pgds = DIV_ROUND_UP((max_pfn << PAGE_SHIFT), PGDIR_SIZE); |
| 69 | set_pgd(pgd_offset_k(0x0UL), *pgd_offset_k(vaddress)); | 71 | save_pgd = kmalloc(n_pgds * sizeof(pgd_t), GFP_KERNEL); |
| 72 | |||
| 73 | for (pgd = 0; pgd < n_pgds; pgd++) { | ||
| 74 | save_pgd[pgd] = *pgd_offset_k(pgd * PGDIR_SIZE); | ||
| 75 | vaddress = (unsigned long)__va(pgd * PGDIR_SIZE); | ||
| 76 | set_pgd(pgd_offset_k(pgd * PGDIR_SIZE), *pgd_offset_k(vaddress)); | ||
| 77 | } | ||
| 70 | __flush_tlb_all(); | 78 | __flush_tlb_all(); |
| 71 | } | 79 | } |
| 72 | 80 | ||
| @@ -75,7 +83,11 @@ void __init efi_call_phys_epilog(void) | |||
| 75 | /* | 83 | /* |
| 76 | * After the lock is released, the original page table is restored. | 84 | * After the lock is released, the original page table is restored. |
| 77 | */ | 85 | */ |
| 78 | set_pgd(pgd_offset_k(0x0UL), save_pgd); | 86 | int pgd; |
| 87 | int n_pgds = DIV_ROUND_UP((max_pfn << PAGE_SHIFT) , PGDIR_SIZE); | ||
| 88 | for (pgd = 0; pgd < n_pgds; pgd++) | ||
| 89 | set_pgd(pgd_offset_k(pgd * PGDIR_SIZE), save_pgd[pgd]); | ||
| 90 | kfree(save_pgd); | ||
| 79 | __flush_tlb_all(); | 91 | __flush_tlb_all(); |
| 80 | local_irq_restore(efi_flags); | 92 | local_irq_restore(efi_flags); |
| 81 | early_code_mapping_set_exec(0); | 93 | early_code_mapping_set_exec(0); |
diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c index b8b3a37c80cd..dbbdca5f508c 100644 --- a/arch/x86/platform/uv/tlb_uv.c +++ b/arch/x86/platform/uv/tlb_uv.c | |||
| @@ -1034,7 +1034,8 @@ static int set_distrib_bits(struct cpumask *flush_mask, struct bau_control *bcp, | |||
| 1034 | * globally purge translation cache of a virtual address or all TLB's | 1034 | * globally purge translation cache of a virtual address or all TLB's |
| 1035 | * @cpumask: mask of all cpu's in which the address is to be removed | 1035 | * @cpumask: mask of all cpu's in which the address is to be removed |
| 1036 | * @mm: mm_struct containing virtual address range | 1036 | * @mm: mm_struct containing virtual address range |
| 1037 | * @va: virtual address to be removed (or TLB_FLUSH_ALL for all TLB's on cpu) | 1037 | * @start: start virtual address to be removed from TLB |
| 1038 | * @end: end virtual address to be remove from TLB | ||
| 1038 | * @cpu: the current cpu | 1039 | * @cpu: the current cpu |
| 1039 | * | 1040 | * |
| 1040 | * This is the entry point for initiating any UV global TLB shootdown. | 1041 | * This is the entry point for initiating any UV global TLB shootdown. |
| @@ -1056,7 +1057,7 @@ static int set_distrib_bits(struct cpumask *flush_mask, struct bau_control *bcp, | |||
| 1056 | */ | 1057 | */ |
| 1057 | const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask, | 1058 | const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask, |
| 1058 | struct mm_struct *mm, unsigned long start, | 1059 | struct mm_struct *mm, unsigned long start, |
| 1059 | unsigned end, unsigned int cpu) | 1060 | unsigned long end, unsigned int cpu) |
| 1060 | { | 1061 | { |
| 1061 | int locals = 0; | 1062 | int locals = 0; |
| 1062 | int remotes = 0; | 1063 | int remotes = 0; |
| @@ -1113,7 +1114,10 @@ const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask, | |||
| 1113 | 1114 | ||
| 1114 | record_send_statistics(stat, locals, hubs, remotes, bau_desc); | 1115 | record_send_statistics(stat, locals, hubs, remotes, bau_desc); |
| 1115 | 1116 | ||
| 1116 | bau_desc->payload.address = start; | 1117 | if (!end || (end - start) <= PAGE_SIZE) |
| 1118 | bau_desc->payload.address = start; | ||
| 1119 | else | ||
| 1120 | bau_desc->payload.address = TLB_FLUSH_ALL; | ||
| 1117 | bau_desc->payload.sending_cpu = cpu; | 1121 | bau_desc->payload.sending_cpu = cpu; |
| 1118 | /* | 1122 | /* |
| 1119 | * uv_flush_send_and_wait returns 0 if all cpu's were messaged, | 1123 | * uv_flush_send_and_wait returns 0 if all cpu's were messaged, |
diff --git a/arch/x86/tools/insn_sanity.c b/arch/x86/tools/insn_sanity.c index cc2f8c131286..872eb60e7806 100644 --- a/arch/x86/tools/insn_sanity.c +++ b/arch/x86/tools/insn_sanity.c | |||
| @@ -55,7 +55,7 @@ static FILE *input_file; /* Input file name */ | |||
| 55 | static void usage(const char *err) | 55 | static void usage(const char *err) |
| 56 | { | 56 | { |
| 57 | if (err) | 57 | if (err) |
| 58 | fprintf(stderr, "Error: %s\n\n", err); | 58 | fprintf(stderr, "%s: Error: %s\n\n", prog, err); |
| 59 | fprintf(stderr, "Usage: %s [-y|-n|-v] [-s seed[,no]] [-m max] [-i input]\n", prog); | 59 | fprintf(stderr, "Usage: %s [-y|-n|-v] [-s seed[,no]] [-m max] [-i input]\n", prog); |
| 60 | fprintf(stderr, "\t-y 64bit mode\n"); | 60 | fprintf(stderr, "\t-y 64bit mode\n"); |
| 61 | fprintf(stderr, "\t-n 32bit mode\n"); | 61 | fprintf(stderr, "\t-n 32bit mode\n"); |
| @@ -269,7 +269,13 @@ int main(int argc, char **argv) | |||
| 269 | insns++; | 269 | insns++; |
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | fprintf(stdout, "%s: decoded and checked %d %s instructions with %d errors (seed:0x%x)\n", (errors) ? "Failure" : "Success", insns, (input_file) ? "given" : "random", errors, seed); | 272 | fprintf(stdout, "%s: %s: decoded and checked %d %s instructions with %d errors (seed:0x%x)\n", |
| 273 | prog, | ||
| 274 | (errors) ? "Failure" : "Success", | ||
| 275 | insns, | ||
| 276 | (input_file) ? "given" : "random", | ||
| 277 | errors, | ||
| 278 | seed); | ||
| 273 | 279 | ||
| 274 | return errors ? 1 : 0; | 280 | return errors ? 1 : 0; |
| 275 | } | 281 | } |
diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c index 5a1847d61930..79d67bd507fa 100644 --- a/arch/x86/tools/relocs.c +++ b/arch/x86/tools/relocs.c | |||
| @@ -814,12 +814,14 @@ int main(int argc, char **argv) | |||
| 814 | read_relocs(fp); | 814 | read_relocs(fp); |
| 815 | if (show_absolute_syms) { | 815 | if (show_absolute_syms) { |
| 816 | print_absolute_symbols(); | 816 | print_absolute_symbols(); |
| 817 | return 0; | 817 | goto out; |
| 818 | } | 818 | } |
| 819 | if (show_absolute_relocs) { | 819 | if (show_absolute_relocs) { |
| 820 | print_absolute_relocs(); | 820 | print_absolute_relocs(); |
| 821 | return 0; | 821 | goto out; |
| 822 | } | 822 | } |
| 823 | emit_relocs(as_text, use_real_mode); | 823 | emit_relocs(as_text, use_real_mode); |
| 824 | out: | ||
| 825 | fclose(fp); | ||
| 824 | return 0; | 826 | return 0; |
| 825 | } | 827 | } |
