Commit 3132ec8
clk: renesas: cpg-mssr: Handle RZ/T2H register layout in PM callbacks
The register layout for RZ/T2H is not handled inside
cpg_mssr_suspend_noirq() and cpg_mssr_resume_noirq(), causing a memory
abort because the wrong code path is taken, as shown below.
Explicitly handle the RZ/T2H register layout in cpg_mssr_suspend_noirq()
and cpg_mssr_resume_noirq(), similar to how it is done inside
cpg_mstp_clock_is_enabled() and cpg_mstp_clock_endisable().
[ 90.052296] Mem abort info:
[ 90.055420] ESR = 0x0000000096000007
[ 90.059553] EC = 0x25: DABT (current EL), IL = 32 bits
[ 90.065697] SET = 0, FnV = 0
[ 90.069211] EA = 0, S1PTW = 0
[ 90.072834] FSC = 0x07: level 3 translation fault
[ 90.078109] Data abort info:
[ 90.081405] ISV = 0, ISS = 0x00000007, ISS2 = 0x00000000
[ 90.087427] CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[ 90.093169] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[ 90.099008] swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000000c60b4000
[ 90.106756] [ffff800082816318] pgd=0000000000000000, p4d=10000000c69ef003, pud=10000000c69f0003, pmd=100000024002b403, pte=0000000000000000
[ 90.120727] Internal error: Oops: 0000000096000007 [#1] SMP
[ 90.127058] Modules linked in: sha256 cfg80211 spi_nor at24 renesas_usbhs bluetooth ecdh_generic ecc rfkill rzt2h_adc spi_rzv2h_rspi industrialio_adc gpio_keys fuse drm backlight ipv6
[ 90.145201] CPU: 0 UID: 0 PID: 307 Comm: sh Not tainted 6.18.0-rc1-next-20251016+ #47 PREEMPT
[ 90.155006] Hardware name: Renesas RZ/T2H EVK Board based on r9a09g077m44 (DT)
[ 90.163041] pstate: 20400005 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 90.170777] pc : cpg_mssr_suspend_noirq+0x4c/0xc0
[ 90.175983] lr : device_suspend_noirq+0x6c/0x22c
[ 90.181309] sp : ffff8000838d3af0
[ 90.185026] x29: ffff8000838d3af0 x28: ffff8000825c016f x27: ffff8000825c01a0
[ 90.192973] x26: ffff8000809feeec x25: ffff8000827bebb8 x24: 0000000000000002
[ 90.200815] x23: ffff8000825c0190 x22: 0000000000000002 x21: 0000000000000000
[ 90.209058] x20: ffff8000827bebb8 x19: ffff000180128010 x18: ffff00033ef92a80
[ 90.217100] x17: ffff000180051700 x16: 0000000000000001 x15: ffff000187afc310
[ 90.224847] x14: 0000000000000254 x13: 0000000000000001 x12: 0000000000000001
[ 90.232793] x11: 00000000000000c0 x10: 0000000000000ab0 x9 : ffff8000838d38b0
[ 90.240540] x8 : ffff000186387410 x7 : 0000000000000001 x6 : 0000000000000000
[ 90.248600] x5 : ffff0001803240d4 x4 : 0000000000000003 x3 : ffff0001803240d0
[ 90.256460] x2 : ffff800082816318 x1 : 000000000000000c x0 : ffff000180324000
[ 90.264208] Call trace:
[ 90.267019] cpg_mssr_suspend_noirq+0x4c/0xc0 (P)
[ 90.272450] device_suspend_noirq+0x6c/0x22c
[ 90.277375] dpm_noirq_suspend_devices+0x1a8/0x2a0
[ 90.282902] dpm_suspend_noirq+0x24/0xa0
[ 90.287428] suspend_devices_and_enter+0x310/0x590
[ 90.292790] pm_suspend+0x1b4/0x200
[ 90.296811] state_store+0x80/0xf4
[ 90.300676] kobj_attr_store+0x18/0x34
[ 90.305002] sysfs_kf_write+0x7c/0x94
[ 90.309232] kernfs_fop_write_iter+0x12c/0x200
[ 90.314115] vfs_write+0x240/0x380
[ 90.318041] ksys_write+0x64/0x100
[ 90.321862] __arm64_sys_write+0x18/0x24
[ 90.326013] invoke_syscall.constprop.0+0x40/0xf0
[ 90.331445] el0_svc_common.constprop.0+0xb8/0xd8
[ 90.336554] do_el0_svc+0x1c/0x28
[ 90.340375] el0_svc+0x34/0xe8
[ 90.343900] el0t_64_sync_handler+0xa0/0xe4
[ 90.348426] el0t_64_sync+0x198/0x19c
[ 90.352609] Code: 8b040042 b9409004 7100049f 54000240 (b9400042)
[ 90.359639] ---[ end trace 0000000000000000 ]---
Fixes: 065fe72 ("clk: renesas: Add support for R9A09G077 SoC")
Signed-off-by: Cosmin Tanislav <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>1 parent 21c1d66 commit 3132ec8
1 file changed
Lines changed: 21 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1077 | 1077 | | |
1078 | 1078 | | |
1079 | 1079 | | |
1080 | | - | |
1081 | | - | |
1082 | | - | |
1083 | | - | |
1084 | | - | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
1085 | 1093 | | |
1086 | 1094 | | |
1087 | 1095 | | |
| |||
1112 | 1120 | | |
1113 | 1121 | | |
1114 | 1122 | | |
| 1123 | + | |
| 1124 | + | |
1115 | 1125 | | |
1116 | 1126 | | |
1117 | 1127 | | |
| |||
1125 | 1135 | | |
1126 | 1136 | | |
1127 | 1137 | | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
1128 | 1144 | | |
1129 | 1145 | | |
1130 | 1146 | | |
| |||
0 commit comments