summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2004-07-01 21:03:34 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2004-07-01 21:03:34 +0000
commita1c65908a8583f063848980fb44ed465869ee19c (patch)
treeb1f2499623eb459afd75f1a5409cd00ceac7e98d
parent54292f9ef9b28fc3ebbd657ac3f1574c64f4f527 (diff)
have separate insn and data cache all-flushers
-rw-r--r--sys/arch/hppa/hppa/machdep.c15
-rw-r--r--sys/arch/hppa/include/cpufunc.h5
2 files changed, 14 insertions, 6 deletions
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index e4c871a034d..99a6c8bbeb1 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.131 2004/06/30 18:18:54 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.132 2004/07/01 21:03:32 mickey Exp $ */
/*
* Copyright (c) 1999-2003 Michael Shalayeff
@@ -347,7 +347,8 @@ hppa_init(start)
cpuid();
ptlball();
- fcacheall();
+ ficacheall();
+ fdcacheall();
avail_end = trunc_page(PAGE0->imm_max_mem);
/*if (avail_end > 32*1024*1024)
@@ -418,7 +419,8 @@ hppa_init(start)
#ifdef DDB
ddb_init();
#endif
- fcacheall();
+ ficacheall();
+ fdcacheall();
}
void
@@ -788,7 +790,7 @@ fall(c_base, c_count, c_loop, c_stride, data)
}
void
-fcacheall(void)
+ficacheall(void)
{
/*
* Flush the instruction, then data cache.
@@ -796,6 +798,11 @@ fcacheall(void)
fall(pdc_cache.ic_base, pdc_cache.ic_count, pdc_cache.ic_loop,
pdc_cache.ic_stride, 0);
sync_caches();
+}
+
+void
+fdcacheall(void)
+{
fall(pdc_cache.dc_base, pdc_cache.dc_count, pdc_cache.dc_loop,
pdc_cache.dc_stride, 1);
sync_caches();
diff --git a/sys/arch/hppa/include/cpufunc.h b/sys/arch/hppa/include/cpufunc.h
index aec3880f7a8..be5c4702466 100644
--- a/sys/arch/hppa/include/cpufunc.h
+++ b/sys/arch/hppa/include/cpufunc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpufunc.h,v 1.25 2004/04/07 18:24:19 mickey Exp $ */
+/* $OpenBSD: cpufunc.h,v 1.26 2004/07/01 21:03:33 mickey Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -208,7 +208,8 @@ void fpu_exit(void);
void ficache(pa_space_t sp, vaddr_t va, vsize_t size);
void fdcache(pa_space_t sp, vaddr_t va, vsize_t size);
void pdcache(pa_space_t sp, vaddr_t va, vsize_t size);
-void fcacheall(void);
+void ficacheall(void);
+void fdcacheall(void);
void ptlball(void);
int btlb_insert(pa_space_t space, vaddr_t va, paddr_t pa, vsize_t *lenp, u_int prot);
hppa_hpa_t cpu_gethpa(int n);