Skip to content

Commit 555827a

Browse files
Linus Walleijctmarinas
authored andcommitted
arm64: entry: Clean out some indirection
The conversion to generic IRQ entry left some functions in the EL1 (kernel) IRQ entry path very shallow, so drop the __inner_functions() where appropriate, saving some time and stack. This is not a fix but an optimization. Drop stale comments about irqentry_enter/exit() while we are at it. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent e2e21a9 commit 555827a

1 file changed

Lines changed: 3 additions & 25 deletions

File tree

arch/arm64/kernel/entry-common.c

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,12 @@
3434
* Handle IRQ/context state management when entering from kernel mode.
3535
* Before this function is called it is not safe to call regular kernel code,
3636
* instrumentable code, or any code which may trigger an exception.
37-
*
38-
* This is intended to match the logic in irqentry_enter(), handling the kernel
39-
* mode transitions only.
4037
*/
41-
static __always_inline irqentry_state_t __enter_from_kernel_mode(struct pt_regs *regs)
42-
{
43-
return irqentry_enter(regs);
44-
}
45-
4638
static noinstr irqentry_state_t enter_from_kernel_mode(struct pt_regs *regs)
4739
{
4840
irqentry_state_t state;
4941

50-
state = __enter_from_kernel_mode(regs);
42+
state = irqentry_enter(regs);
5143
mte_check_tfsr_entry();
5244
mte_disable_tco_entry(current);
5345

@@ -58,39 +50,25 @@ static noinstr irqentry_state_t enter_from_kernel_mode(struct pt_regs *regs)
5850
* Handle IRQ/context state management when exiting to kernel mode.
5951
* After this function returns it is not safe to call regular kernel code,
6052
* instrumentable code, or any code which may trigger an exception.
61-
*
62-
* This is intended to match the logic in irqentry_exit(), handling the kernel
63-
* mode transitions only, and with preemption handled elsewhere.
6453
*/
65-
static __always_inline void __exit_to_kernel_mode(struct pt_regs *regs,
66-
irqentry_state_t state)
67-
{
68-
irqentry_exit(regs, state);
69-
}
70-
7154
static void noinstr exit_to_kernel_mode(struct pt_regs *regs,
7255
irqentry_state_t state)
7356
{
7457
mte_check_tfsr_exit();
75-
__exit_to_kernel_mode(regs, state);
58+
irqentry_exit(regs, state);
7659
}
7760

7861
/*
7962
* Handle IRQ/context state management when entering from user mode.
8063
* Before this function is called it is not safe to call regular kernel code,
8164
* instrumentable code, or any code which may trigger an exception.
8265
*/
83-
static __always_inline void __enter_from_user_mode(struct pt_regs *regs)
66+
static __always_inline void arm64_enter_from_user_mode(struct pt_regs *regs)
8467
{
8568
enter_from_user_mode(regs);
8669
mte_disable_tco_entry(current);
8770
}
8871

89-
static __always_inline void arm64_enter_from_user_mode(struct pt_regs *regs)
90-
{
91-
__enter_from_user_mode(regs);
92-
}
93-
9472
/*
9573
* Handle IRQ/context state management when exiting to user mode.
9674
* After this function returns it is not safe to call regular kernel code,

0 commit comments

Comments
 (0)