summaryrefslogtreecommitdiff
path: root/sys/arch/loongson
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/loongson
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/loongson')
-rw-r--r--sys/arch/loongson/loongson/machdep.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/arch/loongson/loongson/machdep.c b/sys/arch/loongson/loongson/machdep.c
index d0394d8985f..3f48fe2975a 100644
--- a/sys/arch/loongson/loongson/machdep.c
+++ b/sys/arch/loongson/loongson/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.35 2012/03/25 13:52:52 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.36 2012/09/29 19:11:06 miod Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
@@ -540,10 +540,7 @@ mips_init(int32_t argc, int32_t argv, int32_t envp, int32_t cv,
Loongson2_ConfigCache(curcpu());
Loongson2_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.
@@ -596,7 +593,7 @@ mips_init(int32_t argc, int32_t argv, int32_t envp, int32_t cv,
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.