summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-06-12 17:50:28 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-06-12 17:50:28 +0000
commitd216b04c893daddcf3ebe1792cdb4ea95530aa68 (patch)
treed3789b7841f3b4980721be4f3ea0db1bac917c15 /sys/arch
parentc7cb8c1569f0500a7f63cd149e27bff4bbb971a6 (diff)
cannot ever use purge() since dmaed memory is not necessarily aligned always
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hppa/hppa/mainbus.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/arch/hppa/hppa/mainbus.c b/sys/arch/hppa/hppa/mainbus.c
index ab3556fc6a9..425a6fbc59b 100644
--- a/sys/arch/hppa/hppa/mainbus.c
+++ b/sys/arch/hppa/hppa/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.44 2003/04/07 17:01:08 mickey Exp $ */
+/* $OpenBSD: mainbus.c,v 1.45 2003/06/12 17:50:27 mickey Exp $ */
/*
* Copyright (c) 1998-2003 Michael Shalayeff
@@ -707,10 +707,11 @@ void
mbus_dmamap_sync(void *v, bus_dmamap_t map, bus_addr_t offset, bus_size_t len,
int ops)
{
- 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);
+ /*
+ * cannot use purge since the data for dma is not
+ * guarantied to be aligned in any way
+ */
+ fdcache(HPPA_SID_KERNEL, map->_dm_va + offset, len);
/* for either operation sync the shit away */
__asm __volatile ("sync\n\tsyncdma\n\tsync\n\t"