18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci#include <linux/smp.h> 38c2ecf20Sopenharmony_ci#include <linux/export.h> 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_cistatic void __wbinvd(void *dummy) 68c2ecf20Sopenharmony_ci{ 78c2ecf20Sopenharmony_ci wbinvd(); 88c2ecf20Sopenharmony_ci} 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_civoid wbinvd_on_cpu(int cpu) 118c2ecf20Sopenharmony_ci{ 128c2ecf20Sopenharmony_ci smp_call_function_single(cpu, __wbinvd, NULL, 1); 138c2ecf20Sopenharmony_ci} 148c2ecf20Sopenharmony_ciEXPORT_SYMBOL(wbinvd_on_cpu); 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciint wbinvd_on_all_cpus(void) 178c2ecf20Sopenharmony_ci{ 188c2ecf20Sopenharmony_ci on_each_cpu(__wbinvd, NULL, 1); 198c2ecf20Sopenharmony_ci return 0; 208c2ecf20Sopenharmony_ci} 218c2ecf20Sopenharmony_ciEXPORT_SYMBOL(wbinvd_on_all_cpus); 22