From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Huang Pei <huangpei@loongson.cn>
Cc: Bibo Mao <maobibo@loongson.cn>,
linux-mips@vger.kernel.org, Jiaxun Yang <jiaxun.yang@flygoat.com>,
Paul Burton <paulburton@kernel.org>,
Li Xuefeng <lixuefeng@loongson.cn>,
Yang Tiezhu <yangtiezhu@loongson.cn>,
Gao Juxin <gaojuxin@loongson.cn>,
Huacai Chen <chenhuacai@loongson.cn>
Subject: Re: [PATCH 2/2] MIPS: loongson64: set nid for reserved memblock region
Date: Fri, 26 Jan 2024 11:12:32 +0100 [thread overview]
Message-ID: <ZbOFkEikUQbvg7OU@alpha.franken.de> (raw)
In-Reply-To: <20240123014758.12718-2-huangpei@loongson.cn>
On Tue, Jan 23, 2024 at 09:47:58AM +0800, Huang Pei wrote:
> Commit 61167ad5fecd("mm: pass nid to reserve_bootmem_region()") reveals
> that reserved memblock regions have no valid node id set, just set it
> right since loongson64 firmware makes it clear in memory layout info.
>
> This works around booting failure on 3A1000+ since commit 61167ad5fecd
> ("mm: pass nid to reserve_bootmem_region()") under
> CONFIG_DEFERRED_STRUCT_PAGE_INIT.
>
> Signed-off-by: Huang Pei <huangpei@loongson.cn>
> ---
> arch/mips/loongson64/init.c | 2 ++
> arch/mips/loongson64/numa.c | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/arch/mips/loongson64/init.c b/arch/mips/loongson64/init.c
> index f25caa6aa9d3..000ba91c0886 100644
> --- a/arch/mips/loongson64/init.c
> +++ b/arch/mips/loongson64/init.c
> @@ -103,6 +103,8 @@ void __init szmem(unsigned int node)
> if (loongson_sysconf.vgabios_addr)
> memblock_reserve(virt_to_phys((void *)loongson_sysconf.vgabios_addr),
> SZ_256K);
> + /* set nid for reserved memory */
> + memblock_set_node((u64)node << 44, (u64)(node+1) << 44, &memblock.reserved, node);
> }
>
> #ifndef CONFIG_NUMA
> diff --git a/arch/mips/loongson64/numa.c b/arch/mips/loongson64/numa.c
> index 8f61e93c0c5b..6345e096c532 100644
> --- a/arch/mips/loongson64/numa.c
> +++ b/arch/mips/loongson64/numa.c
> @@ -132,6 +132,8 @@ static void __init node_mem_init(unsigned int node)
>
> /* Reserve pfn range 0~node[0]->node_start_pfn */
> memblock_reserve(0, PAGE_SIZE * start_pfn);
> + /* set nid for reserved memory on node 0 */
> + memblock_set_node(0, (u64)1 << 44, &memblock.reserved, 1);
> }
> }
>
> --
> 2.30.2
applied to mips-fixes.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
next prev parent reply other threads:[~2024-01-26 10:16 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-25 9:30 [PATCH] MIPS: loongson64: fix boot failure Huang Pei
2024-01-09 21:40 ` Thomas Bogendoerfer
2024-01-13 9:55 ` [PATCH V2]: " Huang Pei
2024-01-13 9:55 ` [PATCH 1/3] MIPS: adjust exception vector space revervation Huang Pei
2024-01-13 9:55 ` [PATCH 2/3] MIPS: loongson64: fix booting failure Huang Pei
2024-01-13 9:55 ` [PATCH 3/3] Revert "MIPS: Loongson64: Handle more memory types passed from firmware" Huang Pei
2024-01-13 11:59 ` Jiaxun Yang
2024-01-14 8:53 ` Huang Pei
2024-01-14 11:58 ` Jiaxun Yang
2024-01-15 1:25 ` Huang Pei
2024-01-15 14:14 ` Jiaxun Yang
2024-01-16 3:10 ` Huang Pei
2024-01-18 12:39 ` [PATCH V3]: MIPS: loongson64: fix booting failure Huang Pei
2024-01-18 12:39 ` [PATCH 1/2] MIPS: reserve exception vector space ONLY ONCE Huang Pei
2024-01-18 12:39 ` [PATCH 2/2] MIPS: loongson64: set nid for reserved memblock region Huang Pei
2024-01-19 4:02 ` [PATCH V4]: MIPS: loongson64: fix boot failure Huang Pei
2024-01-19 4:02 ` [PATCH 1/2] MIPS: reserve exception vector space ONLY ONCE Huang Pei
2024-01-19 15:23 ` Sergei Shtylyov
2024-01-19 16:15 ` Thomas Bogendoerfer
2024-01-21 7:13 ` Huang Pei
2024-01-19 4:02 ` [PATCH 2/2] MIPS: loongson64: set nid for reserved memblock region Huang Pei
2024-01-19 10:05 ` Jiaxun Yang
2024-01-21 2:14 ` Huang Pei
2024-01-21 10:35 ` Jiaxun Yang
2024-01-22 8:08 ` [PATCH V6]: MIPS: loongson64: fix boot failure Huang Pei
2024-01-22 8:08 ` [PATCH 1/2] MIPS: reserve exception vector space ONLY ONCE Huang Pei
2024-01-22 8:08 ` [PATCH 2/2] MIPS: loongson64: set nid for reserved memblock region Huang Pei
2024-01-22 8:20 ` Sergey Shtylyov
2024-01-23 1:47 ` [PATCH 1/2] MIPS: reserve exception vector space ONLY ONCE Huang Pei
2024-01-23 1:47 ` [PATCH 2/2] MIPS: loongson64: set nid for reserved memblock region Huang Pei
2024-01-26 10:12 ` Thomas Bogendoerfer [this message]
2024-01-26 14:24 ` Huacai Chen
2024-01-26 17:24 ` Thomas Bogendoerfer
2024-01-27 9:12 ` [PATCH] " Huang Pei
2024-01-27 9:12 ` Huang Pei
2024-01-27 10:04 ` Thomas Bogendoerfer
2024-01-28 4:42 ` Huang Pei
2024-01-26 10:12 ` [PATCH 1/2] MIPS: reserve exception vector space ONLY ONCE Thomas Bogendoerfer
2024-01-15 14:08 ` memblock_reserve for unadded region (was: [PATCH] MIPS: loongson64: fix boot failure) Jiaxun Yang
2024-01-16 3:27 ` Huang Pei
2024-01-16 8:39 ` Mike Rapoport
2024-01-16 12:23 ` Huang Pei
2024-01-17 2:20 ` Yajun Deng
2024-01-17 3:01 ` Huang Pei
2024-01-17 3:17 ` Yajun Deng
2024-01-17 3:59 ` Huang Pei
2024-01-17 6:46 ` Mike Rapoport
2024-01-17 7:45 ` Huang Pei
2024-01-17 11:08 ` Mike Rapoport
2024-01-18 2:26 ` Huang Pei
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=ZbOFkEikUQbvg7OU@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=chenhuacai@loongson.cn \
--cc=gaojuxin@loongson.cn \
--cc=huangpei@loongson.cn \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-mips@vger.kernel.org \
--cc=lixuefeng@loongson.cn \
--cc=maobibo@loongson.cn \
--cc=paulburton@kernel.org \
--cc=yangtiezhu@loongson.cn \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.