mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [REGRESSION] of: reserved_mem: allocate and map the reserved_mem array early
@ 2026-12-03 19:28 ` Padhi, Beleswar
  2026-12-04 22:41   ` Marek Szyprowski
  0 siblings, 1 reply; 2+ messages in thread
From: Padhi, Beleswar @ 2026-12-03 19:28 UTC (permalink / raw)
  To: m.szyprowski
  Cc: linux-mm, devicetree, linux-kernel, rppt, Rob Herring, saravanak,
	oreoluwa.babatunde, chenwandun1, akpm, regressions,
	Nishanth Menon, b-padhi

Hi Marek,

After commit aa05faf815836 ("of: reserved_mem: allocate and map
the reserved_mem array early"), the boot has been broken on TI K2G EVM
boards on keystone_defconfig.

1. On next-20261103 the board prints nothing after "Starting kernel ..."
Same can be verified by fetching data from KernelCI dashboard.

2. With earlycon enabled (the only change on top of next-20261103), the
log ends here:

```
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 7.4.0-rc1-next-20261103-00001-g1fac120bc25f 
(arm-none-linux-gnueabihf-gcc (Arm GNU Toolchain 12.3.Rel1 (Build 
arm-12.35)) 12.3.1 20230626, GNU ld (Arm GNU Toolchain 12.3.Rel1 (Build 
arm-12.35)) 2.40.0.20230627) #1 SMP PREEMPT Thu Dec  3 23:21:13 IST 2026
[    0.000000] CPU: ARMv7 Processor [412fc0f4] revision 4 (ARMv7), 
cr=30c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction 
cache
[    0.000000] OF: fdt: Machine model: Texas Instruments K2G General 
Purpose EVM
[    0.000000] earlycon: ns16550a0 MMIO32:0x0000000002530c00 (options 
'115200n8')
[    0.000000] printk: legacy bootconsole [ns16550a0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Switching physical address space to 0x800000000
   <hang>
```

3. Reverting only commit aa05faf81583 on next-20261103 makes the board
boot fine to userspace again:

```
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 7.4.0-rc1-next-20261103-00001-gddae9990d91d 
(arm-none-linux-gnueabihf-gcc (Arm GNU Toolchain 12.3.Rel1 (Build 
arm-12.35)) 12.3.1 20230626, GNU ld (Arm GNU Toolchain 12.3.Rel1 (Build 
arm-12.35)) 2.40.0.20230627) #1 SMP PREEMPT Thu Dec  3 12:04:37 IST 2026
[    0.000000] CPU: ARMv7 Processor [412fc0f4] revision 4 (ARMv7), 
cr=30c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction 
cache
[    0.000000] OF: fdt: Machine model: Texas Instruments K2G General 
Purpose EVM
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Switching physical address space to 0x800000000
[    0.000000] cma: Reserved 16 MiB at 0x0000000801800000
[    0.000000] Reserved memory: created CMA memory pool at 
0x000000081f800000, size 8 MiB
[    0.000000] OF: reserved mem: initialized node 
dsp-common-memory@81f800000, compatible id shared-dma-pool
[    0.000000] OF: reserved mem: 0x000000081f800000..0x000000081fffffff 
(8192 KiB) map reusable dsp-common-memory@81f800000
[    0.000000] Zone ranges:
[    0.000000]   DMA      em 0x0000000800000000-0x000000082fffffff]
[    0.000000]   Normal   empty
[    0.000000]   HighMem  em 0x0000000830000000-0x000000087fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: em 0x0000000800000000-0x000000087fffffff]
[    0.000000] Initmem setup node 0 em 
0x0000000800000000-0x000000087fffffff]
[    0.000000] percpu: Embedded 16 pages/cpu s34252 r8192 d23092 u65536

<...>
```

4.The same holds on the latest tag next-20261202: reverting aa05faf81583
together with the two follow ups that depend on it: e4c9df05d81a ("of:
reserved_mem: Drop node_fixup, CMA can handle it internally again") and
c025fbcb8c91 ("of: reserved_mem: mark the early_memremap() array helpers
__init") also boots fine to userspace:

```
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 7.4.0-rc5-next-20261202-00003-g15aab7f330d7 
(arm-none-linux-gnueabihf-gcc (Arm GNU Toolchain 12.3.Rel1 (Build 
arm-12.35)) 12.3.1 20230626, GNU ld (Arm GNU Toolchain 12.3.Rel1 (Build 
arm-12.35)) 2.40.0.20230627) #1 SMP PREEMPT Thu Dec  3 20:47:32 IST 2026
[    0.000000] CPU: ARMv7 Processor [412fc0f4] revision 4 (ARMv7), 
cr=30c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction 
cache
[    0.000000] OF: fdt: Machine model: Texas Instruments K2G General 
Purpose EVM
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Switching physical address space to 0x800000000
[    0.000000] cma: Reserved 16 MiB at 0x0000000801800000
[    0.000000] Reserved memory: created CMA memory pool at 
0x000000081f800000, size 8 MiB
[    0.000000] OF: reserved mem: initialized node 
dsp-common-memory@81f800000, compatible id shared-dma-pool
[    0.000000] OF: reserved mem: 0x000000081f800000..0x000000081fffffff 
(8192 KiB) map reusable dsp-common-memory@81f800000
[    0.000000] Zone ranges:
[    0.000000]   DMA      em 0x0000000800000000-0x000000082fffffff]
[    0.000000]   Normal   empty
[    0.000000]   HighMem  em 0x0000000830000000-0x000000087fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: em 0x0000000800000000-0x000000087fffffff]
[    0.000000] Initmem setup node 0 em 
0x0000000800000000-0x000000087fffffff]
[    0.000000] percpu: Embedded 16 pages/cpu s34636 r8192 d22708 u65536
<...>

```

Board: TI K2G EVM (has Cortex-A15)
Defconfig: keystone_defconfig
Toolchain: Arm GNU Toolchain 12.3.Rel1

Do you possibly have any ideas as to what is breaking in the code? Happy
to run any experiments or provide more info if you need any.

#regzbot introduced: aa05faf815836

Thanks,
Beleswar


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [REGRESSION] of: reserved_mem: allocate and map the reserved_mem array early
  2026-12-03 19:28 ` [REGRESSION] of: reserved_mem: allocate and map the reserved_mem array early Padhi, Beleswar
@ 2026-12-04 22:41   ` Marek Szyprowski
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Szyprowski @ 2026-12-04 22:41 UTC (permalink / raw)
  To: Padhi, Beleswar
  Cc: linux-mm, devicetree, linux-kernel, rppt, Rob Herring, saravanak,
	oreoluwa.babatunde, chenwandun1, akpm, regressions,
	Nishanth Menon

On 03.12.2026 20:28, Padhi, Beleswar wrote:
> After commit aa05faf815836 ("of: reserved_mem: allocate and map
> the reserved_mem array early"), the boot has been broken on TI K2G EVM
> boards on keystone_defconfig.
>
> 1. On next-20261103 the board prints nothing after "Starting kernel ..."
> Same can be verified by fetching data from KernelCI dashboard.
>
> 2. With earlycon enabled (the only change on top of next-20261103), the
> log ends here:
>
> ```
> [    0.000000] Booting Linux on physical CPU 0x0
> [    0.000000] Linux version 7.4.0-rc1-next-20261103-00001-g1fac120bc25f (arm-none-linux-gnueabihf-gcc (Arm GNU Toolchain 12.3.Rel1 (Build arm-12.35)) 12.3.1 20230626, GNU ld (Arm GNU Toolchain 12.3.Rel1 (Build arm-12.35)) 2.40.0.20230627) #1 SMP PREEMPT Thu Dec  3 23:21:13 IST 2026
> [    0.000000] CPU: ARMv7 Processor [412fc0f4] revision 4 (ARMv7), cr=30c5387d
> [    0.000000] CPU: div instructions available: patching division code
> [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
> [    0.000000] OF: fdt: Machine model: Texas Instruments K2G General Purpose EVM
> [    0.000000] earlycon: ns16550a0 MMIO32:0x0000000002530c00 (options '115200n8')
> [    0.000000] printk: legacy bootconsole [ns16550a0] enabled
> [    0.000000] Memory policy: Data cache writealloc
> [    0.000000] Switching physical address space to 0x800000000
>   <hang>
> ```
>
> 3. Reverting only commit aa05faf81583 on next-20261103 makes the board
> boot fine to userspace again:
>
> ```
> [    0.000000] Booting Linux on physical CPU 0x0
> [    0.000000] Linux version 7.4.0-rc1-next-20261103-00001-gddae9990d91d (arm-none-linux-gnueabihf-gcc (Arm GNU Toolchain 12.3.Rel1 (Build arm-12.35)) 12.3.1 20230626, GNU ld (Arm GNU Toolchain 12.3.Rel1 (Build arm-12.35)) 2.40.0.20230627) #1 SMP PREEMPT Thu Dec  3 12:04:37 IST 2026
> [    0.000000] CPU: ARMv7 Processor [412fc0f4] revision 4 (ARMv7), cr=30c5387d
> [    0.000000] CPU: div instructions available: patching division code
> [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
> [    0.000000] OF: fdt: Machine model: Texas Instruments K2G General Purpose EVM
> [    0.000000] Memory policy: Data cache writealloc
> [    0.000000] Switching physical address space to 0x800000000
> [    0.000000] cma: Reserved 16 MiB at 0x0000000801800000
> [    0.000000] Reserved memory: created CMA memory pool at 0x000000081f800000, size 8 MiB
> [    0.000000] OF: reserved mem: initialized node dsp-common-memory@81f800000, compatible id shared-dma-pool
> [    0.000000] OF: reserved mem: 0x000000081f800000..0x000000081fffffff (8192 KiB) map reusable dsp-common-memory@81f800000
> [    0.000000] Zone ranges:
> [    0.000000]   DMA      em 0x0000000800000000-0x000000082fffffff]
> [    0.000000]   Normal   empty
> [    0.000000]   HighMem  em 0x0000000830000000-0x000000087fffffff]
> [    0.000000] Movable zone start for each node
> [    0.000000] Early memory node ranges
> [    0.000000]   node   0: em 0x0000000800000000-0x000000087fffffff]
> [    0.000000] Initmem setup node 0 em 0x0000000800000000-0x000000087fffffff]
> [    0.000000] percpu: Embedded 16 pages/cpu s34252 r8192 d23092 u65536
>
> <...>
> ```
>
> 4.The same holds on the latest tag next-20261202: reverting aa05faf81583
> together with the two follow ups that depend on it: e4c9df05d81a ("of:
> reserved_mem: Drop node_fixup, CMA can handle it internally again") and
> c025fbcb8c91 ("of: reserved_mem: mark the early_memremap() array helpers
> __init") also boots fine to userspace:
>
> ```
> [    0.000000] Booting Linux on physical CPU 0x0
> [    0.000000] Linux version 7.4.0-rc5-next-20261202-00003-g15aab7f330d7 (arm-none-linux-gnueabihf-gcc (Arm GNU Toolchain 12.3.Rel1 (Build arm-12.35)) 12.3.1 20230626, GNU ld (Arm GNU Toolchain 12.3.Rel1 (Build arm-12.35)) 2.40.0.20230627) #1 SMP PREEMPT Thu Dec  3 20:47:32 IST 2026
> [    0.000000] CPU: ARMv7 Processor [412fc0f4] revision 4 (ARMv7), cr=30c5387d
> [    0.000000] CPU: div instructions available: patching division code
> [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
> [    0.000000] OF: fdt: Machine model: Texas Instruments K2G General Purpose EVM
> [    0.000000] Memory policy: Data cache writealloc
> [    0.000000] Switching physical address space to 0x800000000
> [    0.000000] cma: Reserved 16 MiB at 0x0000000801800000
> [    0.000000] Reserved memory: created CMA memory pool at 0x000000081f800000, size 8 MiB
> [    0.000000] OF: reserved mem: initialized node dsp-common-memory@81f800000, compatible id shared-dma-pool
> [    0.000000] OF: reserved mem: 0x000000081f800000..0x000000081fffffff (8192 KiB) map reusable dsp-common-memory@81f800000
> [    0.000000] Zone ranges:
> [    0.000000]   DMA      em 0x0000000800000000-0x000000082fffffff]
> [    0.000000]   Normal   empty
> [    0.000000]   HighMem  em 0x0000000830000000-0x000000087fffffff]
> [    0.000000] Movable zone start for each node
> [    0.000000] Early memory node ranges
> [    0.000000]   node   0: em 0x0000000800000000-0x000000087fffffff]
> [    0.000000] Initmem setup node 0 em 0x0000000800000000-0x000000087fffffff]
> [    0.000000] percpu: Embedded 16 pages/cpu s34636 r8192 d22708 u65536
> <...>
>
> ```
>
> Board: TI K2G EVM (has Cortex-A15)
> Defconfig: keystone_defconfig
> Toolchain: Arm GNU Toolchain 12.3.Rel1
>
> Do you possibly have any ideas as to what is breaking in the code? Happy
> to run any experiments or provide more info if you need any.


The key here is the "Switching physical address space to 0x800000000" line. It
turned out that the address space switch on ARM 32bit omits updating the fixup
PMD.

This patch should fix this issue:
https://lore.kernel.org/all/20261204223725.2775648-1-m.szyprowski@samsung.com/

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-04 22:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20261203193005eucas1p1ecfa9dac4a598a7231bd575954f5bfda@eucas1p1.samsung.com>
2026-12-03 19:28 ` [REGRESSION] of: reserved_mem: allocate and map the reserved_mem array early Padhi, Beleswar
2026-12-04 22:41   ` Marek Szyprowski

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®