Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

arm64: entry: Use irqentry_{enter_from,exit_to}_kernel_mode()

The generic irqentry code now provides irqentry_enter_from_kernel_mode()
and irqentry_exit_to_kernel_mode(), which can be used when an exception
is known to be taken from kernel mode. These can be inlined into
architecture-specific entry code, and avoid redundant work to test
whether the exception was taken from user mode.

Use these in arm64_enter_from_kernel_mode() and
arm64_exit_to_kernel_mode(), which are only used for exceptions known to
be taken from kernel mode. This will remove a small amount of redundant
work, and will permit further changes to arm64_exit_to_kernel_mode() in
subsequent patches.

There should be no funcitonal change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Jinjie Ruan <ruanjinjie@huawei.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Vladimir Murzin <vladimir.murzin@arm.com>
Cc: Will Deacon <will@kernel.org>
Reviewed-by: Jinjie Ruan <ruanjinjie@huawei.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>

authored by

Mark Rutland and committed by
Catalin Marinas
a07b7b21 6879ef13

+2 -2
+2 -2
arch/arm64/kernel/entry-common.c
··· 39 39 { 40 40 irqentry_state_t state; 41 41 42 - state = irqentry_enter(regs); 42 + state = irqentry_enter_from_kernel_mode(regs); 43 43 mte_check_tfsr_entry(); 44 44 mte_disable_tco_entry(current); 45 45 ··· 55 55 irqentry_state_t state) 56 56 { 57 57 mte_check_tfsr_exit(); 58 - irqentry_exit(regs, state); 58 + irqentry_exit_to_kernel_mode(regs, state); 59 59 } 60 60 61 61 /*