diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/include/cpufunc.h | 11 | ||||
-rw-r--r-- | sys/dev/ic/psp.c | 10 |
2 files changed, 14 insertions, 7 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) diff --git a/sys/dev/ic/psp.c b/sys/dev/ic/psp.c index 0ec90293709..1fd1bb89fc7 100644 --- a/sys/dev/ic/psp.c +++ b/sys/dev/ic/psp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: psp.c,v 1.10 2024/11/05 13:28:35 bluhm Exp $ */ +/* $OpenBSD: psp.c,v 1.11 2024/11/08 12:08:22 bluhm Exp $ */ /* * Copyright (c) 2023, 2024 Hans-Joerg Hoexer <hshoexer@genua.de> @@ -263,7 +263,7 @@ psp_init(struct psp_softc *sc, struct psp_init *uinit) if (ret != 0) return (EIO); - wbinvd_on_all_cpus(); + wbinvd_on_all_cpus_acked(); sc->sc_flags |= PSPF_INITIALIZED; @@ -342,7 +342,7 @@ psp_shutdown(struct psp_softc *sc) return (EIO); /* wbinvd right after SHUTDOWN */ - wbinvd_on_all_cpus(); + wbinvd_on_all_cpus_acked(); /* release TMR */ bus_dmamap_unload(sc->sc_dmat, sc->sc_tmr_map); @@ -382,7 +382,7 @@ psp_df_flush(struct psp_softc *sc) { int ret; - wbinvd_on_all_cpus(); + wbinvd_on_all_cpus_acked(); ret = ccp_docmd(sc, PSP_CMD_DF_FLUSH, 0x0); @@ -482,7 +482,7 @@ psp_launch_update_data(struct psp_softc *sc, ludata->handle = ulud->handle; /* Drain caches before we encrypt memory. */ - wbinvd_on_all_cpus(); + wbinvd_on_all_cpus_acked(); /* * Launch update one physical page at a time. We could |