blob: 1811fa4a1b1ae398611a488c5ffa7e2e98cb5af7 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001// SPDX-License-Identifier: GPL-2.0
Borislav Petkova7b480e2010-01-22 16:01:03 +01002#include <linux/smp.h>
Paul Gortmakere6830142016-07-13 20:18:57 -04003#include <linux/export.h>
Borislav Petkova7b480e2010-01-22 16:01:03 +01004
5static void __wbinvd(void *dummy)
6{
7 wbinvd();
8}
9
10void wbinvd_on_cpu(int cpu)
11{
12 smp_call_function_single(cpu, __wbinvd, NULL, 1);
13}
14EXPORT_SYMBOL(wbinvd_on_cpu);
15
16int wbinvd_on_all_cpus(void)
17{
18 return on_each_cpu(__wbinvd, NULL, 1);
19}
20EXPORT_SYMBOL(wbinvd_on_all_cpus);