On Thu, Nov 4, 2021 at 4:49 PM <[email protected]> wrote:
> Date: Thu, 4 Nov 2021 08:47:57 +0000 > From: HAGIO KAZUHITO(?????) <[email protected]> > To: "[email protected]" <[email protected]> > Cc: "Discussion list for crash utility usage, maintenance and > development" <[email protected]> > Subject: Re: [Crash-utility] [PATCH] arm64 : Update the > section_size_bits for latest kernel > Message-ID: > < > tyypr01mb67775e90f3f2ef285acf5e86dd...@tyypr01mb6777.jpnprd01.prod.outlook.com > > > > Content-Type: text/plain; charset="iso-2022-jp" > > Hi Ankur, > > Thanks for the patch. > > -----Original Message----- > > correct the section_size_bits for kernel version >= 5.12 > > becuase of linux upstream change > > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f0b13ee23241846f6f6cd0d > > 119a8ac8059416ec4 > > (arm64/sparsemem: reduce SECTION_SIZE_BITS) > > > > Change-Id: I31b66fbfe421a02aa9f370ce7a615fbc70efcf2f > > --- > > arm64.c | 10 ++++++++-- > > 1 file changed, 8 insertions(+), 2 deletions(-) > > > > diff --git a/arm64.c b/arm64.c > > index 3dcbcc6..4a207fc 100644 > > --- a/arm64.c > > +++ b/arm64.c > > @@ -1123,9 +1123,15 @@ arm64_get_section_size_bits(void) > > free(string); > > } else if (kt->ikconfig_flags & IKCONFIG_AVAIL) { > > if ((ret = get_kernel_config("CONFIG_MEMORY_HOTPLUG", > NULL)) == IKCONFIG_Y) { > > - if ((ret = > get_kernel_config("CONFIG_HOTPLUG_SIZE_BITS", &string)) == IKCONFIG_STR) > > + if (THIS_KERNEL_VERSION >= LINUX(5,12,0)){ > > + if((ret = > get_kernel_config("CONFIG_ARM64_64K_PAGES", NULL)) == IKCONFIG_Y) > > + machdep->section_size_bits = 29; > > + else > > + machdep->section_size_bits = 27; > > + } > > + else if ((ret = > get_kernel_config("CONFIG_HOTPLUG_SIZE_BITS", &string)) == > > IKCONFIG_STR) > > Considering dumpfiles without vmcoreinfo and IKCONFIG too, it will be > better > to switch the default value of section_size_bits. We can use > machdep->pagesize > here, so how about this? > > - machdep->section_size_bits = _SECTION_SIZE_BITS; > + if (THIS_KERNEL_VERSION >= LINUX(5,12,0)) { > + if (machdep->pagesize == 65536) > + machdep->section_size_bits = 29; > + else > + machdep->section_size_bits = 27; > + } else > + machdep->section_size_bits = _SECTION_SIZE_BITS; > > This change covers more scenarios and looks good to me. Could you please update this patch? Ankur and Kazu. Thanks. Lianbo
-- Crash-utility mailing list [email protected] https://listman.redhat.com/mailman/listinfo/crash-utility
