From 447cfc23bd95c532d7ed05e6c8f4474c9d335a50 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Wed, 31 Oct 2018 09:39:38 +0000 Subject: [PATCH] Fix some style(9) issues in the arm64 pmap_mapbios/unmapbios. Split lines when they are too long. Sponsored by: DARPA, AFRL --- sys/arm64/arm64/pmap.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 390bfbe307c6..1ae33292bf24 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -4604,8 +4604,9 @@ pmap_mapbios(vm_paddr_t pa, vm_size_t size) if (size == 0) return (NULL); - /* Calculate how many full L2 blocks are needed for the mapping */ - l2_blocks = (roundup2(pa + size, L2_SIZE) - rounddown2(pa, L2_SIZE)) >> L2_SHIFT; + /* Calculate how many L2 blocks are needed for the mapping */ + l2_blocks = (roundup2(pa + size, L2_SIZE) - + rounddown2(pa, L2_SIZE)) >> L2_SHIFT; offset = pa & L2_OFFSET; @@ -4652,8 +4653,10 @@ pmap_mapbios(vm_paddr_t pa, vm_size_t size) for (i = 0; i < l2_blocks; i++) { pde = pmap_pde(kernel_pmap, va, &lvl); KASSERT(pde != NULL, - ("pmap_mapbios: Invalid page entry, va: 0x%lx", va)); - KASSERT(lvl == 1, ("pmap_mapbios: Invalid level %d", lvl)); + ("pmap_mapbios: Invalid page entry, va: 0x%lx", + va)); + KASSERT(lvl == 1, + ("pmap_mapbios: Invalid level %d", lvl)); /* Insert L2_BLOCK */ l2 = pmap_l1_to_l2(pde, va); @@ -4698,7 +4701,8 @@ pmap_unmapbios(vm_offset_t va, vm_size_t size) pt_entry_t *l2; int i, lvl, l2_blocks, block; - l2_blocks = (roundup2(va + size, L2_SIZE) - rounddown2(va, L2_SIZE)) >> L2_SHIFT; + l2_blocks = + (roundup2(va + size, L2_SIZE) - rounddown2(va, L2_SIZE)) >> L2_SHIFT; KASSERT(l2_blocks > 0, ("pmap_unmapbios: invalid size %lx", size)); /* Remove preinit mapping */ @@ -4706,7 +4710,8 @@ pmap_unmapbios(vm_offset_t va, vm_size_t size) for (i = 0; i < PMAP_PREINIT_MAPPING_COUNT; i++) { ppim = pmap_preinit_mapping + i; if (ppim->va == va) { - KASSERT(ppim->size == size, ("pmap_unmapbios: size mismatch")); + KASSERT(ppim->size == size, + ("pmap_unmapbios: size mismatch")); ppim->va = 0; ppim->pa = 0; ppim->size = 0; @@ -4716,10 +4721,12 @@ pmap_unmapbios(vm_offset_t va, vm_size_t size) /* Remove L2_BLOCK */ pde = pmap_pde(kernel_pmap, va_trunc, &lvl); KASSERT(pde != NULL, - ("pmap_unmapbios: Invalid page entry, va: 0x%lx", va_trunc)); + ("pmap_unmapbios: Invalid page entry, va: 0x%lx", + va_trunc)); l2 = pmap_l1_to_l2(pde, va_trunc); pmap_load_clear(l2); - pmap_invalidate_range(kernel_pmap, va_trunc, va_trunc + L2_SIZE); + pmap_invalidate_range(kernel_pmap, va_trunc, + va_trunc + L2_SIZE); if (block == (l2_blocks - 1)) return;