Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Apr 2003 11:31:51 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 29139 for review
Message-ID:  <200304171831.h3HIVp7i050522@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=29139

Change 29139 by marcel@marcel_nfs on 2003/04/17 11:31:14

	Unstaticize kptdir and raname it to ia64_kptdir to avoid
	name clashes. This allows us to use the kernel page tables
	for handling nested TLB faults.

Affected files ...

.. //depot/projects/ia64_epc/lib/libkvm/kvm_ia64.c#2 edit
.. //depot/projects/ia64_epc/sys/ia64/ia64/pmap.c#5 edit

Differences ...

==== //depot/projects/ia64_epc/lib/libkvm/kvm_ia64.c#2 (text+ko) ====

@@ -148,7 +148,7 @@
 	 * addresses/values.
 	 */
 
-	nlist[0].n_name = "kptdir";
+	nlist[0].n_name = "ia64_kptdir";
 	nlist[1].n_name = 0;
 
 	if (kvm_nlist(kd, nlist) != 0) {

==== //depot/projects/ia64_epc/sys/ia64/ia64/pmap.c#5 (text+ko) ====

@@ -202,7 +202,7 @@
  * ia64_lptes. This gives us up to 2Gb of kernel virtual space.
  */
 static int nkpt;
-static struct ia64_lpte **kptdir;
+struct ia64_lpte **ia64_kptdir;
 #define KPTE_DIR_INDEX(va) \
 	((va >> (2*PAGE_SHIFT-5)) & ((1<<(PAGE_SHIFT-3))-1))
 #define KPTE_PTE_INDEX(va) \
@@ -346,9 +346,9 @@
 	/*
 	 * Allocate some memory for initial kernel 'page tables'.
 	 */
-	kptdir = (struct ia64_lpte **) pmap_steal_memory(PAGE_SIZE);
+	ia64_kptdir = (void *)pmap_steal_memory(PAGE_SIZE);
 	for (i = 0; i < NKPT; i++) {
-		kptdir[i] = (struct ia64_lpte *) pmap_steal_memory(PAGE_SIZE);
+		ia64_kptdir[i] = (void*)pmap_steal_memory(PAGE_SIZE);
 	}
 	nkpt = NKPT;
 
@@ -878,7 +878,7 @@
 	}
 	addr = (addr + PAGE_SIZE * NKPTEPG) & ~(PAGE_SIZE * NKPTEPG - 1);
 	while (kernel_vm_end < addr) {
-		if (kptdir[KPTE_DIR_INDEX(kernel_vm_end)]) {
+		if (ia64_kptdir[KPTE_DIR_INDEX(kernel_vm_end)]) {
 			kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NKPTEPG)
 				& ~(PAGE_SIZE * NKPTEPG - 1);
 			continue;
@@ -902,7 +902,7 @@
 		ptepage = (struct ia64_lpte *)
 			IA64_PHYS_TO_RR7(VM_PAGE_TO_PHYS(nkpg));
 		bzero(ptepage, PAGE_SIZE);
-		kptdir[KPTE_DIR_INDEX(kernel_vm_end)] = ptepage;
+		ia64_kptdir[KPTE_DIR_INDEX(kernel_vm_end)] = ptepage;
 
 		kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NKPTEPG) & ~(PAGE_SIZE * NKPTEPG - 1);
 	}
@@ -1171,7 +1171,7 @@
 		("kernel mapping 0x%lx not in region 5", va));
 	KASSERT(IA64_RR_MASK(va) < (nkpt * PAGE_SIZE * NKPTEPG),
 		("kernel mapping 0x%lx out of range", va));
-	return &kptdir[KPTE_DIR_INDEX(va)][KPTE_PTE_INDEX(va)];
+	return (&ia64_kptdir[KPTE_DIR_INDEX(va)][KPTE_PTE_INDEX(va)]);
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304171831.h3HIVp7i050522>