xref: /linux/arch/x86/lib/cache-smp.c (revision 96ac6d435100450f0565708d9b885ea2a7400e0a)
1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/smp.h>
3 #include <linux/export.h>
4 
5 static void __wbinvd(void *dummy)
6 {
7 	wbinvd();
8 }
9 
10 void wbinvd_on_cpu(int cpu)
11 {
12 	smp_call_function_single(cpu, __wbinvd, NULL, 1);
13 }
14 EXPORT_SYMBOL(wbinvd_on_cpu);
15 
16 int wbinvd_on_all_cpus(void)
17 {
18 	return on_each_cpu(__wbinvd, NULL, 1);
19 }
20 EXPORT_SYMBOL(wbinvd_on_all_cpus);
21