diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-03-21 05:26:38 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-03-21 05:26:38 +0000 |
commit | 87fecc3af24a298eaa93ca41a7ea4df73a49212f (patch) | |
tree | 665db34d4ebd6feb8b7aca70a75ec69428c6ff1d /sys/arch | |
parent | f42207bfe896cbb30b311d9135a6751e28dd1487 (diff) |
Mips_IOSyncDCache last argument is in the 0..2 range, not -1..1, so let
C and asm code agree on this; this causes no functional change on r10k
and fewer wt invalidates on r5k. ok kettenis@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/mips64/mips64/busdma.c | 8 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/cache_r10k.S | 4 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/cache_r5k.S | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/sys/arch/mips64/mips64/busdma.c b/sys/arch/mips64/mips64/busdma.c index b808b1fa748..06efa131e61 100644 --- a/sys/arch/mips64/mips64/busdma.c +++ b/sys/arch/mips64/mips64/busdma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: busdma.c,v 1.11 2006/09/01 20:07:56 miod Exp $ */ +/* $OpenBSD: busdma.c,v 1.12 2007/03/21 05:26:37 miod Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -342,9 +342,9 @@ _dmamap_sync(t, map, addr, size, op) bus_size_t size; int op; { -#define SYNC_R 0 -#define SYNC_W 1 -#define SYNC_X 2 +#define SYNC_R 0 /* WB invalidate, WT invalidate */ +#define SYNC_W 1 /* WB writeback + invalidate, WT unaffected */ +#define SYNC_X 2 /* WB writeback + invalidate, WT invalidate */ int nsegs; int curseg; diff --git a/sys/arch/mips64/mips64/cache_r10k.S b/sys/arch/mips64/mips64/cache_r10k.S index 4a402b68286..d0a2f793f95 100644 --- a/sys/arch/mips64/mips64/cache_r10k.S +++ b/sys/arch/mips64/mips64/cache_r10k.S @@ -1,4 +1,4 @@ -/* $OpenBSD: cache_r10k.S,v 1.2 2005/07/20 21:36:32 miod Exp $ */ +/* $OpenBSD: cache_r10k.S,v 1.3 2007/03/21 05:26:37 miod Exp $ */ /* * Copyright (c) 2004 Opsycon AB (www.opsycon.se) @@ -572,7 +572,7 @@ NON_LEAF(Mips10k_IOSyncDCache, FRAMESZ(CF_SZ+2*REGSZ), ra) REG_S a0, CF_ARGSZ(sp) # save args beqz a2, SyncRD # Sync PREREAD REG_S a1, CF_ARGSZ+REGSZ(sp) - addiu a2, 1 + addiu a2, -1 bnez a2, SyncRDWB # Sync PREWRITE+PREREAD nop diff --git a/sys/arch/mips64/mips64/cache_r5k.S b/sys/arch/mips64/mips64/cache_r5k.S index 87d38aef58a..da421bfcc97 100644 --- a/sys/arch/mips64/mips64/cache_r5k.S +++ b/sys/arch/mips64/mips64/cache_r5k.S @@ -1,4 +1,4 @@ -/* $OpenBSD: cache_r5k.S,v 1.16 2005/07/20 21:36:32 miod Exp $ */ +/* $OpenBSD: cache_r5k.S,v 1.17 2007/03/21 05:26:37 miod Exp $ */ /* * Copyright (c) 1998-2004 Opsycon AB (www.opsycon.se) @@ -942,7 +942,7 @@ NON_LEAF(Mips5k_IOSyncDCache, FRAMESZ(CF_SZ+2*REGSZ), ra) REG_S a0, CF_ARGSZ(sp) # save args beqz a2, SyncRD # Sync PREREAD REG_S a1, CF_ARGSZ+REGSZ(sp) - addiu a2, 1 + addiu a2, -1 bnez a2, SyncRDWB # Sync PREWRITE+PREREAD nop |