Re: [PATCH v3] MIPS: Fix memory reservation in bootmem_init for certain non-usermem setups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Paul,

Am Dienstag, 21. August 2018, 01:31:11 CEST schrieb Paul Burton:
[...]
> 
> Could you please give an example of a typical memory layout on your
> platform, and what mem= arguments you're using? That would help a lot in
> being able to understand what's going wrong with the existing code.

Here is the boot log without the patch

[    0.000000] SoC Type: Ralink RT2880 id:2 rev:1
[...]
[    0.000000] CPU0 revision is: 0001906c (MIPS 4KEc)
[    0.000000] MIPS: machine is Belkin F5D8235 v1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 08000000 (usable)
[    0.000000] Wasting 1048576 bytes for tracking 32768 unused pages
[...]
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000009ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000009ffffff]
[    0.000000] Initmem setup node 0 [mem 
0x0000000000000000-0x0000000009ffffff]
[...]
[    0.000000] Memory: 23712K/163840K available (3334K kernel code, 162K 
rwdata, 808K rodata, 2984K init, 208K bss, 140128K reserved, 0K cma-reserved)
[...]
[    0.000000] NR_IRQS: 256
[    0.000000] Failed to request intc memory
[    0.000000] Kernel panic - not syncing: Failed to request resources for 
ralink,rt2880-sysc
[    0.000000] Rebooting in 1 seconds..
[    0.000000] Reboot failed -- System halted

... and here with ...

[    0.000000] SoC Type: Ralink RT2880 id:2 rev:1
[...]
[    0.000000] CPU0 revision is: 0001906c (MIPS 4KEc)
[    0.000000] MIPS: machine is Belkin F5D8235 v1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 08000000 (usable)
[    0.000000] Wasting 1048576 bytes for tracking 32768 unused pages
[    0.000000] Initrd not found or empty - disabling initrd
[...]
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000008000000-0x0000000009ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000008000000-0x0000000009ffffff]
[    0.000000] Initmem setup node 0 [mem 
0x0000000008000000-0x0000000009ffffff]
[...]
[    0.000000] Memory: 26700K/32768K available (3334K kernel code, 162K 
rwdata, 808K rodata, 1192K init, 208K bss, 6068K reserved, 0K cma-reserved)
[...]
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 266MHz

The command line does not contain any custom "mem=" entries, that's why the 
patch checks "usermem". Please be aware that the platform already has a memory 
related issue I tried to fix with another patch "mm: Fix alloc_node_mem_map 
with ARCH_PFN_OFFSET calculation" [1]. So you might be right that this is not 
the root cause for both issues. I guess the patch might be useful anyway as it 
originated from the "early_parse_mem" function and memory was not reserved for 
non usermem setups anyway.

Currently I'm testing this device with an OpenWRT based image and compiled a 
vanilla kernel separately to validate that this is not triggered outside the 
mainline one.

Best regards
Tobias

[1] https://patchwork.linux-mips.org/patch/14627/






[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux