summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mvmeppc/include/cpu.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/arch/mvmeppc/include/cpu.h b/sys/arch/mvmeppc/include/cpu.h
index 278051c2110..71d77072af9 100644
--- a/sys/arch/mvmeppc/include/cpu.h
+++ b/sys/arch/mvmeppc/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.3 2001/11/06 22:45:57 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.4 2002/06/07 01:00:55 miod Exp $ */
/* $NetBSD: cpu.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */
/*
@@ -41,8 +41,11 @@
static __inline void
syncicache(void *from, int len)
{
- int l = len;
+ int l;
char *p = from;
+
+ len = len + (((u_int32_t) from) & (CACHELINESIZE - 1));
+ l = len;
do {
__asm__ __volatile__ ("dcbst 0,%0" :: "r"(p));
@@ -61,9 +64,12 @@ syncicache(void *from, int len)
static __inline void
invdcache(void *from, int len)
{
- int l = len;
+ int l;
char *p = from;
+ len = len + (((u_int32_t) from) & (CACHELINESIZE - 1));
+ l = len;
+
do {
__asm__ __volatile__ ("dcbi 0,%0" :: "r"(p));
p += CACHELINESIZE;