]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64: entry: Use preempt_count() and need_resched() helper
authorJinjie Ruan <ruanjinjie@huawei.com>
Fri, 15 Aug 2025 03:06:29 +0000 (11:06 +0800)
committerWill Deacon <will@kernel.org>
Thu, 11 Sep 2025 14:55:34 +0000 (15:55 +0100)
commitc74c44c6ae207e196c4c31c4a243abb0811a5974
tree9372efb3c4e9a697155ef846bf824f1b35161356
parent77c1953946391e38c1e5120230f8df14f85219a7
arm64: entry: Use preempt_count() and need_resched() helper

The generic entry code uses preempt_count() and need_resched() helpers to
check if it should do preempt_schedule_irq(). Currently, arm64 use its own
check logic, that is "READ_ONCE(current_thread_info()->preempt_count == 0",
which is equivalent to "preempt_count() == 0 && need_resched()".

In preparation for moving arm64 over to the generic entry code, use
these helpers to replace arm64's own code and move it ahead.

No functional changes.

Reviewed-by: Ada Couprie Diaz <ada.coupriediaz@arm.com>
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/entry-common.c