summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormickey <mickey@openbsd.org>2003-04-04 00:25:34 +0000
committermickey <mickey@openbsd.org>2003-04-04 00:25:34 +0000
commitad56e0632f7451f485823080f8beb49a8713ea46 (patch)
treef085321a5f8bdc9244dbcf0f9b21c73eb6113af4
parentsnprintf; ok from espie tedu and others (diff)
downloadwireguard-openbsd-ad56e0632f7451f485823080f8beb49a8713ea46.tar.xz
wireguard-openbsd-ad56e0632f7451f485823080f8beb49a8713ea46.zip
always flush on pre-ops. data flushed may involve
flushing other data on the same cache lines (such other local vars around the scsi_*_data sturcts allocated on the satck) and that might need to be flushed and not purged. shows up on the cpu types that implement purge as purge and not purge as flush. no need for extra \n\t at the end of the asm (cosmetique).
-rw-r--r--sys/arch/hppa/hppa/mainbus.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/hppa/hppa/mainbus.c b/sys/arch/hppa/hppa/mainbus.c
index 2977b7a16c0..bd2742fd5c2 100644
--- a/sys/arch/hppa/hppa/mainbus.c
+++ b/sys/arch/hppa/hppa/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.42 2003/04/01 23:11:55 mickey Exp $ */
+/* $OpenBSD: mainbus.c,v 1.43 2003/04/04 00:25:34 mickey Exp $ */
/*
* Copyright (c) 1998-2003 Michael Shalayeff
@@ -705,14 +705,14 @@ void
mbus_dmamap_sync(void *v, bus_dmamap_t map, bus_addr_t offset, bus_size_t len,
int ops)
{
- if (ops & BUS_DMASYNC_PREWRITE)
+ if (ops & (BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE))
fdcache(HPPA_SID_KERNEL, map->_dm_va + offset, len);
else
pdcache(HPPA_SID_KERNEL, map->_dm_va + offset, len);
/* for either operation sync the shit away */
__asm __volatile ("sync\n\tsyncdma\n\tsync\n\t"
- "nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");
+ "nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop");
}
int