On Tue, Jan 26, 2021 at 12:13:31PM +0100, Youling Tang wrote: > "__node_data" instead of "node_data" is used in the MIPS architecture, > so "__node_data" is used to replace "node_data" to improve the use of > next_online_pgdat() functions in the MIPS architecture. On my 32-bit MIPS dumps, MEMORY: works properly without this patch, but they have contig_page_data instead of __node_data/node_data so they shouldn't be affected by this code. AFAICS only mach-loongson64 and mach-ip27 have __node_data. > > E.g. Without this patch: > ... > MEMORY: 0 > ... > > > With this patch: > ... > MEMORY: 7.5 GB > ... > > Signed-off-by: Huacai Chen <chenhuacai@xxxxxxxxxxx> > Signed-off-by: Youling Tang <tangyouling@xxxxxxxxxxx> > --- > memory.c | 28 ++++++++++++++++++---------- > 1 file changed, 18 insertions(+), 10 deletions(-) > > diff --git a/memory.c b/memory.c > index 33b0ca7..5347958 100644 > --- a/memory.c > +++ b/memory.c > @@ -17820,22 +17820,28 @@ next_online_pgdat(int node) > char buf[BUFSIZE]; > ulong pgdat; > > +#ifndef __mips__ > +#define NODE_DATA_VAR "node_data" > +#else > +#define NODE_DATA_VAR "__node_data" > +#endif Is this really correct? Doesn't __mips__ check the host architecture when what we want to check here is the target? -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility