Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752998AbdHNJz7 (ORCPT ); Mon, 14 Aug 2017 05:55:59 -0400 Received: from mail-eopbgr00061.outbound.protection.outlook.com ([40.107.0.61]:10807 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752717AbdHNJzz (ORCPT ); Mon, 14 Aug 2017 05:55:55 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ramana.Radhakrishnan@arm.com; From: Ramana Radhakrishnan Subject: Re: New assembler warnings with binutils 2.29 To: Catalin Marinas Cc: Ard Biesheuvel , linux-arm-kernel , Laura Abbott , Will Deacon , Linux Kernel Mailing List , Arnd Bergmann , michael.collison@arm.com, nd@arm.com References: <20170811092213.mdmzqtm2lp6ltlxt@armageddon.cambridge.arm.com> <20170814085901.evwj3rrxo74wcgak@armageddon.cambridge.arm.com> Message-ID: Date: Mon, 14 Aug 2017 10:55:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:54.0) Gecko/20100101 Thunderbird/54.0 MIME-Version: 1.0 In-Reply-To: <20170814085901.evwj3rrxo74wcgak@armageddon.cambridge.arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [217.140.96.140] X-ClientProxiedBy: AM5PR04CA0018.eurprd04.prod.outlook.com (2603:10a6:206:1::31) To DB6PR08MB2871.eurprd08.prod.outlook.com (2603:10a6:6:23::33) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b7550bbe-6039-4936-e97d-08d4e2faa63d X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DB6PR08MB2871; X-Microsoft-Exchange-Diagnostics: 1;DB6PR08MB2871;3:129mWFt5NS7CUeqJexPk1C3tIgRoJljmIoIRmMKPs6Atw7Cp5JKcWicEfyHhRJiLN1y7iI7/db27xEfeBggI7U7SecU14vGjN6qv2jO3HMg65TeO5ODDMRsmCXknJ+sh64ct8Xd9/MDLxn5qMAKe3wci+B+opAiSvpkuZpZR4JczBdhdHQjCUl+O2XO6U+WgoLZrUMKXiBVC/99WJldRBBm4x9/g9ekjEhWmDpm+9iCZqwmRrdbLLTaBuSgSxezz;25:57K6xOfEZLoEZIoSF2vvyRHuNKTb+YU56TiofKHhZgAp3/nZ05L2o1IROFFSTCHAOS3FY8qHh3f+aWLiuPD6IzD2gNY9pixwpN+LdcbHZK0YVzjbR05Uac8Ze0724cbx3BHzN1Flp20XsTcoUtenNDKTXQfVlWWfeshlXS/RB3Qrtq/XEg27ulpVH84fddtoYsW/6qu0VSkGBZSEtquhTei7tSJuxg9CpfptSlVfmx0QmAe+NDbZ05IFX419CtXV/RQLUKWyd0FCOoWqC2eIHq6udWwASpCI8sX2gP/stYa4pMa2x0KZMC4ssMAsJSCvTkclIPPjJ5tXb5z3KtAiWw==;31:xpivv7yHRF9MlMj7eqAvnHYWALen4NXlCz+M7MbimwTQYm776HmWIEJfFQNpAxt1IvAYoH8OAH6i7GugAibOhGygrGrPpINUep2g7c6oOP9RYVYYdT6Zsx1SZ3y9abztd5UWA66uG8kbHpdLOcB0kLpSXVw+0/sIn7ZmYVFKPnDUBeEch5n3BomVWHbibgcebmoEQ5R6YJOiU8KrABg/tSKWU3WdbQkfNNO4+VVJAsk= X-MS-TrafficTypeDiagnostic: DB6PR08MB2871: NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1;DB6PR08MB2871;20:/LHFtGf5VloJ6oFfh0szqOgtFWPaeZ46hDMF+zX/flgx+WqOhPRIan9NngesAlaG2dX5DXVW/hy3ka6vg6GBja/uDIrOZ5LnjuLbjCN107pApkTJgtwkU0l+MD/S8LRgAIWyW0jZAw7LJvt8Qk4kdUIzpv9BLmHGSy+/VVcj/4A=;4:IzoLp88aCe2IuYUtfSull0tOhctEyCi9SyGl939tCK5A17vK8O9vMnSrctkWMobd+EGD5L7ASGIKX+ptpbaxIoBUwu3aYy9UeaxMK7jPlqGRnDPKb34X2X1nyt8xVNDnJ2a2bXpG7um2qvQ2fAXK3nB6A66p+01avBR43EiQ/ecHX9fZc8F3DQbpdzIFX6q+dDl7JjKzcKgVNKhdNSLBaOfjVF0h1erOhMkxo8MDCb0WJ4fvRjn/79NMqU/z7JjdcOnyIgTIVSxgXxQCdVu5xjRLMQ+G91ufPCjCOmn9FvUhJNwIQkOhP6en61cP+Lx+FD7dYl6psTaC2eCltuIwbA== X-Exchange-Antispam-Report-Test: UriScan:(180628864354917)(788757137089); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123562025)(20161123560025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DB6PR08MB2871;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DB6PR08MB2871; X-Forefront-PRVS: 039975700A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(7370300001)(4630300001)(6009001)(6049001)(39860400002)(199003)(54094003)(24454002)(189002)(8676002)(42186005)(31696002)(50986999)(106356001)(68736007)(2906002)(105586002)(86362001)(25786009)(54356999)(76176999)(101416001)(36756003)(66066001)(7736002)(47776003)(23746002)(31686004)(65806001)(189998001)(97736004)(305945005)(93886004)(65956001)(72206003)(33646002)(5660300001)(7350300001)(6246003)(53546010)(64126003)(2950100002)(478600001)(6486002)(53936002)(65826007)(6636002)(110136004)(6666003)(81166006)(4001350100001)(77096006)(50466002)(83506001)(3846002)(229853002)(6116002)(54906002)(230700001)(6862004)(81156014)(4326008);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR08MB2871;H:[10.2.206.255];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;DB6PR08MB2871;23:Qc/w6uRFlx8h4VjayBUfpaZkq+xnw54/4ze/E?= =?Windows-1252?Q?E7z5BHMpSNP7b8hClw/rR8SZViZ/z4QjaHfCZW6GEC2PeFGXwHpqUd/A?= =?Windows-1252?Q?4WRazv91ku/G5l61peKWmWFVvB2YzL0O6rKP4VsyqkaSisWcBytZqOxP?= =?Windows-1252?Q?HCRGZ4clxSD4suH/d8JDsQmuCJbGPdkqTrzWiIUWTYADE8Jycjzy6N24?= =?Windows-1252?Q?GXnPskXWK04nC7yCGhu01L/Y06pawYPGk5nKUE5PllgHEX+cGsy3ppnr?= =?Windows-1252?Q?KQJ5oogKx1ODEm19e5yi3CfXYpxiBn/RI74bCfiw/bqLzRe00tgcxOn6?= =?Windows-1252?Q?42Y/EY9by/Ly7Axlxpe4XRIGcPOUgbOOnseVUCsyJ3XBsMD/OzH4GW/i?= =?Windows-1252?Q?QYhbnmLzvtiSHXB3MEg6RVLWzWfWl9poSjutR5G6M9UqeB6rrmAacDF+?= =?Windows-1252?Q?nRc9r71E6DWjXH+XUH7iypTvEXCImLlOlIsaaV5isdEUTiiBLWiURBmS?= =?Windows-1252?Q?QWENeXi2c5IPYd+mbXuIV11l2twGKnA6YEeYdlG1i67crDGBkY2dt+u1?= =?Windows-1252?Q?VC0RCtcIAmWRCGfvXXO1qAt7tgZSa2lthQYTCEYLdHU7E5zSx4ckCxuD?= =?Windows-1252?Q?4Fj6H9KgvVKXhOj/tZ2GVjpSE+kGZvrykQvCr/JQmTWpe5903DaSPMge?= =?Windows-1252?Q?iEaUfo4B7l4PDrskWBn9oLuXR2338IiSjtQLUykAfhZNnQL1v+o0/Mec?= =?Windows-1252?Q?0YR+MGYzGP1QOakhOWb2EDkAOaLH25yNIENNK3cU9DsZqYtMdBG9JHyn?= =?Windows-1252?Q?cYeWWQKVKPC+5sXkNLKYWwX1bVih/c9lyGDFtC2v7uRnns6VeE4Py8yt?= =?Windows-1252?Q?pJCa/X9ozq2xw4ljjJHBrozUBxeFcNzvVwpIZcx6omY+LBjty1cP2Uaf?= =?Windows-1252?Q?gYPLQHGOBhUmVGRTKwbGA4HZCRLcjoeCOfvWur+XHI9tNBmfqJGoFD1y?= =?Windows-1252?Q?naqZ1sjdTHReGg/kzZslvcU5mGVI8PMyLh92JW0NZS5sm7Cxp9hyoPqv?= =?Windows-1252?Q?Fy/XETSHxXoGTEFkAJxlUcyU2xHJ1zWIN6P8n02tkrEW/TKnwNiky8ro?= =?Windows-1252?Q?gJBHKdJGwrPf0W09CFF41+z5jjFpHD5qZ1XtO0MCdylRz4CKa4kgHyDJ?= =?Windows-1252?Q?cA99Ri/qtd/2DRk/QVceknFXIfbifNOipspj532BLB+7u1HI7hVlyqKM?= =?Windows-1252?Q?PfELa/+alczIL8NowBsGVs9m6OrLAE0SpumFGG5rbv3GJqTqkOAG3d4G?= =?Windows-1252?Q?1z4uk2rzoTuRtgQcaiC5fTAgEbTZWwLZXgAFeT62purMWT17cSnaMbQ3?= =?Windows-1252?Q?UcyN0yjkZ897z4rr5gkXxCa2p5M6IaX8wo+RhvOCYhJBO+QsS2veXAxM?= =?Windows-1252?Q?Xb9pn7IyhURgT3H9Ni+o3BMnqkKLFOm4jaQQFoQNl/xFGbsPFuwFarIG?= =?Windows-1252?Q?iBxjXCjWotuxt8Ht6kEjFBgXkFjUuOxUGioalTgQ912ZbU/ZZuOUAltV?= =?Windows-1252?Q?YZEsOAmj/xb62RE8aKomlEm8o+ZP+SLuGCG?= X-Microsoft-Exchange-Diagnostics: 1;DB6PR08MB2871;6:P1LpcgP5jXG/gnxBjX4+Ggaj4NO/S8e2jx1XwMjON1JbjTzTE3Co4lAKakSn7UmMFcVmaZluzXuudVk39mX13a7Zpn4qkFXN43LK3GzlzhKzyn4JBFTXOiZPosGJPSYNsCjsCY9FQXWSqHK4uorWigCJuankc9ENCPri2OhbL3n2EF2hiIJpR9ANRa16U+/eIHDRj1RsHIEtrxDp001eTnoNAUtVYAnmmnxtgN4Qhvog9qFP5dGlh/l9cjcgZq9HFA6As0UlIPhLbjJ+wNM7KZF9tq4xu5Z6mw8/pvkfsQz8UYYNE0Icm6K3KCmnxl24C9AAgMRxjWVEMyndQPsW4w==;5:6EV5anhbXtbxyRTKHT4g4CTj/El4YwdAaX6GLGBLeENo/+JYYkkM5iYI6FJzdrzQZ36SR6HmFJdAhcQKRZeAaHPTyI+yKfEUnlCtpGwaXrsBghasv+r/TQmK5GVnmJYp9UsPDey/OHio0YPK1ZFzvA==;24:RI0BX9ipDuciKa6VY09zmZk09fODa+i202wip2TdifYIjDpwlj8vHUudm1m1/jEEFIyYQZq9bupLLYIGzjUgI3wjncjkK7PLBYFCBUSqa6Q=;7:vyA2OuZpPAW7PASnGGInwnxc6N347Vk7USKGNkTj5suGBCEbV8NWYoVyU8nWtddNX3vmgorTyhJKsf/25VRgUKEwASqTU6jmijeO26PcPR7ThekRrXepF+9tlduPjiLisiG9Dv9c7/pgLJXmRukItL+5v5XsQGo5RzokbzYUDSOYSMqsO6xj7sO4/yYJeZq+zuwCQ5Sow0POWKIOm4JfLPRFYbCXNmE08RUgPgzXWMA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2017 09:55:51.2984 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR08MB2871 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2732 Lines: 65 On Mon, Aug 14, 2017 at 09:59:02AM +0100, Catalin Marinas wrote: > On Fri, Aug 11, 2017 at 10:26:06AM +0100, Ard Biesheuvel wrote: > > On 11 August 2017 at 10:22, Catalin Marinas wrote: > > > On Thu, Aug 10, 2017 at 01:13:22PM -0700, Laura Abbott wrote: > > >> Fedora rawhide recently upgraded to binutils 2.29 and this seems > > >> to produce new warnings: > > >> > > >> ./arch/arm64/include/asm/assembler.h: Assembler messages: > > >> ./arch/arm64/include/asm/assembler.h:125: Warning: ignoring attempt to redefine built-in register 'lr' > > >> > > >> This is > > >> > > >> /* > > >> * Register aliases. > > >> */ > > >> lr .req x30 // link register > > > > > > Strange, does gas now think 'lr' is a general purpose register (aliased > > > to x30)? It never was and IIRC the toolchain people many years ago > > > refused to add it, hence the alias above in the kernel. I wonder if they > > > added 'fp' as well... I don't remember the reasons why it was refused in the past. Asking around I can't seem to find anyone who remembers why either and it would be much quicker to fix the problem in binutils than any of this archeology :) > > > > > > We could remove the alias and replace all 'lr' instances with 'x30' > > > throughout the kernel (no too many) or we add some #ifdef around the > > > above based on the binutils version. > > > > This is annoying. Replacing lr with x30 achieves the opposite of the > > intent of the binutils change. And using #ifdefs is inaccurate, > > because you can't really test the binutils version only the GCC > > version, and those are not tightly coupled. > > > > Can you .unreq it? > > Not really, with an older binutils I get: > > arch/arm64/include/asm/assembler.h:125: Error: unknown register alias 'lr' > > I personally consider this a binutils bug. After 6+ years (probably not > all public) of building the kernel just fine, all of a sudden certain > strings became reserved in gas. Three options: IIRC the ABI states that LR is an alias for X30, FP is an alias for X29, IP0 an alias for X16 and IP1 an alias for X17. The warning is unfortunate - looking at the implementation of the .req directive in gas it's something controlled in the aarch64 backend and thus we could change gas to make LR (and friends) an internal alias thus removing the warning. Any attempts to realias these to the correct meaning as per the AAPCS continues to work from my limited testing of a prototype patch so far. I'll do a test run and post it on the lists and point you guys to it (probably now after lunch as I have a couple of meetings to run to) so that you could also test it and let us know if there are any issues. regards Ramana