blob: 7c48ff4ae8d196b651b274dd3a06e1e392e6cee6 [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{
Nadav Amitcaa75932019-06-12 23:48:05 -070018 on_each_cpu(__wbinvd, NULL, 1);
19 return 0;
Borislav Petkova7b480e2010-01-22 16:01:03 +010020}
21EXPORT_SYMBOL(wbinvd_on_all_cpus);