summaryrefslogtreecommitdiff
path: root/sys/arch/macppc/include/cpu.h
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2002-01-07 05:03:24 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2002-01-07 05:03:24 +0000
commitb57f9f5ef5ecb674dac71b5b6c6158a029e4c77c (patch)
treee8aaf42065cb26be00bd022488456b13aa71766a /sys/arch/macppc/include/cpu.h
parent92cf807f392e4c1454835a2ef7b17a0a1e62cd81 (diff)
On cache flushing, if start is not cacheline aligned, add to the lenght
to make sure the whole region is flushed. from conversation with pefo.
Diffstat (limited to 'sys/arch/macppc/include/cpu.h')
-rw-r--r--sys/arch/macppc/include/cpu.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/macppc/include/cpu.h b/sys/arch/macppc/include/cpu.h
index d0b6b60f731..0a1bd865f7d 100644
--- a/sys/arch/macppc/include/cpu.h
+++ b/sys/arch/macppc/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.2 2001/11/06 18:41:10 art Exp $ */
+/* $OpenBSD: cpu.h,v 1.3 2002/01/07 05:03:23 drahn Exp $ */
/* $NetBSD: cpu.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */
/*
@@ -41,8 +41,10 @@
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));