.. | .. |
---|
297 | 297 | alternative_else_nop_endif |
---|
298 | 298 | 1: |
---|
299 | 299 | |
---|
300 | | - scs_load tsk, x20 |
---|
| 300 | + scs_load_current |
---|
301 | 301 | .else |
---|
302 | 302 | add x21, sp, #S_FRAME_SIZE |
---|
303 | 303 | get_current_task tsk |
---|
.. | .. |
---|
1122 | 1122 | msr sp_el0, x1 |
---|
1123 | 1123 | ptrauth_keys_install_kernel x1, x8, x9, x10 |
---|
1124 | 1124 | scs_save x0, x8 |
---|
1125 | | - scs_load x1, x8 |
---|
| 1125 | + scs_load_current |
---|
1126 | 1126 | ret |
---|
1127 | 1127 | SYM_FUNC_END(cpu_switch_to) |
---|
1128 | 1128 | NOKPROBE(cpu_switch_to) |
---|
.. | .. |
---|
1238 | 1238 | |
---|
1239 | 1239 | mov x19, x1 |
---|
1240 | 1240 | |
---|
1241 | | -#if defined(CONFIG_VMAP_STACK) || defined(CONFIG_SHADOW_CALL_STACK) |
---|
| 1241 | + /* Store the registered-event for crash_smp_send_stop() */ |
---|
1242 | 1242 | ldrb w4, [x19, #SDEI_EVENT_PRIORITY] |
---|
1243 | | -#endif |
---|
| 1243 | + cbnz w4, 1f |
---|
| 1244 | + adr_this_cpu dst=x5, sym=sdei_active_normal_event, tmp=x6 |
---|
| 1245 | + b 2f |
---|
| 1246 | +1: adr_this_cpu dst=x5, sym=sdei_active_critical_event, tmp=x6 |
---|
| 1247 | +2: str x19, [x5] |
---|
1244 | 1248 | |
---|
1245 | 1249 | #ifdef CONFIG_VMAP_STACK |
---|
1246 | 1250 | /* |
---|
.. | .. |
---|
1305 | 1309 | |
---|
1306 | 1310 | ldr_l x2, sdei_exit_mode |
---|
1307 | 1311 | |
---|
| 1312 | + /* Clear the registered-event seen by crash_smp_send_stop() */ |
---|
| 1313 | + ldrb w3, [x4, #SDEI_EVENT_PRIORITY] |
---|
| 1314 | + cbnz w3, 1f |
---|
| 1315 | + adr_this_cpu dst=x5, sym=sdei_active_normal_event, tmp=x6 |
---|
| 1316 | + b 2f |
---|
| 1317 | +1: adr_this_cpu dst=x5, sym=sdei_active_critical_event, tmp=x6 |
---|
| 1318 | +2: str xzr, [x5] |
---|
| 1319 | + |
---|
1308 | 1320 | alternative_if_not ARM64_UNMAP_KERNEL_AT_EL0 |
---|
1309 | 1321 | sdei_handler_exit exit_mode=x2 |
---|
1310 | 1322 | alternative_else_nop_endif |
---|
.. | .. |
---|
1315 | 1327 | #endif |
---|
1316 | 1328 | SYM_CODE_END(__sdei_asm_handler) |
---|
1317 | 1329 | NOKPROBE(__sdei_asm_handler) |
---|
| 1330 | + |
---|
| 1331 | +SYM_CODE_START(__sdei_handler_abort) |
---|
| 1332 | + mov_q x0, SDEI_1_0_FN_SDEI_EVENT_COMPLETE_AND_RESUME |
---|
| 1333 | + adr x1, 1f |
---|
| 1334 | + ldr_l x2, sdei_exit_mode |
---|
| 1335 | + sdei_handler_exit exit_mode=x2 |
---|
| 1336 | + // exit the handler and jump to the next instruction. |
---|
| 1337 | + // Exit will stomp x0-x17, PSTATE, ELR_ELx, and SPSR_ELx. |
---|
| 1338 | +1: ret |
---|
| 1339 | +SYM_CODE_END(__sdei_handler_abort) |
---|
| 1340 | +NOKPROBE(__sdei_handler_abort) |
---|
1318 | 1341 | #endif /* CONFIG_ARM_SDE_INTERFACE */ |
---|