Commit 283ae0c
spi: spi-fsl-dspi: restrict register range for regmap access
DSPI registers are NOT continuous, some registers are reserved and
accessing them from userspace will trigger external abort, add regmap
register access table to avoid below abort.
For example on S32G:
# cat /sys/kernel/debug/regmap/401d8000.spi/registers
Internal error: synchronous external abort: 96000210 1 PREEMPT SMP
...
Call trace:
regmap_mmio_read32le+0x24/0x48
regmap_mmio_read+0x48/0x70
_regmap_bus_reg_read+0x38/0x48
_regmap_read+0x68/0x1b0
regmap_read+0x50/0x78
regmap_read_debugfs+0x120/0x338
Fixes: 1acbdeb ("spi/fsl-dspi: Convert to use regmap and add big-endian support")
Co-developed-by: Xulin Sun <[email protected]>
Signed-off-by: Xulin Sun <[email protected]>
Signed-off-by: Larisa Grigore <[email protected]>
Signed-off-by: James Clark <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>1 parent 1007ae0 commit 283ae0c
1 file changed
+19
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
1167 | 1167 | | |
1168 | 1168 | | |
1169 | 1169 | | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
1170 | 1184 | | |
1171 | 1185 | | |
1172 | 1186 | | |
| |||
1184 | 1198 | | |
1185 | 1199 | | |
1186 | 1200 | | |
| 1201 | + | |
| 1202 | + | |
1187 | 1203 | | |
1188 | 1204 | | |
1189 | 1205 | | |
| |||
1205 | 1221 | | |
1206 | 1222 | | |
1207 | 1223 | | |
| 1224 | + | |
| 1225 | + | |
1208 | 1226 | | |
1209 | 1227 | | |
1210 | 1228 | | |
| |||
0 commit comments