From patchwork Tue May 24 00:04:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 68425 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp352765qge; Mon, 23 May 2016 17:12:56 -0700 (PDT) X-Received: by 10.66.145.35 with SMTP id sr3mr2318171pab.82.1464048776200; Mon, 23 May 2016 17:12:56 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ag3si314905pad.44.2016.05.23.17.12.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 May 2016 17:12:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@CAVIUMNETWORKS.onmicrosoft.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org 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 1b4zwq-0004sL-FN; Tue, 24 May 2016 00:11:48 +0000 Received: from mail-eopbgr690073.outbound.protection.outlook.com ([40.107.69.73] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b4zrJ-0005UP-AP for linux-arm-kernel@lists.infradead.org; Tue, 24 May 2016 00:06:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=6NZ8cNDQc5dTPwmRXn70ERndk3dEBHZWnOTQoVxbzz4=; b=S/P+vI8yyWkIgkyNYM36h8EC8lYAHmgAZyjAeq1lWvpIn7fYIgxXFSgMQ2Rf5oqJ4LD/PicIhpo1aamu+r6OVkrg+3YGr2lNqptkQim+AB8t20mDwMT8WKu9jnzXcYPahGvY9IQb22oloWuR//6HrYR30IJcQxD2BY+1F64AufU= Authentication-Results: arndb.de; dkim=none (message not signed) header.d=none;arndb.de; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost (50.233.148.158) by SN1PR07MB2237.namprd07.prod.outlook.com (10.164.47.143) with Microsoft SMTP Server (TLS) id 15.1.497.12; Tue, 24 May 2016 00:05:42 +0000 From: Yury Norov To: , , , , , , , Subject: [PATCH 10/23] arm64: rename COMPAT to AARCH32_EL0 in Kconfig Date: Tue, 24 May 2016 03:04:39 +0300 Message-ID: <1464048292-30136-11-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1464048292-30136-1-git-send-email-ynorov@caviumnetworks.com> References: <1464048292-30136-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [50.233.148.158] X-ClientProxiedBy: DM2PR0501CA0026.namprd05.prod.outlook.com (10.162.29.164) To SN1PR07MB2237.namprd07.prod.outlook.com (10.164.47.143) X-MS-Office365-Filtering-Correlation-Id: f15cb505-ac8c-4587-bb32-08d38367259f X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2237; 2:UEQQBU3kbwXKwMUYcDDMKbmUiRVnPw3Wk99KxwCfS66HS5nm4hIHEXlycqaepDIRPBOuURXGwilg2t5K7LAqsjy+hlUItjCSfvmX71htY5Y6mum7hKtv2eQKGjkhroTqC50R9r5djdDzBkek3yEeGFB2aJkn3A3gwtVjA6/RU1Y12QpNDUZCGNtzu6eJAy1a; 3:0lewjDfny8VUxFO1euYID2ROe/mZoOA2QqCyPIXBiBJsE4iSay3N99mQtXJd1u/b0/rt4eCZlIqJV5YlPYbVKCbqJNX07BQHJSpQUf0WQNPxzHPXB9VEwXKedv6bSnD6 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR07MB2237; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2237; 25:pAycEctOF0jvoJdgDoMi/vaRKfbAXTbhy8I883EVOYJOTiZ0VKYcxxTR6uF+VW04s0g7ZigOPC+1n2O1onL8oC0W0UHf4tB9x3amejT9oDJGEDK9DdgJQoQCGmJQtxhKFw4wULBhFW3Anvrro1dc4KAdDybhtZ9JKcTh7h1XZS+572RVvm2xCcWC+LuVu/EWPK/uf36L3LvsLB6iQmc5/Gf8KoNgqfs/Yq4zls+fXVI9wr1407MJhgftJ1PYMuskuPs7KDTuJygy657uJKhSoFkrZ6ZqkGfpJA1KAlCzBV2qnR6534mA56bjCv9AWNGzlSGnajVpwqk38v1wfjksxW2FBxL9SQXMUkA2MpXZNjEfSFF0sn4Cy1Ck5hbnzRVC2MLueijMx7s/5sHBXP85OfI63jIJk0q1Zmx4MYB4RnUw0uAS9JpfbH9NzJbIf6aLY2N2+3uraCVDo2riTUyPatJZr+DdSYaIa4hbnphLdfYb8b5LQ6gCZgl2e6xOeesLaIL7MYp/Se++7Sy0YB543ZWSZz+neKui2acAPKCcWAycE/cnoG4dxtu3FkUNHTwK6a1hDkyxoUFqFb2rJdrNesOWNJWRLKVPwqnJEyb9OQSsTnzZ9pxYYEyeEjsVRWUoCXxaPLdBOSDO6I97PveLlSbA3D9wS6pa0vUQMebDxzQd2aVJNwoN9X4R8OCVG3Si436koHwHdWbMUhlkezKMTQ6/ySu2+0MlpsjHtyFzL+Sn/VJn3mVXxU5CmIA3Y5IoomtB6vIs4VDjQv1Wykt05SOiBqwTWxsI+CAcnQde2UBTRpcylkfV1v1dN8irUN47hJvph5xMf6IvwoL8pMN39Q== X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2237; 20:8LxJJxAWEf4h79D33svBnrrChQaqqpG32SMclvER0VgApoNKGot8YFHjvE/GnVBo7dEZ8BT56p3g94Y1+P9Nn38Vk0pCR+sVvPydAzzkpHBwuUP7MzLmJ+kW/eo8lDz+B7pPsRIPZZnP17HUoxO04/KtVKOrqsAYQu29aF/nCg6d4AlExRa4AXsvkPhqUCcEcJYhAA0+YAYQq46WGdIQdHQdQ5lAc1be3iVefyuvHmtL9Ipn+TBr0JYnQ3iaeQdw82zXVNG2DER37PBLCN5v/j7z2tOTuzFLj0pyMmReOau/qIZoGd6225oNp61SjTSlWj455kqs0cEiUzIMv1GEwyGBfEbYhEmz96AKU9QRyf2kSGOEz1G+BbwGW0KQQYVfF7H6BxTNFe7FE9c8NLrZMuCtj7zJPmx0u1x/2Kc9uJx4nn1T7G0RVLuz8nGXhCAM6qG34hbzYf1t2TGCjKx5g2thIdODf7puxpmm5zNFHCWVuk/4k5esYcQ6qThkp2uADoj14nptol5+SdXn9mUNN/UxVeRjoligKC4V6Xy8P3statLmZiHdVkk2TXT+aPENeUjLrDhQ3vga04ZIb2566Ujk4ULK0GVrmreRZnY8ZWQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:SN1PR07MB2237; BCL:0; PCL:0; RULEID:; SRVR:SN1PR07MB2237; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2237; 4:Z0xoL96gzRC8MyhhZDE0saTS9Ea53Fqbe1jOnZ3ocnirzGhjxtnYof4G3YvbMM0IDSZFy+76id0v5lbdUrWrzrrhEzzHLWVr2nrxT1nHNgwVDxmTQ0eMtF6kFz2d5uJRN4ngNvh0/3WLZAGIu6LMj+1cGLQu0C4h2p/Wtm53RQdErMyJSyYHSoHYrIwja7C1j3do+mh8Kt5IxetgxQVz5SN49hHeOaiWJTbhY5dViZdIZC/nqQko9j7oROJTnbRq9N+rQRUaePoW0VYGl0Iij9vCSg0vnFkxkrsuurgr4MzsgJvdicO+BqTc+PNty/22RjAamo0lDsLA4HByYHYrpeYCAIQQbDLQVfWRxChdv9eSQ1ig4BBE2EoWTO9dyk45 X-Forefront-PRVS: 09525C61DB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(19580405001)(19580395003)(92566002)(81166006)(5008740100001)(586003)(47776003)(189998001)(8676002)(5001770100001)(36756003)(4326007)(6116002)(77096005)(2906002)(50986999)(229853001)(33646002)(15975445007)(5003940100001)(42186005)(50466002)(5004730100002)(2950100001)(76176999)(76506005)(575784001)(48376002)(66066001)(50226002)(2201001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB2237; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2237; 23:4D/Zw/GdRG2TzA3EtGI7KzRsEy76RNHbVJRG8ELl6SZ4bRlcZ623F+ptYjYiY5lbebgNhv+iQeJfpQzGVsosX/qRepzT1sitZp9LiHAFo9LC2sYaLUvUbaPCy3YYb9NQAoOVPc+fgg9SGdlYf7W+IDBr3gpR4IFYRqBEa1ti5YHNUKlP73dSBhdPYDfL0QkileCCUe52gh1CML1Ob9F2uQXZMSUWgOAyd5PWCCuyoqRT1Lsa7at1smfDPCs1t5SJNX65f6ZjTQEM24czUEoDlJNAoVJzByqF3Oh5rjnmoppW8iEeOH1bHizsO6CXjt8Av12Byi8SoW2x9oSksZOUFJDfVuvYBS8rJLp6xUZqfsQnQ6avLFhZjlo++OhFHAec5Bz3U0KUu3fJ2z0B0CxnIc4uNlNCKRlmrmGQ49sw06Q7lGDw3nOkMjmweTiyGP7wI6KRWHDH0Is+FmkJOleXl6zI0Z+rs2ipsBDM1UyHLHU+OL4VrF4S3yoQKts4m1Ob07RoN9iN/wwNJKNhU35Z8PyKqxJPZfbyzT0voJTO2f+i0xbY+XXfYuEQz0VGBNwsQ7u8p3yHtyxpSOjfNko72CSeQm/ZHf+EMXrRVT/XpmxWBPXwQAhg6iWEIJT589iBggpIbu4TBNOPzbcxxoph55qmAu8ta4b+m5HlPAg696OZqV8Hq6gE575hegbEGxhZ7wr3g0tZlUXueb6MVNb+LRKEcQ9kRjENKzXQLF0mL0xCzNd+dRknZ8Rq0VSOqebgiWkrXk4yz8n7Ms3Doz8BqMDcZuZYbyGhSaKHbuD44rV5Vq0J5gsTv83FtLslyWygHi9IwyDgAgqzIYWhZfqX7m1MbycIc8Xb2X59reOTiV566Vo3e3a4OkzXPk/uQMfgmFUeFVOV2zQOryR4uHQEoSB50NGu34qlLSIaRBO+sow+qOJDM/yDRWEPPiF/totL X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2237; 5:MOMai5XFZGnq2Br2zVMOHvh6/uTmbfu36mUnOuZ1vcSwc7Z4jPrjIq+i3Kv4tcfeDfEX8CH7BaNsK423tf/JpUxRvk+lzDW2xkTlxrhLGFTDB+CnR4TlhMy4dsA7c/s3GZcyg8XW0LkNKI99kLvIiQ==; 24:m3HTxvJQ1de6sWs6DfLiAcVqUN9f45DCLmEpdBtt/g6mvseYDxVrDRhITxkogeA3o46OTX53FlLmjkybQ5fMFQ1Aftcr3ddjTZFVrh2+s3I=; 7:b+ug3ZuUoBxJz7YgEre3gV6Hk6aGGdphVkjMyKdCjkT3wKOgOKPoc5O+P2GTrKpcF7+H0LEdlYpy8O+PW6FwZsssMWOJew5DSiHZNjRmVy+7ooTcu554DVNelQ5+9WAi4++AFcy4m8vgIVx3TFYYXXtTGRIB/NXa/LZNAZKVTTmlncROtGOlglmR+cYuPbCV SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2016 00:05:42.3279 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2237 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160523_170605_834552_0AABC0CF X-CRM114-Status: GOOD ( 12.50 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [40.107.69.73 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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: kilobyte@angband.pl, pinskia@gmail.com, szabolcs.nagy@arm.com, Nathan_Lynch@mentor.com, heiko.carstens@de.ibm.com, agraf@suse.de, geert@linux-m68k.org, Prasun.Kapoor@caviumnetworks.com, klimov.linux@gmail.com, Andrew Pinski , broonie@kernel.org, ynorov@caviumnetworks.com, Andrew Pinski , schwidefsky@de.ibm.com, bamvor.zhangjian@huawei.com, philipp.tomsich@theobroma-systems.com, Bamvor Jian Zhang , joseph@codesourcery.com, christoph.muellner@theobroma-systems.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org From: Andrew Pinski 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, ARM64_ILP32 - support of ILP32 ABI (see next patches), and 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: David Daney Signed-off-by: Andrew Pinski Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Bamvor Jian Zhang Signed-off-by: Yury Norov --- arch/arm64/Kconfig | 9 +++++++-- 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 +- 17 files changed, 39 insertions(+), 32 deletions(-) -- 2.5.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 4f43622..ede9b2e 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -370,7 +370,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 @@ -655,7 +655,7 @@ config FORCE_MAX_ZONEORDER menuconfig ARMV8_DEPRECATED bool "Emulate deprecated/obsolete ARMv8 instructions" - depends on COMPAT + depends on AARCH32_EL0 help Legacy software support may require certain instructions that have been deprecated or obsoleted in the architecture. @@ -925,7 +925,12 @@ menu "Userspace binary formats" source "fs/Kconfig.binfmt" config COMPAT + bool + 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 select HAVE_UID16 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 cef1cf3..5bbdbb4 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -81,7 +81,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; @@ -90,7 +90,7 @@ struct thread_struct { struct debug_info debug; /* debugging */ }; -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 #define task_user_tls(t) \ ({ \ unsigned long *__tls; \ @@ -121,7 +121,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 a307eb6..4c730c3 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h @@ -121,7 +121,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 3793003..75dd250 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 3ae6b31..e229525 100644 --- a/arch/arm64/kernel/asm-offsets.c +++ b/arch/arm64/kernel/asm-offsets.c @@ -52,7 +52,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 943f514..6f77412 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -32,7 +32,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|\ @@ -751,7 +751,7 @@ static const struct arm64_cpu_capabilities arm64_hwcaps[] = { HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_FP_SHIFT, FTR_SIGNED, 1, CAP_HWCAP, HWCAP_FPHP), HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_ASIMD_SHIFT, FTR_SIGNED, 0, CAP_HWCAP, HWCAP_ASIMD), HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_ASIMD_SHIFT, FTR_SIGNED, 1, CAP_HWCAP, HWCAP_ASIMDHP), -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 HWCAP_CAP(SYS_ID_ISAR5_EL1, ID_ISAR5_AES_SHIFT, FTR_UNSIGNED, 2, CAP_COMPAT_HWCAP2, COMPAT_HWCAP2_PMULL), HWCAP_CAP(SYS_ID_ISAR5_EL1, ID_ISAR5_AES_SHIFT, FTR_UNSIGNED, 1, CAP_COMPAT_HWCAP2, COMPAT_HWCAP2_AES), HWCAP_CAP(SYS_ID_ISAR5_EL1, ID_ISAR5_SHA1_SHIFT, FTR_UNSIGNED, 1, CAP_COMPAT_HWCAP2, COMPAT_HWCAP2_SHA1), @@ -767,7 +767,7 @@ static void __init 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; @@ -790,7 +790,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 84c8684..32fb4f3 100644 --- a/arch/arm64/kernel/cpuinfo.c +++ b/arch/arm64/kernel/cpuinfo.c @@ -127,7 +127,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]); @@ -135,7 +135,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 ec8bb48..21a0624 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -260,7 +260,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 @@ -300,7 +300,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) @@ -463,7 +463,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 85da0f5..35e70d8 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -608,7 +608,7 @@ CPU_LE( movk x0, #0x30d0, lsl #16 ) // Clear EE and E0E on LE systems msr cptr_el2, x0 // Disable copro. traps to EL2 1: -#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 3f6cd5c..aa79e81 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -82,7 +82,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()) @@ -657,7 +657,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 { @@ -1192,11 +1192,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 e16ae22..85461e8 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -409,7 +409,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 5152b38..d5e699d 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -321,7 +321,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 }