diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2024-11-08 12:08:23 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2024-11-08 12:08:23 +0000 |
commit | de4ba6f493e277786cd0fe13ec6f4980e66779f2 (patch) | |
tree | a87b984ee941035fb95887e08d6a02c6f59374bd /sys/arch | |
parent | 0f3c15e8c285faec3a95bc7615a4b5588d4e6b3e (diff) |
psp(4) waits for acknowledgement of wbinvd from other CPU.
If any other CPU has not finished wbinvd, PSP command may fail. To
avoid races, call wbinvd_on_all_cpus_acked() which waits for
acknowledgement from IPI handler. Provide stub to build non-MP
kernels.
from hshoexer@; OK mlarkin@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/include/cpufunc.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/arch/amd64/include/cpufunc.h b/sys/arch/amd64/include/cpufunc.h index fe46d1378c0..6c09c256489 100644 --- a/sys/arch/amd64/include/cpufunc.h +++ b/sys/arch/amd64/include/cpufunc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpufunc.h,v 1.42 2024/11/07 17:24:42 bluhm Exp $ */ +/* $OpenBSD: cpufunc.h,v 1.43 2024/11/08 12:08:22 bluhm Exp $ */ /* $NetBSD: cpufunc.h,v 1.3 2003/05/08 10:27:43 fvdl Exp $ */ /*- @@ -293,7 +293,14 @@ wbinvd_on_all_cpus(void) wbinvd(); return 0; } -#endif + +static inline int +wbinvd_on_all_cpus_acked(void) +{ + wbinvd(); + return 0; +} +#endif /* MULTIPROCESSOR */ static __inline void clflush(u_int64_t addr) |