Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1945997AbbEVPid (ORCPT ); Fri, 22 May 2015 11:38:33 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:59501 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1945931AbbEVPic (ORCPT ); Fri, 22 May 2015 11:38:32 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Date: Fri, 22 May 2015 17:36:44 +0200 From: Stefan Agner To: Maxime Coquelin Cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, Russell King , manabian@gmail.com, linux-kernel@vger.kernel.org, =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , olof@lixom.net Subject: Re: [PATCH soc] ARM: use =?UTF-8?Q?ARM=5FSINGLE=5FARMV=37M=20for?= =?UTF-8?Q?=20ARMv=37-M=20platforms?= In-Reply-To: References: <1432161344-1930-1-git-send-email-stefan@agner.ch> <15864413.ed8EFg1NLl@wuerfel> Message-ID: <26b8dda924076b7587c42ecd5f7d854a@agner.ch> User-Agent: Roundcube Webmail/1.1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1925 Lines: 49 On 2015-05-22 17:29, Maxime Coquelin wrote: > 2015-05-22 16:50 GMT+02:00 Arnd Bergmann : >> [one small request as I have four armv7-m folks on Cc already: >> could one of you try to fix the warning that I get with every >> single build: "/git/arm-soc/arch/arm/kernel/head-nommu.S: Assembler >> messages: /git/arm-soc/arch/arm/kernel/head-nommu.S:167: Warning: >> Use of r13 as a source register is deprecated when r15 is the >> destination register."] > > Moving r13 to r12 and returning r12 seems to do the job (see below). > But I don't know if there is a more elegant way, and if it is also > valid for other architectures than armv7-m. > I can propose a patch if someone can confirm it is valid. > > ------------------------------------------------------------------------------------------------------------- > > diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S > index aebfbf7..e84bdad 100644 > --- a/arch/arm/kernel/head-nommu.S > +++ b/arch/arm/kernel/head-nommu.S > @@ -164,7 +164,8 @@ __after_proc_init: > #endif > mcr p15, 0, r0, c1, c0, 0 @ write control reg > #endif /* CONFIG_CPU_CP15 */ > - ret r13 > + mov r12, r13 > + ret r12 > ENDPROC(__after_proc_init) > .ltorg That is actually a patch I have here too, altough I used r11 back then... :-) However, I don't think this is a nice solution. We should avoid using r13 for that address in the first place, e.g. using a different register to get the value when calling __mmap_switched. However, for that one need to know what registers are guaranteed to be not used within PROCINFO_INITFUNC... -- Stefan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/