Commit 270de60
arm64: Simplify do_notify_resume() DAIF masking
In do_notify_resume, we handle _TIF_NEED_RESCHED differently from all
other flags, leaving IRQ+FIQ masked when calling into schedule(). This
masking is a historical artifact, and it is not currently necessary
to mask IRQ+FIQ when calling into schedule (as evidenced by the generic
exit_to_user_mode_loop(), which unmasks IRQs before checking
_TIF_NEED_RESCHED and calling schedule()).
This patch removes the special case for _TIF_NEED_RESCHED, moving this
check into the main loop such that schedule() will be called from a
regular process context with IRQ+FIQ unmasked. This is a minor
simplification to do_notify_resume() and brings it into line with the
generic exit_to_user_mode_loop() logic. This will also aid subsequent
rework of DAIF management.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20240206123848.1696480-2-mark.rutland@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Itaru Kitayama <itaru.kitayama@linux.dev>1 parent 54be6c6 commit 270de60
1 file changed
Lines changed: 15 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1281 | 1281 | | |
1282 | 1282 | | |
1283 | 1283 | | |
1284 | | - | |
1285 | | - | |
1286 | | - | |
| 1284 | + | |
1287 | 1285 | | |
| 1286 | + | |
1288 | 1287 | | |
1289 | | - | |
1290 | | - | |
1291 | 1288 | | |
1292 | | - | |
1293 | | - | |
| 1289 | + | |
| 1290 | + | |
1294 | 1291 | | |
1295 | | - | |
1296 | | - | |
1297 | | - | |
1298 | | - | |
1299 | | - | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
1300 | 1297 | | |
1301 | | - | |
1302 | | - | |
| 1298 | + | |
| 1299 | + | |
1303 | 1300 | | |
1304 | | - | |
1305 | | - | |
| 1301 | + | |
| 1302 | + | |
1306 | 1303 | | |
1307 | | - | |
1308 | | - | |
1309 | | - | |
| 1304 | + | |
| 1305 | + | |
1310 | 1306 | | |
1311 | 1307 | | |
1312 | 1308 | | |
| |||
0 commit comments