Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge remote-tracking branch 'scott/next' into next

Freescale updates from Scott. Mostly support for critical
and machine check exceptions on 64-bit BookE, some new
PCI suspend/resume work and misc bits.

+1322 -229
+23
Documentation/devicetree/bindings/powerpc/fsl/l2cache.txt
··· 1 + Freescale L2 Cache Controller 2 + 3 + L2 cache is present in Freescale's QorIQ and QorIQ Qonverge platforms. 4 + The cache bindings explained below are ePAPR compliant 5 + 6 + Required Properties: 7 + 8 + - compatible : Should include "fsl,chip-l2-cache-controller" and "cache" 9 + where chip is the processor (bsc9132, npc8572 etc.) 10 + - reg : Address and size of L2 cache controller registers 11 + - cache-size : Size of the entire L2 cache 12 + - interrupts : Error interrupt of L2 controller 13 + - cache-line-size : Size of L2 cache lines 14 + 15 + Example: 16 + 17 + L2: l2-cache-controller@20000 { 18 + compatible = "fsl,bsc9132-l2-cache-controller", "cache"; 19 + reg = <0x20000 0x1000>; 20 + cache-line-size = <32>; // 32 bytes 21 + cache-size = <0x40000>; // L2,256K 22 + interrupts = <16 2 1 0>; 23 + };
+27
Documentation/devicetree/bindings/powerpc/fsl/mem-ctrlr.txt
··· 1 + Freescale DDR memory controller 2 + 3 + Properties: 4 + 5 + - compatible : Should include "fsl,chip-memory-controller" where 6 + chip is the processor (bsc9132, mpc8572 etc.), or 7 + "fsl,qoriq-memory-controller". 8 + - reg : Address and size of DDR controller registers 9 + - interrupts : Error interrupt of DDR controller 10 + 11 + Example 1: 12 + 13 + memory-controller@2000 { 14 + compatible = "fsl,bsc9132-memory-controller"; 15 + reg = <0x2000 0x1000>; 16 + interrupts = <16 2 1 8>; 17 + }; 18 + 19 + 20 + Example 2: 21 + 22 + ddr1: memory-controller@8000 { 23 + compatible = "fsl,qoriq-memory-controller-v4.7", 24 + "fsl,qoriq-memory-controller"; 25 + reg = <0x8000 0x1000>; 26 + interrupts = <16 2 1 23>; 27 + };
+3 -1
Documentation/devicetree/bindings/usb/fsl-usb.txt
··· 8 8 Required properties : 9 9 - compatible : Should be "fsl-usb2-mph" for multi port host USB 10 10 controllers, or "fsl-usb2-dr" for dual role USB controllers 11 - or "fsl,mpc5121-usb2-dr" for dual role USB controllers of MPC5121 11 + or "fsl,mpc5121-usb2-dr" for dual role USB controllers of MPC5121. 12 + Wherever applicable, the IP version of the USB controller should 13 + also be mentioned (for eg. fsl-usb2-dr-v2.2 for bsc9132). 12 14 - phy_type : For multi port host USB controllers, should be one of 13 15 "ulpi", or "serial". For dual role USB controllers, should be 14 16 one of "ulpi", "utmi", "utmi_wide", or "serial".
+36
arch/powerpc/boot/dts/fsl/b4420si-post.dtsi
··· 86 86 87 87 clockgen: global-utilities@e1000 { 88 88 compatible = "fsl,b4420-clockgen", "fsl,qoriq-clockgen-2.0"; 89 + ranges = <0x0 0xe1000 0x1000>; 90 + #address-cells = <1>; 91 + #size-cells = <1>; 92 + 93 + sysclk: sysclk { 94 + #clock-cells = <0>; 95 + compatible = "fsl,qoriq-sysclk-2.0"; 96 + clock-output-names = "sysclk"; 97 + }; 98 + 99 + pll0: pll0@800 { 100 + #clock-cells = <1>; 101 + reg = <0x800 0x4>; 102 + compatible = "fsl,qoriq-core-pll-2.0"; 103 + clocks = <&sysclk>; 104 + clock-output-names = "pll0", "pll0-div2", "pll0-div4"; 105 + }; 106 + 107 + pll1: pll1@820 { 108 + #clock-cells = <1>; 109 + reg = <0x820 0x4>; 110 + compatible = "fsl,qoriq-core-pll-2.0"; 111 + clocks = <&sysclk>; 112 + clock-output-names = "pll1", "pll1-div2", "pll1-div4"; 113 + }; 114 + 115 + mux0: mux0@0 { 116 + #clock-cells = <0>; 117 + reg = <0x0 0x4>; 118 + compatible = "fsl,qoriq-core-mux-2.0"; 119 + clocks = <&pll0 0>, <&pll0 1>, <&pll0 2>, 120 + <&pll1 0>, <&pll1 1>, <&pll1 2>; 121 + clock-names = "pll0", "pll0-div2", "pll0-div4", 122 + "pll1", "pll1-div2", "pll1-div4"; 123 + clock-output-names = "cmux0"; 124 + }; 89 125 }; 90 126 91 127 rcpm: global-utilities@e2000 {
+2
arch/powerpc/boot/dts/fsl/b4420si-pre.dtsi
··· 64 64 cpu0: PowerPC,e6500@0 { 65 65 device_type = "cpu"; 66 66 reg = <0 1>; 67 + clocks = <&mux0>; 67 68 next-level-cache = <&L2>; 68 69 }; 69 70 cpu1: PowerPC,e6500@2 { 70 71 device_type = "cpu"; 71 72 reg = <2 3>; 73 + clocks = <&mux0>; 72 74 next-level-cache = <&L2>; 73 75 }; 74 76 };
+36
arch/powerpc/boot/dts/fsl/b4860si-post.dtsi
··· 130 130 131 131 clockgen: global-utilities@e1000 { 132 132 compatible = "fsl,b4860-clockgen", "fsl,qoriq-clockgen-2.0"; 133 + ranges = <0x0 0xe1000 0x1000>; 134 + #address-cells = <1>; 135 + #size-cells = <1>; 136 + 137 + sysclk: sysclk { 138 + #clock-cells = <0>; 139 + compatible = "fsl,qoriq-sysclk-2.0"; 140 + clock-output-names = "sysclk"; 141 + }; 142 + 143 + pll0: pll0@800 { 144 + #clock-cells = <1>; 145 + reg = <0x800 0x4>; 146 + compatible = "fsl,qoriq-core-pll-2.0"; 147 + clocks = <&sysclk>; 148 + clock-output-names = "pll0", "pll0-div2", "pll0-div4"; 149 + }; 150 + 151 + pll1: pll1@820 { 152 + #clock-cells = <1>; 153 + reg = <0x820 0x4>; 154 + compatible = "fsl,qoriq-core-pll-2.0"; 155 + clocks = <&sysclk>; 156 + clock-output-names = "pll1", "pll1-div2", "pll1-div4"; 157 + }; 158 + 159 + mux0: mux0@0 { 160 + #clock-cells = <0>; 161 + reg = <0x0 0x4>; 162 + compatible = "fsl,qoriq-core-mux-2.0"; 163 + clocks = <&pll0 0>, <&pll0 1>, <&pll0 2>, 164 + <&pll1 0>, <&pll1 1>, <&pll1 2>; 165 + clock-names = "pll0", "pll0-div2", "pll0-div4", 166 + "pll1", "pll1-div2", "pll1-div4"; 167 + clock-output-names = "cmux0"; 168 + }; 133 169 }; 134 170 135 171 rcpm: global-utilities@e2000 {
+4
arch/powerpc/boot/dts/fsl/b4860si-pre.dtsi
··· 64 64 cpu0: PowerPC,e6500@0 { 65 65 device_type = "cpu"; 66 66 reg = <0 1>; 67 + clocks = <&mux0>; 67 68 next-level-cache = <&L2>; 68 69 }; 69 70 cpu1: PowerPC,e6500@2 { 70 71 device_type = "cpu"; 71 72 reg = <2 3>; 73 + clocks = <&mux0>; 72 74 next-level-cache = <&L2>; 73 75 }; 74 76 cpu2: PowerPC,e6500@4 { 75 77 device_type = "cpu"; 76 78 reg = <4 5>; 79 + clocks = <&mux0>; 77 80 next-level-cache = <&L2>; 78 81 }; 79 82 cpu3: PowerPC,e6500@6 { 80 83 device_type = "cpu"; 81 84 reg = <6 7>; 85 + clocks = <&mux0>; 82 86 next-level-cache = <&L2>; 83 87 }; 84 88 };
+60
arch/powerpc/boot/dts/fsl/p2041si-post.dtsi
··· 306 306 307 307 clockgen: global-utilities@e1000 { 308 308 compatible = "fsl,p2041-clockgen", "fsl,qoriq-clockgen-1.0"; 309 + ranges = <0x0 0xe1000 0x1000>; 309 310 reg = <0xe1000 0x1000>; 310 311 clock-frequency = <0>; 312 + #address-cells = <1>; 313 + #size-cells = <1>; 314 + 315 + sysclk: sysclk { 316 + #clock-cells = <0>; 317 + compatible = "fsl,qoriq-sysclk-1.0"; 318 + clock-output-names = "sysclk"; 319 + }; 320 + 321 + pll0: pll0@800 { 322 + #clock-cells = <1>; 323 + reg = <0x800 0x4>; 324 + compatible = "fsl,qoriq-core-pll-1.0"; 325 + clocks = <&sysclk>; 326 + clock-output-names = "pll0", "pll0-div2"; 327 + }; 328 + 329 + pll1: pll1@820 { 330 + #clock-cells = <1>; 331 + reg = <0x820 0x4>; 332 + compatible = "fsl,qoriq-core-pll-1.0"; 333 + clocks = <&sysclk>; 334 + clock-output-names = "pll1", "pll1-div2"; 335 + }; 336 + 337 + mux0: mux0@0 { 338 + #clock-cells = <0>; 339 + reg = <0x0 0x4>; 340 + compatible = "fsl,qoriq-core-mux-1.0"; 341 + clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; 342 + clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 343 + clock-output-names = "cmux0"; 344 + }; 345 + 346 + mux1: mux1@20 { 347 + #clock-cells = <0>; 348 + reg = <0x20 0x4>; 349 + compatible = "fsl,qoriq-core-mux-1.0"; 350 + clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; 351 + clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 352 + clock-output-names = "cmux1"; 353 + }; 354 + 355 + mux2: mux2@40 { 356 + #clock-cells = <0>; 357 + reg = <0x40 0x4>; 358 + compatible = "fsl,qoriq-core-mux-1.0"; 359 + clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; 360 + clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 361 + }; 362 + 363 + mux3: mux3@60 { 364 + #clock-cells = <0>; 365 + reg = <0x60 0x4>; 366 + compatible = "fsl,qoriq-core-mux-1.0"; 367 + clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; 368 + clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 369 + clock-output-names = "cmux3"; 370 + }; 311 371 }; 312 372 313 373 rcpm: global-utilities@e2000 {
+4
arch/powerpc/boot/dts/fsl/p2041si-pre.dtsi
··· 81 81 cpu0: PowerPC,e500mc@0 { 82 82 device_type = "cpu"; 83 83 reg = <0>; 84 + clocks = <&mux0>; 84 85 next-level-cache = <&L2_0>; 85 86 L2_0: l2-cache { 86 87 next-level-cache = <&cpc>; ··· 90 89 cpu1: PowerPC,e500mc@1 { 91 90 device_type = "cpu"; 92 91 reg = <1>; 92 + clocks = <&mux1>; 93 93 next-level-cache = <&L2_1>; 94 94 L2_1: l2-cache { 95 95 next-level-cache = <&cpc>; ··· 99 97 cpu2: PowerPC,e500mc@2 { 100 98 device_type = "cpu"; 101 99 reg = <2>; 100 + clocks = <&mux2>; 102 101 next-level-cache = <&L2_2>; 103 102 L2_2: l2-cache { 104 103 next-level-cache = <&cpc>; ··· 108 105 cpu3: PowerPC,e500mc@3 { 109 106 device_type = "cpu"; 110 107 reg = <3>; 108 + clocks = <&mux3>; 111 109 next-level-cache = <&L2_3>; 112 110 L2_3: l2-cache { 113 111 next-level-cache = <&cpc>;
+61
arch/powerpc/boot/dts/fsl/p3041si-post.dtsi
··· 333 333 334 334 clockgen: global-utilities@e1000 { 335 335 compatible = "fsl,p3041-clockgen", "fsl,qoriq-clockgen-1.0"; 336 + ranges = <0x0 0xe1000 0x1000>; 336 337 reg = <0xe1000 0x1000>; 337 338 clock-frequency = <0>; 339 + #address-cells = <1>; 340 + #size-cells = <1>; 341 + 342 + sysclk: sysclk { 343 + #clock-cells = <0>; 344 + compatible = "fsl,qoriq-sysclk-1.0"; 345 + clock-output-names = "sysclk"; 346 + }; 347 + 348 + pll0: pll0@800 { 349 + #clock-cells = <1>; 350 + reg = <0x800 0x4>; 351 + compatible = "fsl,qoriq-core-pll-1.0"; 352 + clocks = <&sysclk>; 353 + clock-output-names = "pll0", "pll0-div2"; 354 + }; 355 + 356 + pll1: pll1@820 { 357 + #clock-cells = <1>; 358 + reg = <0x820 0x4>; 359 + compatible = "fsl,qoriq-core-pll-1.0"; 360 + clocks = <&sysclk>; 361 + clock-output-names = "pll1", "pll1-div2"; 362 + }; 363 + 364 + mux0: mux0@0 { 365 + #clock-cells = <0>; 366 + reg = <0x0 0x4>; 367 + compatible = "fsl,qoriq-core-mux-1.0"; 368 + clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; 369 + clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 370 + clock-output-names = "cmux0"; 371 + }; 372 + 373 + mux1: mux1@20 { 374 + #clock-cells = <0>; 375 + reg = <0x20 0x4>; 376 + compatible = "fsl,qoriq-core-mux-1.0"; 377 + clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; 378 + clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 379 + clock-output-names = "cmux1"; 380 + }; 381 + 382 + mux2: mux2@40 { 383 + #clock-cells = <0>; 384 + reg = <0x40 0x4>; 385 + compatible = "fsl,qoriq-core-mux-1.0"; 386 + clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; 387 + clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 388 + clock-output-names = "cmux2"; 389 + }; 390 + 391 + mux3: mux3@60 { 392 + #clock-cells = <0>; 393 + reg = <0x60 0x4>; 394 + compatible = "fsl,qoriq-core-mux-1.0"; 395 + clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; 396 + clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 397 + clock-output-names = "cmux3"; 398 + }; 338 399 }; 339 400 340 401 rcpm: global-utilities@e2000 {
+4
arch/powerpc/boot/dts/fsl/p3041si-pre.dtsi
··· 82 82 cpu0: PowerPC,e500mc@0 { 83 83 device_type = "cpu"; 84 84 reg = <0>; 85 + clocks = <&mux0>; 85 86 next-level-cache = <&L2_0>; 86 87 L2_0: l2-cache { 87 88 next-level-cache = <&cpc>; ··· 91 90 cpu1: PowerPC,e500mc@1 { 92 91 device_type = "cpu"; 93 92 reg = <1>; 93 + clocks = <&mux1>; 94 94 next-level-cache = <&L2_1>; 95 95 L2_1: l2-cache { 96 96 next-level-cache = <&cpc>; ··· 100 98 cpu2: PowerPC,e500mc@2 { 101 99 device_type = "cpu"; 102 100 reg = <2>; 101 + clocks = <&mux2>; 103 102 next-level-cache = <&L2_2>; 104 103 L2_2: l2-cache { 105 104 next-level-cache = <&cpc>; ··· 109 106 cpu3: PowerPC,e500mc@3 { 110 107 device_type = "cpu"; 111 108 reg = <3>; 109 + clocks = <&mux3>; 112 110 next-level-cache = <&L2_3>; 113 111 L2_3: l2-cache { 114 112 next-level-cache = <&cpc>;
+113
arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
··· 353 353 354 354 clockgen: global-utilities@e1000 { 355 355 compatible = "fsl,p4080-clockgen", "fsl,qoriq-clockgen-1.0"; 356 + ranges = <0x0 0xe1000 0x1000>; 356 357 reg = <0xe1000 0x1000>; 357 358 clock-frequency = <0>; 359 + #address-cells = <1>; 360 + #size-cells = <1>; 361 + 362 + sysclk: sysclk { 363 + #clock-cells = <0>; 364 + compatible = "fsl,qoriq-sysclk-1.0"; 365 + clock-output-names = "sysclk"; 366 + }; 367 + 368 + pll0: pll0@800 { 369 + #clock-cells = <1>; 370 + reg = <0x800 0x4>; 371 + compatible = "fsl,qoriq-core-pll-1.0"; 372 + clocks = <&sysclk>; 373 + clock-output-names = "pll0", "pll0-div2"; 374 + }; 375 + 376 + pll1: pll1@820 { 377 + #clock-cells = <1>; 378 + reg = <0x820 0x4>; 379 + compatible = "fsl,qoriq-core-pll-1.0"; 380 + clocks = <&sysclk>; 381 + clock-output-names = "pll1", "pll1-div2"; 382 + }; 383 + 384 + pll2: pll2@840 { 385 + #clock-cells = <1>; 386 + reg = <0x840 0x4>; 387 + compatible = "fsl,qoriq-core-pll-1.0"; 388 + clocks = <&sysclk>; 389 + clock-output-names = "pll2", "pll2-div2"; 390 + }; 391 + 392 + pll3: pll3@860 { 393 + #clock-cells = <1>; 394 + reg = <0x860 0x4>; 395 + compatible = "fsl,qoriq-core-pll-1.0"; 396 + clocks = <&sysclk>; 397 + clock-output-names = "pll3", "pll3-div2"; 398 + }; 399 + 400 + mux0: mux0@0 { 401 + #clock-cells = <0>; 402 + reg = <0x0 0x4>; 403 + compatible = "fsl,qoriq-core-mux-1.0"; 404 + clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; 405 + clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 406 + clock-output-names = "cmux0"; 407 + }; 408 + 409 + mux1: mux1@20 { 410 + #clock-cells = <0>; 411 + reg = <0x20 0x4>; 412 + compatible = "fsl,qoriq-core-mux-1.0"; 413 + clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; 414 + clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 415 + clock-output-names = "cmux1"; 416 + }; 417 + 418 + mux2: mux2@40 { 419 + #clock-cells = <0>; 420 + reg = <0x40 0x4>; 421 + compatible = "fsl,qoriq-core-mux-1.0"; 422 + clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; 423 + clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 424 + clock-output-names = "cmux2"; 425 + }; 426 + 427 + mux3: mux3@60 { 428 + #clock-cells = <0>; 429 + reg = <0x60 0x4>; 430 + compatible = "fsl,qoriq-core-mux-1.0"; 431 + clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; 432 + clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 433 + clock-output-names = "cmux3"; 434 + }; 435 + 436 + mux4: mux4@80 { 437 + #clock-cells = <0>; 438 + reg = <0x80 0x4>; 439 + compatible = "fsl,qoriq-core-mux-1.0"; 440 + clocks = <&pll2 0>, <&pll2 1>, <&pll3 0>, <&pll3 1>; 441 + clock-names = "pll2", "pll2-div2", "pll3", "pll3-div2"; 442 + clock-output-names = "cmux4"; 443 + }; 444 + 445 + mux5: mux5@a0 { 446 + #clock-cells = <0>; 447 + reg = <0xa0 0x4>; 448 + compatible = "fsl,qoriq-core-mux-1.0"; 449 + clocks = <&pll2 0>, <&pll2 1>, <&pll3 0>, <&pll3 1>; 450 + clock-names = "pll2", "pll2-div2", "pll3", "pll3-div2"; 451 + clock-output-names = "cmux5"; 452 + }; 453 + 454 + mux6: mux6@c0 { 455 + #clock-cells = <0>; 456 + reg = <0xc0 0x4>; 457 + compatible = "fsl,qoriq-core-mux-1.0"; 458 + clocks = <&pll2 0>, <&pll2 1>, <&pll3 0>, <&pll3 1>; 459 + clock-names = "pll2", "pll2-div2", "pll3", "pll3-div2"; 460 + clock-output-names = "cmux6"; 461 + }; 462 + 463 + mux7: mux7@e0 { 464 + #clock-cells = <0>; 465 + reg = <0xe0 0x4>; 466 + compatible = "fsl,qoriq-core-mux-1.0"; 467 + clocks = <&pll2 0>, <&pll2 1>, <&pll3 0>, <&pll3 1>; 468 + clock-names = "pll2", "pll2-div2", "pll3", "pll3-div2"; 469 + clock-output-names = "cmux7"; 470 + }; 358 471 }; 359 472 360 473 rcpm: global-utilities@e2000 {
+8
arch/powerpc/boot/dts/fsl/p4080si-pre.dtsi
··· 81 81 cpu0: PowerPC,e500mc@0 { 82 82 device_type = "cpu"; 83 83 reg = <0>; 84 + clocks = <&mux0>; 84 85 next-level-cache = <&L2_0>; 85 86 L2_0: l2-cache { 86 87 next-level-cache = <&cpc>; ··· 90 89 cpu1: PowerPC,e500mc@1 { 91 90 device_type = "cpu"; 92 91 reg = <1>; 92 + clocks = <&mux1>; 93 93 next-level-cache = <&L2_1>; 94 94 L2_1: l2-cache { 95 95 next-level-cache = <&cpc>; ··· 99 97 cpu2: PowerPC,e500mc@2 { 100 98 device_type = "cpu"; 101 99 reg = <2>; 100 + clocks = <&mux2>; 102 101 next-level-cache = <&L2_2>; 103 102 L2_2: l2-cache { 104 103 next-level-cache = <&cpc>; ··· 108 105 cpu3: PowerPC,e500mc@3 { 109 106 device_type = "cpu"; 110 107 reg = <3>; 108 + clocks = <&mux3>; 111 109 next-level-cache = <&L2_3>; 112 110 L2_3: l2-cache { 113 111 next-level-cache = <&cpc>; ··· 117 113 cpu4: PowerPC,e500mc@4 { 118 114 device_type = "cpu"; 119 115 reg = <4>; 116 + clocks = <&mux4>; 120 117 next-level-cache = <&L2_4>; 121 118 L2_4: l2-cache { 122 119 next-level-cache = <&cpc>; ··· 126 121 cpu5: PowerPC,e500mc@5 { 127 122 device_type = "cpu"; 128 123 reg = <5>; 124 + clocks = <&mux5>; 129 125 next-level-cache = <&L2_5>; 130 126 L2_5: l2-cache { 131 127 next-level-cache = <&cpc>; ··· 135 129 cpu6: PowerPC,e500mc@6 { 136 130 device_type = "cpu"; 137 131 reg = <6>; 132 + clocks = <&mux6>; 138 133 next-level-cache = <&L2_6>; 139 134 L2_6: l2-cache { 140 135 next-level-cache = <&cpc>; ··· 144 137 cpu7: PowerPC,e500mc@7 { 145 138 device_type = "cpu"; 146 139 reg = <7>; 140 + clocks = <&mux7>; 147 141 next-level-cache = <&L2_7>; 148 142 L2_7: l2-cache { 149 143 next-level-cache = <&cpc>;
+43
arch/powerpc/boot/dts/fsl/p5020si-post.dtsi
··· 338 338 339 339 clockgen: global-utilities@e1000 { 340 340 compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0"; 341 + ranges = <0x0 0xe1000 0x1000>; 341 342 reg = <0xe1000 0x1000>; 342 343 clock-frequency = <0>; 344 + #address-cells = <1>; 345 + #size-cells = <1>; 346 + 347 + sysclk: sysclk { 348 + #clock-cells = <0>; 349 + compatible = "fsl,qoriq-sysclk-1.0"; 350 + clock-output-names = "sysclk"; 351 + }; 352 + 353 + pll0: pll0@800 { 354 + #clock-cells = <1>; 355 + reg = <0x800 0x4>; 356 + compatible = "fsl,qoriq-core-pll-1.0"; 357 + clocks = <&sysclk>; 358 + clock-output-names = "pll0", "pll0-div2"; 359 + }; 360 + 361 + pll1: pll1@820 { 362 + #clock-cells = <1>; 363 + reg = <0x820 0x4>; 364 + compatible = "fsl,qoriq-core-pll-1.0"; 365 + clocks = <&sysclk>; 366 + clock-output-names = "pll1", "pll1-div2"; 367 + }; 368 + 369 + mux0: mux0@0 { 370 + #clock-cells = <0>; 371 + reg = <0x0 0x4>; 372 + compatible = "fsl,qoriq-core-mux-1.0"; 373 + clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; 374 + clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 375 + clock-output-names = "cmux0"; 376 + }; 377 + 378 + mux1: mux1@20 { 379 + #clock-cells = <0>; 380 + reg = <0x20 0x4>; 381 + compatible = "fsl,qoriq-core-mux-1.0"; 382 + clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; 383 + clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 384 + clock-output-names = "cmux1"; 385 + }; 343 386 }; 344 387 345 388 rcpm: global-utilities@e2000 {
+2
arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi
··· 88 88 cpu0: PowerPC,e5500@0 { 89 89 device_type = "cpu"; 90 90 reg = <0>; 91 + clocks = <&mux0>; 91 92 next-level-cache = <&L2_0>; 92 93 L2_0: l2-cache { 93 94 next-level-cache = <&cpc>; ··· 97 96 cpu1: PowerPC,e5500@1 { 98 97 device_type = "cpu"; 99 98 reg = <1>; 99 + clocks = <&mux1>; 100 100 next-level-cache = <&L2_1>; 101 101 L2_1: l2-cache { 102 102 next-level-cache = <&cpc>;
+61
arch/powerpc/boot/dts/fsl/p5040si-post.dtsi
··· 298 298 299 299 clockgen: global-utilities@e1000 { 300 300 compatible = "fsl,p5040-clockgen", "fsl,qoriq-clockgen-1.0"; 301 + ranges = <0x0 0xe1000 0x1000>; 301 302 reg = <0xe1000 0x1000>; 302 303 clock-frequency = <0>; 304 + #address-cells = <1>; 305 + #size-cells = <1>; 306 + 307 + sysclk: sysclk { 308 + #clock-cells = <0>; 309 + compatible = "fsl,qoriq-sysclk-1.0"; 310 + clock-output-names = "sysclk"; 311 + }; 312 + 313 + pll0: pll0@800 { 314 + #clock-cells = <1>; 315 + reg = <0x800 0x4>; 316 + compatible = "fsl,qoriq-core-pll-1.0"; 317 + clocks = <&sysclk>; 318 + clock-output-names = "pll0", "pll0-div2"; 319 + }; 320 + 321 + pll1: pll1@820 { 322 + #clock-cells = <1>; 323 + reg = <0x820 0x4>; 324 + compatible = "fsl,qoriq-core-pll-1.0"; 325 + clocks = <&sysclk>; 326 + clock-output-names = "pll1", "pll1-div2"; 327 + }; 328 + 329 + mux0: mux0@0 { 330 + #clock-cells = <0>; 331 + reg = <0x0 0x4>; 332 + compatible = "fsl,qoriq-core-mux-1.0"; 333 + clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; 334 + clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 335 + clock-output-names = "cmux0"; 336 + }; 337 + 338 + mux1: mux1@20 { 339 + #clock-cells = <0>; 340 + reg = <0x20 0x4>; 341 + compatible = "fsl,qoriq-core-mux-1.0"; 342 + clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; 343 + clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 344 + clock-output-names = "cmux1"; 345 + }; 346 + 347 + mux2: mux2@40 { 348 + #clock-cells = <0>; 349 + reg = <0x40 0x4>; 350 + compatible = "fsl,qoriq-core-mux-1.0"; 351 + clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; 352 + clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 353 + clock-output-names = "cmux2"; 354 + }; 355 + 356 + mux3: mux3@60 { 357 + #clock-cells = <0>; 358 + reg = <0x60 0x4>; 359 + compatible = "fsl,qoriq-core-mux-1.0"; 360 + clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; 361 + clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 362 + clock-output-names = "cmux3"; 363 + }; 303 364 }; 304 365 305 366 rcpm: global-utilities@e2000 {
+4
arch/powerpc/boot/dts/fsl/p5040si-pre.dtsi
··· 81 81 cpu0: PowerPC,e5500@0 { 82 82 device_type = "cpu"; 83 83 reg = <0>; 84 + clocks = <&mux0>; 84 85 next-level-cache = <&L2_0>; 85 86 L2_0: l2-cache { 86 87 next-level-cache = <&cpc>; ··· 90 89 cpu1: PowerPC,e5500@1 { 91 90 device_type = "cpu"; 92 91 reg = <1>; 92 + clocks = <&mux1>; 93 93 next-level-cache = <&L2_1>; 94 94 L2_1: l2-cache { 95 95 next-level-cache = <&cpc>; ··· 99 97 cpu2: PowerPC,e5500@2 { 100 98 device_type = "cpu"; 101 99 reg = <2>; 100 + clocks = <&mux2>; 102 101 next-level-cache = <&L2_2>; 103 102 L2_2: l2-cache { 104 103 next-level-cache = <&cpc>; ··· 108 105 cpu3: PowerPC,e5500@3 { 109 106 device_type = "cpu"; 110 107 reg = <3>; 108 + clocks = <&mux3>; 111 109 next-level-cache = <&L2_3>; 112 110 L2_3: l2-cache { 113 111 next-level-cache = <&cpc>;
+86
arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
··· 369 369 370 370 clockgen: global-utilities@e1000 { 371 371 compatible = "fsl,t4240-clockgen", "fsl,qoriq-clockgen-2.0"; 372 + ranges = <0x0 0xe1000 0x1000>; 372 373 reg = <0xe1000 0x1000>; 374 + #address-cells = <1>; 375 + #size-cells = <1>; 376 + 377 + sysclk: sysclk { 378 + #clock-cells = <0>; 379 + compatible = "fsl,qoriq-sysclk-2.0"; 380 + clock-output-names = "sysclk"; 381 + }; 382 + 383 + pll0: pll0@800 { 384 + #clock-cells = <1>; 385 + reg = <0x800 0x4>; 386 + compatible = "fsl,qoriq-core-pll-2.0"; 387 + clocks = <&sysclk>; 388 + clock-output-names = "pll0", "pll0-div2", "pll0-div4"; 389 + }; 390 + 391 + pll1: pll1@820 { 392 + #clock-cells = <1>; 393 + reg = <0x820 0x4>; 394 + compatible = "fsl,qoriq-core-pll-2.0"; 395 + clocks = <&sysclk>; 396 + clock-output-names = "pll1", "pll1-div2", "pll1-div4"; 397 + }; 398 + 399 + pll2: pll2@840 { 400 + #clock-cells = <1>; 401 + reg = <0x840 0x4>; 402 + compatible = "fsl,qoriq-core-pll-2.0"; 403 + clocks = <&sysclk>; 404 + clock-output-names = "pll2", "pll2-div2", "pll2-div4"; 405 + }; 406 + 407 + pll3: pll3@860 { 408 + #clock-cells = <1>; 409 + reg = <0x860 0x4>; 410 + compatible = "fsl,qoriq-core-pll-2.0"; 411 + clocks = <&sysclk>; 412 + clock-output-names = "pll3", "pll3-div2", "pll3-div4"; 413 + }; 414 + 415 + pll4: pll4@880 { 416 + #clock-cells = <1>; 417 + reg = <0x880 0x4>; 418 + compatible = "fsl,qoriq-core-pll-2.0"; 419 + clocks = <&sysclk>; 420 + clock-output-names = "pll4", "pll4-div2", "pll4-div4"; 421 + }; 422 + 423 + mux0: mux0@0 { 424 + #clock-cells = <0>; 425 + reg = <0x0 0x4>; 426 + compatible = "fsl,qoriq-core-mux-2.0"; 427 + clocks = <&pll0 0>, <&pll0 1>, <&pll0 2>, 428 + <&pll1 0>, <&pll1 1>, <&pll1 2>, 429 + <&pll2 0>, <&pll2 1>, <&pll2 2>; 430 + clock-names = "pll0", "pll0-div2", "pll0-div4", 431 + "pll1", "pll1-div2", "pll1-div4", 432 + "pll2", "pll2-div2", "pll2-div4"; 433 + clock-output-names = "cmux0"; 434 + }; 435 + 436 + mux1: mux1@20 { 437 + #clock-cells = <0>; 438 + reg = <0x20 0x4>; 439 + compatible = "fsl,qoriq-core-mux-2.0"; 440 + clocks = <&pll0 0>, <&pll0 1>, <&pll0 2>, 441 + <&pll1 0>, <&pll1 1>, <&pll1 2>, 442 + <&pll2 0>, <&pll2 1>, <&pll2 2>; 443 + clock-names = "pll0", "pll0-div2", "pll0-div4", 444 + "pll1", "pll1-div2", "pll1-div4", 445 + "pll2", "pll2-div2", "pll2-div4"; 446 + clock-output-names = "cmux1"; 447 + }; 448 + 449 + mux2: mux2@40 { 450 + #clock-cells = <0>; 451 + reg = <0x40 0x4>; 452 + compatible = "fsl,qoriq-core-mux-2.0"; 453 + clocks = <&pll3 0>, <&pll3 1>, <&pll3 2>, 454 + <&pll4 0>, <&pll4 1>, <&pll4 2>; 455 + clock-names = "pll3", "pll3-div2", "pll3-div4", 456 + "pll4", "pll4-div2", "pll4-div4"; 457 + clock-output-names = "cmux2"; 458 + }; 373 459 }; 374 460 375 461 rcpm: global-utilities@e2000 {
+12
arch/powerpc/boot/dts/fsl/t4240si-pre.dtsi
··· 67 67 cpu0: PowerPC,e6500@0 { 68 68 device_type = "cpu"; 69 69 reg = <0 1>; 70 + clocks = <&mux0>; 70 71 next-level-cache = <&L2_1>; 71 72 }; 72 73 cpu1: PowerPC,e6500@2 { 73 74 device_type = "cpu"; 74 75 reg = <2 3>; 76 + clocks = <&mux0>; 75 77 next-level-cache = <&L2_1>; 76 78 }; 77 79 cpu2: PowerPC,e6500@4 { 78 80 device_type = "cpu"; 79 81 reg = <4 5>; 82 + clocks = <&mux0>; 80 83 next-level-cache = <&L2_1>; 81 84 }; 82 85 cpu3: PowerPC,e6500@6 { 83 86 device_type = "cpu"; 84 87 reg = <6 7>; 88 + clocks = <&mux0>; 85 89 next-level-cache = <&L2_1>; 86 90 }; 87 91 cpu4: PowerPC,e6500@8 { 88 92 device_type = "cpu"; 89 93 reg = <8 9>; 94 + clocks = <&mux1>; 90 95 next-level-cache = <&L2_2>; 91 96 }; 92 97 cpu5: PowerPC,e6500@10 { 93 98 device_type = "cpu"; 94 99 reg = <10 11>; 100 + clocks = <&mux1>; 95 101 next-level-cache = <&L2_2>; 96 102 }; 97 103 cpu6: PowerPC,e6500@12 { 98 104 device_type = "cpu"; 99 105 reg = <12 13>; 106 + clocks = <&mux1>; 100 107 next-level-cache = <&L2_2>; 101 108 }; 102 109 cpu7: PowerPC,e6500@14 { 103 110 device_type = "cpu"; 104 111 reg = <14 15>; 112 + clocks = <&mux1>; 105 113 next-level-cache = <&L2_2>; 106 114 }; 107 115 cpu8: PowerPC,e6500@16 { 108 116 device_type = "cpu"; 109 117 reg = <16 17>; 118 + clocks = <&mux2>; 110 119 next-level-cache = <&L2_3>; 111 120 }; 112 121 cpu9: PowerPC,e6500@18 { 113 122 device_type = "cpu"; 114 123 reg = <18 19>; 124 + clocks = <&mux2>; 115 125 next-level-cache = <&L2_3>; 116 126 }; 117 127 cpu10: PowerPC,e6500@20 { 118 128 device_type = "cpu"; 119 129 reg = <20 21>; 130 + clocks = <&mux2>; 120 131 next-level-cache = <&L2_3>; 121 132 }; 122 133 cpu11: PowerPC,e6500@22 { 123 134 device_type = "cpu"; 124 135 reg = <22 23>; 136 + clocks = <&mux2>; 125 137 next-level-cache = <&L2_3>; 126 138 }; 127 139 };
+42
arch/powerpc/boot/dts/t4240qds.dts
··· 159 159 interrupts = <0x1 0x1 0 0>; 160 160 }; 161 161 }; 162 + 163 + i2c@2 { 164 + #address-cells = <1>; 165 + #size-cells = <0>; 166 + reg = <0x2>; 167 + 168 + ina220@40 { 169 + compatible = "ti,ina220"; 170 + reg = <0x40>; 171 + shunt-resistor = <1000>; 172 + }; 173 + 174 + ina220@41 { 175 + compatible = "ti,ina220"; 176 + reg = <0x41>; 177 + shunt-resistor = <1000>; 178 + }; 179 + 180 + ina220@44 { 181 + compatible = "ti,ina220"; 182 + reg = <0x44>; 183 + shunt-resistor = <1000>; 184 + }; 185 + 186 + ina220@45 { 187 + compatible = "ti,ina220"; 188 + reg = <0x45>; 189 + shunt-resistor = <1000>; 190 + }; 191 + 192 + ina220@46 { 193 + compatible = "ti,ina220"; 194 + reg = <0x46>; 195 + shunt-resistor = <1000>; 196 + }; 197 + 198 + ina220@47 { 199 + compatible = "ti,ina220"; 200 + reg = <0x47>; 201 + shunt-resistor = <1000>; 202 + }; 203 + }; 162 204 }; 163 205 }; 164 206
-1
arch/powerpc/configs/corenet64_smp_defconfig
··· 26 26 CONFIG_BINFMT_MISC=m 27 27 CONFIG_MATH_EMULATION=y 28 28 CONFIG_MATH_EMULATION_HW_UNIMPLEMENTED=y 29 - CONFIG_FSL_IFC=y 30 29 CONFIG_PCIEPORTBUS=y 31 30 CONFIG_PCI_MSI=y 32 31 CONFIG_RAPIDIO=y
-1
arch/powerpc/configs/mpc85xx_defconfig
··· 49 49 CONFIG_BINFMT_MISC=m 50 50 CONFIG_MATH_EMULATION=y 51 51 CONFIG_FORCE_MAX_ZONEORDER=12 52 - CONFIG_FSL_IFC=y 53 52 CONFIG_PCI=y 54 53 CONFIG_PCI_MSI=y 55 54 CONFIG_RAPIDIO=y
-1
arch/powerpc/configs/mpc85xx_smp_defconfig
··· 52 52 CONFIG_BINFMT_MISC=m 53 53 CONFIG_MATH_EMULATION=y 54 54 CONFIG_FORCE_MAX_ZONEORDER=12 55 - CONFIG_FSL_IFC=y 56 55 CONFIG_PCI=y 57 56 CONFIG_PCI_MSI=y 58 57 CONFIG_RAPIDIO=y
+2 -13
arch/powerpc/include/asm/exception-64e.h
··· 46 46 #define EX_CR (1 * 8) 47 47 #define EX_R10 (2 * 8) 48 48 #define EX_R11 (3 * 8) 49 - #define EX_R13 (4 * 8) 50 - #define EX_R14 (5 * 8) 51 - #define EX_R15 (6 * 8) 49 + #define EX_R14 (4 * 8) 50 + #define EX_R15 (5 * 8) 52 51 53 52 /* 54 53 * The TLB miss exception uses different slots. ··· 171 172 ld r16,EX_TLB_LR(r12); \ 172 173 ld r9,EX_TLB_R9(r12); \ 173 174 ld r8,EX_TLB_R8(r12); \ 174 - mtlr r16; 175 - #define TLB_MISS_PROLOG_STATS_BOLTED \ 176 - mflr r10; \ 177 - std r8,PACA_EXTLB+EX_TLB_R8(r13); \ 178 - std r9,PACA_EXTLB+EX_TLB_R9(r13); \ 179 - std r10,PACA_EXTLB+EX_TLB_LR(r13); 180 - #define TLB_MISS_RESTORE_STATS_BOLTED \ 181 - ld r16,PACA_EXTLB+EX_TLB_LR(r13); \ 182 - ld r9,PACA_EXTLB+EX_TLB_R9(r13); \ 183 - ld r8,PACA_EXTLB+EX_TLB_R8(r13); \ 184 175 mtlr r16; 185 176 #define TLB_MISS_STATS_D(name) \ 186 177 addi r9,r13,MMSTAT_DSTATS+name; \
+6 -11
arch/powerpc/include/asm/kvm_booke_hv_asm.h
··· 36 36 * *(r8 + GPR11) = saved r11 37 37 * 38 38 * 64-bit host 39 - * Expected inputs (GEN/GDBELL/DBG/MC exception types): 39 + * Expected inputs (GEN/GDBELL/DBG/CRIT/MC exception types): 40 40 * r10 = saved CR 41 41 * r13 = PACA_POINTER 42 42 * *(r13 + PACA_EX##type + EX_R10) = saved r10 43 43 * *(r13 + PACA_EX##type + EX_R11) = saved r11 44 44 * SPRN_SPRG_##type##_SCRATCH = saved r13 45 45 * 46 - * Expected inputs (CRIT exception type): 47 - * r10 = saved CR 48 - * r13 = PACA_POINTER 49 - * *(r13 + PACA_EX##type + EX_R10) = saved r10 50 - * *(r13 + PACA_EX##type + EX_R11) = saved r11 51 - * *(r13 + PACA_EX##type + EX_R13) = saved r13 52 - * 53 46 * Expected inputs (TLB exception type): 54 47 * r10 = saved CR 48 + * r12 = extlb pointer 55 49 * r13 = PACA_POINTER 56 - * *(r13 + PACA_EX##type + EX_TLB_R10) = saved r10 57 - * *(r13 + PACA_EX##type + EX_TLB_R11) = saved r11 58 - * SPRN_SPRG_GEN_SCRATCH = saved r13 50 + * *(r12 + EX_TLB_R10) = saved r10 51 + * *(r12 + EX_TLB_R11) = saved r11 52 + * *(r12 + EX_TLB_R13) = saved r13 53 + * SPRN_SPRG_GEN_SCRATCH = saved r12 59 54 * 60 55 * Only the bolted version of TLB miss exception handlers is supported now. 61 56 */
+6 -3
arch/powerpc/include/asm/mmu-book3e.h
··· 287 287 extern int mmu_vmemmap_psize; 288 288 289 289 struct tlb_core_data { 290 + /* 291 + * Per-core spinlock for e6500 TLB handlers (no tlbsrx.) 292 + * Must be the first struct element. 293 + */ 294 + u8 lock; 295 + 290 296 /* For software way selection, as on Freescale TLB1 */ 291 297 u8 esel_next, esel_max, esel_first; 292 - 293 - /* Per-core spinlock for e6500 TLB handlers (no tlbsrx.) */ 294 - u8 lock; 295 298 }; 296 299 297 300 #ifdef CONFIG_PPC64
+6 -3
arch/powerpc/include/asm/paca.h
··· 116 116 /* Shared by all threads of a core -- points to tcd of first thread */ 117 117 struct tlb_core_data *tcd_ptr; 118 118 119 - /* We can have up to 3 levels of reentrancy in the TLB miss handler */ 120 - u64 extlb[3][EX_TLB_SIZE / sizeof(u64)]; 119 + /* 120 + * We can have up to 3 levels of reentrancy in the TLB miss handler, 121 + * in each of four exception levels (normal, crit, mcheck, debug). 122 + */ 123 + u64 extlb[12][EX_TLB_SIZE / sizeof(u64)]; 121 124 u64 exmc[8]; /* used for machine checks */ 122 125 u64 excrit[8]; /* used for crit interrupts */ 123 126 u64 exdbg[8]; /* used for debug interrupts */ ··· 149 146 u8 io_sync; /* writel() needs spin_unlock sync */ 150 147 u8 irq_work_pending; /* IRQ_WORK interrupt while soft-disable */ 151 148 u8 nap_state_lost; /* NV GPR values lost in power7_idle */ 152 - u64 sprg3; /* Saved user-visible sprg */ 149 + u64 sprg_vdso; /* Saved user-visible sprg */ 153 150 #ifdef CONFIG_PPC_TRANSACTIONAL_MEM 154 151 u64 tm_scratch; /* TM scratch area for reclaim */ 155 152 #endif
+12 -3
arch/powerpc/include/asm/reg.h
··· 577 577 #define SPRN_SPRG3 0x113 /* Special Purpose Register General 3 */ 578 578 #define SPRN_USPRG3 0x103 /* SPRG3 userspace read */ 579 579 #define SPRN_SPRG4 0x114 /* Special Purpose Register General 4 */ 580 + #define SPRN_USPRG4 0x104 /* SPRG4 userspace read */ 580 581 #define SPRN_SPRG5 0x115 /* Special Purpose Register General 5 */ 582 + #define SPRN_USPRG5 0x105 /* SPRG5 userspace read */ 581 583 #define SPRN_SPRG6 0x116 /* Special Purpose Register General 6 */ 584 + #define SPRN_USPRG6 0x106 /* SPRG6 userspace read */ 582 585 #define SPRN_SPRG7 0x117 /* Special Purpose Register General 7 */ 586 + #define SPRN_USPRG7 0x107 /* SPRG7 userspace read */ 583 587 #define SPRN_SRR0 0x01A /* Save/Restore Register 0 */ 584 588 #define SPRN_SRR1 0x01B /* Save/Restore Register 1 */ 585 589 #define SRR1_ISI_NOPT 0x40000000 /* ISI: Not found in hash */ ··· 886 882 * 64-bit embedded 887 883 * - SPRG0 generic exception scratch 888 884 * - SPRG2 TLB exception stack 889 - * - SPRG3 critical exception scratch and 890 - * CPU and NUMA node for VDSO getcpu (user visible) 885 + * - SPRG3 critical exception scratch (user visible, sorry!) 891 886 * - SPRG4 unused (user visible) 892 887 * - SPRG6 TLB miss scratch (user visible, sorry !) 893 - * - SPRG7 critical exception scratch 888 + * - SPRG7 CPU and NUMA node for VDSO getcpu (user visible) 894 889 * - SPRG8 machine check exception scratch 895 890 * - SPRG9 debug exception scratch 896 891 * ··· 946 943 #define SPRN_SPRG_SCRATCH0 SPRN_SPRG2 947 944 #define SPRN_SPRG_HPACA SPRN_HSPRG0 948 945 #define SPRN_SPRG_HSCRATCH0 SPRN_HSPRG1 946 + #define SPRN_SPRG_VDSO_READ SPRN_USPRG3 947 + #define SPRN_SPRG_VDSO_WRITE SPRN_SPRG3 949 948 950 949 #define GET_PACA(rX) \ 951 950 BEGIN_FTR_SECTION_NESTED(66); \ ··· 991 986 #define SPRN_SPRG_TLB_SCRATCH SPRN_SPRG6 992 987 #define SPRN_SPRG_GEN_SCRATCH SPRN_SPRG0 993 988 #define SPRN_SPRG_GDBELL_SCRATCH SPRN_SPRG_GEN_SCRATCH 989 + #define SPRN_SPRG_VDSO_READ SPRN_USPRG7 990 + #define SPRN_SPRG_VDSO_WRITE SPRN_SPRG7 994 991 995 992 #define SET_PACA(rX) mtspr SPRN_SPRG_PACA,rX 996 993 #define GET_PACA(rX) mfspr rX,SPRN_SPRG_PACA ··· 1112 1105 #define PVR_8560 0x80200000 1113 1106 #define PVR_VER_E500V1 0x8020 1114 1107 #define PVR_VER_E500V2 0x8021 1108 + #define PVR_VER_E500MC 0x8023 1109 + #define PVR_VER_E5500 0x8024 1115 1110 #define PVR_VER_E6500 0x8040 1116 1111 1117 1112 /*
+1 -1
arch/powerpc/kernel/asm-offsets.c
··· 253 253 DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time)); 254 254 DEFINE(PACA_TRAP_SAVE, offsetof(struct paca_struct, trap_save)); 255 255 DEFINE(PACA_NAPSTATELOST, offsetof(struct paca_struct, nap_state_lost)); 256 - DEFINE(PACA_SPRG3, offsetof(struct paca_struct, sprg3)); 256 + DEFINE(PACA_SPRG_VDSO, offsetof(struct paca_struct, sprg_vdso)); 257 257 #endif /* CONFIG_PPC64 */ 258 258 259 259 /* RTAS */
+337 -98
arch/powerpc/kernel/exceptions-64e.S
··· 34 34 * special interrupts from within a non-standard level will probably 35 35 * blow you up 36 36 */ 37 - #define SPECIAL_EXC_FRAME_SIZE INT_FRAME_SIZE 37 + #define SPECIAL_EXC_SRR0 0 38 + #define SPECIAL_EXC_SRR1 1 39 + #define SPECIAL_EXC_SPRG_GEN 2 40 + #define SPECIAL_EXC_SPRG_TLB 3 41 + #define SPECIAL_EXC_MAS0 4 42 + #define SPECIAL_EXC_MAS1 5 43 + #define SPECIAL_EXC_MAS2 6 44 + #define SPECIAL_EXC_MAS3 7 45 + #define SPECIAL_EXC_MAS6 8 46 + #define SPECIAL_EXC_MAS7 9 47 + #define SPECIAL_EXC_MAS5 10 /* E.HV only */ 48 + #define SPECIAL_EXC_MAS8 11 /* E.HV only */ 49 + #define SPECIAL_EXC_IRQHAPPENED 12 50 + #define SPECIAL_EXC_DEAR 13 51 + #define SPECIAL_EXC_ESR 14 52 + #define SPECIAL_EXC_SOFTE 15 53 + #define SPECIAL_EXC_CSRR0 16 54 + #define SPECIAL_EXC_CSRR1 17 55 + /* must be even to keep 16-byte stack alignment */ 56 + #define SPECIAL_EXC_END 18 57 + 58 + #define SPECIAL_EXC_FRAME_SIZE (INT_FRAME_SIZE + SPECIAL_EXC_END * 8) 59 + #define SPECIAL_EXC_FRAME_OFFS (INT_FRAME_SIZE - 288) 60 + 61 + #define SPECIAL_EXC_STORE(reg, name) \ 62 + std reg, (SPECIAL_EXC_##name * 8 + SPECIAL_EXC_FRAME_OFFS)(r1) 63 + 64 + #define SPECIAL_EXC_LOAD(reg, name) \ 65 + ld reg, (SPECIAL_EXC_##name * 8 + SPECIAL_EXC_FRAME_OFFS)(r1) 66 + 67 + special_reg_save: 68 + lbz r9,PACAIRQHAPPENED(r13) 69 + RECONCILE_IRQ_STATE(r3,r4) 70 + 71 + /* 72 + * We only need (or have stack space) to save this stuff if 73 + * we interrupted the kernel. 74 + */ 75 + ld r3,_MSR(r1) 76 + andi. r3,r3,MSR_PR 77 + bnelr 78 + 79 + /* Copy info into temporary exception thread info */ 80 + ld r11,PACAKSAVE(r13) 81 + CURRENT_THREAD_INFO(r11, r11) 82 + CURRENT_THREAD_INFO(r12, r1) 83 + ld r10,TI_FLAGS(r11) 84 + std r10,TI_FLAGS(r12) 85 + ld r10,TI_PREEMPT(r11) 86 + std r10,TI_PREEMPT(r12) 87 + ld r10,TI_TASK(r11) 88 + std r10,TI_TASK(r12) 89 + 90 + /* 91 + * Advance to the next TLB exception frame for handler 92 + * types that don't do it automatically. 93 + */ 94 + LOAD_REG_ADDR(r11,extlb_level_exc) 95 + lwz r12,0(r11) 96 + mfspr r10,SPRN_SPRG_TLB_EXFRAME 97 + add r10,r10,r12 98 + mtspr SPRN_SPRG_TLB_EXFRAME,r10 99 + 100 + /* 101 + * Save registers needed to allow nesting of certain exceptions 102 + * (such as TLB misses) inside special exception levels 103 + */ 104 + mfspr r10,SPRN_SRR0 105 + SPECIAL_EXC_STORE(r10,SRR0) 106 + mfspr r10,SPRN_SRR1 107 + SPECIAL_EXC_STORE(r10,SRR1) 108 + mfspr r10,SPRN_SPRG_GEN_SCRATCH 109 + SPECIAL_EXC_STORE(r10,SPRG_GEN) 110 + mfspr r10,SPRN_SPRG_TLB_SCRATCH 111 + SPECIAL_EXC_STORE(r10,SPRG_TLB) 112 + mfspr r10,SPRN_MAS0 113 + SPECIAL_EXC_STORE(r10,MAS0) 114 + mfspr r10,SPRN_MAS1 115 + SPECIAL_EXC_STORE(r10,MAS1) 116 + mfspr r10,SPRN_MAS2 117 + SPECIAL_EXC_STORE(r10,MAS2) 118 + mfspr r10,SPRN_MAS3 119 + SPECIAL_EXC_STORE(r10,MAS3) 120 + mfspr r10,SPRN_MAS6 121 + SPECIAL_EXC_STORE(r10,MAS6) 122 + mfspr r10,SPRN_MAS7 123 + SPECIAL_EXC_STORE(r10,MAS7) 124 + BEGIN_FTR_SECTION 125 + mfspr r10,SPRN_MAS5 126 + SPECIAL_EXC_STORE(r10,MAS5) 127 + mfspr r10,SPRN_MAS8 128 + SPECIAL_EXC_STORE(r10,MAS8) 129 + 130 + /* MAS5/8 could have inappropriate values if we interrupted KVM code */ 131 + li r10,0 132 + mtspr SPRN_MAS5,r10 133 + mtspr SPRN_MAS8,r10 134 + END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV) 135 + SPECIAL_EXC_STORE(r9,IRQHAPPENED) 136 + 137 + mfspr r10,SPRN_DEAR 138 + SPECIAL_EXC_STORE(r10,DEAR) 139 + mfspr r10,SPRN_ESR 140 + SPECIAL_EXC_STORE(r10,ESR) 141 + 142 + lbz r10,PACASOFTIRQEN(r13) 143 + SPECIAL_EXC_STORE(r10,SOFTE) 144 + ld r10,_NIP(r1) 145 + SPECIAL_EXC_STORE(r10,CSRR0) 146 + ld r10,_MSR(r1) 147 + SPECIAL_EXC_STORE(r10,CSRR1) 148 + 149 + blr 150 + 151 + ret_from_level_except: 152 + ld r3,_MSR(r1) 153 + andi. r3,r3,MSR_PR 154 + beq 1f 155 + b ret_from_except 156 + 1: 157 + 158 + LOAD_REG_ADDR(r11,extlb_level_exc) 159 + lwz r12,0(r11) 160 + mfspr r10,SPRN_SPRG_TLB_EXFRAME 161 + sub r10,r10,r12 162 + mtspr SPRN_SPRG_TLB_EXFRAME,r10 163 + 164 + /* 165 + * It's possible that the special level exception interrupted a 166 + * TLB miss handler, and inserted the same entry that the 167 + * interrupted handler was about to insert. On CPUs without TLB 168 + * write conditional, this can result in a duplicate TLB entry. 169 + * Wipe all non-bolted entries to be safe. 170 + * 171 + * Note that this doesn't protect against any TLB misses 172 + * we may take accessing the stack from here to the end of 173 + * the special level exception. It's not clear how we can 174 + * reasonably protect against that, but only CPUs with 175 + * neither TLB write conditional nor bolted kernel memory 176 + * are affected. Do any such CPUs even exist? 177 + */ 178 + PPC_TLBILX_ALL(0,R0) 179 + 180 + REST_NVGPRS(r1) 181 + 182 + SPECIAL_EXC_LOAD(r10,SRR0) 183 + mtspr SPRN_SRR0,r10 184 + SPECIAL_EXC_LOAD(r10,SRR1) 185 + mtspr SPRN_SRR1,r10 186 + SPECIAL_EXC_LOAD(r10,SPRG_GEN) 187 + mtspr SPRN_SPRG_GEN_SCRATCH,r10 188 + SPECIAL_EXC_LOAD(r10,SPRG_TLB) 189 + mtspr SPRN_SPRG_TLB_SCRATCH,r10 190 + SPECIAL_EXC_LOAD(r10,MAS0) 191 + mtspr SPRN_MAS0,r10 192 + SPECIAL_EXC_LOAD(r10,MAS1) 193 + mtspr SPRN_MAS1,r10 194 + SPECIAL_EXC_LOAD(r10,MAS2) 195 + mtspr SPRN_MAS2,r10 196 + SPECIAL_EXC_LOAD(r10,MAS3) 197 + mtspr SPRN_MAS3,r10 198 + SPECIAL_EXC_LOAD(r10,MAS6) 199 + mtspr SPRN_MAS6,r10 200 + SPECIAL_EXC_LOAD(r10,MAS7) 201 + mtspr SPRN_MAS7,r10 202 + BEGIN_FTR_SECTION 203 + SPECIAL_EXC_LOAD(r10,MAS5) 204 + mtspr SPRN_MAS5,r10 205 + SPECIAL_EXC_LOAD(r10,MAS8) 206 + mtspr SPRN_MAS8,r10 207 + END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV) 208 + 209 + lbz r6,PACASOFTIRQEN(r13) 210 + ld r5,SOFTE(r1) 211 + 212 + /* Interrupts had better not already be enabled... */ 213 + twnei r6,0 214 + 215 + cmpwi cr0,r5,0 216 + beq 1f 217 + 218 + TRACE_ENABLE_INTS 219 + stb r5,PACASOFTIRQEN(r13) 220 + 1: 221 + /* 222 + * Restore PACAIRQHAPPENED rather than setting it based on 223 + * the return MSR[EE], since we could have interrupted 224 + * __check_irq_replay() or other inconsistent transitory 225 + * states that must remain that way. 226 + */ 227 + SPECIAL_EXC_LOAD(r10,IRQHAPPENED) 228 + stb r10,PACAIRQHAPPENED(r13) 229 + 230 + SPECIAL_EXC_LOAD(r10,DEAR) 231 + mtspr SPRN_DEAR,r10 232 + SPECIAL_EXC_LOAD(r10,ESR) 233 + mtspr SPRN_ESR,r10 234 + 235 + stdcx. r0,0,r1 /* to clear the reservation */ 236 + 237 + REST_4GPRS(2, r1) 238 + REST_4GPRS(6, r1) 239 + 240 + ld r10,_CTR(r1) 241 + ld r11,_XER(r1) 242 + mtctr r10 243 + mtxer r11 244 + 245 + blr 246 + 247 + .macro ret_from_level srr0 srr1 paca_ex scratch 248 + bl ret_from_level_except 249 + 250 + ld r10,_LINK(r1) 251 + ld r11,_CCR(r1) 252 + ld r0,GPR13(r1) 253 + mtlr r10 254 + mtcr r11 255 + 256 + ld r10,GPR10(r1) 257 + ld r11,GPR11(r1) 258 + ld r12,GPR12(r1) 259 + mtspr \scratch,r0 260 + 261 + std r10,\paca_ex+EX_R10(r13); 262 + std r11,\paca_ex+EX_R11(r13); 263 + ld r10,_NIP(r1) 264 + ld r11,_MSR(r1) 265 + ld r0,GPR0(r1) 266 + ld r1,GPR1(r1) 267 + mtspr \srr0,r10 268 + mtspr \srr1,r11 269 + ld r10,\paca_ex+EX_R10(r13) 270 + ld r11,\paca_ex+EX_R11(r13) 271 + mfspr r13,\scratch 272 + .endm 273 + 274 + ret_from_crit_except: 275 + ret_from_level SPRN_CSRR0 SPRN_CSRR1 PACA_EXCRIT SPRN_SPRG_CRIT_SCRATCH 276 + rfci 277 + 278 + ret_from_mc_except: 279 + ret_from_level SPRN_MCSRR0 SPRN_MCSRR1 PACA_EXMC SPRN_SPRG_MC_SCRATCH 280 + rfmci 38 281 39 282 /* Exception prolog code for all exceptions */ 40 283 #define EXCEPTION_PROLOG(n, intnum, type, addition) \ ··· 285 42 mfspr r13,SPRN_SPRG_PACA; /* get PACA */ \ 286 43 std r10,PACA_EX##type+EX_R10(r13); \ 287 44 std r11,PACA_EX##type+EX_R11(r13); \ 288 - PROLOG_STORE_RESTORE_SCRATCH_##type; \ 289 45 mfcr r10; /* save CR */ \ 290 46 mfspr r11,SPRN_##type##_SRR1;/* what are we coming from */ \ 291 47 DO_KVM intnum,SPRN_##type##_SRR1; /* KVM hook */ \ ··· 311 69 312 70 #define CRIT_SET_KSTACK \ 313 71 ld r1,PACA_CRIT_STACK(r13); \ 314 - subi r1,r1,SPECIAL_EXC_FRAME_SIZE; 72 + subi r1,r1,SPECIAL_EXC_FRAME_SIZE 315 73 #define SPRN_CRIT_SRR0 SPRN_CSRR0 316 74 #define SPRN_CRIT_SRR1 SPRN_CSRR1 317 75 318 76 #define DBG_SET_KSTACK \ 319 77 ld r1,PACA_DBG_STACK(r13); \ 320 - subi r1,r1,SPECIAL_EXC_FRAME_SIZE; 78 + subi r1,r1,SPECIAL_EXC_FRAME_SIZE 321 79 #define SPRN_DBG_SRR0 SPRN_DSRR0 322 80 #define SPRN_DBG_SRR1 SPRN_DSRR1 323 81 324 82 #define MC_SET_KSTACK \ 325 83 ld r1,PACA_MC_STACK(r13); \ 326 - subi r1,r1,SPECIAL_EXC_FRAME_SIZE; 84 + subi r1,r1,SPECIAL_EXC_FRAME_SIZE 327 85 #define SPRN_MC_SRR0 SPRN_MCSRR0 328 86 #define SPRN_MC_SRR1 SPRN_MCSRR1 329 87 ··· 341 99 342 100 #define GDBELL_EXCEPTION_PROLOG(n, intnum, addition) \ 343 101 EXCEPTION_PROLOG(n, intnum, GDBELL, addition##_GDBELL(n)) 344 - 345 - /* 346 - * Store user-visible scratch in PACA exception slots and restore proper value 347 - */ 348 - #define PROLOG_STORE_RESTORE_SCRATCH_GEN 349 - #define PROLOG_STORE_RESTORE_SCRATCH_GDBELL 350 - #define PROLOG_STORE_RESTORE_SCRATCH_DBG 351 - #define PROLOG_STORE_RESTORE_SCRATCH_MC 352 - 353 - #define PROLOG_STORE_RESTORE_SCRATCH_CRIT \ 354 - mfspr r10,SPRN_SPRG_CRIT_SCRATCH; /* get r13 */ \ 355 - std r10,PACA_EXCRIT+EX_R13(r13); \ 356 - ld r11,PACA_SPRG3(r13); \ 357 - mtspr SPRN_SPRG_CRIT_SCRATCH,r11; 358 102 359 103 /* Variants of the "addition" argument for the prolog 360 104 */ ··· 375 147 std r15,PACA_EXMC+EX_R15(r13) 376 148 377 149 378 - /* Core exception code for all exceptions except TLB misses. 379 - * XXX: Needs to make SPRN_SPRG_GEN depend on exception type 380 - */ 381 - #define EXCEPTION_COMMON(n, excf, ints) \ 150 + /* Core exception code for all exceptions except TLB misses. */ 151 + #define EXCEPTION_COMMON_LVL(n, scratch, excf) \ 382 152 exc_##n##_common: \ 383 153 std r0,GPR0(r1); /* save r0 in stackframe */ \ 384 154 std r2,GPR2(r1); /* save r2 in stackframe */ \ ··· 389 163 ACCOUNT_CPU_USER_ENTRY(r10,r11);/* accounting (uses cr0+eq) */ \ 390 164 2: ld r3,excf+EX_R10(r13); /* get back r10 */ \ 391 165 ld r4,excf+EX_R11(r13); /* get back r11 */ \ 392 - mfspr r5,SPRN_SPRG_GEN_SCRATCH;/* get back r13 */ \ 166 + mfspr r5,scratch; /* get back r13 */ \ 393 167 std r12,GPR12(r1); /* save r12 in stackframe */ \ 394 168 ld r2,PACATOC(r13); /* get kernel TOC into r2 */ \ 395 169 mflr r6; /* save LR in stackframe */ \ ··· 413 187 std r11,SOFTE(r1); /* and save it to stackframe */ \ 414 188 std r12,STACK_FRAME_OVERHEAD-16(r1); /* mark the frame */ \ 415 189 std r3,_TRAP(r1); /* set trap number */ \ 416 - std r0,RESULT(r1); /* clear regs->result */ \ 417 - ints; 190 + std r0,RESULT(r1); /* clear regs->result */ 418 191 419 - /* Variants for the "ints" argument. This one does nothing when we want 420 - * to keep interrupts in their original state 421 - */ 422 - #define INTS_KEEP 192 + #define EXCEPTION_COMMON(n) \ 193 + EXCEPTION_COMMON_LVL(n, SPRN_SPRG_GEN_SCRATCH, PACA_EXGEN) 194 + #define EXCEPTION_COMMON_CRIT(n) \ 195 + EXCEPTION_COMMON_LVL(n, SPRN_SPRG_CRIT_SCRATCH, PACA_EXCRIT) 196 + #define EXCEPTION_COMMON_MC(n) \ 197 + EXCEPTION_COMMON_LVL(n, SPRN_SPRG_MC_SCRATCH, PACA_EXMC) 198 + #define EXCEPTION_COMMON_DBG(n) \ 199 + EXCEPTION_COMMON_LVL(n, SPRN_SPRG_DBG_SCRATCH, PACA_EXDBG) 423 200 424 - /* This second version is meant for exceptions that don't immediately 425 - * hard-enable. We set a bit in paca->irq_happened to ensure that 426 - * a subsequent call to arch_local_irq_restore() will properly 427 - * hard-enable and avoid the fast-path, and then reconcile irq state. 201 + /* 202 + * This is meant for exceptions that don't immediately hard-enable. We 203 + * set a bit in paca->irq_happened to ensure that a subsequent call to 204 + * arch_local_irq_restore() will properly hard-enable and avoid the 205 + * fast-path, and then reconcile irq state. 428 206 */ 429 207 #define INTS_DISABLE RECONCILE_IRQ_STATE(r3,r4) 430 208 431 - /* This is called by exceptions that used INTS_KEEP (that did not touch 432 - * irq indicators in the PACA). This will restore MSR:EE to it's previous 433 - * value 209 + /* 210 + * This is called by exceptions that don't use INTS_DISABLE (that did not 211 + * touch irq indicators in the PACA). This will restore MSR:EE to it's 212 + * previous value 434 213 * 435 214 * XXX In the long run, we may want to open-code it in order to separate the 436 215 * load from the wrtee, thus limiting the latency caused by the dependency ··· 493 262 #define MASKABLE_EXCEPTION(trapnum, intnum, label, hdlr, ack) \ 494 263 START_EXCEPTION(label); \ 495 264 NORMAL_EXCEPTION_PROLOG(trapnum, intnum, PROLOG_ADDITION_MASKABLE)\ 496 - EXCEPTION_COMMON(trapnum, PACA_EXGEN, INTS_DISABLE) \ 265 + EXCEPTION_COMMON(trapnum) \ 266 + INTS_DISABLE; \ 497 267 ack(r8); \ 498 268 CHECK_NAPPING(); \ 499 269 addi r3,r1,STACK_FRAME_OVERHEAD; \ ··· 515 283 .balign 0x1000 516 284 .globl interrupt_base_book3e 517 285 interrupt_base_book3e: /* fake trap */ 518 - EXCEPTION_STUB(0x000, machine_check) /* 0x0200 */ 519 - EXCEPTION_STUB(0x020, critical_input) /* 0x0580 */ 286 + EXCEPTION_STUB(0x000, machine_check) 287 + EXCEPTION_STUB(0x020, critical_input) /* 0x0100 */ 520 288 EXCEPTION_STUB(0x040, debug_crit) /* 0x0d00 */ 521 289 EXCEPTION_STUB(0x060, data_storage) /* 0x0300 */ 522 290 EXCEPTION_STUB(0x080, instruction_storage) /* 0x0400 */ ··· 531 299 EXCEPTION_STUB(0x1a0, watchdog) /* 0x09f0 */ 532 300 EXCEPTION_STUB(0x1c0, data_tlb_miss) 533 301 EXCEPTION_STUB(0x1e0, instruction_tlb_miss) 534 - EXCEPTION_STUB(0x200, altivec_unavailable) /* 0x0f20 */ 535 - EXCEPTION_STUB(0x220, altivec_assist) /* 0x1700 */ 302 + EXCEPTION_STUB(0x200, altivec_unavailable) 303 + EXCEPTION_STUB(0x220, altivec_assist) 536 304 EXCEPTION_STUB(0x260, perfmon) 537 305 EXCEPTION_STUB(0x280, doorbell) 538 306 EXCEPTION_STUB(0x2a0, doorbell_crit) ··· 549 317 START_EXCEPTION(critical_input); 550 318 CRIT_EXCEPTION_PROLOG(0x100, BOOKE_INTERRUPT_CRITICAL, 551 319 PROLOG_ADDITION_NONE) 552 - // EXCEPTION_COMMON(0x100, PACA_EXCRIT, INTS_DISABLE) 553 - // bl special_reg_save_crit 554 - // CHECK_NAPPING(); 555 - // addi r3,r1,STACK_FRAME_OVERHEAD 556 - // bl .critical_exception 557 - // b ret_from_crit_except 558 - b . 320 + EXCEPTION_COMMON_CRIT(0x100) 321 + bl .save_nvgprs 322 + bl special_reg_save 323 + CHECK_NAPPING(); 324 + addi r3,r1,STACK_FRAME_OVERHEAD 325 + bl .unknown_exception 326 + b ret_from_crit_except 559 327 560 328 /* Machine Check Interrupt */ 561 329 START_EXCEPTION(machine_check); 562 - MC_EXCEPTION_PROLOG(0x200, BOOKE_INTERRUPT_MACHINE_CHECK, 330 + MC_EXCEPTION_PROLOG(0x000, BOOKE_INTERRUPT_MACHINE_CHECK, 563 331 PROLOG_ADDITION_NONE) 564 - // EXCEPTION_COMMON(0x200, PACA_EXMC, INTS_DISABLE) 565 - // bl special_reg_save_mc 566 - // addi r3,r1,STACK_FRAME_OVERHEAD 567 - // CHECK_NAPPING(); 568 - // bl .machine_check_exception 569 - // b ret_from_mc_except 570 - b . 332 + EXCEPTION_COMMON_MC(0x000) 333 + bl .save_nvgprs 334 + bl special_reg_save 335 + CHECK_NAPPING(); 336 + addi r3,r1,STACK_FRAME_OVERHEAD 337 + bl .machine_check_exception 338 + b ret_from_mc_except 571 339 572 340 /* Data Storage Interrupt */ 573 341 START_EXCEPTION(data_storage) ··· 575 343 PROLOG_ADDITION_2REGS) 576 344 mfspr r14,SPRN_DEAR 577 345 mfspr r15,SPRN_ESR 578 - EXCEPTION_COMMON(0x300, PACA_EXGEN, INTS_DISABLE) 346 + EXCEPTION_COMMON(0x300) 347 + INTS_DISABLE 579 348 b storage_fault_common 580 349 581 350 /* Instruction Storage Interrupt */ ··· 585 352 PROLOG_ADDITION_2REGS) 586 353 li r15,0 587 354 mr r14,r10 588 - EXCEPTION_COMMON(0x400, PACA_EXGEN, INTS_DISABLE) 355 + EXCEPTION_COMMON(0x400) 356 + INTS_DISABLE 589 357 b storage_fault_common 590 358 591 359 /* External Input Interrupt */ ··· 599 365 PROLOG_ADDITION_2REGS) 600 366 mfspr r14,SPRN_DEAR 601 367 mfspr r15,SPRN_ESR 602 - EXCEPTION_COMMON(0x600, PACA_EXGEN, INTS_KEEP) 368 + EXCEPTION_COMMON(0x600) 603 369 b alignment_more /* no room, go out of line */ 604 370 605 371 /* Program Interrupt */ ··· 607 373 NORMAL_EXCEPTION_PROLOG(0x700, BOOKE_INTERRUPT_PROGRAM, 608 374 PROLOG_ADDITION_1REG) 609 375 mfspr r14,SPRN_ESR 610 - EXCEPTION_COMMON(0x700, PACA_EXGEN, INTS_DISABLE) 376 + EXCEPTION_COMMON(0x700) 377 + INTS_DISABLE 611 378 std r14,_DSISR(r1) 612 379 addi r3,r1,STACK_FRAME_OVERHEAD 613 380 ld r14,PACA_EXGEN+EX_R14(r13) ··· 621 386 NORMAL_EXCEPTION_PROLOG(0x800, BOOKE_INTERRUPT_FP_UNAVAIL, 622 387 PROLOG_ADDITION_NONE) 623 388 /* we can probably do a shorter exception entry for that one... */ 624 - EXCEPTION_COMMON(0x800, PACA_EXGEN, INTS_KEEP) 389 + EXCEPTION_COMMON(0x800) 625 390 ld r12,_MSR(r1) 626 391 andi. r0,r12,MSR_PR; 627 392 beq- 1f ··· 638 403 NORMAL_EXCEPTION_PROLOG(0x200, BOOKE_INTERRUPT_SPE_ALTIVEC_UNAVAIL, 639 404 PROLOG_ADDITION_NONE) 640 405 /* we can probably do a shorter exception entry for that one... */ 641 - EXCEPTION_COMMON(0x200, PACA_EXGEN, INTS_KEEP) 406 + EXCEPTION_COMMON(0x200) 642 407 #ifdef CONFIG_ALTIVEC 643 408 BEGIN_FTR_SECTION 644 409 ld r12,_MSR(r1) ··· 660 425 NORMAL_EXCEPTION_PROLOG(0x220, 661 426 BOOKE_INTERRUPT_SPE_FP_DATA_ALTIVEC_ASSIST, 662 427 PROLOG_ADDITION_NONE) 663 - EXCEPTION_COMMON(0x220, PACA_EXGEN, INTS_DISABLE) 428 + EXCEPTION_COMMON(0x220) 429 + INTS_DISABLE 664 430 bl .save_nvgprs 665 431 addi r3,r1,STACK_FRAME_OVERHEAD 666 432 #ifdef CONFIG_ALTIVEC ··· 686 450 START_EXCEPTION(watchdog); 687 451 CRIT_EXCEPTION_PROLOG(0x9f0, BOOKE_INTERRUPT_WATCHDOG, 688 452 PROLOG_ADDITION_NONE) 689 - // EXCEPTION_COMMON(0x9f0, PACA_EXCRIT, INTS_DISABLE) 690 - // bl special_reg_save_crit 691 - // CHECK_NAPPING(); 692 - // addi r3,r1,STACK_FRAME_OVERHEAD 693 - // bl .unknown_exception 694 - // b ret_from_crit_except 695 - b . 453 + EXCEPTION_COMMON_CRIT(0x9f0) 454 + bl .save_nvgprs 455 + bl special_reg_save 456 + CHECK_NAPPING(); 457 + addi r3,r1,STACK_FRAME_OVERHEAD 458 + #ifdef CONFIG_BOOKE_WDT 459 + bl .WatchdogException 460 + #else 461 + bl .unknown_exception 462 + #endif 463 + b ret_from_crit_except 696 464 697 465 /* System Call Interrupt */ 698 466 START_EXCEPTION(system_call) ··· 710 470 START_EXCEPTION(ap_unavailable); 711 471 NORMAL_EXCEPTION_PROLOG(0xf20, BOOKE_INTERRUPT_AP_UNAVAIL, 712 472 PROLOG_ADDITION_NONE) 713 - EXCEPTION_COMMON(0xf20, PACA_EXGEN, INTS_DISABLE) 473 + EXCEPTION_COMMON(0xf20) 474 + INTS_DISABLE 714 475 bl .save_nvgprs 715 476 addi r3,r1,STACK_FRAME_OVERHEAD 716 477 bl .unknown_exception ··· 754 513 mtcr r10 755 514 ld r10,PACA_EXCRIT+EX_R10(r13) /* restore registers */ 756 515 ld r11,PACA_EXCRIT+EX_R11(r13) 757 - ld r13,PACA_EXCRIT+EX_R13(r13) 516 + mfspr r13,SPRN_SPRG_CRIT_SCRATCH 758 517 rfci 759 518 760 519 /* Normal debug exception */ ··· 767 526 /* Now we mash up things to make it look like we are coming on a 768 527 * normal exception 769 528 */ 770 - ld r15,PACA_EXCRIT+EX_R13(r13) 771 - mtspr SPRN_SPRG_GEN_SCRATCH,r15 772 529 mfspr r14,SPRN_DBSR 773 - EXCEPTION_COMMON(0xd00, PACA_EXCRIT, INTS_DISABLE) 530 + EXCEPTION_COMMON_CRIT(0xd00) 774 531 std r14,_DSISR(r1) 775 532 addi r3,r1,STACK_FRAME_OVERHEAD 776 533 mr r4,r14 ··· 831 592 /* Now we mash up things to make it look like we are coming on a 832 593 * normal exception 833 594 */ 834 - mfspr r15,SPRN_SPRG_DBG_SCRATCH 835 - mtspr SPRN_SPRG_GEN_SCRATCH,r15 836 595 mfspr r14,SPRN_DBSR 837 - EXCEPTION_COMMON(0xd08, PACA_EXDBG, INTS_DISABLE) 596 + EXCEPTION_COMMON_DBG(0xd08) 597 + INTS_DISABLE 838 598 std r14,_DSISR(r1) 839 599 addi r3,r1,STACK_FRAME_OVERHEAD 840 600 mr r4,r14 ··· 846 608 START_EXCEPTION(perfmon); 847 609 NORMAL_EXCEPTION_PROLOG(0x260, BOOKE_INTERRUPT_PERFORMANCE_MONITOR, 848 610 PROLOG_ADDITION_NONE) 849 - EXCEPTION_COMMON(0x260, PACA_EXGEN, INTS_DISABLE) 611 + EXCEPTION_COMMON(0x260) 612 + INTS_DISABLE 850 613 CHECK_NAPPING() 851 614 addi r3,r1,STACK_FRAME_OVERHEAD 852 615 bl .performance_monitor_exception ··· 861 622 START_EXCEPTION(doorbell_crit); 862 623 CRIT_EXCEPTION_PROLOG(0x2a0, BOOKE_INTERRUPT_DOORBELL_CRITICAL, 863 624 PROLOG_ADDITION_NONE) 864 - // EXCEPTION_COMMON(0x2a0, PACA_EXCRIT, INTS_DISABLE) 865 - // bl special_reg_save_crit 866 - // CHECK_NAPPING(); 867 - // addi r3,r1,STACK_FRAME_OVERHEAD 868 - // bl .doorbell_critical_exception 869 - // b ret_from_crit_except 870 - b . 625 + EXCEPTION_COMMON_CRIT(0x2a0) 626 + bl .save_nvgprs 627 + bl special_reg_save 628 + CHECK_NAPPING(); 629 + addi r3,r1,STACK_FRAME_OVERHEAD 630 + bl .unknown_exception 631 + b ret_from_crit_except 871 632 872 633 /* 873 634 * Guest doorbell interrupt ··· 876 637 START_EXCEPTION(guest_doorbell); 877 638 GDBELL_EXCEPTION_PROLOG(0x2c0, BOOKE_INTERRUPT_GUEST_DBELL, 878 639 PROLOG_ADDITION_NONE) 879 - EXCEPTION_COMMON(0x2c0, PACA_EXGEN, INTS_KEEP) 640 + EXCEPTION_COMMON(0x2c0) 880 641 addi r3,r1,STACK_FRAME_OVERHEAD 881 642 bl .save_nvgprs 882 643 INTS_RESTORE_HARD ··· 887 648 START_EXCEPTION(guest_doorbell_crit); 888 649 CRIT_EXCEPTION_PROLOG(0x2e0, BOOKE_INTERRUPT_GUEST_DBELL_CRIT, 889 650 PROLOG_ADDITION_NONE) 890 - // EXCEPTION_COMMON(0x2e0, PACA_EXCRIT, INTS_DISABLE) 891 - // bl special_reg_save_crit 892 - // CHECK_NAPPING(); 893 - // addi r3,r1,STACK_FRAME_OVERHEAD 894 - // bl .guest_doorbell_critical_exception 895 - // b ret_from_crit_except 896 - b . 651 + EXCEPTION_COMMON_CRIT(0x2e0) 652 + bl .save_nvgprs 653 + bl special_reg_save 654 + CHECK_NAPPING(); 655 + addi r3,r1,STACK_FRAME_OVERHEAD 656 + bl .unknown_exception 657 + b ret_from_crit_except 897 658 898 659 /* Hypervisor call */ 899 660 START_EXCEPTION(hypercall); 900 661 NORMAL_EXCEPTION_PROLOG(0x310, BOOKE_INTERRUPT_HV_SYSCALL, 901 662 PROLOG_ADDITION_NONE) 902 - EXCEPTION_COMMON(0x310, PACA_EXGEN, INTS_KEEP) 663 + EXCEPTION_COMMON(0x310) 903 664 addi r3,r1,STACK_FRAME_OVERHEAD 904 665 bl .save_nvgprs 905 666 INTS_RESTORE_HARD ··· 910 671 START_EXCEPTION(ehpriv); 911 672 NORMAL_EXCEPTION_PROLOG(0x320, BOOKE_INTERRUPT_HV_PRIV, 912 673 PROLOG_ADDITION_NONE) 913 - EXCEPTION_COMMON(0x320, PACA_EXGEN, INTS_KEEP) 674 + EXCEPTION_COMMON(0x320) 914 675 addi r3,r1,STACK_FRAME_OVERHEAD 915 676 bl .save_nvgprs 916 677 INTS_RESTORE_HARD ··· 921 682 START_EXCEPTION(lrat_error); 922 683 NORMAL_EXCEPTION_PROLOG(0x340, BOOKE_INTERRUPT_LRAT_ERROR, 923 684 PROLOG_ADDITION_NONE) 924 - EXCEPTION_COMMON(0x340, PACA_EXGEN, INTS_KEEP) 685 + EXCEPTION_COMMON(0x340) 925 686 addi r3,r1,STACK_FRAME_OVERHEAD 926 687 bl .save_nvgprs 927 688 INTS_RESTORE_HARD
+14 -6
arch/powerpc/kernel/setup_64.c
··· 102 102 { 103 103 int cpu; 104 104 105 + BUILD_BUG_ON(offsetof(struct tlb_core_data, lock) != 0); 106 + 105 107 for_each_possible_cpu(cpu) { 106 108 int first = cpu_first_thread_sibling(cpu); 107 109 ··· 554 552 static void __init exc_lvl_early_init(void) 555 553 { 556 554 unsigned int i; 555 + unsigned long sp; 557 556 558 557 for_each_possible_cpu(i) { 559 - critirq_ctx[i] = (struct thread_info *) 560 - __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE)); 561 - dbgirq_ctx[i] = (struct thread_info *) 562 - __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE)); 563 - mcheckirq_ctx[i] = (struct thread_info *) 564 - __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE)); 558 + sp = memblock_alloc(THREAD_SIZE, THREAD_SIZE); 559 + critirq_ctx[i] = (struct thread_info *)__va(sp); 560 + paca[i].crit_kstack = __va(sp + THREAD_SIZE); 561 + 562 + sp = memblock_alloc(THREAD_SIZE, THREAD_SIZE); 563 + dbgirq_ctx[i] = (struct thread_info *)__va(sp); 564 + paca[i].dbg_kstack = __va(sp + THREAD_SIZE); 565 + 566 + sp = memblock_alloc(THREAD_SIZE, THREAD_SIZE); 567 + mcheckirq_ctx[i] = (struct thread_info *)__va(sp); 568 + paca[i].mc_kstack = __va(sp + THREAD_SIZE); 565 569 } 566 570 567 571 if (cpu_has_feature(CPU_FTR_DEBUG_LVL_EXC))
+4 -4
arch/powerpc/kernel/vdso.c
··· 715 715 unsigned long cpu, node, val; 716 716 717 717 /* 718 - * SPRG3 contains the CPU in the bottom 16 bits and the NUMA node in 719 - * the next 16 bits. The VDSO uses this to implement getcpu(). 718 + * SPRG_VDSO contains the CPU in the bottom 16 bits and the NUMA node 719 + * in the next 16 bits. The VDSO uses this to implement getcpu(). 720 720 */ 721 721 cpu = get_cpu(); 722 722 WARN_ON_ONCE(cpu > 0xffff); ··· 725 725 WARN_ON_ONCE(node > 0xffff); 726 726 727 727 val = (cpu & 0xfff) | ((node & 0xffff) << 16); 728 - mtspr(SPRN_SPRG3, val); 729 - get_paca()->sprg3 = val; 728 + mtspr(SPRN_SPRG_VDSO_WRITE, val); 729 + get_paca()->sprg_vdso = val; 730 730 731 731 put_cpu(); 732 732
+1 -1
arch/powerpc/kernel/vdso32/getcpu.S
··· 29 29 */ 30 30 V_FUNCTION_BEGIN(__kernel_getcpu) 31 31 .cfi_startproc 32 - mfspr r5,SPRN_USPRG3 32 + mfspr r5,SPRN_SPRG_VDSO_READ 33 33 cmpdi cr0,r3,0 34 34 cmpdi cr1,r4,0 35 35 clrlwi r6,r5,16
+1 -1
arch/powerpc/kernel/vdso64/getcpu.S
··· 29 29 */ 30 30 V_FUNCTION_BEGIN(__kernel_getcpu) 31 31 .cfi_startproc 32 - mfspr r5,SPRN_USPRG3 32 + mfspr r5,SPRN_SPRG_VDSO_READ 33 33 cmpdi cr0,r3,0 34 34 cmpdi cr1,r4,0 35 35 clrlwi r6,r5,16
+2 -2
arch/powerpc/kvm/book3s_hv_rmhandlers.S
··· 75 75 END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_207S) 76 76 77 77 /* Restore SPRG3 */ 78 - ld r3,PACA_SPRG3(r13) 79 - mtspr SPRN_SPRG3,r3 78 + ld r3,PACA_SPRG_VDSO(r13) 79 + mtspr SPRN_SPRG_VDSO_WRITE,r3 80 80 81 81 /* Reload the host's PMU registers */ 82 82 ld r3, PACALPPACAPTR(r13) /* is the host using the PMU? */
+2 -2
arch/powerpc/kvm/book3s_interrupts.S
··· 153 153 * Reload kernel SPRG3 value. 154 154 * No need to save guest value as usermode can't modify SPRG3. 155 155 */ 156 - ld r3, PACA_SPRG3(r13) 157 - mtspr SPRN_SPRG3, r3 156 + ld r3, PACA_SPRG_VDSO(r13) 157 + mtspr SPRN_SPRG_VDSO_WRITE, r3 158 158 #endif /* CONFIG_PPC_BOOK3S_64 */ 159 159 160 160 /* R7 = vcpu */
+15 -6
arch/powerpc/kvm/bookehv_interrupts.S
··· 229 229 stw r10, VCPU_CR(r4) 230 230 PPC_STL r11, VCPU_GPR(R4)(r4) 231 231 PPC_STL r5, VCPU_GPR(R5)(r4) 232 - .if \type == EX_CRIT 233 - PPC_LL r5, (\paca_ex + EX_R13)(r13) 234 - .else 235 - mfspr r5, \scratch 236 - .endif 237 232 PPC_STL r6, VCPU_GPR(R6)(r4) 238 233 PPC_STL r8, VCPU_GPR(R8)(r4) 239 234 PPC_STL r9, VCPU_GPR(R9)(r4) 240 - PPC_STL r5, VCPU_GPR(R13)(r4) 235 + .if \type == EX_TLB 236 + PPC_LL r5, EX_TLB_R13(r12) 237 + PPC_LL r6, EX_TLB_R10(r12) 238 + PPC_LL r8, EX_TLB_R11(r12) 239 + mfspr r12, \scratch 240 + .else 241 + mfspr r5, \scratch 241 242 PPC_LL r6, (\paca_ex + \ex_r10)(r13) 242 243 PPC_LL r8, (\paca_ex + \ex_r11)(r13) 244 + .endif 245 + PPC_STL r5, VCPU_GPR(R13)(r4) 243 246 PPC_STL r3, VCPU_GPR(R3)(r4) 244 247 PPC_STL r7, VCPU_GPR(R7)(r4) 245 248 PPC_STL r12, VCPU_GPR(R12)(r4) ··· 438 435 PPC_STL r5, VCPU_LR(r4) 439 436 mfspr r7, SPRN_SPRG5 440 437 stw r3, VCPU_VRSAVE(r4) 438 + #ifdef CONFIG_64BIT 439 + PPC_LL r3, PACA_SPRG_VDSO(r13) 440 + #endif 441 441 PPC_STD(r6, VCPU_SHARED_SPRG4, r11) 442 442 mfspr r8, SPRN_SPRG6 443 443 PPC_STD(r7, VCPU_SHARED_SPRG5, r11) 444 444 mfspr r9, SPRN_SPRG7 445 + #ifdef CONFIG_64BIT 446 + mtspr SPRN_SPRG_VDSO_WRITE, r3 447 + #endif 445 448 PPC_STD(r8, VCPU_SHARED_SPRG6, r11) 446 449 mfxer r3 447 450 PPC_STD(r9, VCPU_SHARED_SPRG7, r11)
+40 -23
arch/powerpc/mm/tlb_low_64e.S
··· 39 39 * * 40 40 **********************************************************************/ 41 41 42 + /* 43 + * Note that, unlike non-bolted handlers, TLB_EXFRAME is not 44 + * modified by the TLB miss handlers themselves, since the TLB miss 45 + * handler code will not itself cause a recursive TLB miss. 46 + * 47 + * TLB_EXFRAME will be modified when crit/mc/debug exceptions are 48 + * entered/exited. 49 + */ 42 50 .macro tlb_prolog_bolted intnum addr 43 - mtspr SPRN_SPRG_GEN_SCRATCH,r13 51 + mtspr SPRN_SPRG_GEN_SCRATCH,r12 52 + mfspr r12,SPRN_SPRG_TLB_EXFRAME 53 + std r13,EX_TLB_R13(r12) 54 + std r10,EX_TLB_R10(r12) 44 55 mfspr r13,SPRN_SPRG_PACA 45 - std r10,PACA_EXTLB+EX_TLB_R10(r13) 56 + 46 57 mfcr r10 47 - std r11,PACA_EXTLB+EX_TLB_R11(r13) 58 + std r11,EX_TLB_R11(r12) 48 59 #ifdef CONFIG_KVM_BOOKE_HV 49 60 BEGIN_FTR_SECTION 50 61 mfspr r11, SPRN_SRR1 51 62 END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV) 52 63 #endif 53 64 DO_KVM \intnum, SPRN_SRR1 54 - std r16,PACA_EXTLB+EX_TLB_R16(r13) 65 + std r16,EX_TLB_R16(r12) 55 66 mfspr r16,\addr /* get faulting address */ 56 - std r14,PACA_EXTLB+EX_TLB_R14(r13) 67 + std r14,EX_TLB_R14(r12) 57 68 ld r14,PACAPGD(r13) 58 - std r15,PACA_EXTLB+EX_TLB_R15(r13) 59 - std r10,PACA_EXTLB+EX_TLB_CR(r13) 60 - TLB_MISS_PROLOG_STATS_BOLTED 69 + std r15,EX_TLB_R15(r12) 70 + std r10,EX_TLB_CR(r12) 71 + TLB_MISS_PROLOG_STATS 61 72 .endm 62 73 63 74 .macro tlb_epilog_bolted 64 - ld r14,PACA_EXTLB+EX_TLB_CR(r13) 65 - ld r10,PACA_EXTLB+EX_TLB_R10(r13) 66 - ld r11,PACA_EXTLB+EX_TLB_R11(r13) 75 + ld r14,EX_TLB_CR(r12) 76 + ld r10,EX_TLB_R10(r12) 77 + ld r11,EX_TLB_R11(r12) 78 + ld r13,EX_TLB_R13(r12) 67 79 mtcr r14 68 - ld r14,PACA_EXTLB+EX_TLB_R14(r13) 69 - ld r15,PACA_EXTLB+EX_TLB_R15(r13) 70 - TLB_MISS_RESTORE_STATS_BOLTED 71 - ld r16,PACA_EXTLB+EX_TLB_R16(r13) 72 - mfspr r13,SPRN_SPRG_GEN_SCRATCH 80 + ld r14,EX_TLB_R14(r12) 81 + ld r15,EX_TLB_R15(r12) 82 + TLB_MISS_RESTORE_STATS 83 + ld r16,EX_TLB_R16(r12) 84 + mfspr r12,SPRN_SPRG_GEN_SCRATCH 73 85 .endm 74 86 75 87 /* Data TLB miss */ ··· 296 284 * r14 = page table base 297 285 * r13 = PACA 298 286 * r11 = tlb_per_core ptr 299 - * r10 = crap (free to use) 287 + * r10 = cpu number 300 288 */ 301 289 tlb_miss_common_e6500: 302 290 /* ··· 305 293 * 306 294 * MAS6:IND should be already set based on MAS4 307 295 */ 308 - addi r10,r11,TCD_LOCK 309 - 1: lbarx r15,0,r10 296 + 1: lbarx r15,0,r11 297 + lhz r10,PACAPACAINDEX(r13) 310 298 cmpdi r15,0 299 + cmpdi cr1,r15,1 /* set cr1.eq = 0 for non-recursive */ 311 300 bne 2f 312 - li r15,1 313 - stbcx. r15,0,r10 301 + stbcx. r10,0,r11 314 302 bne 1b 303 + 3: 315 304 .subsection 1 316 - 2: lbz r15,0(r10) 305 + 2: cmpd cr1,r15,r10 /* recursive lock due to mcheck/crit/etc? */ 306 + beq cr1,3b /* unlock will happen if cr1.eq = 0 */ 307 + lbz r15,0(r11) 317 308 cmpdi r15,0 318 309 bne 2b 319 310 b 1b ··· 394 379 395 380 tlb_miss_done_e6500: 396 381 .macro tlb_unlock_e6500 382 + beq cr1,1f /* no unlock if lock was recursively grabbed */ 397 383 li r15,0 398 384 isync 399 - stb r15,TCD_LOCK(r11) 385 + stb r15,0(r11) 386 + 1: 400 387 .endm 401 388 402 389 tlb_unlock_e6500
+11
arch/powerpc/mm/tlb_nohash.c
··· 144 144 int book3e_htw_mode; /* HW tablewalk? Value is PPC_HTW_* */ 145 145 unsigned long linear_map_top; /* Top of linear mapping */ 146 146 147 + 148 + /* 149 + * Number of bytes to add to SPRN_SPRG_TLB_EXFRAME on crit/mcheck/debug 150 + * exceptions. This is used for bolted and e6500 TLB miss handlers which 151 + * do not modify this SPRG in the TLB miss code; for other TLB miss handlers, 152 + * this is set to zero. 153 + */ 154 + int extlb_level_exc; 155 + 147 156 #endif /* CONFIG_PPC64 */ 148 157 149 158 #ifdef CONFIG_PPC_FSL_BOOK3E ··· 568 559 break; 569 560 #ifdef CONFIG_PPC_FSL_BOOK3E 570 561 case PPC_HTW_E6500: 562 + extlb_level_exc = EX_TLB_SIZE; 571 563 patch_exception(0x1c0, exc_data_tlb_miss_e6500_book3e); 572 564 patch_exception(0x1e0, exc_instruction_tlb_miss_e6500_book3e); 573 565 break; ··· 662 652 memblock_enforce_memory_limit(linear_map_top); 663 653 664 654 if (book3e_htw_mode == PPC_HTW_NONE) { 655 + extlb_level_exc = EX_TLB_SIZE; 665 656 patch_exception(0x1c0, exc_data_tlb_miss_bolted_book3e); 666 657 patch_exception(0x1e0, 667 658 exc_instruction_tlb_miss_bolted_book3e);
+1
arch/powerpc/platforms/85xx/c293pcie.c
··· 68 68 .init_IRQ = c293_pcie_pic_init, 69 69 #ifdef CONFIG_PCI 70 70 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 71 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 71 72 #endif 72 73 .get_irq = mpic_get_irq, 73 74 .restart = fsl_rstcr_restart,
+6
arch/powerpc/platforms/85xx/common.c
··· 107 107 qe_reset(); 108 108 of_node_put(np); 109 109 110 + } 111 + 112 + void __init mpc85xx_qe_par_io_init(void) 113 + { 114 + struct device_node *np; 115 + 110 116 np = of_find_node_by_name(NULL, "par_io"); 111 117 if (np) { 112 118 struct device_node *ucc;
+17
arch/powerpc/platforms/85xx/corenet_generic.c
··· 26 26 #include <asm/udbg.h> 27 27 #include <asm/mpic.h> 28 28 #include <asm/ehv_pic.h> 29 + #include <asm/qe_ic.h> 29 30 30 31 #include <linux/of_platform.h> 31 32 #include <sysdev/fsl_soc.h> 32 33 #include <sysdev/fsl_pci.h> 33 34 #include "smp.h" 35 + #include "mpc85xx.h" 34 36 35 37 void __init corenet_gen_pic_init(void) 36 38 { 37 39 struct mpic *mpic; 38 40 unsigned int flags = MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU | 39 41 MPIC_NO_RESET; 42 + 43 + struct device_node *np; 40 44 41 45 if (ppc_md.get_irq == mpic_get_coreint_irq) 42 46 flags |= MPIC_ENABLE_COREINT; ··· 49 45 BUG_ON(mpic == NULL); 50 46 51 47 mpic_init(mpic); 48 + 49 + np = of_find_compatible_node(NULL, NULL, "fsl,qe-ic"); 50 + if (np) { 51 + qe_ic_init(np, 0, qe_ic_cascade_low_mpic, 52 + qe_ic_cascade_high_mpic); 53 + of_node_put(np); 54 + } 52 55 } 53 56 54 57 /* ··· 68 57 swiotlb_detect_4g(); 69 58 70 59 pr_info("%s board from Freescale Semiconductor\n", ppc_md.name); 60 + 61 + mpc85xx_qe_init(); 71 62 } 72 63 73 64 static const struct of_device_id of_device_ids[] = { ··· 93 80 }, 94 81 { 95 82 .compatible = "fsl,qoriq-pcie-v3.0", 83 + }, 84 + { 85 + .compatible = "fsl,qe", 96 86 }, 97 87 /* The following two are for the Freescale hypervisor */ 98 88 { ··· 179 163 .init_IRQ = corenet_gen_pic_init, 180 164 #ifdef CONFIG_PCI 181 165 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 166 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 182 167 #endif 183 168 .get_irq = mpic_get_coreint_irq, 184 169 .restart = fsl_rstcr_restart,
+1
arch/powerpc/platforms/85xx/ge_imp3a.c
··· 215 215 .show_cpuinfo = ge_imp3a_show_cpuinfo, 216 216 #ifdef CONFIG_PCI 217 217 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 218 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 218 219 #endif 219 220 .get_irq = mpic_get_irq, 220 221 .restart = fsl_rstcr_restart,
+1
arch/powerpc/platforms/85xx/mpc8536_ds.c
··· 76 76 .init_IRQ = mpc8536_ds_pic_init, 77 77 #ifdef CONFIG_PCI 78 78 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 79 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 79 80 #endif 80 81 .get_irq = mpic_get_irq, 81 82 .restart = fsl_rstcr_restart,
+2
arch/powerpc/platforms/85xx/mpc85xx.h
··· 10 10 11 11 #ifdef CONFIG_QUICC_ENGINE 12 12 extern void mpc85xx_qe_init(void); 13 + extern void mpc85xx_qe_par_io_init(void); 13 14 #else 14 15 static inline void __init mpc85xx_qe_init(void) {} 16 + static inline void __init mpc85xx_qe_par_io_init(void) {} 15 17 #endif 16 18 17 19 #endif
+1
arch/powerpc/platforms/85xx/mpc85xx_cds.c
··· 385 385 #ifdef CONFIG_PCI 386 386 .restart = mpc85xx_cds_restart, 387 387 .pcibios_fixup_bus = mpc85xx_cds_fixup_bus, 388 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 388 389 #else 389 390 .restart = fsl_rstcr_restart, 390 391 #endif
+3
arch/powerpc/platforms/85xx/mpc85xx_ds.c
··· 209 209 .init_IRQ = mpc85xx_ds_pic_init, 210 210 #ifdef CONFIG_PCI 211 211 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 212 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 212 213 #endif 213 214 .get_irq = mpic_get_irq, 214 215 .restart = fsl_rstcr_restart, ··· 224 223 .init_IRQ = mpc85xx_ds_pic_init, 225 224 #ifdef CONFIG_PCI 226 225 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 226 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 227 227 #endif 228 228 .get_irq = mpic_get_irq, 229 229 .restart = fsl_rstcr_restart, ··· 239 237 .init_IRQ = mpc85xx_ds_pic_init, 240 238 #ifdef CONFIG_PCI 241 239 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 240 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 242 241 #endif 243 242 .get_irq = mpic_get_irq, 244 243 .restart = fsl_rstcr_restart,
+4
arch/powerpc/platforms/85xx/mpc85xx_mds.c
··· 239 239 struct device_node *np; 240 240 241 241 mpc85xx_qe_init(); 242 + mpc85xx_qe_par_io_init(); 242 243 mpc85xx_mds_reset_ucc_phys(); 243 244 244 245 if (machine_is(p1021_mds)) { ··· 392 391 .progress = udbg_progress, 393 392 #ifdef CONFIG_PCI 394 393 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 394 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 395 395 #endif 396 396 }; 397 397 ··· 414 412 .progress = udbg_progress, 415 413 #ifdef CONFIG_PCI 416 414 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 415 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 417 416 #endif 418 417 }; 419 418 ··· 437 434 .progress = udbg_progress, 438 435 #ifdef CONFIG_PCI 439 436 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 437 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 440 438 #endif 441 439 }; 442 440
+12 -4
arch/powerpc/platforms/85xx/mpc85xx_rdb.c
··· 86 86 */ 87 87 static void __init mpc85xx_rdb_setup_arch(void) 88 88 { 89 - #ifdef CONFIG_QUICC_ENGINE 90 - struct device_node *np; 91 - #endif 92 - 93 89 if (ppc_md.progress) 94 90 ppc_md.progress("mpc85xx_rdb_setup_arch()", 0); 95 91 ··· 95 99 96 100 #ifdef CONFIG_QUICC_ENGINE 97 101 mpc85xx_qe_init(); 102 + mpc85xx_qe_par_io_init(); 98 103 #if defined(CONFIG_UCC_GETH) || defined(CONFIG_SERIAL_QE) 99 104 if (machine_is(p1025_rdb)) { 105 + struct device_node *np; 100 106 101 107 struct ccsr_guts __iomem *guts; 102 108 ··· 231 233 .init_IRQ = mpc85xx_rdb_pic_init, 232 234 #ifdef CONFIG_PCI 233 235 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 236 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 234 237 #endif 235 238 .get_irq = mpic_get_irq, 236 239 .restart = fsl_rstcr_restart, ··· 246 247 .init_IRQ = mpc85xx_rdb_pic_init, 247 248 #ifdef CONFIG_PCI 248 249 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 250 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 249 251 #endif 250 252 .get_irq = mpic_get_irq, 251 253 .restart = fsl_rstcr_restart, ··· 261 261 .init_IRQ = mpc85xx_rdb_pic_init, 262 262 #ifdef CONFIG_PCI 263 263 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 264 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 264 265 #endif 265 266 .get_irq = mpic_get_irq, 266 267 .restart = fsl_rstcr_restart, ··· 276 275 .init_IRQ = mpc85xx_rdb_pic_init, 277 276 #ifdef CONFIG_PCI 278 277 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 278 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 279 279 #endif 280 280 .get_irq = mpic_get_irq, 281 281 .restart = fsl_rstcr_restart, ··· 291 289 .init_IRQ = mpc85xx_rdb_pic_init, 292 290 #ifdef CONFIG_PCI 293 291 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 292 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 294 293 #endif 295 294 .get_irq = mpic_get_irq, 296 295 .restart = fsl_rstcr_restart, ··· 306 303 .init_IRQ = mpc85xx_rdb_pic_init, 307 304 #ifdef CONFIG_PCI 308 305 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 306 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 309 307 #endif 310 308 .get_irq = mpic_get_irq, 311 309 .restart = fsl_rstcr_restart, ··· 321 317 .init_IRQ = mpc85xx_rdb_pic_init, 322 318 #ifdef CONFIG_PCI 323 319 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 320 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 324 321 #endif 325 322 .get_irq = mpic_get_irq, 326 323 .restart = fsl_rstcr_restart, ··· 336 331 .init_IRQ = mpc85xx_rdb_pic_init, 337 332 #ifdef CONFIG_PCI 338 333 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 334 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 339 335 #endif 340 336 .get_irq = mpic_get_irq, 341 337 .restart = fsl_rstcr_restart, ··· 351 345 .init_IRQ = mpc85xx_rdb_pic_init, 352 346 #ifdef CONFIG_PCI 353 347 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 348 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 354 349 #endif 355 350 .get_irq = mpic_get_irq, 356 351 .restart = fsl_rstcr_restart, ··· 366 359 .init_IRQ = mpc85xx_rdb_pic_init, 367 360 #ifdef CONFIG_PCI 368 361 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 362 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 369 363 #endif 370 364 .get_irq = mpic_get_irq, 371 365 .restart = fsl_rstcr_restart,
+1
arch/powerpc/platforms/85xx/p1010rdb.c
··· 78 78 .init_IRQ = p1010_rdb_pic_init, 79 79 #ifdef CONFIG_PCI 80 80 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 81 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 81 82 #endif 82 83 .get_irq = mpic_get_irq, 83 84 .restart = fsl_rstcr_restart,
+1
arch/powerpc/platforms/85xx/p1022_ds.c
··· 567 567 .init_IRQ = p1022_ds_pic_init, 568 568 #ifdef CONFIG_PCI 569 569 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 570 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 570 571 #endif 571 572 .get_irq = mpic_get_irq, 572 573 .restart = fsl_rstcr_restart,
+1
arch/powerpc/platforms/85xx/p1022_rdk.c
··· 147 147 .init_IRQ = p1022_rdk_pic_init, 148 148 #ifdef CONFIG_PCI 149 149 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 150 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 150 151 #endif 151 152 .get_irq = mpic_get_irq, 152 153 .restart = fsl_rstcr_restart,
+2
arch/powerpc/platforms/85xx/p1023_rds.c
··· 126 126 .progress = udbg_progress, 127 127 #ifdef CONFIG_PCI 128 128 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 129 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 129 130 #endif 130 131 }; 131 132 ··· 141 140 .progress = udbg_progress, 142 141 #ifdef CONFIG_PCI 143 142 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 143 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 144 144 #endif 145 145 };
+1
arch/powerpc/platforms/85xx/qemu_e500.c
··· 66 66 .init_IRQ = qemu_e500_pic_init, 67 67 #ifdef CONFIG_PCI 68 68 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 69 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 69 70 #endif 70 71 .get_irq = mpic_get_coreint_irq, 71 72 .restart = fsl_rstcr_restart,
+1
arch/powerpc/platforms/85xx/sbc8548.c
··· 135 135 .restart = fsl_rstcr_restart, 136 136 #ifdef CONFIG_PCI 137 137 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 138 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 138 139 #endif 139 140 .calibrate_decr = generic_calibrate_decr, 140 141 .progress = udbg_progress,
+1
arch/powerpc/platforms/85xx/twr_p102x.c
··· 77 77 78 78 #ifdef CONFIG_QUICC_ENGINE 79 79 mpc85xx_qe_init(); 80 + mpc85xx_qe_par_io_init(); 80 81 81 82 #if defined(CONFIG_UCC_GETH) || defined(CONFIG_SERIAL_QE) 82 83 if (machine_is(twr_p1025)) {
+3
arch/powerpc/platforms/85xx/xes_mpc85xx.c
··· 170 170 .init_IRQ = xes_mpc85xx_pic_init, 171 171 #ifdef CONFIG_PCI 172 172 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 173 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 173 174 #endif 174 175 .get_irq = mpic_get_irq, 175 176 .restart = fsl_rstcr_restart, ··· 185 184 .init_IRQ = xes_mpc85xx_pic_init, 186 185 #ifdef CONFIG_PCI 187 186 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 187 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 188 188 #endif 189 189 .get_irq = mpic_get_irq, 190 190 .restart = fsl_rstcr_restart, ··· 200 198 .init_IRQ = xes_mpc85xx_pic_init, 201 199 #ifdef CONFIG_PCI 202 200 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 201 + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 203 202 #endif 204 203 .get_irq = mpic_get_irq, 205 204 .restart = fsl_rstcr_restart,
-2
arch/powerpc/platforms/embedded6xx/Kconfig
··· 34 34 select TSI108_BRIDGE 35 35 select DEFAULT_UIMAGE 36 36 select PPC_UDBG_16550 37 - select TSI108_BRIDGE 38 37 help 39 38 Select MPC7448HPC2 if configuring for Freescale MPC7448HPC2 (Taiga) 40 39 platform ··· 43 44 depends on EMBEDDED6xx 44 45 select TSI108_BRIDGE 45 46 select PPC_UDBG_16550 46 - select TSI108_BRIDGE 47 47 help 48 48 Select PPC_HOLLY if configuring for an IBM 750GX/CL Eval 49 49 Board with TSI108/9 bridge (Hickory/Holly)
+164 -34
arch/powerpc/sysdev/fsl_pci.c
··· 22 22 #include <linux/delay.h> 23 23 #include <linux/string.h> 24 24 #include <linux/init.h> 25 + #include <linux/interrupt.h> 25 26 #include <linux/bootmem.h> 26 27 #include <linux/memblock.h> 27 28 #include <linux/log2.h> 28 29 #include <linux/slab.h> 30 + #include <linux/suspend.h> 31 + #include <linux/syscore_ops.h> 29 32 #include <linux/uaccess.h> 30 33 31 34 #include <asm/io.h> ··· 871 868 872 869 pci_bus_read_config_dword(hose->bus, 873 870 PCI_DEVFN(0, 0), PCI_BASE_ADDRESS_0, &base); 871 + 872 + /* 873 + * For PEXCSRBAR, bit 3-0 indicate prefetchable and 874 + * address type. So when getting base address, these 875 + * bits should be masked 876 + */ 877 + base &= PCI_BASE_ADDRESS_MEM_MASK; 878 + 874 879 return base; 875 880 } 876 881 #endif ··· 1097 1086 } 1098 1087 } 1099 1088 1089 + #ifdef CONFIG_PM_SLEEP 1090 + static irqreturn_t fsl_pci_pme_handle(int irq, void *dev_id) 1091 + { 1092 + struct pci_controller *hose = dev_id; 1093 + struct ccsr_pci __iomem *pci = hose->private_data; 1094 + u32 dr; 1095 + 1096 + dr = in_be32(&pci->pex_pme_mes_dr); 1097 + if (!dr) 1098 + return IRQ_NONE; 1099 + 1100 + out_be32(&pci->pex_pme_mes_dr, dr); 1101 + 1102 + return IRQ_HANDLED; 1103 + } 1104 + 1105 + static int fsl_pci_pme_probe(struct pci_controller *hose) 1106 + { 1107 + struct ccsr_pci __iomem *pci; 1108 + struct pci_dev *dev; 1109 + int pme_irq; 1110 + int res; 1111 + u16 pms; 1112 + 1113 + /* Get hose's pci_dev */ 1114 + dev = list_first_entry(&hose->bus->devices, typeof(*dev), bus_list); 1115 + 1116 + /* PME Disable */ 1117 + pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pms); 1118 + pms &= ~PCI_PM_CTRL_PME_ENABLE; 1119 + pci_write_config_word(dev, dev->pm_cap + PCI_PM_CTRL, pms); 1120 + 1121 + pme_irq = irq_of_parse_and_map(hose->dn, 0); 1122 + if (!pme_irq) { 1123 + dev_err(&dev->dev, "Failed to map PME interrupt.\n"); 1124 + 1125 + return -ENXIO; 1126 + } 1127 + 1128 + res = devm_request_irq(hose->parent, pme_irq, 1129 + fsl_pci_pme_handle, 1130 + IRQF_SHARED, 1131 + "[PCI] PME", hose); 1132 + if (res < 0) { 1133 + dev_err(&dev->dev, "Unable to requiest irq %d for PME\n", pme_irq); 1134 + irq_dispose_mapping(pme_irq); 1135 + 1136 + return -ENODEV; 1137 + } 1138 + 1139 + pci = hose->private_data; 1140 + 1141 + /* Enable PTOD, ENL23D & EXL23D */ 1142 + out_be32(&pci->pex_pme_mes_disr, 0); 1143 + setbits32(&pci->pex_pme_mes_disr, 1144 + PME_DISR_EN_PTOD | PME_DISR_EN_ENL23D | PME_DISR_EN_EXL23D); 1145 + 1146 + out_be32(&pci->pex_pme_mes_ier, 0); 1147 + setbits32(&pci->pex_pme_mes_ier, 1148 + PME_DISR_EN_PTOD | PME_DISR_EN_ENL23D | PME_DISR_EN_EXL23D); 1149 + 1150 + /* PME Enable */ 1151 + pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pms); 1152 + pms |= PCI_PM_CTRL_PME_ENABLE; 1153 + pci_write_config_word(dev, dev->pm_cap + PCI_PM_CTRL, pms); 1154 + 1155 + return 0; 1156 + } 1157 + 1158 + static void send_pme_turnoff_message(struct pci_controller *hose) 1159 + { 1160 + struct ccsr_pci __iomem *pci = hose->private_data; 1161 + u32 dr; 1162 + int i; 1163 + 1164 + /* Send PME_Turn_Off Message Request */ 1165 + setbits32(&pci->pex_pmcr, PEX_PMCR_PTOMR); 1166 + 1167 + /* Wait trun off done */ 1168 + for (i = 0; i < 150; i++) { 1169 + dr = in_be32(&pci->pex_pme_mes_dr); 1170 + if (dr) { 1171 + out_be32(&pci->pex_pme_mes_dr, dr); 1172 + break; 1173 + } 1174 + 1175 + udelay(1000); 1176 + } 1177 + } 1178 + 1179 + static void fsl_pci_syscore_do_suspend(struct pci_controller *hose) 1180 + { 1181 + send_pme_turnoff_message(hose); 1182 + } 1183 + 1184 + static int fsl_pci_syscore_suspend(void) 1185 + { 1186 + struct pci_controller *hose, *tmp; 1187 + 1188 + list_for_each_entry_safe(hose, tmp, &hose_list, list_node) 1189 + fsl_pci_syscore_do_suspend(hose); 1190 + 1191 + return 0; 1192 + } 1193 + 1194 + static void fsl_pci_syscore_do_resume(struct pci_controller *hose) 1195 + { 1196 + struct ccsr_pci __iomem *pci = hose->private_data; 1197 + u32 dr; 1198 + int i; 1199 + 1200 + /* Send Exit L2 State Message */ 1201 + setbits32(&pci->pex_pmcr, PEX_PMCR_EXL2S); 1202 + 1203 + /* Wait exit done */ 1204 + for (i = 0; i < 150; i++) { 1205 + dr = in_be32(&pci->pex_pme_mes_dr); 1206 + if (dr) { 1207 + out_be32(&pci->pex_pme_mes_dr, dr); 1208 + break; 1209 + } 1210 + 1211 + udelay(1000); 1212 + } 1213 + 1214 + setup_pci_atmu(hose); 1215 + } 1216 + 1217 + static void fsl_pci_syscore_resume(void) 1218 + { 1219 + struct pci_controller *hose, *tmp; 1220 + 1221 + list_for_each_entry_safe(hose, tmp, &hose_list, list_node) 1222 + fsl_pci_syscore_do_resume(hose); 1223 + } 1224 + 1225 + static struct syscore_ops pci_syscore_pm_ops = { 1226 + .suspend = fsl_pci_syscore_suspend, 1227 + .resume = fsl_pci_syscore_resume, 1228 + }; 1229 + #endif 1230 + 1231 + void fsl_pcibios_fixup_phb(struct pci_controller *phb) 1232 + { 1233 + #ifdef CONFIG_PM_SLEEP 1234 + fsl_pci_pme_probe(phb); 1235 + #endif 1236 + } 1237 + 1100 1238 static int fsl_pci_probe(struct platform_device *pdev) 1101 1239 { 1102 - int ret; 1103 1240 struct device_node *node; 1241 + int ret; 1104 1242 1105 1243 node = pdev->dev.of_node; 1106 1244 ret = fsl_add_bridge(pdev, fsl_pci_primary == node); ··· 1259 1099 return 0; 1260 1100 } 1261 1101 1262 - #ifdef CONFIG_PM 1263 - static int fsl_pci_resume(struct device *dev) 1264 - { 1265 - struct pci_controller *hose; 1266 - struct resource pci_rsrc; 1267 - 1268 - hose = pci_find_hose_for_OF_device(dev->of_node); 1269 - if (!hose) 1270 - return -ENODEV; 1271 - 1272 - if (of_address_to_resource(dev->of_node, 0, &pci_rsrc)) { 1273 - dev_err(dev, "Get pci register base failed."); 1274 - return -ENODEV; 1275 - } 1276 - 1277 - setup_pci_atmu(hose); 1278 - 1279 - return 0; 1280 - } 1281 - 1282 - static const struct dev_pm_ops pci_pm_ops = { 1283 - .resume = fsl_pci_resume, 1284 - }; 1285 - 1286 - #define PCI_PM_OPS (&pci_pm_ops) 1287 - 1288 - #else 1289 - 1290 - #define PCI_PM_OPS NULL 1291 - 1292 - #endif 1293 - 1294 1102 static struct platform_driver fsl_pci_driver = { 1295 1103 .driver = { 1296 1104 .name = "fsl-pci", 1297 - .pm = PCI_PM_OPS, 1298 1105 .of_match_table = pci_ids, 1299 1106 }, 1300 1107 .probe = fsl_pci_probe, ··· 1269 1142 1270 1143 static int __init fsl_pci_init(void) 1271 1144 { 1145 + #ifdef CONFIG_PM_SLEEP 1146 + register_syscore_ops(&pci_syscore_pm_ops); 1147 + #endif 1272 1148 return platform_driver_register(&fsl_pci_driver); 1273 1149 } 1274 1150 arch_initcall(fsl_pci_init);
+8
arch/powerpc/sysdev/fsl_pci.h
··· 32 32 #define PIWAR_WRITE_SNOOP 0x00005000 33 33 #define PIWAR_SZ_MASK 0x0000003f 34 34 35 + #define PEX_PMCR_PTOMR 0x1 36 + #define PEX_PMCR_EXL2S 0x2 37 + 38 + #define PME_DISR_EN_PTOD 0x00008000 39 + #define PME_DISR_EN_ENL23D 0x00002000 40 + #define PME_DISR_EN_EXL23D 0x00001000 41 + 35 42 /* PCI/PCI Express outbound window reg */ 36 43 struct pci_outbound_window_regs { 37 44 __be32 potar; /* 0x.0 - Outbound translation address register */ ··· 118 111 119 112 extern int fsl_add_bridge(struct platform_device *pdev, int is_primary); 120 113 extern void fsl_pcibios_fixup_bus(struct pci_bus *bus); 114 + extern void fsl_pcibios_fixup_phb(struct pci_controller *phb); 121 115 extern int mpc83xx_add_bridge(struct device_node *dev); 122 116 u64 fsl_pci_immrbar_base(struct pci_controller *hose); 123 117
-8
drivers/watchdog/booke_wdt.c
··· 138 138 val &= ~WDTP_MASK; 139 139 val |= (TCR_WIE|TCR_WRC(WRC_CHIP)|WDTP(booke_wdt_period)); 140 140 141 - #ifdef CONFIG_PPC_BOOK3E_64 142 - /* 143 - * Crit ints are currently broken on PPC64 Book-E, so 144 - * just disable them for now. 145 - */ 146 - val &= ~TCR_WIE; 147 - #endif 148 - 149 141 mtspr(SPRN_TCR, val); 150 142 } 151 143