Commit dabbb8fb authored by Andrew Pinski's avatar Andrew Pinski Committed by Yang Yingliang
Browse files

arm64: rename COMPAT to AARCH32_EL0



hulk inclusion
category: feature
bugzilla: NA
CVE: NA
---------------------------

In this patchset ILP32 ABI support is added. Additionally to AARCH32,
which is binary-compatible with ARM, ILP32 is (mostly) ABI-compatible.

From now, AARCH32_EL0 (former COMPAT) config option means the support of
AARCH32 userspace, and ARM64_ILP32 - support of ILP32 ABI (see following
patches). COMPAT indicates that one of them or both is enabled.

Where needed, CONFIG_COMPAT is changed over to use CONFIG_AARCH32_EL0
instead.

Reviewed-by: default avatarDavid Daney <ddaney@caviumnetworks.com>
Signed-off-by: default avatarAndrew Pinski <Andrew.Pinski@caviumnetworks.com>
Signed-off-by: default avatarYury Norov <ynorov@caviumnetworks.com>
Signed-off-by: default avatarPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: default avatarChristoph Muellner <christoph.muellner@theobroma-systems.com>
Signed-off-by: default avatarBamvor Jian Zhang <bamv2005@gmail.com>

 Conflicts:
	arch/arm64/kernel/cpufeature.c
[wangxiongfeng: conflicts below 'arm64_cpu_capabilities
compat_elf_hwcaps' because we have the follow commit.
119703e850 arm64: cpufeature: Set the FP/SIMD compat HWCAP bits properly
Fix conflicts by only changing 'CONFIG_COMPAT' to 'CONFIG_AARCH32_EL0']

Signed-off-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: default avatarHanjun Guo &lt;guohanjun@huawei.com <mailto:guohanjun@huawei.com&gt;>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 7bce67a9
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -444,7 +444,7 @@ config ARM64_ERRATUM_834220

config ARM64_ERRATUM_845719
	bool "Cortex-A53: 845719: a load might read incorrect data"
	depends on COMPAT
	depends on AARCH32_EL0
	default y
	help
	  This option adds an alternative code sequence to work around ARM
@@ -1009,7 +1009,7 @@ config ARM64_SSBD

menuconfig ARMV8_DEPRECATED
	bool "Emulate deprecated/obsolete ARMv8 instructions"
	depends on COMPAT
	depends on AARCH32_EL0
	depends on SYSCTL
	help
	  Legacy software support may require certain instructions
@@ -1373,7 +1373,12 @@ config DMI
endmenu

config COMPAT
	def_bool y
	depends on AARCH32_EL0

config AARCH32_EL0
	bool "Kernel support for 32-bit EL0"
	def_bool y
	depends on ARM64_4K_PAGES || EXPERT
	select COMPAT_BINFMT_ELF if BINFMT_ELF
	select HAVE_UID16
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
#include <linux/init.h>
#include <linux/stddef.h>

#if defined(__KERNEL__) && defined(CONFIG_COMPAT)
#if defined(__KERNEL__) && defined(CONFIG_AARCH32_EL0)
/* Masks for extracting the FPSR and FPCR from the FPSCR */
#define VFP_FPSCR_STAT_MASK	0xf800009f
#define VFP_FPSCR_CTRL_MASK	0x07f79f00
+2 −2
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@
 */
#define ELF_HWCAP		(elf_hwcap)

#ifdef CONFIG_COMPAT
#ifdef CONFIG_AARCH32_EL0
#define COMPAT_ELF_HWCAP	(compat_elf_hwcap)
#define COMPAT_ELF_HWCAP2	(compat_elf_hwcap2)
extern unsigned int compat_elf_hwcap, compat_elf_hwcap2;
@@ -54,7 +54,7 @@ extern unsigned int compat_elf_hwcap, compat_elf_hwcap2;

enum {
	CAP_HWCAP = 1,
#ifdef CONFIG_COMPAT
#ifdef CONFIG_AARCH32_EL0
	CAP_COMPAT_HWCAP,
	CAP_COMPAT_HWCAP2,
#endif
+2 −2
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ static inline void arch_thread_struct_whitelist(unsigned long *offset,
	*size = sizeof_field(struct thread_struct, uw);
}

#ifdef CONFIG_COMPAT
#ifdef CONFIG_AARCH32_EL0
#define task_user_tls(t)						\
({									\
	unsigned long *__tls;						\
@@ -202,7 +202,7 @@ static inline void start_thread(struct pt_regs *regs, unsigned long pc,
	regs->sp = sp;
}

#ifdef CONFIG_COMPAT
#ifdef CONFIG_AARCH32_EL0
static inline void compat_start_thread(struct pt_regs *regs, unsigned long pc,
				       unsigned long sp)
{
+1 −1
Original line number Diff line number Diff line
@@ -206,7 +206,7 @@ static inline void forget_syscall(struct pt_regs *regs)

#define arch_has_single_step()	(1)

#ifdef CONFIG_COMPAT
#ifdef CONFIG_AARCH32_EL0
#define compat_thumb_mode(regs) \
	(((regs)->pstate & PSR_AA32_T_BIT))
#else
Loading