[PATCH 3/3] ARM: Map the lowmem and kernel separately

Linus Walleij linus.walleij at linaro.org
Fri Jul 30 15:40:36 PDT 2021


On Fri, Jul 30, 2021 at 10:23 PM Nishanth Menon <nm at ti.com> wrote:
> On 16:57-20210517, Linus Walleij wrote:
> > Using our knowledge of where the physical kernel sections start
> > and end we can split mapping of lowmem and kernel apart.
> >
> [...]
> >
> > Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
>
>
> We noticed a regression in k2g platforms with this patch.
> commit 6e121df14ccd ("ARM: 9090/1: Map the lowmem and kernel
> separately")
>
> Boot log: https://pastebin.ubuntu.com/p/Sf3r28D8MR/
> Bisect log: https://pastebin.ubuntu.com/p/6PTYpNVFDy/

Given how invasive the patch is I'm surprised that k2g is the
only thing so far complaining about it. Let's fix this!

I've had similar reports and in those cases it has been that the boot
loader did not turn off the caches before jumping to execute the
Linux kernel.

So first can you check that cache is off?

Next can you turn on DEBUG_LL and enable the debug messages
in arch/arm/mmu.c in map_lowmem() in some way that works for
you, for example I just add a patch like this:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git/patch/?id=d10c46631a6eaef1339e376b878de985143b27ff
(Beware of ugly debug habits!)

Next is this using the keystone 2 pv fixup thing  mdesc->pv_fixup
mdesc->pv_fixup in early_paging_init()?

I added a special print
there to see if that gets called. This code is really scary but I
suppose Santosh can explain what is supposed to happen here
and what I may have stepped on. (I see Santosh work at Oracle
now? Interesting.)

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list