From: Nicolas Pitre <nico@fluxnic.net>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
Arnd Bergmann <arnd@arndb.de>,
Russell King <linux@armlinux.org.uk>,
linux-arm-kernel@lists.infradead.org,
Ard Biesheuvel <ardb@kernel.org>
Subject: Re: [PATCH 2/3] RFC: ARM: head: Save lr in r11 while setting up page tables
Date: Fri, 4 Sep 2020 10:53:38 -0400 (EDT) [thread overview]
Message-ID: <nycvar.YSQ.7.78.906.2009041052180.4095746@knanqh.ubzr> (raw)
In-Reply-To: <20200904081949.5594-3-linus.walleij@linaro.org>
On Fri, 4 Sep 2020, Linus Walleij wrote:
> We might need to use lr as we want to be able to call
> the debug print functions, so save lr to r11 and restore
> lr from r11 in __create_page_tables.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> arch/arm/kernel/head.S | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
> index 2bfdf33aa74c..8b089c4c0d17 100644
> --- a/arch/arm/kernel/head.S
> +++ b/arch/arm/kernel/head.S
> @@ -171,10 +171,11 @@ ENDPROC(stext)
> * r8 = phys_offset, r9 = cpuid, r10 = procinfo
> *
> * Returns:
> - * r0, r3, r5-r7 corrupted
> + * r0, r3, r5-r7, r11 corrupted
> * r4 = physical page table address
> */
> __create_page_tables:
> + mov r11, lr @ we need to be able to call prints
> pgtbl r4, r8 @ page table address
>
> /*
> @@ -350,6 +351,7 @@ __create_page_tables:
> #ifdef CONFIG_ARM_LPAE
> sub r4, r4, #0x1000 @ point to the PGD table
> #endif
> + mov lr, r11
> ret lr
Here you could simply do "ret r11".
> ENDPROC(__create_page_tables)
> .ltorg
> --
> 2.26.2
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-09-04 14:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-04 8:19 [PATCH 0/3] RFC: ARM section mapping debug prints Linus Walleij
2020-09-04 8:19 ` [PATCH 1/3] RFC: ARM: head: Use non-conditional instructions Linus Walleij
2020-09-04 8:19 ` [PATCH 2/3] RFC: ARM: head: Save lr in r11 while setting up page tables Linus Walleij
2020-09-04 14:53 ` Nicolas Pitre [this message]
2020-09-04 8:19 ` [PATCH 3/3] RFC: ARM: head: Debug prints for section mappings Linus Walleij
2020-09-04 15:51 ` Nicolas Pitre
2020-09-04 18:33 ` Nicolas Pitre
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=nycvar.YSQ.7.78.906.2009041052180.4095746@knanqh.ubzr \
--to=nico@fluxnic.net \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=geert+renesas@glider.be \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux@armlinux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).