From 4c87008f63ffdb1c0ed6cd3d9eb3ec8468df38ba Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Fri, 4 Apr 2003 00:25:35 +0000 Subject: 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). --- sys/arch/hppa/hppa/mainbus.c | 6 +++--- 1 file 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 -- cgit v1.2.3