Re: [PATCH v2 2/3] arm64: Always inline preempt count and reschedule checks

From: Catalin Marinas

Date: Fri Nov 27 2026 - 08:42:24 EST


On Thu, Nov 26, 2026 at 03:30:53AM +0100, Karl Mehltretter wrote:
> The preempt count and reschedule checks are plain inline functions,
> which permits out-of-line copies in instrumentable text. The checked
> notrace helpers added by the following patch use preempt_count(), while
> preempt_enable_notrace() uses should_resched() with
> CONFIG_DEBUG_PREEMPT and __preempt_count_dec_and_test() without it.
>
> Force all three operations inline so noinstr callers keep them in their
> own section.
>
> Reviewed-by: Hongyan Xia <hongyan.xia@xxxxxxxxxxxxx>
> Signed-off-by: Karl Mehltretter <kmehltretter@xxxxxxxxx>

Acked-by: Catalin Marinas <catalin.marinas@xxxxxxx>