From bb7964b2058716c33e28cf16d95d933451128a13 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 9 Jul 2008 06:04:10 +0000 Subject: [PATCH] Fix lines that are too long in pmap_growkernel() by substituting shorter but equivalent expressions. --- sys/amd64/amd64/pmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index a3e14e233f92..7b9222e5f5e6 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1721,7 +1721,7 @@ pmap_growkernel(vm_offset_t addr) if (KERNBASE < addr && addr <= KERNBASE + NKPT * NBPDR) return; - addr = roundup2(addr, PAGE_SIZE * NPTEPG); + addr = roundup2(addr, NBPDR); if (addr - 1 >= kernel_map->max_offset) addr = kernel_map->max_offset; while (kernel_vm_end < addr) { @@ -1742,7 +1742,7 @@ pmap_growkernel(vm_offset_t addr) } pde = pmap_pdpe_to_pde(pdpe, kernel_vm_end); if ((*pde & PG_V) != 0) { - kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); + kernel_vm_end = (kernel_vm_end + NBPDR) & ~PDRMASK; if (kernel_vm_end - 1 >= kernel_map->max_offset) { kernel_vm_end = kernel_map->max_offset; break; @@ -1761,7 +1761,7 @@ pmap_growkernel(vm_offset_t addr) newpdir = (pd_entry_t) (paddr | PG_V | PG_RW | PG_A | PG_M); pde_store(pde, newpdir); - kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); + kernel_vm_end = (kernel_vm_end + NBPDR) & ~PDRMASK; if (kernel_vm_end - 1 >= kernel_map->max_offset) { kernel_vm_end = kernel_map->max_offset; break;