diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-21 19:57:40 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-21 19:57:40 +0000 |
commit | 729533413f4e97bb65852c22fb914805e2759b5a (patch) | |
tree | cd4dfa8859a5f57124d315ff395b524d7587e1ea /sys/arm64 | |
parent | 0d55061d05ce55d28aff0c06bad831448d172425 (diff) | |
download | FreeBSD-src-729533413f4e97bb65852c22fb914805e2759b5a.zip FreeBSD-src-729533413f4e97bb65852c22fb914805e2759b5a.tar.gz |
sys: use our roundup2/rounddown2() macros when param.h is available.
rounddown2 tends to produce longer lines than the original code
and when the code has a high indentation level it was not really
advantageous to do the replacement.
This tries to strike a balance between readability using the macros
and flexibility of having the expressions, so not everything is
converted.
Diffstat (limited to 'sys/arm64')
-rw-r--r-- | sys/arm64/arm64/pmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 2cf3c33..de093bd 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -622,7 +622,7 @@ pmap_bootstrap_l3(vm_offset_t l1pt, vm_offset_t va, vm_offset_t l3_start) KASSERT((va & L2_OFFSET) == 0, ("Invalid virtual address")); l2 = pmap_l2(kernel_pmap, va); - l2 = (pd_entry_t *)((uintptr_t)l2 & ~(PAGE_SIZE - 1)); + l2 = (pd_entry_t *)rounddown2((uintptr_t)l2, PAGE_SIZE); l2pt = (vm_offset_t)l2; l2_slot = pmap_l2_index(va); l3pt = l3_start; |