.. | .. |
---|
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 |
---|
.. | .. |
---|
626 | 626 | mrs x0, daif |
---|
627 | 627 | orr x24, x24, x0 |
---|
628 | 628 | alternative_else_nop_endif |
---|
629 | | - |
---|
630 | | - cbz x24, 1f // (need_resched + count) == 0 |
---|
631 | | - cbnz w24, 2f // count != 0 |
---|
632 | | - |
---|
633 | | - ldr w24, [tsk, #TSK_TI_PREEMPT_LAZY] // get preempt lazy count |
---|
634 | | - cbnz w24, 2f // preempt lazy count != 0 |
---|
635 | | - |
---|
636 | | - ldr x0, [tsk, #TSK_TI_FLAGS] // get flags |
---|
637 | | - tbz x0, #TIF_NEED_RESCHED_LAZY, 2f // needs rescheduling? |
---|
| 629 | + cbnz x24, 1f // preempt count != 0 || NMI return path |
---|
| 630 | + bl arm64_preempt_schedule_irq // irq en/disable is done inside |
---|
638 | 631 | 1: |
---|
639 | | - bl arm64_preempt_schedule_irq // irq en/disable is done inside |
---|
640 | | -2: |
---|
641 | 632 | #endif |
---|
642 | 633 | |
---|
643 | 634 | mov x0, sp |
---|
.. | .. |
---|
1131 | 1122 | msr sp_el0, x1 |
---|
1132 | 1123 | ptrauth_keys_install_kernel x1, x8, x9, x10 |
---|
1133 | 1124 | scs_save x0, x8 |
---|
1134 | | - scs_load x1, x8 |
---|
| 1125 | + scs_load_current |
---|
1135 | 1126 | ret |
---|
1136 | 1127 | SYM_FUNC_END(cpu_switch_to) |
---|
1137 | 1128 | NOKPROBE(cpu_switch_to) |
---|
.. | .. |
---|
1247 | 1238 | |
---|
1248 | 1239 | mov x19, x1 |
---|
1249 | 1240 | |
---|
1250 | | -#if defined(CONFIG_VMAP_STACK) || defined(CONFIG_SHADOW_CALL_STACK) |
---|
| 1241 | + /* Store the registered-event for crash_smp_send_stop() */ |
---|
1251 | 1242 | ldrb w4, [x19, #SDEI_EVENT_PRIORITY] |
---|
1252 | | -#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] |
---|
1253 | 1248 | |
---|
1254 | 1249 | #ifdef CONFIG_VMAP_STACK |
---|
1255 | 1250 | /* |
---|
.. | .. |
---|
1314 | 1309 | |
---|
1315 | 1310 | ldr_l x2, sdei_exit_mode |
---|
1316 | 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 | + |
---|
1317 | 1320 | alternative_if_not ARM64_UNMAP_KERNEL_AT_EL0 |
---|
1318 | 1321 | sdei_handler_exit exit_mode=x2 |
---|
1319 | 1322 | alternative_else_nop_endif |
---|
.. | .. |
---|
1324 | 1327 | #endif |
---|
1325 | 1328 | SYM_CODE_END(__sdei_asm_handler) |
---|
1326 | 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) |
---|
1327 | 1341 | #endif /* CONFIG_ARM_SDE_INTERFACE */ |
---|