From: Stefan Agner <stefan@agner.ch>
To: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
linux-arm-kernel@lists.infradead.org,
"Russell King" <linux@arm.linux.org.uk>,
manabian@gmail.com, linux-kernel@vger.kernel.org,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
olof@lixom.net
Subject: Re: [PATCH soc] ARM: use ARM_SINGLE_ARMV7M for ARMv7-M platforms
Date: Fri, 22 May 2015 17:36:44 +0200 [thread overview]
Message-ID: <26b8dda924076b7587c42ecd5f7d854a@agner.ch> (raw)
In-Reply-To: <CALszF6D-3pXHtyVMwhO0JkT-dCSSB98UNDHNN7-LD04Wdgd2cA@mail.gmail.com>
On 2015-05-22 17:29, Maxime Coquelin wrote:
> 2015-05-22 16:50 GMT+02:00 Arnd Bergmann <arnd@arndb.de>:
>> [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
next prev parent reply other threads:[~2015-05-22 15:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 22:35 Stefan Agner
2015-05-21 6:43 ` Uwe Kleine-König
2015-05-21 17:00 ` Joachim Eastwood
2015-05-21 19:04 ` Uwe Kleine-König
2015-05-22 7:27 ` Stefan Agner
2015-05-22 9:37 ` Arnd Bergmann
2015-05-22 7:53 ` Arnd Bergmann
2015-05-22 8:54 ` Stefan Agner
2015-05-22 9:39 ` Arnd Bergmann
2015-05-22 13:06 ` Maxime Coquelin
2015-05-22 14:50 ` Arnd Bergmann
2015-05-22 15:29 ` Maxime Coquelin
2015-05-22 15:36 ` Stefan Agner [this message]
2015-05-22 15:56 ` Daniel Thompson
2015-05-22 16:28 ` Stefan Agner
2015-05-22 18:06 ` Russell King - ARM Linux
2015-05-22 19:34 ` Stefan Agner
2015-05-22 17:56 ` Russell King - ARM Linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=26b8dda924076b7587c42ecd5f7d854a@agner.ch \
--to=stefan@agner.ch \
--cc=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=manabian@gmail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=olof@lixom.net \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®