]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
smp: Get this_cpu once in smp_call_function
authorShrikanth Hegde <sshegde@linux.ibm.com>
Mon, 23 Mar 2026 19:36:29 +0000 (01:06 +0530)
committerThomas Gleixner <tglx@kernel.org>
Wed, 25 Mar 2026 19:11:30 +0000 (20:11 +0100)
commitec39780d6a9e05e7e427008603b40efef515b775
treeeb5d63ad1952732896dc375c62013b3da9afd6ac
parentcc5623947f3d86687c39771fcbea641907966d5c
smp: Get this_cpu once in smp_call_function

smp_call_function_single() and smp_call_function_many_cond() disable
preemption and cache the CPU number via get_cpu().

Use this cached value throughout the function instead of invoking
smp_processor_id() again.

[ tglx: Make the copy&pasta'ed change log match the patch ]

Signed-off-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com>
Link: https://patch.msgid.link/20260323193630.640311-4-sshegde@linux.ibm.com
kernel/smp.c