xref: /linux/arch/x86/lib/cache-smp.c (revision 06d07429858317ded2db7986113a9e0129cd599b)
1 // SPDX-License-Identifier: GPL-2.0
2 #include <asm/paravirt.h>
3 #include <linux/smp.h>
4 #include <linux/export.h>
5 
__wbinvd(void * dummy)6 static void __wbinvd(void *dummy)
7 {
8 	wbinvd();
9 }
10 
wbinvd_on_cpu(int cpu)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 
wbinvd_on_all_cpus(void)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