diff options
| author | 2016-02-22 18:46:04 +0100 | |
|---|---|---|
| committer | 2016-02-23 17:43:25 +0000 | |
| commit | 8439e62a15614e8fcd43835d57b7245cd9870dc5 (patch) | |
| tree | 8ace79af5dced3e6f18b5000d6ae4e9c5e6fa5c6 /lib/extable.c | |
| parent | arm64: mm: only perform memstart_addr sanity check if DEBUG_VM (diff) | |
| download | wireguard-linux-8439e62a15614e8fcd43835d57b7245cd9870dc5.tar.xz wireguard-linux-8439e62a15614e8fcd43835d57b7245cd9870dc5.zip | |
arm64: mm: use bit ops rather than arithmetic in pa/va translations
Since PAGE_OFFSET is chosen such that it cuts the kernel VA space right
in half, and since the size of the kernel VA space itself is always a
power of 2, we can treat PAGE_OFFSET as a bitmask and replace the
additions/subtractions with 'or' and 'and-not' operations.
For the comparison against PAGE_OFFSET, a mov/cmp/branch sequence ends
up getting replaced with a single tbz instruction. For the additions and
subtractions, we save a mov instruction since the mask is folded into the
instruction's immediate field.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'lib/extable.c')
0 files changed, 0 insertions, 0 deletions
