Restore the check for the page size extension after r332489.
Without this, the support for transparent superpage promotion on i386 was left disabled. Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D16279
This commit is contained in:
parent
4600b569bb
commit
697be9a3bd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=336321
@ -201,8 +201,8 @@ struct pmap kernel_pmap_store;
|
||||
|
||||
vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss) */
|
||||
vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */
|
||||
int pgeflag = 0; /* PG_G or-in */
|
||||
int pseflag = 0; /* PG_PS or-in */
|
||||
static int pgeflag = 0; /* PG_G or-in */
|
||||
static int pseflag = 0; /* PG_PS or-in */
|
||||
|
||||
static int nkpt = NKPT;
|
||||
vm_offset_t kernel_vm_end = /* 0 + */ NKPT * NBPDR;
|
||||
@ -518,6 +518,7 @@ pmap_cold(void)
|
||||
ncr4 = 0;
|
||||
if ((cpu_feature & CPUID_PSE) != 0) {
|
||||
ncr4 |= CR4_PSE;
|
||||
pseflag = PG_PS;
|
||||
/*
|
||||
* Superpage mapping of the kernel text. Existing 4k
|
||||
* page table pages are wasted.
|
||||
@ -1791,7 +1792,7 @@ pmap_map(vm_offset_t *virt, vm_paddr_t start, vm_paddr_t end, int prot)
|
||||
sva = va;
|
||||
while (start < end) {
|
||||
if ((start & PDRMASK) == 0 && end - start >= NBPDR &&
|
||||
pseflag) {
|
||||
pseflag != 0) {
|
||||
KASSERT((va & PDRMASK) == 0,
|
||||
("pmap_map: misaligned va %#x", va));
|
||||
newpde = start | PG_PS | PG_RW | PG_V;
|
||||
@ -4175,7 +4176,7 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, vm_object_t object,
|
||||
VM_OBJECT_ASSERT_WLOCKED(object);
|
||||
KASSERT(object->type == OBJT_DEVICE || object->type == OBJT_SG,
|
||||
("pmap_object_init_pt: non-device object"));
|
||||
if (pseflag &&
|
||||
if (pg_ps_enabled &&
|
||||
(addr & (NBPDR - 1)) == 0 && (size & (NBPDR - 1)) == 0) {
|
||||
if (!vm_object_populate(object, pindex, pindex + atop(size)))
|
||||
return;
|
||||
|
@ -360,8 +360,6 @@ extern caddr_t CADDR3;
|
||||
extern pt_entry_t *CMAP3;
|
||||
extern vm_paddr_t phys_avail[];
|
||||
extern vm_paddr_t dump_avail[];
|
||||
extern int pseflag;
|
||||
extern int pgeflag;
|
||||
extern char *ptvmmap; /* poor name! */
|
||||
extern vm_offset_t virtual_avail;
|
||||
extern vm_offset_t virtual_end;
|
||||
|
Loading…
Reference in New Issue
Block a user