summaryrefslogtreecommitdiff
path: root/sys/arch/octeon
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2012-09-29 19:11:09 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2012-09-29 19:11:09 +0000
commitb60b7cf9e3d07d9ff9f747df9992383468b6499c (patch)
tree719c9a96543b80ddbf52fe07fa0a09b442ceb1a5 /sys/arch/octeon
parent29c0098b834ddaa89ad7b55b50df47a30a055026 (diff)
Kill the mostly unused VMTLB_xxx and VMNUM_xxx defines. Move all tlb
knowledge to <machine/pte.h>. Add specific routines for tlb handling setup (at cpu initialization time) and tlb ASID wrap.
Diffstat (limited to 'sys/arch/octeon')
-rw-r--r--sys/arch/octeon/octeon/machdep.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/sys/arch/octeon/octeon/machdep.c b/sys/arch/octeon/octeon/machdep.c
index 2b500ef97ef..f6285548c64 100644
--- a/sys/arch/octeon/octeon/machdep.c
+++ b/sys/arch/octeon/octeon/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.19 2012/07/16 16:06:40 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.20 2012/09/29 19:11:08 miod Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
@@ -426,10 +426,7 @@ mips_init(__register_t a0, __register_t a1, __register_t a2 __unused,
Octeon_ConfigCache(curcpu());
Octeon_SyncCache(curcpu());
- tlb_set_page_mask(TLB_PAGE_MASK);
- tlb_set_wired(0);
- tlb_flush(bootcpu_hwinfo.tlbsize);
- tlb_set_wired(UPAGES / 2);
+ tlb_init(bootcpu_hwinfo.tlbsize);
/*
* Get a console, very early but after initial mapping setup.
@@ -497,7 +494,7 @@ mips_init(__register_t a0, __register_t a1, __register_t a2 __unused,
proc0.p_addr = proc0paddr = curcpu()->ci_curprocpaddr =
(struct user *)pmap_steal_memory(USPACE, NULL, NULL);
proc0.p_md.md_regs = (struct trap_frame *)&proc0paddr->u_pcb.pcb_regs;
- tlb_set_pid(1);
+ tlb_set_pid(MIN_USER_ASID);
/*
* Bootstrap VM system.
@@ -796,11 +793,7 @@ hw_cpu_hatch(struct cpu_info *ci)
*/
setsr(getsr() | SR_KX | SR_UX);
- tlb_set_page_mask(TLB_PAGE_MASK);
- tlb_set_wired(0);
- tlb_flush(64);
- tlb_set_wired(UPAGES / 2);
-
+ tlb_init(64);
tlb_set_pid(0);
/*