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