diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-01-21 17:32:41 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-01-21 17:32:41 +0000 |
commit | e4848b74cb22013749cf3117dafb0d77f22eb09e (patch) | |
tree | dbb1a45e38fb69e71d0b7014e3956803d4ac3174 /sys/arch/hppa | |
parent | 6f91904713239faf066ebcf68837c45846a5ee84 (diff) |
reverse logic in dma sync flush as long as prewrite was given and purge for preread otherwise
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r-- | sys/arch/hppa/hppa/mainbus.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/arch/hppa/hppa/mainbus.c b/sys/arch/hppa/hppa/mainbus.c index c856e8caa84..a6201bd31bc 100644 --- a/sys/arch/hppa/hppa/mainbus.c +++ b/sys/arch/hppa/hppa/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.38 2002/12/18 23:52:45 mickey Exp $ */ +/* $OpenBSD: mainbus.c,v 1.39 2003/01/21 17:32:40 mickey Exp $ */ /* * Copyright (c) 1998-2001 Michael Shalayeff @@ -706,14 +706,14 @@ mbus_dmamap_sync(void *v, bus_dmamap_t map, bus_addr_t offset, bus_size_t len, int ops) { - if (ops & (BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE)) - __asm __volatile ("sync\n\tsyncdma\n\tsync\n\t" - "nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t"); - - if (ops & BUS_DMASYNC_PREREAD) - pdcache(HPPA_SID_KERNEL, map->_dm_va + offset, len); - else if (ops & BUS_DMASYNC_PREWRITE) + if (ops & BUS_DMASYNC_PREWRITE) fdcache(HPPA_SID_KERNEL, map->_dm_va + offset, len); + else if (ops & BUS_DMASYNC_PREREAD) + 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"); } int |