From patchwork Sun Jun 4 11:59:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 101357 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp494675qgd; Sun, 4 Jun 2017 05:02:19 -0700 (PDT) X-Received: by 10.99.127.26 with SMTP id a26mr15840049pgd.75.1496577739267; Sun, 04 Jun 2017 05:02:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496577739; cv=none; d=google.com; s=arc-20160816; b=WTcWngzgvRYFynL36OzEzRaTYUs4c7JXXk+dmj1YuVGpkLjaO+QGJErxmMaDHcgT0z lerEUG7M8h4R6NyshbZExP4OIYRZDjOstpTuuTFMdbwe+eHenNkWZOgY3oXhiMvSUnN8 msicifG0DMyX0ZU1t7WQYTZu3qzk95FWTxOEr+LTYt4zYHav+88FnrxC/qsm0eUED8Iu s8nZEPgRbO1XAEmOVFaKkyuP5FnuoMa5iah4/Ovv+4gChA3epP+TUHu8QLsfQfiFKQB1 Ta1W22WWgWaym8AfQi7N/6pUoDud18StUSyadAdagJjY7nUNXdPp0CuqCUQcpktRjmAQ yHBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=qyGDWv/Y4uXeQ2hMDY2/MF0YIXkcfrWFXdxzbIakVbQ=; b=hyQqjziAbAmHgMQEFHNUIgwJvU6zBGcLvkJvdO1Ctpdx6WY7OL7PjCLFlgiw6eGrTU WLoF0RZOdgpTOgaHgokThEJK9t+RhLGiSxvQKixXmf5mR0onc5syEoHIZfMHtocuYLeM vVbKgxBYOY7mi2loLTv+fYh19Dhe/U6w/Uep/XHkkURyMz1ad10bENjDOF/hvVY7Isrj bmeWs93/lotBff4qnbhEZj7/qz3AZL5z1U/5vxD812EAwEHdtGc+iNIVWAYf982Iu7NH vROTMOrFmM/sAsSV+sEpDDcO/0pRHeJyQEtSu4KWK7csydPYGX69MMwCHtYq8GjnQfCT pFPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 82si28290997pga.93.2017.06.04.05.02.18; Sun, 04 Jun 2017 05:02:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751162AbdFDMCC (ORCPT + 25 others); Sun, 4 Jun 2017 08:02:02 -0400 Received: from mail-cys01nam02on0066.outbound.protection.outlook.com ([104.47.37.66]:16235 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751201AbdFDMBm (ORCPT ); Sun, 4 Jun 2017 08:01:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=qyGDWv/Y4uXeQ2hMDY2/MF0YIXkcfrWFXdxzbIakVbQ=; b=nuwS3MGC7uczxAECLLrzBBoK8eP5gr83CLEqIrt+qFDdEhE3IAibQghMrMn898dRykVnIwC2cbs3SSGVHbOJIf/oSfbApBTGKNd3uNdCgbBLvsLtTjNDX9Qr16Ad6tcCs0pUZVfm8RsU02XCMEHDmn1LsAmyDLTZe+4SdzlGzds= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none; arm.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost (176.59.55.28) by BY1PR0701MB1269.namprd07.prod.outlook.com (10.160.108.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Sun, 4 Jun 2017 12:01:25 +0000 From: Yury Norov To: Catalin Marinas , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Arnd Bergmann Cc: Yury Norov , Andrew Pinski , Andrew Pinski , Adam Borowski , Chris Metcalf , Steve Ellcey , Maxim Kuvyrkov , Ramana Radhakrishnan , Florian Weimer , Bamvor Zhangjian , Andreas Schwab , Chris Metcalf , Heiko Carstens , schwidefsky@de.ibm.com, broonie@kernel.org, Joseph Myers , christoph.muellner@theobroma-systems.com, szabolcs.nagy@arm.com, klimov.linux@gmail.com, Nathan_Lynch@mentor.com, agraf@suse.de, Prasun.Kapoor@caviumnetworks.com, geert@linux-m68k.org, philipp.tomsich@theobroma-systems.com, manuel.montezelo@gmail.com, linyongting@huawei.com, davem@davemloft.net, zhouchengming1@huawei.com, Andrew Pinski , Bamvor Jian Zhang Subject: [PATCH 05/20] arm64: rename COMPAT to AARCH32_EL0 in Kconfig Date: Sun, 4 Jun 2017 14:59:54 +0300 Message-Id: <20170604120009.342-6-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170604120009.342-1-ynorov@caviumnetworks.com> References: <20170604120009.342-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [176.59.55.28] X-ClientProxiedBy: HE1PR09CA0076.eurprd09.prod.outlook.com (10.174.50.148) To BY1PR0701MB1269.namprd07.prod.outlook.com (10.160.108.156) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY1PR0701MB1269: X-MS-Office365-Filtering-Correlation-Id: 4a3ece77-7961-46d5-2295-08d4ab416d76 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY1PR0701MB1269; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1269; 3:x7aL/c7xS/sRmiX0kqBxlNnkRX8/Aw6sB+ksGkRURfxqAN9scfQUhjHD+pFK+rSD8l8xjAGXs6leo2A3rkug+FusPP+Hddzjs79vPw3gQTkiKwGJ/7JBo6oUowtMf9db773FAdlXpXMxJyhxRaJHuIMUYp5zEBYQq4T1mFTlRUYx8n4Ips2VasVHnWmTK90EKbIwUxOP2YtBi5YnAOE8mijlgO0liV4bVpBLcAwG/EapoOa86yp8nJxAiUujZCJc0BBHExAtAGcK5M85izC1FPfbnHz3LBA23RaA7FmvJTg4MbgBnNRX4w321iNgzSR8Z4FQAxcRrtXQiEle6mIurA==; 25:0M2piO4reCNqXK7YGbW75FFdCRAM8EQsJyMaEBZ/RBGy/wOVJ9QusIFtDMshI6+84FSrmH/SD4qrpicAe47x22pUfpo+o3d3WutJyktnC6D48s1bE7HDXk++M4HtvSlK7UmL/DW9oog/iFtGBwabjXgPBzLS3k/SBySqo3a92PgsJ5j6F5aNU/ZqCM5JWe1ct1kwLJRo9KixsMflESq9z3e3JTQWZ1dtJcJ2EbBuyn4m5dg/9rTO/eCvYcbSRbxX7sYwTvFC443A7pMspXTfGHiwDA/+hd5jZ2nkZY6wW15CBK89AwUsKqPl/Vh+sONCsXYnf+3V4bYjG4Q0L59SLfif86C/RasO6cVWp9y+8nqIeKAgYnQh1krmYeRqHHKGJdUQt7FMgVtI0496TPNr78rlufZveZSqanT+wh9frEyknDu12ySNqHVcz0muWQ+bN3rJUimASk4dFbFge6nm4UOL9sd/jIX6TtVzne2ow7Y= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1269; 31:aN+r4w5FyR0NLJ1HYUxtkRASxEoy7wyHiX5ybRBoq/cpxCgrJp0FU//ZVUEXbZBJsok8BrwMrd2NVti8Z4eURJ5VAuR7mNF+1nWN1xN1piIygSPwV582ysfU7xQ31YiWQuHFeMF5Ppl8fn1Sb4aszbUpkGfcmRluu+68aR49h23cxDTdTCp8bn11t5KManGzQDEtjGbIWCWRCST60q7JrsZIpIs+DSBvDMxx151njMU=; 20:NROwvxMd6t3srmyePk+a1JNlxIwa+ykYulC0+5As6H3fVH3NYoc01Qyu2zhazmCCclZO104cjc1rJUQBMBUOlEbmXm5MzRC3tGUBjpXdn2+6RSdA/YMRbZSITP1yuWALh92lfQ3hXQ1Nuxk4B7/DxGQkLb99ALa4QLUoAl00HGZ1U4iCR7bUj16BJZlHx5q1AlRZWgfLk3gLu2C68Vcb3BDkDByQyv0rO5llx/IbbrPg1SfqfBt5YnYV8E/RiUvBb5sBRSUMYtnYfI+/q7GJjXKUJMFY44RZE7paGBMkNJueZYvPAY2rHvA6NF8EXD2KCLgp2YnFlwde0cH9bKKgmA+Dif5XrhcwF/7SlkLGvnUpeW7D/Jt3NiTyi/pc1BZ4og/vzlzt++ixpJVtjDJmRStma1MPXUlbkOtEuULr/iIrCdXFKFSSF7RuA/btohbSMjr1Ux/VKqfs4+B2UNdDsO6vhRi6qpHcHw1NXxkfUKToTgEtGMeAo6SmR7Rm2GXzQ1GzLGzTt4nS1qbdTCjGPnEf+4ct6IquhN3Bzw1rt0oTjCc26AXeao+uYOA2+mB4K/r6mmK+UIPR18zXhBOcuEmZbyOWOl5Wd5AcMTRseVU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(22074186197030); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY1PR0701MB1269; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY1PR0701MB1269; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1269; 4:95lcRVaxUXtwPCMQxA9YboY/wN2UXBWHXBZgl14ZfP4eqSzBm8HG0dVFJdMtfVUN9bc+SpbwENoXs3qOZ/aL9KEyO+DysYsGiknciZ0/Zo5nWNwOPaflxgYMprzRn9rdl39aG2zgPetWX9ONe94kgfBra4q+okvqIFVxojPkcxg6VqPaaAHZMc1DKVPIq7JFlAY9ITtsHSb963YBCh3b3qCjPH1Y5cCU9rReyNx2or0dg3gniQvyJr/dp2nszi64fqdR2W4EIHosx/lQQ71C2d3JMS+/yxR+oD9tz1+Sd3/9fFVcy5u3W12O9p9zAB2rLiuk0fTX7nyqydCYTXdE2+HNTo25K5363DIgsxAgt5ql91ccm0xNa+D4mLS/eWVY75dqen/oVtEwpY8kwSSyP/UTs4zNDndMCYPx5QHqOWXG2C4jeMGVzzlqBgXeEgl+EIfSjq+2JmRazXFZ3CIqDZ03PN0qkrGglhsHICFB35IdcCKcvcGgh9bkJvbmtsEvwW+ARezfn9ChtkdsJ6a8t0SHuri0LyK7Ig3//v6tk2nnNUSh25i5XSDQKDOP9kcesX6ymo9qz7DmP2TUxriXZbHIl62X0V3U3QuxlKdGQowmrqTd2SLtKWsgolcu6aniG5iXrig/avFKGhdLzp4k602zLs/YcrVk1d8VLEA4aTduaTLFEB54hVgkf0CvAlFSnz0ThDuQrPdsaiMf7khRjdY+soKpU9I+/yUcxo8ye6vz3vWWhG2zKWnnKCS5tNhQQXbXivrsi4G6bSR7KDRwXJMBxzvhv1qvlptVhCKv8KCVMH9xMzj+WFAdlfHn8aPrpN89hS5h4k0Ti1DJ8Mi6kmGazcNTuCB3Dx0p1aa43hYJzuyOMkBL/4e8de1qoAOLmNQqoycvZU7fISJdBImvV6ajRGS8wnnw6tXTLOonwyAmmaqAHcEMbf0Y3Z4waZgUkuQ7urbYa7FFMbvV8Tp44GRCy4sMOMmJQ8oF+p7K+mN5iL4cUBhrj1aRCvlfBBCf8s5NLr5CF5Xvp/lPSfdtAz9x9AsRvBybUQurah72lBrOFehOQpmMHWfbezpNTIn8x5V7j7s1Niut0b49/vcZcMb6bXoDMbqSErGZEFWHviUzsy5FcZScROvYS/14BRL+2dK8epWuUe71MYNMT1LmS2pXv/G7X1Ha8xZnXf40JHrljViZY/FVHHJwcaVORTDF X-Forefront-PRVS: 03283976A6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(39400400002)(39850400002)(39410400002)(50986999)(76176999)(575784001)(6666003)(2950100002)(42882006)(189998001)(3846002)(6116002)(6486002)(2906002)(66066001)(50466002)(76506005)(1076002)(48376002)(6306002)(33646002)(4326008)(47776003)(54906002)(42186005)(5003940100001)(53936002)(6496005)(81166006)(8676002)(25786009)(36756003)(38730400002)(305945005)(50226002)(5660300001)(72206003)(478600001)(7416002)(7406005); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1269; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1269; 23:9sIKtT4NBWWwwdiuuqggBoXjjWtPixnfyv89UZKSc6qTr2peHApynkhTe/RK5PzuEGMrUBSuVszVPe7jfZWHRmhz/hsExLc3o3SYOwfklM2bO8a1ozk8SSO3IaEBdqa2bfLAcz8/gkK5fHiA7Cad9EZZ60N+S32ax2pvoBCJuLmbKtRGYZNu3I+opkzPB9B+7wTER7p5AuQs/9wvcXnqisvPhwA8OIc9i30TzsEPX1lOgV14tcJAS7fbkcseJMN3kAXR0W+qs4ht0rOgrfc1snoP3rDA3GsqB9TZwqhYeyct+bR9A/uPQZGQfw1XkdCkTPMtHH7x+f8szOsomFm/IofEDEbTW/oOAr3BQ0dSko71ppSOURB2TYRbmBUX5sPNxqyAloB0+nxJEQnlwnuT2CEgKqcqWPGCtT2IkCNuH2l8DNgdxsrgSx8JDkT79/x4rIJIrbhkBsMlu45C/92UbbLiaxbXsxFk4TbZP2iVPxZuc6mbflsYtaaW9zgFgwH6XNI94jX0BuvBwUqoTGO0WhRKkz6ZHlAMZy12uLccvZCz92+U3RnLbm8Kxo3/HkhdHzy0IYwGNSnlwv62k+LGbEeJLG3x45MCXkbCUj4CEmr/4PcI/MHBQHAlSfFyBGjqvWjTYHQL46pdge24Jnl1W3zHXIyqxuEOfmC47Mklk8tLEkDPH+Mx/8oTnhcCXYioVShG3N5Igr61BEYiHG6qbwsiWA8O4liiklLKE12Sz7mQjmURSoqkMsvCKiGU75gaaAHvxDYopJqji/CvxWR2gHcAHMk6CZUr6P9X2lWK43xfD0wzG35VLGSQ3F4rv3Wu4891DO2zasM1hJUundCZeAQ6jnSlcA5tEgWbnkjFM6AlaxGlSmFlh+lCJRf0sC/n8RDEkRRSL5wHnjAd+8427mV77nA5xdhNdx21IbxUH70rn9z+SJaFBNYcTlEA0M9dYL4qDxvKEG+jIxgDSon0jAIagqFFBQlhz2YVMYk0HW7KQX8VcjCVwrHv5MQq8IT2NmUd/coDCMc4rUHMoXLYiJ4oGbLf+WHonhJsjVQLDVzmUXhJJnDtj4pjNnWq3V9B X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1269; 6:GlT8wdjdIdh4bBKIgNg0heDMsZzfq09zigY1Rw9qE3q/dtLllGcRk4PX/XugPPaIqPunGovoVx7swFrcVI4w5PQ43JQufNWSRr3yab+qy5LcAVFWMCrN6ZAB7Pd11c2avGJK6BUqlyDjVAWwO15ex+09YHgVzY9HwXq6Nne7jTHIh6N9M9lrY6OKFddrc9HUovVYcm0Oww+7QfJtLqBeYwesIdo/XKFlRr83e9+xcBylzrwR8DKKw+ow66T8Cv5CH/LAS0ZVpAmxmRrwP/7Wv7nf5YpuJV/3Pd2b0h2CLq09tJTxCAx754CObUCvroN6w426QoH5iwTVsI80q+J7YYiuQ3V4WeYOZvUD87atsna/87Rh2kWUxql8dFqobiy3SWc5EfgUEgQ5U0JbEgfW3f8zfK+aur9OSVud4p7PQNEyxeiQGOIVKnvvWaDlSGJJMg7nQ3CrOgxE4CaZ5Tt6dY92qoUAkcTnhDeCk4+pr20+ai+j1VYbla5a0UnWji6UTjNfGhyKbcruxH9Y8Rab8g== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1269; 5:n0NRCgeQd0IptoenyN16oUTFqSqu+nddnWAyD2Yj9YpaiQlYteg/EK3wQeFQE0rWHF9TISwR43wkh89QeIGUt5IT242GPCMpOYFWsa1gf5d7cTMCafWZSD3UkNh4vI/c1YRZ3gfB46Q3enBfR4pEpGdUgCXRJC3w8UVWw9dQzS/DRI0VJxgbEG9t0af4qOlr6EQ6JzQ/X2UAh4LA82n9QD2c+WWT9OPhSeZRtC0E1XrNAM4/cDn2GrQV/8hHbNQz8e6EY08iYm9c5q3mmhH6kHvGlFpitZWnQvQl1FqJjRal2alxMtqWsgODfSh+IEIMNE1HhQ68UM+N2E2eQqS+hggIbTcOadFLRokXSKTxgMgj2rQBvDPF2NvqSxcLAblIaxnndp33SqAb7a895mN2uNRqTaWvxWhS2T1yft0kARjXYmrXuuXLwhf/+gpmw9V2nePLMskJfnZkz0GClhsibAFa237CbVE6+ToacVRq40wiXfU4m+B1q1KRvdIYZkNV; 24:tG6qe6E9G5nGS7Yp4DADJrYELeaI4hHuWEgMlyAB1A2QZr35ezm+K1j8Mr/uEZpdm3e93ihdxBSLd3RkgFMMPEUUpOXSatvfJL5NtUzcF+8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1269; 7:2PcwejgoFy3c2fWCRc7iwIf7t1DOglLAPnyvX/RVD1o7nu7SBhSwxuYgkYEfnUSYNHeYFaY1DPFumsEIx2ddHwYrfSxIAhdFQHfHUxUCDOInPq11ArFZt2wmI9ho9aA7pOweSlvvWMHDTShMqLtStB9XBX90gON3DOfa+7ca3MEcOScznS6jxcFjLYXamDf7ABiS3mNlhDJVkqwwsxj8JfZNLE2og56ajMeeC+xpCTZDGV1RgPN+6brzX4qMy8wg3hGfZqUeFKhH3be8eeagNmgb9jNFVJp6O61mTEc+3l+vJkEy2HnklS21s3U2MUw99yD3Gaqx28OeeI9+158YcA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2017 12:01:25.6919 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1269 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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: Yury Norov Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Bamvor Jian Zhang --- arch/arm64/Kconfig | 10 ++++++++-- 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/seccomp.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 | 20 +++++++++++--------- 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 +- 18 files changed, 50 insertions(+), 40 deletions(-) -- 2.11.0 diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 848a34116c67..417760b2663b 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -402,7 +402,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 @@ -784,7 +784,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. @@ -1062,9 +1062,15 @@ 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 if BINFMT_ELF + select COMPAT select HAVE_UID16 select OLD_SIGSUSPEND3 select COMPAT_OLD_SIGACTION diff --git a/arch/arm64/include/asm/fpsimd.h b/arch/arm64/include/asm/fpsimd.h index 50f559f574fe..63b19f128c6c 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 400b80b49595..2c7fc5d89813 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 9428b93fefb2..2bbbd33549c0 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 11403fdd0a50..d668b3900b52 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h @@ -125,7 +125,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/seccomp.h b/arch/arm64/include/asm/seccomp.h index c76fac979629..00ef0bf63230 100644 --- a/arch/arm64/include/asm/seccomp.h +++ b/arch/arm64/include/asm/seccomp.h @@ -13,7 +13,7 @@ #include -#ifdef CONFIG_COMPAT +#ifdef CONFIG_AARCH32_EL0 #define __NR_seccomp_read_32 __NR_compat_read #define __NR_seccomp_write_32 __NR_compat_write #define __NR_seccomp_exit_32 __NR_compat_exit diff --git a/arch/arm64/include/asm/signal32.h b/arch/arm64/include/asm/signal32.h index eeaa97559bab..e68fcce538e1 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 a0baa9af5487..99d29290c98b 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_STAT64 #define __ARCH_WANT_SYS_GETHOSTNAME #define __ARCH_WANT_SYS_PAUSE diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile index 1dcb69d3d0e5..3c70db6bd570 100644 --- a/arch/arm64/kernel/Makefile +++ b/arch/arm64/kernel/Makefile @@ -27,7 +27,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 arm64-obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o entry-ftrace.o arm64-obj-$(CONFIG_MODULES) += arm64ksyms.o module.o diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c index b3bb7ef97bc8..aec5b6cedc7c 100644 --- a/arch/arm64/kernel/asm-offsets.c +++ b/arch/arm64/kernel/asm-offsets.c @@ -67,7 +67,7 @@ int main(void) DEFINE(S_X28, offsetof(struct pt_regs, regs[28])); 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 22f554320581..2e9f89217be5 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -36,7 +36,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|\ @@ -902,7 +902,7 @@ static const struct arm64_cpu_capabilities arm64_elf_hwcaps[] = { }; static const struct arm64_cpu_capabilities compat_elf_hwcaps[] = { -#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), @@ -918,7 +918,7 @@ static void __init cap_set_elf_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; @@ -941,7 +941,7 @@ static bool cpus_have_elf_hwcap(const struct arm64_cpu_capabilities *cap) 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 68b1f364c515..bc2f6b2fc2b5 100644 --- a/arch/arm64/kernel/cpuinfo.c +++ b/arch/arm64/kernel/cpuinfo.c @@ -139,15 +139,17 @@ static int c_show(struct seq_file *m, void *v) */ seq_puts(m, "Features\t:"); if (compat) { -#ifdef CONFIG_COMPAT - for (j = 0; compat_hwcap_str[j]; j++) - if (compat_elf_hwcap & (1 << j)) - seq_printf(m, " %s", compat_hwcap_str[j]); - - 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 */ +#ifdef CONFIG_AARCH32_EL0 + if (personality(current->personality) == PER_LINUX32) { + for (j = 0; compat_hwcap_str[j]; j++) + if (compat_elf_hwcap & (1 << j)) + seq_printf(m, " %s", compat_hwcap_str[j]); + + for (j = 0; compat_hwcap2_str[j]; j++) + if (compat_elf_hwcap2 & (1 << j)) + seq_printf(m, " %s", compat_hwcap2_str[j]); + } +#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 b738880350f9..279bc2ab10c3 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -330,7 +330,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 @@ -370,7 +370,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) @@ -539,7 +539,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 973df7de7bf8..3f64dd138782 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -461,7 +461,7 @@ set_hcr: msr vpidr_el2, x0 msr vmpidr_el2, x1 -#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 c142459a88f3..da908f9a1e05 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -184,7 +184,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()) @@ -766,7 +766,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 { @@ -1301,11 +1301,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 3ebfb1d00b53..287a21ee39b3 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -576,7 +576,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 41b6e31f8f55..9d4490251793 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. */ @@ -108,7 +108,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] __ro_after_init = { { diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 4bed671e490e..2a7f6ac92e97 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -733,7 +733,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 }