Commit 9aa667a
FROMLIST: iommu/arm-smmu: Use pm_runtime in fault handlers
Commit d4a44f0 ("iommu/arm-smmu: Invoke pm_runtime across the driver")
enabled pm_runtime for the arm-smmu device. On systems where the SMMU
sits in a power domain, all register accesses must be done while the
device is runtime active to avoid unclocked register reads and
potential NoC errors.
So far, this has not been an issue for most SMMU clients because
stall-on-fault is enabled by default. While a translation fault is
being handled, the SMMU stalls further translations for that context
bank, so the fault handler would not race with a powered-down
SMMU.
Adreno SMMU now disables stall-on-fault in the presence of fault
storms to avoid saturating SMMU resources and hanging the GMU. With
stall-on-fault disabled, the SMMU can generate faults while its power
domain may no longer be enabled, which makes unclocked accesses to
fault-status registers in the SMMU fault handlers possible.
Guard the context and global fault handlers with pm_runtime_get_if_active()
and pm_runtime_put_autosuspend() so that all SMMU fault register accesses
are done with the SMMU powered. In case pm_runtime is not active we can
safely ignore the fault as for pm runtime resume the smmu device is
reset and fault registers are cleared.
Fixes: b130440 ("drm/msm: Temporarily disable stall-on-fault after a page fault")
Co-developed-by: Pratyush Brahma <pratyush.brahma@oss.qualcomm.com>
Signed-off-by: Pratyush Brahma <pratyush.brahma@oss.qualcomm.com>
Signed-off-by: Prakash Gupta <prakash.gupta@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260313-smmu-rpm-v2-1-8c2236b402b0@oss.qualcomm.com/1 parent 883da00 commit 9aa667a
1 file changed
Lines changed: 39 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
465 | 473 | | |
466 | 474 | | |
467 | | - | |
468 | | - | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
469 | 479 | | |
470 | 480 | | |
471 | 481 | | |
| |||
480 | 490 | | |
481 | 491 | | |
482 | 492 | | |
483 | | - | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
484 | 499 | | |
485 | 500 | | |
486 | 501 | | |
| |||
489 | 504 | | |
490 | 505 | | |
491 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
492 | 516 | | |
493 | 517 | | |
494 | 518 | | |
495 | 519 | | |
496 | 520 | | |
497 | 521 | | |
498 | | - | |
499 | | - | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
500 | 526 | | |
501 | 527 | | |
502 | 528 | | |
| |||
513 | 539 | | |
514 | 540 | | |
515 | 541 | | |
516 | | - | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
517 | 547 | | |
518 | 548 | | |
519 | 549 | | |
| |||
683 | 713 | | |
684 | 714 | | |
685 | 715 | | |
686 | | - | |
687 | 716 | | |
688 | 717 | | |
689 | 718 | | |
| |||
850 | 879 | | |
851 | 880 | | |
852 | 881 | | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
857 | | - | |
858 | 882 | | |
859 | 883 | | |
860 | | - | |
| 884 | + | |
861 | 885 | | |
862 | 886 | | |
863 | 887 | | |
864 | 888 | | |
865 | | - | |
| 889 | + | |
866 | 890 | | |
867 | 891 | | |
868 | 892 | | |
| |||
2122 | 2146 | | |
2123 | 2147 | | |
2124 | 2148 | | |
2125 | | - | |
2126 | 2149 | | |
2127 | 2150 | | |
2128 | 2151 | | |
| |||
2202 | 2225 | | |
2203 | 2226 | | |
2204 | 2227 | | |
2205 | | - | |
2206 | | - | |
2207 | | - | |
2208 | | - | |
2209 | | - | |
2210 | 2228 | | |
2211 | 2229 | | |
2212 | 2230 | | |
2213 | 2231 | | |
2214 | 2232 | | |
2215 | 2233 | | |
2216 | | - | |
| 2234 | + | |
2217 | 2235 | | |
2218 | 2236 | | |
2219 | 2237 | | |
| |||
0 commit comments