public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Russell King <linux@armlinux.org.uk>,
	<linux-arm-kernel@lists.infradead.org>,
	Nishanth Menon <nmenon@kernel.org>
Subject: Re: [PATCH] ARM: Fix Keystone 2 kernel mapping regression
Date: Wed, 4 Aug 2021 11:40:33 -0500	[thread overview]
Message-ID: <20210804164033.5omplm7qs7fuxgfb@cupcake> (raw)
In-Reply-To: <20210804135747.737233-1-linus.walleij@linaro.org>

On 15:57-20210804, Linus Walleij wrote:
> This fixes a Keystone 2 regression discovered as a side effect of
> defining an passing the physical start/end sections of the kernel
> to the MMU remapping code.
> 
> As the Keystone applies an offset to all physical addresses,
> including those identified and patches by phys2virt, we fail to
> account for this offset in the kernel_sec_start and kernel_sec_end
> variables.
> 
> Further these offsets can extend into the 64bit range on LPAE
> systems such as the Keystone 2.
> 
> Fix it like this:
> - Extend kernel_sec_start and kernel_sec_end to be 64bit
> - Add the offset also to kernel_sec_start and kernel_sec_end
> 
> As passing kernel_sec_start and kernel_sec_end as 64bit invariably
> incurs endianness issues I have attempted to dry-code around
> these. Please review.
> 
> Tested on the Vexpress QEMU model both with and without LPAE
> enabled.
> 
> Fixes: 6e121df14ccd ("ARM: 9090/1: Map the lowmem and kernel separately")
> Reported-by: Nishanth Menon <nmenon@kernel.org>
> Suggested-by: Russell King <linux@armlinux.org.uk>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> Link: https://lore.kernel.org/r/20210804135747.737233-1-linus.walleij@linaro.org
> ---
> Nishanth: Please test!
> Other smart folks: please have a look at my endianness compensation
> assembly.

Russell, Linus - awesome. thanks for looking at the right problem.

test log (two k2 platforms from two generations):
Baseline(good): v5.13
k2g-evm: https://pastebin.ubuntu.com/p/xnGy9fM6mj/
k2hk-evm: https://pastebin.ubuntu.com/p/gpX6bPsF2R/

Check base(bad): v5.14-rc4
k2g-evm: 
k2hk-evm: https://pastebin.ubuntu.com/p/ht7sTjyTD2/
k2g-evm: https://pastebin.ubuntu.com/p/skf8nsGqPZ/

Check patch: v5.14-rc4 + 20210804135747.737233-1-linus.walleij@linaro.org
k2hk-evm: https://pastebin.ubuntu.com/p/ycX7bmgcyT/
k2g-evm: https://pastebin.ubuntu.com/p/FgfZSwg7fY/

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      parent reply	other threads:[~2021-08-04 16:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04 13:57 [PATCH] ARM: Fix Keystone 2 kernel mapping regression Linus Walleij
2021-08-04 14:10 ` Russell King (Oracle)
2021-08-04 16:23   ` Grygorii Strashko
2021-08-04 16:40 ` Nishanth Menon [this message]

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=20210804164033.5omplm7qs7fuxgfb@cupcake \
    --to=nm@ti.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=nmenon@kernel.org \
    /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