Hi tao
crash load 5.12 before vmcore, parse section_size_bits equals 27,
but it should be equals 30. because defined "CONFIG_ARM64_4K_PAGES",
The commit "568c6f04" for compat android gki, so we should cleanup.
Exp:
Before:
crash vmcore vmlinux -d1
...
xtime timespec.tv_sec: 603549d0: Wed Feb 24 02:30:40 CST 2021
utsname:
sysname: Linux
nodename: localhost
release: 4.14.180-perf-g4483caa8ae80-dirty
version: #1 SMP PREEMPT Wed Feb 24 03:16:01 CST 2021
machine: aarch64
domainname: localdomain
...
SECTION_SIZE_BITS: 27
...
After:
crash vmcore vmlinux -d1
...
xtime timespec.tv_sec: 603549d0: Wed Feb 24 02:30:40 CST 2021
utsname:
sysname: Linux
nodename: localhost
release: 4.14.180-perf-g4483caa8ae80-dirty
version: #1 SMP PREEMPT Wed Feb 24 03:16:01 CST 2021
machine: aarch64
domainname: localdomain
...
SECTION_SIZE_BITS: 30
...
but it should be equals 30. because defined "CONFIG_ARM64_4K_PAGES",
The commit "568c6f04" for compat android gki, so we should cleanup.
Exp:
Before:
crash vmcore vmlinux -d1
...
xtime timespec.tv_sec: 603549d0: Wed Feb 24 02:30:40 CST 2021
utsname:
sysname: Linux
nodename: localhost
release: 4.14.180-perf-g4483caa8ae80-dirty
version: #1 SMP PREEMPT Wed Feb 24 03:16:01 CST 2021
machine: aarch64
domainname: localdomain
...
SECTION_SIZE_BITS: 27
...
After:
crash vmcore vmlinux -d1
...
xtime timespec.tv_sec: 603549d0: Wed Feb 24 02:30:40 CST 2021
utsname:
sysname: Linux
nodename: localhost
release: 4.14.180-perf-g4483caa8ae80-dirty
version: #1 SMP PREEMPT Wed Feb 24 03:16:01 CST 2021
machine: aarch64
domainname: localdomain
...
SECTION_SIZE_BITS: 30
...
diff --git a/arm64.c b/arm64.c
index 06e7451..05ffdb3 100644
--- a/arm64.c
+++ b/arm64.c
@@ -1698,14 +1698,7 @@ arm64_get_section_size_bits(void)
if ((ret = get_kernel_config("CONFIG_MEMORY_HOTPLUG", NULL)) == IKCONFIG_Y) {
if ((ret = get_kernel_config("CONFIG_HOTPLUG_SIZE_BITS", &string)) == IKCONFIG_STR)
machdep->section_size_bits = atol(string);
- }
-
- /* arm64: reduce section size for sparsemem */
- if ((ret = get_kernel_config("CONFIG_ARM64_4K_PAGES", NULL)) == IKCONFIG_Y
- || (ret = get_kernel_config("CONFIG_ARM64_16K_PAGES", NULL)) == IKCONFIG_Y)
- machdep->section_size_bits = _SECTION_SIZE_BITS_5_12;
- else if ((ret = get_kernel_config("CONFIG_ARM64_64K_PAGES", NULL)) == IKCONFIG_Y)
- machdep->section_size_bits = _SECTION_SIZE_BITS_5_12_64K;
+ }
}
if (CRASHDEBUG(1))
index 06e7451..05ffdb3 100644
--- a/arm64.c
+++ b/arm64.c
@@ -1698,14 +1698,7 @@ arm64_get_section_size_bits(void)
if ((ret = get_kernel_config("CONFIG_MEMORY_HOTPLUG", NULL)) == IKCONFIG_Y) {
if ((ret = get_kernel_config("CONFIG_HOTPLUG_SIZE_BITS", &string)) == IKCONFIG_STR)
machdep->section_size_bits = atol(string);
- }
-
- /* arm64: reduce section size for sparsemem */
- if ((ret = get_kernel_config("CONFIG_ARM64_4K_PAGES", NULL)) == IKCONFIG_Y
- || (ret = get_kernel_config("CONFIG_ARM64_16K_PAGES", NULL)) == IKCONFIG_Y)
- machdep->section_size_bits = _SECTION_SIZE_BITS_5_12;
- else if ((ret = get_kernel_config("CONFIG_ARM64_64K_PAGES", NULL)) == IKCONFIG_Y)
- machdep->section_size_bits = _SECTION_SIZE_BITS_5_12_64K;
+ }
}
if (CRASHDEBUG(1))
Thanks,
Guanyou.
From af23f8151c8eb4a35b4bf2a0d2179a4aa625cff5 Mon Sep 17 00:00:00 2001 From: chenguanyou <chenguanyou@xxxxxxxxxx> Date: Fri, 30 Aug 2024 09:51:11 +0800 Subject: [PATCH] Revert "arm64: section_size_bits compatible with macro definitions" This reverts commit 568c6f049ad4a20918afeb2db9bb7a15b17d9ff2. crash load 5.12 before vmcore, parse section_size_bits equals 27, but it should be equals 30. because defined "CONFIG_ARM64_4K_PAGES", The commit "568c6f04" for compat android gki, so we should cleanup. Exp: Before: crash vmcore vmlinux -d1 ... xtime timespec.tv_sec: 603549d0: Wed Feb 24 02:30:40 CST 2021 utsname: sysname: Linux nodename: localhost release: 4.14.180-perf-g4483caa8ae80-dirty version: #1 SMP PREEMPT Wed Feb 24 03:16:01 CST 2021 machine: aarch64 domainname: localdomain ... SECTION_SIZE_BITS: 27 ... After: crash vmcore vmlinux -d1 ... xtime timespec.tv_sec: 603549d0: Wed Feb 24 02:30:40 CST 2021 utsname: sysname: Linux nodename: localhost release: 4.14.180-perf-g4483caa8ae80-dirty version: #1 SMP PREEMPT Wed Feb 24 03:16:01 CST 2021 machine: aarch64 domainname: localdomain ... SECTION_SIZE_BITS: 30 ... Signed-off-by: chenguanyou <chenguanyou@xxxxxxxxxx> --- arm64.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/arm64.c b/arm64.c index 06e7451..05ffdb3 100644 --- a/arm64.c +++ b/arm64.c @@ -1698,14 +1698,7 @@ arm64_get_section_size_bits(void) if ((ret = get_kernel_config("CONFIG_MEMORY_HOTPLUG", NULL)) == IKCONFIG_Y) { if ((ret = get_kernel_config("CONFIG_HOTPLUG_SIZE_BITS", &string)) == IKCONFIG_STR) machdep->section_size_bits = atol(string); - } - - /* arm64: reduce section size for sparsemem */ - if ((ret = get_kernel_config("CONFIG_ARM64_4K_PAGES", NULL)) == IKCONFIG_Y - || (ret = get_kernel_config("CONFIG_ARM64_16K_PAGES", NULL)) == IKCONFIG_Y) - machdep->section_size_bits = _SECTION_SIZE_BITS_5_12; - else if ((ret = get_kernel_config("CONFIG_ARM64_64K_PAGES", NULL)) == IKCONFIG_Y) - machdep->section_size_bits = _SECTION_SIZE_BITS_5_12_64K; + } } if (CRASHDEBUG(1)) -- 2.39.0
-- Crash-utility mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxxxxxx https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/ Contribution Guidelines: https://github.com/crash-utility/crash/wiki