diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-04-04 00:25:35 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-04-04 00:25:35 +0000 |
commit | 4c87008f63ffdb1c0ed6cd3d9eb3ec8468df38ba (patch) | |
tree | 339ae600bc82e971ef3714c21552db3c16e7e313 | |
parent | 988b70ba4354790a7affc080c9adf814105da57e (diff) |
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.c | 6 |
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 |