diff options
| author | Mark Rutland <mark.rutland@arm.com> | 2016-01-06 11:05:27 +0000 |
|---|---|---|
| committer | Alex Shi <alex.shi@linaro.org> | 2016-05-11 17:01:09 +0800 |
| commit | 1ebc63c2d5ebd9578b625a049b6f83e9181caf8d (patch) | |
| tree | 86fa0b41ecf82e9eae5863c5d559aa2194391a72 /tools/perf/scripts/python | |
| parent | 91a6481661c6e9d8e503540decf6382a604c7893 (diff) | |
arm64: head.S: use memset to clear BSS
Currently we use an open-coded memzero to clear the BSS. As it is a
trivial implementation, it is sub-optimal.
Our optimised memset doesn't use the stack, is position-independent, and
for the memzero case can use of DC ZVA to clear large blocks
efficiently. In __mmap_switched the MMU is on and there are no live
caller-saved registers, so we can safely call an uninstrumented memset.
This patch changes __mmap_switched to use memset when clearing the BSS.
We use the __pi_memset alias so as to avoid any instrumentation in all
kernel configurations.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 2a803c4db615d85126c5c7afd5849a3cfde71422)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
