|
29 | 29 | #include <asm/asm-uaccess.h> |
30 | 30 | #include <asm/unistd.h> |
31 | 31 |
|
32 | | -/* |
33 | | - * Context tracking and irqflag tracing need to instrument transitions between |
34 | | - * user and kernel mode. |
35 | | - */ |
36 | | - .macro user_enter_irqoff |
37 | | -#if defined(CONFIG_CONTEXT_TRACKING) || defined(CONFIG_TRACE_IRQFLAGS) |
38 | | - bl exit_to_user_mode |
39 | | -#endif |
40 | | - .endm |
41 | | - |
42 | 32 | .macro clear_gp_regs |
43 | 33 | .irp n,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29 |
44 | 34 | mov x\n, xzr |
@@ -474,18 +464,6 @@ SYM_CODE_END(__swpan_exit_el0) |
474 | 464 | /* GPRs used by entry code */ |
475 | 465 | tsk .req x28 // current thread_info |
476 | 466 |
|
477 | | -/* |
478 | | - * Interrupt handling. |
479 | | - */ |
480 | | - .macro gic_prio_kentry_setup, tmp:req |
481 | | -#ifdef CONFIG_ARM64_PSEUDO_NMI |
482 | | - alternative_if ARM64_HAS_IRQ_PRIO_MASKING |
483 | | - mov \tmp, #(GIC_PRIO_PSR_I_SET | GIC_PRIO_IRQON) |
484 | | - msr_s SYS_ICC_PMR_EL1, \tmp |
485 | | - alternative_else_nop_endif |
486 | | -#endif |
487 | | - .endm |
488 | | - |
489 | 467 | .text |
490 | 468 |
|
491 | 469 | /* |
@@ -585,37 +563,17 @@ SYM_CODE_START_LOCAL(ret_to_kernel) |
585 | 563 | kernel_exit 1 |
586 | 564 | SYM_CODE_END(ret_to_kernel) |
587 | 565 |
|
588 | | -/* |
589 | | - * "slow" syscall return path. |
590 | | - */ |
591 | 566 | SYM_CODE_START_LOCAL(ret_to_user) |
592 | | - disable_daif |
593 | | - gic_prio_kentry_setup tmp=x3 |
594 | | -#ifdef CONFIG_TRACE_IRQFLAGS |
595 | | - bl trace_hardirqs_off |
596 | | -#endif |
597 | | - ldr x19, [tsk, #TSK_TI_FLAGS] |
598 | | - and x2, x19, #_TIF_WORK_MASK |
599 | | - cbnz x2, work_pending |
600 | | -finish_ret_to_user: |
601 | | - user_enter_irqoff |
| 567 | + mov x0, sp |
| 568 | + bl asm_exit_to_user_mode |
602 | 569 | /* Ignore asynchronous tag check faults in the uaccess routines */ |
603 | 570 | clear_mte_async_tcf |
| 571 | + ldr x19, [tsk, #TSK_TI_FLAGS] // re-check for single-step |
604 | 572 | enable_step_tsk x19, x2 |
605 | 573 | #ifdef CONFIG_GCC_PLUGIN_STACKLEAK |
606 | 574 | bl stackleak_erase |
607 | 575 | #endif |
608 | 576 | kernel_exit 0 |
609 | | - |
610 | | -/* |
611 | | - * Ok, we need to do extra processing, enter the slow path. |
612 | | - */ |
613 | | -work_pending: |
614 | | - mov x0, sp // 'regs' |
615 | | - mov x1, x19 |
616 | | - bl do_notify_resume |
617 | | - ldr x19, [tsk, #TSK_TI_FLAGS] // re-check for single-step |
618 | | - b finish_ret_to_user |
619 | 577 | SYM_CODE_END(ret_to_user) |
620 | 578 |
|
621 | 579 | .popsection // .entry.text |
|
0 commit comments