PERFORCE change 110623 for review
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Tue Nov 28 07:36:58 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=110623
Change 110623 by gonzo at gonzo_hq on 2006/11/28 15:36:42
o Switch on ASID magic. Further work is required though.
Affected files ...
.. //depot/projects/mips2/src/sys/mips/mips/pmap.c#17 edit
Differences ...
==== //depot/projects/mips2/src/sys/mips/mips/pmap.c#17 (text+ko) ====
@@ -186,6 +186,10 @@
* Data for the ASID allocator
*/
static int pmap_maxasid;
+/* zero ASID is reserved for KVA */
+#define PMAP_ASID_RESERVED 0
+#define MIPS_TLB_MAX_ASID 255
+
static pmap_t pmap_active;
static LIST_HEAD(,pmap) allpmaps;
static struct mtx allpmaps_lock;
@@ -324,11 +328,14 @@
*/
kernel_pmap->pm_private.pm_direct_map = kptmap;
kernel_pmap->pm_active = ~0;
- kernel_pmap->pm_asid = 0;
+ kernel_pmap->pm_asid = PMAP_ASID_RESERVED;
kernel_pmap->pm_asidgen = 1;
PMAP_LOCK_INIT(kernel_pmap);
TAILQ_INIT(&kernel_pmap->pm_pvlist);
+ pmap_maxasid = MIPS_TLB_MAX_ASID;
+ PCPU_SET(next_asid, 1);
+
/*
* Initialize list of pmaps.
*/
@@ -484,7 +491,7 @@
*
* Invalidate all per-process mappings and I-cache
*/
- PCPU_SET(next_asid, 0);
+ PCPU_SET(next_asid, 1);
PCPU_SET(current_asidgen, (PCPU_GET(current_asidgen) + 1) &
ASIDGEN_MASK);
@@ -704,8 +711,10 @@
pmap->pm_private.pm_direct_map = kptmap;
pmap->pm_ptphint = NULL;
pmap->pm_active = 0;
- pmap->pm_asid = 0;
- pmap->pm_asidgen = 0;
+
+ pmap->pm_asid = PMAP_ASID_RESERVED;
+ pmap->pm_asidgen = 1;
+
TAILQ_INIT(&pmap->pm_pvlist);
bzero(&pmap->pm_stats, sizeof pmap->pm_stats);
mtx_init(&allpmaps_lock, "allpmaps", NULL, MTX_SPIN | MTX_QUIET);
More information about the p4-projects
mailing list