summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-03-07 16:56:58 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-03-07 16:56:58 +0000
commit5ff01a74e72b455860f539593c9f9ca46230f5c6 (patch)
tree74ee28ba22ba36b48f6f1a4effe4ad51c25a315f /sys
parentae4bb49da0f6c09e6d7ec32256dc891080b933a0 (diff)
We already assume global mappings (PG_G) are supported, so pmap_pg_g is
unnecessary ok krw@ kettenis@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/lapic.c4
-rw-r--r--sys/arch/amd64/amd64/pmap.c15
-rw-r--r--sys/arch/amd64/include/pmap.h3
3 files changed, 6 insertions, 16 deletions
diff --git a/sys/arch/amd64/amd64/lapic.c b/sys/arch/amd64/amd64/lapic.c
index 2f4b672510f..bd2e7c8943b 100644
--- a/sys/arch/amd64/amd64/lapic.c
+++ b/sys/arch/amd64/amd64/lapic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lapic.c,v 1.29 2014/01/21 09:40:54 kettenis Exp $ */
+/* $OpenBSD: lapic.c,v 1.30 2014/03/07 16:56:57 guenther Exp $ */
/* $NetBSD: lapic.c,v 1.2 2003/05/08 01:04:35 fvdl Exp $ */
/*-
@@ -110,7 +110,7 @@ lapic_map(paddr_t lapic_base)
*/
pte = kvtopte(va);
- *pte = lapic_base | PG_RW | PG_V | PG_N | pmap_pg_g;
+ *pte = lapic_base | PG_RW | PG_V | PG_N | PG_G;
invlpg(va);
#ifdef MULTIPROCESSOR
diff --git a/sys/arch/amd64/amd64/pmap.c b/sys/arch/amd64/amd64/pmap.c
index aed4b5921bf..e5a2bbf3503 100644
--- a/sys/arch/amd64/amd64/pmap.c
+++ b/sys/arch/amd64/amd64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.67 2013/11/19 04:12:17 guenther Exp $ */
+/* $OpenBSD: pmap.c,v 1.68 2014/03/07 16:56:57 guenther Exp $ */
/* $NetBSD: pmap.c,v 1.3 2003/05/08 18:13:13 thorpej Exp $ */
/*
@@ -229,13 +229,6 @@ pd_entry_t *alternate_pdes[] = APDES_INITIALIZER;
struct pmap kernel_pmap_store; /* the kernel's pmap (proc0) */
/*
- * pmap_pg_g: if our processor supports PG_G in the PTE then we
- * set pmap_pg_g to PG_G (otherwise it is zero).
- */
-
-int pmap_pg_g = 0;
-
-/*
* pmap_pg_wc: if our processor supports PAT then we set this
* to be the pte bits for Write Combining. Else we fall back to
* UC- so mtrrs can override the cacheability;
@@ -442,7 +435,7 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot)
/* special 1:1 mappings in the first 2MB must not be global */
if (va >= (vaddr_t)NBPD_L2)
- npte |= pmap_pg_g;
+ npte |= PG_G;
if ((cpu_feature & CPUID_NXE) && !(prot & VM_PROT_EXECUTE))
npte |= PG_NX;
@@ -578,8 +571,6 @@ pmap_bootstrap(paddr_t first_avail, paddr_t max_pa)
/*
* enable global TLB entries.
*/
- pmap_pg_g = PG_G; /* enable software */
-
/* add PG_G attribute to already mapped kernel pages */
#if KERNBASE == VM_MIN_KERNEL_ADDRESS
for (kva = VM_MIN_KERNEL_ADDRESS ; kva < virtual_avail ;
@@ -2117,7 +2108,7 @@ enter_now:
else if (va < VM_MAX_ADDRESS)
npte |= (PG_u | PG_RW); /* XXXCDC: no longer needed? */
if (pmap == pmap_kernel())
- npte |= pmap_pg_g;
+ npte |= PG_G;
ptes[pl1_i(va)] = npte; /* zap! */
diff --git a/sys/arch/amd64/include/pmap.h b/sys/arch/amd64/include/pmap.h
index d1af66c6737..7cbabbb2959 100644
--- a/sys/arch/amd64/include/pmap.h
+++ b/sys/arch/amd64/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.42 2014/01/30 18:16:41 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.43 2014/03/07 16:56:57 guenther Exp $ */
/* $NetBSD: pmap.h,v 1.1 2003/04/26 18:39:46 fvdl Exp $ */
/*
@@ -368,7 +368,6 @@ struct pmap_remove_record {
extern u_long PTDpaddr;
extern struct pmap kernel_pmap_store; /* kernel pmap */
-extern int pmap_pg_g; /* do we support PG_G? */
extern paddr_t ptp_masks[];
extern int ptp_shifts[];