From 108115df61b1acc06e854fdfac3f955a5c8fce7c Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Sat, 22 May 1999 00:16:43 +0000 Subject: fix f{d,i}cache wrt last cache line --- sys/arch/hppa/include/cpufunc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/arch/hppa') diff --git a/sys/arch/hppa/include/cpufunc.h b/sys/arch/hppa/include/cpufunc.h index 6dbe1e102d0..73e1921fd94 100644 --- a/sys/arch/hppa/include/cpufunc.h +++ b/sys/arch/hppa/include/cpufunc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpufunc.h,v 1.8 1999/05/02 03:41:45 mickey Exp $ */ +/* $OpenBSD: cpufunc.h,v 1.9 1999/05/22 00:16:42 mickey Exp $ */ /* * Copyright (c) 1998 Michael Shalayeff @@ -122,7 +122,7 @@ static __inline void ficache(pa_space_t sp, vaddr_t va, vsize_t size) { extern int icache_stride; - register vaddr_t eva = va + size; + register vaddr_t eva = (va + size + icache_stride-1) & ~(icache_stride-1); mtsp(sp, 1); while (va < eva) @@ -134,7 +134,7 @@ static __inline void fdcache(pa_space_t sp, vaddr_t va, vsize_t size) { extern int dcache_stride; - register vaddr_t eva = va + size; + register vaddr_t eva = (va + size + dcache_stride-1) & ~(dcache_stride-1); mtsp(sp, 1); while (va < eva) -- cgit v1.2.3