diff options
| author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-02-22 18:46:04 +0100 |
|---|---|---|
| committer | Alex Shi <alex.shi@linaro.org> | 2016-05-11 22:52:49 +0800 |
| commit | d3bb0180b3ecbcff076ca7e41d4ad4fa0ee4c9d7 (patch) | |
| tree | e69d3ae80b9984bcedcde8fd9e8c2032cae347f5 /tools/perf/scripts/python | |
| parent | bf7cb966b2f5ef5a456a25d84d2b64c79730a07a (diff) | |
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>
(cherry picked from commit 8439e62a15614e8fcd43835d57b7245cd9870dc5)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
