aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/smp.h
diff options
context:
space:
mode:
authorLeonardo Bras <leobras@redhat.com>2023-08-31 03:31:28 -0300
committerIngo Molnar <mingo@kernel.org>2023-09-13 14:59:24 +0200
commitd090ec0df81e56556af3a2bf04a7e89347ae5784 (patch)
tree40109dfc9f7a33202c71c0371cdf0ee58e2819c6 /include/linux/smp.h
parentDocumentation: core-api/cpuhotplug: Fix state names (diff)
downloadwireguard-linux-d090ec0df81e56556af3a2bf04a7e89347ae5784.tar.xz
wireguard-linux-d090ec0df81e56556af3a2bf04a7e89347ae5784.zip
smp: Change function signatures to use call_single_data_t
call_single_data_t is a size-aligned typedef of struct __call_single_data. This alignment is desirable in order to have smp_call_function*() avoid bouncing an extra cacheline in case of an unaligned csd, given this would hurt performance. Since the removal of struct request->csd in commit 660e802c76c8 ("blk-mq: use percpu csd to remote complete instead of per-rq csd") there are no current users of smp_call_function*() with unaligned csd. Change every 'struct __call_single_data' function parameter to 'call_single_data_t', so we have warnings if any new code tries to introduce an smp_call_function*() call with unaligned csd. Signed-off-by: Leonardo Bras <leobras@redhat.com> Reviewed-by: Guo Ren <guoren@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20230831063129.335425-1-leobras@redhat.com
Diffstat (limited to 'include/linux/smp.h')
-rw-r--r--include/linux/smp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 91ea4a67f8ca..e87520dc2959 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -53,7 +53,7 @@ int smp_call_function_single(int cpuid, smp_call_func_t func, void *info,
void on_each_cpu_cond_mask(smp_cond_func_t cond_func, smp_call_func_t func,
void *info, bool wait, const struct cpumask *mask);
-int smp_call_function_single_async(int cpu, struct __call_single_data *csd);
+int smp_call_function_single_async(int cpu, call_single_data_t *csd);
/*
* Cpus stopping functions in panic. All have default weak definitions.