diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2015-10-08 20:02:03 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2015-10-12 16:19:45 +0100 |
commit | 207918461eb0aca720fddec5da79bc71c133b9f1 (patch) | |
tree | 3e6133bef93e5ed5e0610ca6f536b23e97d0b736 /arch/arm64/include/asm/assembler.h | |
parent | d4dddfdbbc75f46d2cbab4e9f421999452617d64 (diff) | |
download | blackbird-op-linux-207918461eb0aca720fddec5da79bc71c133b9f1.tar.gz blackbird-op-linux-207918461eb0aca720fddec5da79bc71c133b9f1.zip |
arm64: use ENDPIPROC() to annotate position independent assembler routines
For more control over which functions are called with the MMU off or
with the UEFI 1:1 mapping active, annotate some assembler routines as
position independent. This is done by introducing ENDPIPROC(), which
replaces the ENDPROC() declaration of those routines.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/assembler.h')
-rw-r--r-- | arch/arm64/include/asm/assembler.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h index b51f2cc22ca9..12eff928ef8b 100644 --- a/arch/arm64/include/asm/assembler.h +++ b/arch/arm64/include/asm/assembler.h @@ -193,4 +193,15 @@ lr .req x30 // link register str \src, [\tmp, :lo12:\sym] .endm +/* + * Annotate a function as position independent, i.e., safe to be called before + * the kernel virtual mapping is activated. + */ +#define ENDPIPROC(x) \ + .globl __pi_##x; \ + .type __pi_##x, %function; \ + .set __pi_##x, x; \ + .size __pi_##x, . - x; \ + ENDPROC(x) + #endif /* __ASM_ASSEMBLER_H */ |