summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/elf.h
diff options
context:
space:
mode:
authorYury Norov <ynorov@caviumnetworks.com>2016-05-24 03:04:42 +0300
committerChristoph Muellner <christoph.muellner@theobroma-systems.com>2018-04-03 10:52:41 +0200
commit8ce9160536f568044fe36cfdee54b5e30394e09c (patch)
tree912ba88dad87ae57a1988fa425a2bf103f4b0ffc /arch/arm64/include/asm/elf.h
parenta67033d3c7c5fc8f5da77ac10fec53db3bba1d9c (diff)
arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat)
Based on patch of Andrew Pinski. This patch introduces is_a32_compat_task and is_a32_thread so it is easier to say this is a a32 specific thread or a generic compat thread/task. Corresponding functions are located in <asm/is_compat.h> to avoid mess in headers. Some files include both <linux/compat.h> and <asm/compat.h>, and this is wrong because <linux/compat.h> has <asm/compat.h> already included. It was fixed too. Signed-off-by: Yury Norov <ynorov@caviumnetworks.com> Signed-off-by: Andrew Pinski <Andrew.Pinski@caviumnetworks.com> Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Diffstat (limited to 'arch/arm64/include/asm/elf.h')
-rw-r--r--arch/arm64/include/asm/elf.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h
index fac1c4de7898..b4b10eefc667 100644
--- a/arch/arm64/include/asm/elf.h
+++ b/arch/arm64/include/asm/elf.h
@@ -16,6 +16,10 @@
#ifndef __ASM_ELF_H
#define __ASM_ELF_H
+#ifndef __ASSEMBLY__
+#include <linux/compat.h>
+#endif
+
#include <asm/hwcap.h>
/*
@@ -156,13 +160,9 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm,
int uses_interp);
/* 1GB of VA */
-#ifdef CONFIG_COMPAT
-#define STACK_RND_MASK (test_thread_flag(TIF_32BIT) ? \
+#define STACK_RND_MASK (is_compat_task() ? \
0x7ff >> (PAGE_SHIFT - 12) : \
0x3ffff >> (PAGE_SHIFT - 12))
-#else
-#define STACK_RND_MASK (0x3ffff >> (PAGE_SHIFT - 12))
-#endif
#ifdef __AARCH64EB__
#define COMPAT_ELF_PLATFORM ("v8b")