From patchwork Thu Jan 14 17:23:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 8034481 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 43535BEEE5 for ; Thu, 14 Jan 2016 17:27:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E327520497 for ; Thu, 14 Jan 2016 17:27:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8DC7A20445 for ; Thu, 14 Jan 2016 17:27:00 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aJleJ-00041R-Kn; Thu, 14 Jan 2016 17:25:27 +0000 Received: from mail-bl2on0066.outbound.protection.outlook.com ([65.55.169.66] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aJldn-0002EB-6i for linux-arm-kernel@lists.infradead.org; Thu, 14 Jan 2016 17:25:04 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.121) by CO2PR07MB617.namprd07.prod.outlook.com (10.141.228.143) with Microsoft SMTP Server (TLS) id 15.1.361.13; Thu, 14 Jan 2016 17:24:29 +0000 From: Yury Norov To: , , , Subject: [PATCH v6 04/21] arm64: change some CONFIG_COMPAT over to use CONFIG_AARCH32_EL0 instead Date: Thu, 14 Jan 2016 20:23:01 +0300 Message-ID: <1452792198-10718-5-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1452792198-10718-1-git-send-email-ynorov@caviumnetworks.com> References: <1452792198-10718-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: VI1PR05CA0022.eurprd05.prod.outlook.com (25.162.33.160) To CO2PR07MB617.namprd07.prod.outlook.com (10.141.228.143) X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB617; 2:9VyGg69lJbKLGMSI9vgXSzYTzkS1JWMj0OUxHiOhuZzqqHHgkTY/+VCI6OpP8/tmv1dxlvW16Bu4iTmltRm/9A3NCCP9cd23pk/k3rQgBYif43VS4dusq7iwFVvkdnVEPBiJdJ26KABvyrLPUaSVFg==; 3:K3ukWbPA07YCPm+KRgMek6yh13VQMM/kiJS1PZZVMHtzgcBCpXgtRNHjVXpVRs1NfBhKWP1nGkbC2bQJ5v8tUv5DG7DwSQpxlK4VyIM+Dzexbr53Eq6+hTjG/CwncTPh; 25:a3eJtzk4JF0QW7r3FrBfkDXNZZLPazJ/WLO3z33SwfwnFW8tyz6+uoBT0NEL7urQsbTc1Hjjjnbej1EE2PIM7Aj3cfSSadB1n/93slxHzFd9O8rvYgw2gI54Pb1U43dg/+XVv2LBmWFPblqfuBGKoZRK+TUS/7/lplrwhONCQk+JEZHjc6nEmmkjSynMPMMkzwZ1fraafTMQzipQBRyYoItAAiR2jNw9PCOzGFXe+zbSAdGrw5Y/UkWTTV4x/VF9 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CO2PR07MB617; X-MS-Office365-Filtering-Correlation-Id: 6deb5539-19fe-4fc3-46d4-08d31d078f75 X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB617; 20:Z+kZkqQHWUEYWgOshQxpqX7P/oO2MNVT+j2DCyLCVwdeUCM5YFzdoY4VZ/2X/xkVa0+ePILcpzhFxGLYJB092f/I2IJTv8Tn9aPNzEc8KRyp+M3Ti9+7X94OjMT4B0xR6ljFp8Qw7BlGW31fMQSW3D6c8VltMKAL+qnLiF3sMnd6Hk7oiNbHwg4C1Azso1nM+yxcNPUj/Nf9w/mJc07qWZ3mLZ4sPhtUu2+ef1fZGekLhYxqn8LRiZ2HGnS/MpzBnBV42YO7W9D1IRMvUUv5ifacsOuoZRM7hMSQO403iP8hyQBnkm2MzsdGMlVgvX452yiC83FX8Ng3dr1bnZwrbNeNQ/ZirrBQJPRamG3PMAEcmyP+FJjK+cJvoVwbUpH0e/JGEJm5HOj3A9ZXl0AVCyaJwOI/hZy1mkFBYT/9wVNVG6jhUs0XxK14RDO3/jXUP8eacA5lsx/CzA5C0aA9AtNcO0Y+dT8l+EC5XKJIfFUGPQAmx9L0lBciP8KrD9mJHHLrCllQKokFYXBdRb0k7e9kx34P39+um1/ob1z/YZ1cGI2O5SOmbr5OlsJouB4ReUGTQexPXFjQJnwt5waTYo0jrwNbOqv9OEolOo3fU6A= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236414709691187); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001)(10201501046); SRVR:CO2PR07MB617; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB617; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB617; 4:NdeW5a2Qg+ORzgI8e3PXZXifKJkGF/9VfL2tBlHnJWNZeR9Uu7yJLUcplmz7cNeUvpl8GrVWVCvg3Sc9iNgxbCnNB2xyPxNquhWUkUKWWvqL5dZWCifJ6E5Yqlh5wTllWciMRZ24Oy6XF6LGnTre4Ac84AGK1dgqwQ031wlojV+WO7DeO2akMieVCvwlq9ffL2U5R8H7NTJyka8NBjFuVqSa4oAIZctR0C6vltrCVYr6dxiZuZPpJV3Wo69cOovM9RnZDol5rjMvr67YGXPnRXxcbIGpNhg7fRBbpks16RVPKN+wcNxo3JKwQ2g7tdGwIRdf9HmLr89gjpz3qFGUpr8aVKjfMLBvxRtlgd18mctc72856fuhcli00Z2rS7gEJIMHF3wsysmGRdwf+9f0rhV3ANiKJmw9qz0vVJOe1PDVEX4MbjQBpn/HSWd8jG4S X-Forefront-PRVS: 08213D42D3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(6069001)(6009001)(189002)(199003)(586003)(6116002)(3846002)(19580395003)(36756003)(76506005)(5004730100002)(19580405001)(106356001)(33646002)(5003940100001)(42186005)(105586002)(2906002)(5008740100001)(4326007)(77096005)(1096002)(575784001)(47776003)(66066001)(81156007)(50226001)(189998001)(5001770100001)(5001960100002)(97736004)(2201001)(40100003)(122386002)(92566002)(15975445007)(50466002)(48376002)(229853001)(87976001)(76176999)(50986999)(101416001)(2950100001)(2101003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB617; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR07MB617; 23:USIRouZSF5rQfvKjnba3M25i0BHFrKP1BOf9kcoM2Q?= =?us-ascii?Q?OoD75+w+ke1olK1exjgxhNBsrpJV0if+4TzV9OQYFK+6iuZEKEnDzlQmCNvb?= =?us-ascii?Q?/3jhfKWsmweUbnGjP1W1wR9dBn7yBreD8qefwRsNjnLILuZGs4RmbIQA7I8a?= =?us-ascii?Q?6GZBGzBVSfByumthHalsVGpDRmOAbTvbPm3tpP8yvd9ceJNyFJmnIe0pvJdd?= =?us-ascii?Q?jqDeSVipOPAMuNE1jLK6AlNAj8b/sFUyce0H/8+MQA05VjSYGVugCj0kiDk2?= =?us-ascii?Q?ym4X0tH9XVvP+hA0vCbevPqsK94/edrNaA6LYBntc69Vn9fLNWw0eSqrlolo?= =?us-ascii?Q?+rzxDxgjAU0LCdeVdlk5XdoOkVSUoEJDqlMRgZc23c6cQTdgFEf+cnWLe/xt?= =?us-ascii?Q?ZO/T1u4+1mFngK9MmANPWnMNW+EpA5iz+NppFjRxwJUe4tjxWNnXeUctFbhh?= =?us-ascii?Q?uBNDoJyc5Eoo+UrpcLFUHzLm6B05hVp7aRMYhT3Y78HHCG3UFK2JgPkpmPKq?= =?us-ascii?Q?pq6IXzy/4VQ1GOSCiIdDU5b0Hnhvxb/N8vWJaxCaPjh31LzzWaVQeTsXix7J?= =?us-ascii?Q?Ckz3NhD4/a9a21s+jB8jBUm6ljFjsYn4A+yKBwVV6fBPLPJgy2jAZ32Z13pr?= =?us-ascii?Q?rTKiPbQTS0vciceD4QTkc2aC9qgiGDAY39LHyXjz3XaZrXjgZ8xkAupjoTBJ?= =?us-ascii?Q?/KOk9Q9jgJtsFc0I2QvS9zRlawTYbMdYcPoLWB3/wUqSrTdFmKdmq8MjUlyO?= =?us-ascii?Q?oXkQSZP0N8GRSpk/3FHJstYkicqF97q9Y/w1XJ61qfqfK6WSsCDuQgN3JuQD?= =?us-ascii?Q?4sUzcNAyveLNPzXl9BrTi4rsTZbY7wC66J5fv9Zlt2U3I35QqA3+eqAkpKCU?= =?us-ascii?Q?fgOwfFntvTu5nQZQ+E8CHDUv0rbJgQgOJ9BIDsPYIJyJqBajE4onMawYpq98?= =?us-ascii?Q?AWdM8h6Dg9jIKHwm2W7XyX2GaBiswTr7z42zmudAcPIiXJ61aWxqBd4mHpep?= =?us-ascii?Q?03i2izhX6argilh4oro+9Z9gGy9E7yCeO6eh2dBq0RywprezDHK0wfHW9y2e?= =?us-ascii?Q?UgDUEoNwzkGm4XQ8tfdU2ZzOVtKxHNuq4PV5FD4z1MNn+SZyXgDOq8E2w2TF?= =?us-ascii?Q?1GMOMsPs1pfoJcy9hdLV34nYHBH8lvm/L46PNQ4ptyGQ8FZkiCA8RXja+yPI?= =?us-ascii?Q?MgA7bgGkVun5ypfaEIwxLAQBt7QPDRq6kzy79aaWrb3yYXAQClbn4WdbzLb+?= =?us-ascii?Q?vZgaRW5g68BokQgz/w+E1QE44P8h2sPX9/JEFR?= X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB617; 5:dHA1z/OYjdVfi2fMZYaeF2N+8sORjzxKxO+V/5jdFoGEfsq0ItNDEjWBpbgbG3ld/DkyZBZKcQ7mjkOL6cgRO/hK2rYcRXhr3A7RKZLLDCLzu4IWx1cYbcw0UzMDkdFRKkGxa4fO8xUAXyTuIDf32Q==; 24:KnZ2YzyYR12EQ9iM+p6LOIexIurHOsUJKULm2UmwIAWevo8PRw5xy0YPhn/18HDZDGheHqQFZYhmVqnAz3W5dlf2R1ic7AofhOBBZlTrCOg= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2016 17:24:29.2863 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB617 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160114_092456_154752_E7583981 X-CRM114-Status: GOOD ( 12.03 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pinskia@gmail.com, Prasun.Kapoor@caviumnetworks.com, schwab@suse.de, broonie@kernel.org, heiko.carstens@de.ibm.com, agraf@suse.de, klimov.linux@gmail.com, Andrew Pinski , ynorov@caviumnetworks.com, jan.dakinevich@gmail.com, Andrew Pinski , schwidefsky@de.ibm.com, Nathan_Lynch@mentor.com, Philipp Tomsich , joseph@codesourcery.com, christoph.muellner@theobroma-systems.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Andrew Pinski Signed-off-by: Andrew Pinski Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Yury Norov Reviewed-by: David Daney --- arch/arm64/include/asm/fpsimd.h | 2 +- arch/arm64/include/asm/hwcap.h | 4 ++-- arch/arm64/include/asm/processor.h | 6 +++--- arch/arm64/include/asm/ptrace.h | 2 +- arch/arm64/include/asm/signal32.h | 6 ++++-- arch/arm64/include/asm/unistd.h | 2 +- arch/arm64/kernel/Makefile | 2 +- arch/arm64/kernel/asm-offsets.c | 2 +- arch/arm64/kernel/cpufeature.c | 8 ++++---- arch/arm64/kernel/cpuinfo.c | 4 ++-- arch/arm64/kernel/entry.S | 6 +++--- arch/arm64/kernel/head.S | 2 +- arch/arm64/kernel/ptrace.c | 8 ++++---- arch/arm64/kernel/traps.c | 2 +- arch/arm64/kernel/vdso.c | 4 ++-- drivers/clocksource/arm_arch_timer.c | 2 +- 16 files changed, 32 insertions(+), 30 deletions(-) diff --git a/arch/arm64/include/asm/fpsimd.h b/arch/arm64/include/asm/fpsimd.h index 50f559f..63b19f1 100644 --- a/arch/arm64/include/asm/fpsimd.h +++ b/arch/arm64/include/asm/fpsimd.h @@ -52,7 +52,7 @@ struct fpsimd_partial_state { }; -#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 diff --git a/arch/arm64/include/asm/hwcap.h b/arch/arm64/include/asm/hwcap.h index 400b80b..2c7fc5d 100644 --- a/arch/arm64/include/asm/hwcap.h +++ b/arch/arm64/include/asm/hwcap.h @@ -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 diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 4acb7ca..9c4d95d 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -79,7 +79,7 @@ struct cpu_context { struct thread_struct { struct cpu_context cpu_context; /* cpu context */ unsigned long tp_value; /* TLS register */ -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 unsigned long tp2_value; #endif struct fpsimd_state fpsimd_state; @@ -88,7 +88,7 @@ struct thread_struct { struct debug_info debug; /* debugging */ }; -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 #define task_user_tls(t) \ ({ \ unsigned long *__tls; \ @@ -119,7 +119,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) { diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h index e9e5467..95eff51 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h @@ -120,7 +120,7 @@ struct pt_regs { #define arch_has_single_step() (1) -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 #define compat_thumb_mode(regs) \ (((regs)->pstate & COMPAT_PSR_T_BIT)) #else diff --git a/arch/arm64/include/asm/signal32.h b/arch/arm64/include/asm/signal32.h index eeaa975..e68fcce 100644 --- a/arch/arm64/include/asm/signal32.h +++ b/arch/arm64/include/asm/signal32.h @@ -17,7 +17,9 @@ #define __ASM_SIGNAL32_H #ifdef __KERNEL__ -#ifdef CONFIG_COMPAT + +#ifdef CONFIG_AARCH32_EL0 + #include #define AARCH32_KERN_SIGRET_CODE_OFFSET 0x500 @@ -47,6 +49,6 @@ static inline int compat_setup_rt_frame(int usig, struct ksignal *ksig, sigset_t static inline void compat_setup_restart_syscall(struct pt_regs *regs) { } -#endif /* CONFIG_COMPAT */ +#endif /* CONFIG_AARCH32_EL0 */ #endif /* __KERNEL__ */ #endif /* __ASM_SIGNAL32_H */ diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h index 41e58fe..2971dea 100644 --- a/arch/arm64/include/asm/unistd.h +++ b/arch/arm64/include/asm/unistd.h @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 #define __ARCH_WANT_COMPAT_SYS_GETDENTS64 #define __ARCH_WANT_COMPAT_STAT64 #define __ARCH_WANT_SYS_GETHOSTNAME diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile index 474691f..bf75a7f 100644 --- a/arch/arm64/kernel/Makefile +++ b/arch/arm64/kernel/Makefile @@ -25,7 +25,7 @@ OBJCOPYFLAGS := --prefix-symbols=__efistub_ $(obj)/%.stub.o: $(obj)/%.o FORCE $(call if_changed,objcopy) -arm64-obj-$(CONFIG_COMPAT) += sys32.o kuser32.o signal32.o \ +arm64-obj-$(CONFIG_AARCH32_EL0) += sys32.o kuser32.o signal32.o \ sys_compat.o entry32.o \ ../../arm/kernel/opcodes.o arm64-obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o entry-ftrace.o diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c index 25de8b2..0d4f1e7 100644 --- a/arch/arm64/kernel/asm-offsets.c +++ b/arch/arm64/kernel/asm-offsets.c @@ -51,7 +51,7 @@ int main(void) DEFINE(S_X7, offsetof(struct pt_regs, regs[7])); DEFINE(S_LR, offsetof(struct pt_regs, regs[30])); DEFINE(S_SP, offsetof(struct pt_regs, sp)); -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 DEFINE(S_COMPAT_SP, offsetof(struct pt_regs, compat_sp)); #endif DEFINE(S_PSTATE, offsetof(struct pt_regs, pstate)); diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 0669c63..20956cd 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -30,7 +30,7 @@ unsigned long elf_hwcap __read_mostly; EXPORT_SYMBOL_GPL(elf_hwcap); -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 #define COMPAT_ELF_HWCAP_DEFAULT \ (COMPAT_HWCAP_HALF|COMPAT_HWCAP_THUMB|\ COMPAT_HWCAP_FAST_MULT|COMPAT_HWCAP_EDSP|\ @@ -674,7 +674,7 @@ static const struct arm64_cpu_capabilities arm64_hwcaps[] = { HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_ATOMICS_SHIFT, 2, CAP_HWCAP, HWCAP_ATOMICS), HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_FP_SHIFT, 0, CAP_HWCAP, HWCAP_FP), HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_ASIMD_SHIFT, 0, CAP_HWCAP, HWCAP_ASIMD), -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 HWCAP_CAP(SYS_ID_ISAR5_EL1, ID_ISAR5_AES_SHIFT, 2, CAP_COMPAT_HWCAP2, COMPAT_HWCAP2_PMULL), HWCAP_CAP(SYS_ID_ISAR5_EL1, ID_ISAR5_AES_SHIFT, 1, CAP_COMPAT_HWCAP2, COMPAT_HWCAP2_AES), HWCAP_CAP(SYS_ID_ISAR5_EL1, ID_ISAR5_SHA1_SHIFT, 1, CAP_COMPAT_HWCAP2, COMPAT_HWCAP2_SHA1), @@ -690,7 +690,7 @@ static void cap_set_hwcap(const struct arm64_cpu_capabilities *cap) case CAP_HWCAP: elf_hwcap |= cap->hwcap; break; -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 case CAP_COMPAT_HWCAP: compat_elf_hwcap |= (u32)cap->hwcap; break; @@ -713,7 +713,7 @@ static bool __maybe_unused cpus_have_hwcap(const struct arm64_cpu_capabilities * case CAP_HWCAP: rc = (elf_hwcap & cap->hwcap) != 0; break; -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 case CAP_COMPAT_HWCAP: rc = (compat_elf_hwcap & (u32)cap->hwcap) != 0; break; diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c index 212ae63..4a4602d 100644 --- a/arch/arm64/kernel/cpuinfo.c +++ b/arch/arm64/kernel/cpuinfo.c @@ -125,7 +125,7 @@ static int c_show(struct seq_file *m, void *v) */ seq_puts(m, "Features\t:"); if (personality(current->personality) == PER_LINUX32) { -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 for (j = 0; compat_hwcap_str[j]; j++) if (compat_elf_hwcap & (1 << j)) seq_printf(m, " %s", compat_hwcap_str[j]); @@ -133,7 +133,7 @@ static int c_show(struct seq_file *m, void *v) for (j = 0; compat_hwcap2_str[j]; j++) if (compat_elf_hwcap2 & (1 << j)) seq_printf(m, " %s", compat_hwcap2_str[j]); -#endif /* CONFIG_COMPAT */ +#endif /* CONFIG_AARCH32_EL0 */ } else { for (j = 0; hwcap_str[j]; j++) if (elf_hwcap & (1 << j)) diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 7ed3d75..5eb1bb7 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -212,7 +212,7 @@ ENTRY(vectors) ventry el0_fiq_invalid // FIQ 64-bit EL0 ventry el0_error_invalid // Error 64-bit EL0 -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 ventry el0_sync_compat // Synchronous 32-bit EL0 ventry el0_irq_compat // IRQ 32-bit EL0 ventry el0_fiq_invalid_compat // FIQ 32-bit EL0 @@ -252,7 +252,7 @@ el0_error_invalid: inv_entry 0, BAD_ERROR ENDPROC(el0_error_invalid) -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 el0_fiq_invalid_compat: inv_entry 0, BAD_FIQ, 32 ENDPROC(el0_fiq_invalid_compat) @@ -414,7 +414,7 @@ el0_sync: b.ge el0_dbg b el0_inv -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 .align 6 el0_sync_compat: kernel_entry 0, 32 diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index 23cfc08..a554e3a 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -507,7 +507,7 @@ CPU_LE( movk x0, #0x30d0, lsl #16 ) // Clear EE and E0E on LE systems mov x0, #0x33ff msr cptr_el2, x0 // Disable copro. traps to EL2 -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 msr hstr_el2, xzr // Disable CP15 traps to EL2 #endif diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index 1971f49..6b02f26 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -76,7 +76,7 @@ static void ptrace_hbptriggered(struct perf_event *bp, .si_addr = (void __user *)(bkpt->trigger), }; -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 int i; if (!is_compat_task()) @@ -651,7 +651,7 @@ static const struct user_regset_view user_aarch64_view = { .regsets = aarch64_regsets, .n = ARRAY_SIZE(aarch64_regsets) }; -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 #include enum compat_regset { @@ -1186,11 +1186,11 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, return ret; } -#endif /* CONFIG_COMPAT */ +#endif /* CONFIG_AARCH32_EL0 */ const struct user_regset_view *task_user_regset_view(struct task_struct *task) { -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 /* * Core dumping of 32-bit tasks or compat ptrace requests must use the * user_aarch32_view compatible with arm32. Native ptrace requests on diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index e9b9b53..b50fced 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -368,7 +368,7 @@ long compat_arm_syscall(struct pt_regs *regs); asmlinkage long do_ni_syscall(struct pt_regs *regs) { -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 long ret; if (is_compat_task()) { ret = compat_arm_syscall(regs); diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index 97bc68f..26352a6 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -49,7 +49,7 @@ static union { } vdso_data_store __page_aligned_data; struct vdso_data *vdso_data = &vdso_data_store.data; -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 /* * Create and map the vectors page for AArch32 tasks. */ @@ -107,7 +107,7 @@ int aarch32_setup_vectors_page(struct linux_binprm *bprm, int uses_interp) return PTR_ERR_OR_ZERO(ret); } -#endif /* CONFIG_COMPAT */ +#endif /* CONFIG_AARCH32_EL0 */ static struct vm_special_mapping vdso_spec[2]; diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index c64d543..35461e1 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -303,7 +303,7 @@ static void arch_timer_evtstrm_enable(int divider) | ARCH_TIMER_VIRT_EVT_EN; arch_timer_set_cntkctl(cntkctl); elf_hwcap |= HWCAP_EVTSTRM; -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 compat_elf_hwcap |= COMPAT_HWCAP_EVTSTRM; #endif }