Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751753AbdFHWlN (ORCPT ); Thu, 8 Jun 2017 18:41:13 -0400 Received: from mail-cys01nam02on0044.outbound.protection.outlook.com ([104.47.37.44]:23680 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751475AbdFHWlK (ORCPT ); Thu, 8 Jun 2017 18:41:10 -0400 Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=caviumnetworks.com; Date: Fri, 9 Jun 2017 01:40:59 +0300 From: Yury Norov To: Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Arnd Bergmann , Andrew Pinski , Heiko Carstens , Chris Metcalf , philipp.tomsich@theobroma-systems.com, Joseph Myers , zhouchengming1@huawei.com, Steve Ellcey , Prasun.Kapoor@caviumnetworks.com, Andreas Schwab , agraf@suse.de, szabolcs.nagy@arm.com, geert@linux-m68k.org, Adam Borowski , manuel.montezelo@gmail.com, Chris Metcalf , Andrew Pinski , linyongting@huawei.com, klimov.linux@gmail.com, broonie@kernel.org, Bamvor Zhangjian , Bamvor Jian Zhang , Maxim Kuvyrkov , Florian Weimer , Nathan_Lynch@mentor.com, Andrew Pinski , Ramana Radhakrishnan , schwidefsky@de.ibm.com, davem@davemloft.net, christoph.muellner@theobroma-systems.com Subject: Re: [PATCH 05/20] arm64: rename COMPAT to AARCH32_EL0 in Kconfig Message-ID: <20170608224059.fi4a5urcjoxhbgwb@yury-thinkpad> References: <20170604120009.342-1-ynorov@caviumnetworks.com> <20170604120009.342-6-ynorov@caviumnetworks.com> <20170608140912.56rww67adolr4ytr@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170608140912.56rww67adolr4ytr@localhost> User-Agent: NeoMutt/20170113 (1.7.2) X-Originating-IP: [31.204.170.137] X-ClientProxiedBy: DB6PR0801CA0059.eurprd08.prod.outlook.com (2603:10a6:4:2b::27) To DM2PR0701MB1277.namprd07.prod.outlook.com (2a01:111:e400:5118::15) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM2PR0701MB1277: X-MS-Office365-Filtering-Correlation-Id: 0d6c6eeb-fc0b-431a-15bf-08d4aebf7491 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:DM2PR0701MB1277; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0701MB1277;3:Qlg1PvLB8sGJeofz8ZiziUkgBePTMEoBjCnEoyixXbBaCVRJvtixhh8taZc0FPROCCGcIX+8RIN/1cEwqjO1DmPNkyWNmVhfEbQnMZnvA2TiWgHo7f0hJ5DOQkvztsZOOhTbpPQ6zAvRjveP6MqmW4zFKG+jWQHXn12WsrwR0iuCYyxfq2SwpqbUViRLI7LBQCFLVjAwFqzwGJTjXvcdhnqLOu1hySLiTm0nQWxDGnhtsgNed8vev9143/WrcF8VxH/E4TRhB+CCM/QAnXCzE4r7m7nSL2BGDjZcxZ6LspivpYVMMGphxV/jpVia+THcOpa9aMHvfKNdXO7HmUh6bQ==;25:e0wSgjY/rEGKDisLUeQ8HrcHuOwPjfm3y9Y+mF9JSx1taR81Dq6hEvJqTQ/6Bj4uFrVRLVDW1sY7t097Yz1yuL0HS99QCwC7O3DwjH+jTP1IPJszYpSo6IMVEXltT/90Pr7AZXr4auCkNh3wR4uWvjAjaNUCermuMr89XLp9AoNy7rDUjdk9c4JqfesYB3tCBzRC0edRlolkotT2j9n3Jll5c5hDtY6OaGIv1/6qGoht1dmSxz1kylmen6V1oWZ/io05atcoXKutDbTbWPdK8xx76RRkYQdCzN1Df1dTMj43eITRJpc0K4iOMXfrMktPmpi2rfd4mH5M/oBq/zws59nusIUqy6qp/4YVz1CWz30YDAk0WZccJ+X64fJTkpWWt4p9hJ2yiDySPCIofjRErWEsWjp4II7FqjP+7EvvS4e1StxF2u5nkiqVy6QL8SL/XpHNQfciTfQesnXWz/a8TyQ6wrzIui5XkkM+uJJQosM= X-Microsoft-Exchange-Diagnostics: 1;DM2PR0701MB1277;31:xjvYnzYPLJqKqoGvxv2/q5VxJUTOj/DA0D32/EkLspYmlAW7gjIbniPZDEQNUXUPskBdQR05uqVrnQ2D3OHws4i5GZ8xry0IH+KjSPxXn7P3IY2hi2iUU17WYsmPeWAiTSWiGCTICRylLV+1I8a1YLdj9Z3gk3NUCgE8GeeJnxNF9+DuC9fOQ77xZGmEYVuuDKh3IJZGKlt+bnqNTQimYKYrDITeoO5T836qSz9DUqw=;20:wAypL8KhgoePXtnj+5Nq6DdfRjwsnr1fSOLIcKXjxERzQe/qWvy3IPWJGxcK2G90uAKdYHFFyZTuuwHzMMEZspHaggx3fXZWLkMVBiX8ZsGnD5ZMH2TTgCypCybPbQ/nUBNs3URpI3/z9ng5hnDInEyMdUKbMp3xzGhVG/OFMVMQOqp8oHfFmwcwzY2IiAuPKaYT1rpRRrnv1GHiR5eDI2QuBzSNMkmTZT0h0B59oYQwY08Ikjif0gaH1PsfVavNyfE+zC9q3bYZQrDwNj4qlSpr5dk2rdpiGJHj9KeqTPDQ6pJbQ10b3TaP9jYZLsbq4pCz1G62QrVVNIJaM8l3Z+iChvFk+2JtITG4eCfpdriPT5A8kvTpEo1J/YC8mI5NyD5bOKY6Ecs1VsTmiCxDAMi3ke+rmezSQNY26YCdR3kzm2BXzGUbJn/4ozBGMTSVfw7xyry73KIp+sPlFLBjIZ0F4X3OJkNlElI8ukLxtZlumVqjgVwtIPi6OnLxCGfe8IkR/fA93cnoXNgqaa0SLRSiKx3IolkMqD+l/qrCUhiG7uDx5JFQZCAMqk2ZAykSjasy48TQQPpwtRb7ot8XRM4AGDKcIHRFjX+WzCNIlAg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123560025)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM2PR0701MB1277;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM2PR0701MB1277; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0701MB1277;4:kF5EYqIYHalj8vvnSw5jJ0iEI1cj/JIN8CIqAG/G?= =?us-ascii?Q?HqzT261XY57tus+WLFqPXwwpfF3M2HfdUfvWJHdRKcaimB0/CMVN0ZxQlxMs?= =?us-ascii?Q?gRRITBla4HMyt//BnXXx9FU7eLJ0g/wwLtH20Y1496E48GG80fI6m6t1MXja?= =?us-ascii?Q?QqR2hvy9m0Zudr6Kg2bdSqW7SWS0l0jO0k0eIlLpcg+NyoyP4CoWZqv4mMtQ?= =?us-ascii?Q?VOui8NjkKbUT3EPUTNrf3NeKiAQ2Cgik9KoQvFf4yhq9D2pS3hvhu7oMRMty?= =?us-ascii?Q?9JpWOEqO/1p+2mhDtJItRavtz+nVgJssSnoOKWMuR88DCNzSRNNOhDHPYGsQ?= =?us-ascii?Q?VpMt9NR7WnbiBepLBavDHGyXjcmb66I25GoSiiE4AQNrMO7uK83rWY5Dm/dY?= =?us-ascii?Q?/GOonqWTSuf0yD/I5m5E5KpQ+39R/oi0tM9GG/8ClZH/89//138cbrJsY+TT?= =?us-ascii?Q?9Zf/gOX1xQVxrwACVUqxO3V6DDBWzzT4eUkgg3S9wpUkKqKTFbOvKU7zI9Hm?= =?us-ascii?Q?m143Izi1moTDiFaBdAW87Ol2/a8xi/YilmORo9vHcFavGXGQmiowtO5SIc1h?= =?us-ascii?Q?OXs5WLHRSKvyCjArQSC85sgrDj79TNljkUbDcnXNAMG5AZ8SCKErMRd1wE0R?= =?us-ascii?Q?PP+yxn5AL9kXxfeX/yhSwWF0uOMBrLP6SvXewDtrsQkBtlPzGSVb1OwhMVUw?= =?us-ascii?Q?c954bO9XbLSb96yHg/r2aYXB1myKfR+mHvwqGaQbDIcGXZ1oEuvovsNkJYOi?= =?us-ascii?Q?nS1awdyVUhOZ/bGygLbDK/7vE/CjgqYZ7vk5SKEtL7aL1O/d3i/dZEOIItzf?= =?us-ascii?Q?ZUewQyW6BqcSylNpWzDPNcEYaKo/Ov1ZfAiR7Zscvog14S4dXkRZqLg0xGFt?= =?us-ascii?Q?s1X3V0tseZqLvv4viumK6m6cQyEmsyOM7hU674Hwfzw2+xwxOLHM6kMmc5xt?= =?us-ascii?Q?ChW1LTW9/qSpjm4QAu6s64U1XcXs3uIvUoKQ4Bf9axNDb/flnPHN2WH+WmW5?= =?us-ascii?Q?42CCnaGimE6clEK7uyPwwmoFwwE9nSMuyxTNo9gWO+FxZSLgtSNX/oNGazI4?= =?us-ascii?Q?ra9R6FSYCw0lOZVbeYjj2gPV4pW4e/VK/ddolN9XoFRJ3HsBLwJmK7BE4k4W?= =?us-ascii?Q?nKI+En2FWh8=3D?= X-Forefront-PRVS: 0332AACBC3 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(6069001)(39410400002)(39850400002)(39840400002)(39400400002)(39450400003)(24454002)(3846002)(5660300001)(6666003)(6496005)(9686003)(53936002)(6916009)(1076002)(42882006)(2950100002)(42186005)(7736002)(54906002)(6486002)(7406005)(7416002)(305945005)(229853002)(110136004)(66066001)(38730400002)(6246003)(81166006)(8676002)(23726003)(47776003)(33716001)(478600001)(189998001)(2906002)(33646002)(72206003)(25786009)(76176999)(50986999)(76506005)(54356999)(4326008);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR0701MB1277;H:localhost;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0701MB1277;23:wbBVsH/+2A5QIZ6EReKOO1HDR+M5JWxulPyt7ry?= =?us-ascii?Q?uTJVGmBOsS0vczOBVJnIdfuxQJFLS77Ssvi2sc5+xICS9UeiFpSjHOFK9jhk?= =?us-ascii?Q?pneLCBoNojiVLDhjAZm73KLTlfAv8atz9bI7b4GgvsfVHkAPqH7LQ900JUFi?= =?us-ascii?Q?1M5OgztaEUyCdIWbLPFLod2CCaPJ8yAQ67/lRSubZX8xEhX5tuniqCkZxo6P?= =?us-ascii?Q?Iad20QArq+bNU5exg2ri9xt1amaRuFJeDl3b8EWwu9j4FMPS14KtYxxjv4Qu?= =?us-ascii?Q?Iw00GUbgmGfgfRtxgg01qft249NDXgp/p/EO29gIhxhmgM8vnyJpyTBG+wST?= =?us-ascii?Q?wjUfbtB8dVg0C829LTjXv8SCtuHztxGVQBpUuJBLQkepVDCDhQe18617tw2q?= =?us-ascii?Q?HJUtHQyMlVUVo1wq5Q8924E/V/S2AQ8jJrQonEisFQel/0r//yGUgv96heTd?= =?us-ascii?Q?B6NuLpLUxe/yXbGbwli2gl374qHo+1CQAhhe2LNmOw2LuHJdz65q/u3sSwKz?= =?us-ascii?Q?MxKu2pWZcNvYrbUJjqSb+Das4BptnzFe6OIlyXfO0msYHd8IXvmVimzJquXC?= =?us-ascii?Q?HSiHmTh+Cu2Nm/vVtSGhiYiX6ijOhEX9kCHUcfoboGGLxN2OBvD31DVFEEBG?= =?us-ascii?Q?X4VVzY1bcVk12iu2MZIi82MhjdvKR9Fh8IydRAwpdBX06d9qXl0KQHG4HD9Z?= =?us-ascii?Q?MKyo7w6mr6ZrPRsL81DoY2KhV500Icoj5DH6XhDhPDZpE1qQCxrijRzP1c9y?= =?us-ascii?Q?1ADlxsBmraJwNKJuwBo6eH6n9Hv5a/rtRK0ShKkDIRLYrAXCvMcJNsj4nGYQ?= =?us-ascii?Q?CG0/dCEWcBsq5V6T9BaYGsn65UVwirXwj/70xpWrxRUN7RcUt19MCYBen9o7?= =?us-ascii?Q?II3FAVUaOR11/1vGSOtvsQswcuTPyO3Wxkxo5nRY6CidSPPzliqFoRlwRLUL?= =?us-ascii?Q?9kTQAWo/LIcWKi/AyfHxEGSzhwCg34FTRsyFFFiNrDIteHFoHmSGpEugLXgo?= =?us-ascii?Q?LQNxru/lyp3zG4vvKZ3V80ulhDn1jEO0T6NbV4cXgm9E+DVUvLJzn1SzDpMc?= =?us-ascii?Q?WUSMkYuJmMDCZkXQ1N868oVxzGjVdS2fvRLzWiHmrQ86QUqofXftFss9AGfi?= =?us-ascii?Q?sTh37R//AObT4oTbKLybnjptG0lUY/JrejC77vavabGnfC2a5HxUbRQ=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR0701MB1277;6:0kkLQOKZ+f22scQpZ3B4/TTlF770A6ltTJO6G8fLwufkdhjbgmUAd8xi5IigGxdRLVxilYX1Mh/F20DqrtMAaXD+1ErUpUkE8hc8P2+rqiOvPG/rx3c/JMm/Nzf7xvmIzrOdK3pZN3bDCV7HzXb/a9eedck+shVoiCKf+j/VRKsOY3cvrXvSNICD6IA3unMQzf2YVT1vwBOs6BvuMjPsPa6grftZ4I6I7WBkFdzCNOnpUXacQQ5u/Jm1Hi1XaT1q5RWxuE2FBYbmdG3T5stqY1gfDxDHFTxm0WoZFrTH6FTxloq7t6m0e5LAbtmcYDDfX+kQuVEczN0PavAryykBU5PES6xTfwzNeOsYbj+eASpH8HHag7PzpRUIFBcHcqhua/1sdsDONEiB/0SiWD25qbK/0+S5woVHQuM7VOBmB7VOD9q9Eksxyh+0x9f8MumosHnAl5R406sdIu0XAVyFDfsqoMW4yYkAH1df362Nw6GS6k+84MPW8dEDnRhR8rhRRfaRshca/qvgzoptFzDyZg== X-Microsoft-Exchange-Diagnostics: 1;DM2PR0701MB1277;5:qNSbv3XV/sDfmcrK2g/V7XRr1jQ3Nom0BTST5bgLgQSyQTcA89ECo8j6KdHk/sGLMv/xH2lz9qWkShBM3fl+XN8ExSoLOXMIK6P3JDOH1Z8YjLmUfdmE3RFxjf19qy9Hs49wpoUPxjnD3B8FCs7cvs39y5IQ4Lk3aQQb7o/B2s5TKFKfhqQcZKvEH2/8S1IXAcDMdRorfDA60CzuamrMaA2pJx8UCvj+XKXgZiUSmi+gFa90ip5cW3D3nj4nwp6ZHpVoyrL3UiUK0SUKDFftDftnPlZRckTnODBiMLfChXINhY9Uiz+fa7XKWBNPE0EG1tSriQKzggw4tZ2AC+Qt4XQ4D7a1SvTdVXTxGsdoNmD04JR22gw3Xhgv0SWBhNF7TRxLMm2wg7TRR0LRMmi7AeNa04MmVg2WycoJDL76KiukSt+eLx7fpqgorxUxY+ov68NDD5+bt4HmUX2GoIZ6Tsbgb+/adA3K8Dcg/yFtCvrWCMCzT/40d8o+U4EtWjzS;24:Sjya6gLF8G+q/Y7YFzFsNcpgbitSb8HyQyFSwNONXL8SWK9eyroaUPrbasvm/hGiaxj+N/FDEJ0BMmFZ9nTMWRboo58PePSv7svo59ymNPc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM2PR0701MB1277;7:fgjp8PE72bTUtXvkhyzYZGlm85MGSe9gSXgE8TUf8UEFSQiESENzd6otqYohvWEZ1E5zsZDnFZjOJF09JXcF3uiWZFu5CRcIM1SQccQ/ijVynzQ2DutwbhG4GVDfTs7tErle5QkGIZ5w4Egi6Gr203H3dY/BgXg+UGepAUScrpjWuahkDmt+/RF9Ukm/0JX0PVkwI9zMZUD2P18uvO+37Dt85yLwyLmxJuWuM4toJ8H6qnipq/HevR0Lf0rhY1VMnFor9EkfPJYouMft+bstUYYfmn5f/rqbAkwhmtzYHOd9MW+Y2bU7oxY14SQAjBVosI265de+sUWlGfUzgaXqxA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2017 22:41:07.9828 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0701MB1277 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3199 Lines: 96 Hi Catalin, thanks for review. On Thu, Jun 08, 2017 at 03:09:12PM +0100, Catalin Marinas wrote: > On Sun, Jun 04, 2017 at 02:59:54PM +0300, Yury Norov wrote: > > --- 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 > > You could just use "def_bool y" here > > > + > > +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 > > and avoid the explicit select. in patch 20 COMPAT becomes depending also on ARM64_ILP32, like this: - depends on AARCH32_EL0 + depends on AARCH32_EL0 || ARM64_ILP32 So this is a preparation for it. If it looks confusing, I think it's better to underline it in the description to the patch in addition to this: > 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. But if you prefer, I can do like you suggested here and make COMPAT depend on AARCH32_EL0 in the last patch. > > > select HAVE_UID16 > > select OLD_SIGSUSPEND3 > > select COMPAT_OLD_SIGACTION > [...] > > --- 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 */ > > I don't understand this hunk. Why do you need another check on > personality? "compat" is already true if PER_LINUX32. I think it's rebase issue. I'll fix it. Yury