Re: [PATCH] powerpc/8xx: Fix permanently mapped IMMR region.

From: Christophe Leroy
Date: Tue Nov 26 2019 - 03:01:17 EST




On 11/18/2019 11:17 AM, Michael Ellerman wrote:
Christophe Leroy <christophe.leroy@xxxxxx> writes:
When not using large TLBs, the IMMR region is still
mapped as a whole block in the FIXMAP area.

Do not remove pages mapped in the FIXMAP region when
initialising paging.

Properly report that the IMMR region is block-mapped even
when not using large TLBs.

Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxx>
---
arch/powerpc/mm/mem.c | 8 --------
arch/powerpc/mm/nohash/8xx.c | 13 +++++++------
2 files changed, 7 insertions(+), 14 deletions(-)

This blows up pmac32_defconfig + qemu mac99 for me with:

NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 0 bytes, default 32
Trying to unpack rootfs image as initramfs...
BUG: Unable to handle kernel data access on write at 0xfffdf000

I tested it with pmac32_defconfig and qemu mac99 and don't get the problem:

NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 0 bytes, default 32
Initialise system trusted keyrings
workingset: timestamp_bits=30 max_order=15 bucket_order=0
NFS: Registering the id_resolver key type
Key type id_resolver registered
...

Looks like I don't get that 'Trying to unpack rootfs image as initramfs...', do you change anything to pmac32_defconfig ?

Anyway, when rebasing this patch on next branch, only the arch/powerpc/mm/nohash/8xx.c change remains. The other part is already applied through another patch.

So I believe the remaining part is safe to apply

Christophe