diff for duplicates of <YmoPhvkXQFZQOcIO@MiWiFi-R3L-srv> diff --git a/a/1.txt b/N1/1.txt index 5b1955a..7a84715 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -94,160 +94,3 @@ Sorry, forgot attaching the draft patch. By the way, we can also have a simple version with basic ,high, ,low support, no fallback. We can add fallback and other optimization later. This can be plan B. - - --------------- next part -------------- -diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c -index 4a8200f29b35..aa1fbea47c46 100644 ---- a/arch/arm64/mm/init.c -+++ b/arch/arm64/mm/init.c -@@ -84,11 +84,7 @@ EXPORT_SYMBOL(memstart_addr); - * Note: Page-granularity mappings are necessary for crash kernel memory - * range for shrinking its size via /sys/kernel/kexec_crash_size interface. - */ --#if IS_ENABLED(CONFIG_ZONE_DMA) || IS_ENABLED(CONFIG_ZONE_DMA32) - phys_addr_t __ro_after_init arm64_dma_phys_limit; --#else --phys_addr_t __ro_after_init arm64_dma_phys_limit = PHYS_MASK + 1; --#endif - - bool crash_low_mem_page_map __initdata; - static bool crash_high_mem_reserved __initdata; -@@ -132,63 +128,6 @@ static int __init reserve_crashkernel_low(unsigned long long low_size) - return 0; - } - --static void __init reserve_crashkernel_high(void) --{ -- unsigned long long crash_base, crash_size; -- char *cmdline = boot_command_line; -- int ret; -- -- if (!IS_ENABLED(CONFIG_KEXEC_CORE)) -- return; -- -- /* crashkernel=X[@offset] */ -- ret = parse_crashkernel(cmdline, memblock_phys_mem_size(), -- &crash_size, &crash_base); -- if (ret || !crash_size) { -- ret = parse_crashkernel_high(cmdline, 0, &crash_size, &crash_base); -- if (ret || !crash_size) -- return; -- } else if (!crash_base) { -- crash_low_mem_page_map = true; -- } -- -- crash_size = PAGE_ALIGN(crash_size); -- -- /* -- * For the case crashkernel=X, may fall back to reserve memory above -- * 4G, make reservations here in advance. It will be released later if -- * the region is successfully reserved under 4G. -- */ -- if (!crash_base) { -- crash_base = memblock_phys_alloc_range(crash_size, CRASH_ALIGN, -- crash_base, CRASH_ADDR_HIGH_MAX); -- if (!crash_base) -- return; -- -- crash_high_mem_reserved = true; -- } -- -- /* Mark the memory range that requires page-level mappings */ -- crashk_res.start = crash_base; -- crashk_res.end = crash_base + crash_size - 1; --} -- --static void __init hand_over_reserved_high_mem(void) --{ -- crashk_res_high.start = crashk_res.start; -- crashk_res_high.end = crashk_res.end; -- -- crashk_res.start = 0; -- crashk_res.end = 0; --} -- --static void __init take_reserved_high_mem(unsigned long long *crash_base, -- unsigned long long *crash_size) --{ -- *crash_base = crashk_res_high.start; -- *crash_size = resource_size(&crashk_res_high); --} -- - static void __init free_reserved_high_mem(void) - { - memblock_phys_free(crashk_res_high.start, resource_size(&crashk_res_high)); -@@ -225,7 +164,8 @@ static void __init reserve_crashkernel(void) - if (!IS_ENABLED(CONFIG_KEXEC_CORE)) - return; - -- hand_over_reserved_high_mem(); -+ if (crashk_res.end) -+ return; - - /* crashkernel=X[@offset] */ - ret = parse_crashkernel(cmdline, memblock_phys_mem_size(), -@@ -245,11 +185,6 @@ static void __init reserve_crashkernel(void) - - high = true; - crash_max = CRASH_ADDR_HIGH_MAX; -- -- if (crash_high_mem_reserved) { -- take_reserved_high_mem(&crash_base, &crash_size); -- goto reserve_low; -- } - } - - fixed_base = !!crash_base; -@@ -267,12 +202,8 @@ static void __init reserve_crashkernel(void) - * to high memory, the minimum required low memory will be - * reserved later. - */ -- if (!fixed_base && (crash_max == CRASH_ADDR_LOW_MAX)) { -- if (crash_high_mem_reserved) { -- take_reserved_high_mem(&crash_base, &crash_size); -- goto reserve_low; -- } -- -+ if (!fixed_base && (crash_max == CRASH_ADDR_LOW_MAX -+ && crash_max <CRASH_ADDR_HIGH_MAX)) { - crash_max = CRASH_ADDR_HIGH_MAX; - goto retry; - } -@@ -289,7 +220,7 @@ static void __init reserve_crashkernel(void) - * description of "crashkernel=X,high" option, add below 'high' - * condition to make sure the crash low memory will be reserved. - */ -- if ((crash_base >= CRASH_ADDR_LOW_MAX) || high) { -+ if (crash_base >= CRASH_ADDR_LOW_MAX ) { - reserve_low: - /* case #3 of crashkernel,low reservation */ - if (!high) -@@ -299,14 +230,7 @@ static void __init reserve_crashkernel(void) - memblock_phys_free(crash_base, crash_size); - return; - } -- } else if (crash_high_mem_reserved) { -- /* -- * The crash memory is successfully allocated under 4G, and the -- * previously reserved high memory is no longer required. -- */ -- free_reserved_high_mem(); - } -- - pr_info("crashkernel reserved: 0x%016llx - 0x%016llx (%lld MB)\n", - crash_base, crash_base + crash_size, crash_size >> 20); - -@@ -520,10 +444,10 @@ void __init arm64_memblock_init(void) - - early_init_fdt_scan_reserved_mem(); - -+ arm64_dma_phys_limit = memblock_end_of_DRAM(); -+ - if (!IS_ENABLED(CONFIG_ZONE_DMA) && !IS_ENABLED(CONFIG_ZONE_DMA32)) - reserve_crashkernel(); -- else -- reserve_crashkernel_high(); - - high_memory = __va(memblock_end_of_DRAM() - 1) + 1; - } diff --git a/N1/2.hdr b/N1/2.hdr new file mode 100644 index 0000000..f865ebc --- /dev/null +++ b/N1/2.hdr @@ -0,0 +1,2 @@ +Content-Type: text/plain; charset=us-ascii +Content-Disposition: attachment; filename="diff.patch" diff --git a/N1/2.txt b/N1/2.txt new file mode 100644 index 0000000..4e249a8 --- /dev/null +++ b/N1/2.txt @@ -0,0 +1,154 @@ +diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c +index 4a8200f29b35..aa1fbea47c46 100644 +--- a/arch/arm64/mm/init.c ++++ b/arch/arm64/mm/init.c +@@ -84,11 +84,7 @@ EXPORT_SYMBOL(memstart_addr); + * Note: Page-granularity mappings are necessary for crash kernel memory + * range for shrinking its size via /sys/kernel/kexec_crash_size interface. + */ +-#if IS_ENABLED(CONFIG_ZONE_DMA) || IS_ENABLED(CONFIG_ZONE_DMA32) + phys_addr_t __ro_after_init arm64_dma_phys_limit; +-#else +-phys_addr_t __ro_after_init arm64_dma_phys_limit = PHYS_MASK + 1; +-#endif + + bool crash_low_mem_page_map __initdata; + static bool crash_high_mem_reserved __initdata; +@@ -132,63 +128,6 @@ static int __init reserve_crashkernel_low(unsigned long long low_size) + return 0; + } + +-static void __init reserve_crashkernel_high(void) +-{ +- unsigned long long crash_base, crash_size; +- char *cmdline = boot_command_line; +- int ret; +- +- if (!IS_ENABLED(CONFIG_KEXEC_CORE)) +- return; +- +- /* crashkernel=X[@offset] */ +- ret = parse_crashkernel(cmdline, memblock_phys_mem_size(), +- &crash_size, &crash_base); +- if (ret || !crash_size) { +- ret = parse_crashkernel_high(cmdline, 0, &crash_size, &crash_base); +- if (ret || !crash_size) +- return; +- } else if (!crash_base) { +- crash_low_mem_page_map = true; +- } +- +- crash_size = PAGE_ALIGN(crash_size); +- +- /* +- * For the case crashkernel=X, may fall back to reserve memory above +- * 4G, make reservations here in advance. It will be released later if +- * the region is successfully reserved under 4G. +- */ +- if (!crash_base) { +- crash_base = memblock_phys_alloc_range(crash_size, CRASH_ALIGN, +- crash_base, CRASH_ADDR_HIGH_MAX); +- if (!crash_base) +- return; +- +- crash_high_mem_reserved = true; +- } +- +- /* Mark the memory range that requires page-level mappings */ +- crashk_res.start = crash_base; +- crashk_res.end = crash_base + crash_size - 1; +-} +- +-static void __init hand_over_reserved_high_mem(void) +-{ +- crashk_res_high.start = crashk_res.start; +- crashk_res_high.end = crashk_res.end; +- +- crashk_res.start = 0; +- crashk_res.end = 0; +-} +- +-static void __init take_reserved_high_mem(unsigned long long *crash_base, +- unsigned long long *crash_size) +-{ +- *crash_base = crashk_res_high.start; +- *crash_size = resource_size(&crashk_res_high); +-} +- + static void __init free_reserved_high_mem(void) + { + memblock_phys_free(crashk_res_high.start, resource_size(&crashk_res_high)); +@@ -225,7 +164,8 @@ static void __init reserve_crashkernel(void) + if (!IS_ENABLED(CONFIG_KEXEC_CORE)) + return; + +- hand_over_reserved_high_mem(); ++ if (crashk_res.end) ++ return; + + /* crashkernel=X[@offset] */ + ret = parse_crashkernel(cmdline, memblock_phys_mem_size(), +@@ -245,11 +185,6 @@ static void __init reserve_crashkernel(void) + + high = true; + crash_max = CRASH_ADDR_HIGH_MAX; +- +- if (crash_high_mem_reserved) { +- take_reserved_high_mem(&crash_base, &crash_size); +- goto reserve_low; +- } + } + + fixed_base = !!crash_base; +@@ -267,12 +202,8 @@ static void __init reserve_crashkernel(void) + * to high memory, the minimum required low memory will be + * reserved later. + */ +- if (!fixed_base && (crash_max == CRASH_ADDR_LOW_MAX)) { +- if (crash_high_mem_reserved) { +- take_reserved_high_mem(&crash_base, &crash_size); +- goto reserve_low; +- } +- ++ if (!fixed_base && (crash_max == CRASH_ADDR_LOW_MAX ++ && crash_max <CRASH_ADDR_HIGH_MAX)) { + crash_max = CRASH_ADDR_HIGH_MAX; + goto retry; + } +@@ -289,7 +220,7 @@ static void __init reserve_crashkernel(void) + * description of "crashkernel=X,high" option, add below 'high' + * condition to make sure the crash low memory will be reserved. + */ +- if ((crash_base >= CRASH_ADDR_LOW_MAX) || high) { ++ if (crash_base >= CRASH_ADDR_LOW_MAX ) { + reserve_low: + /* case #3 of crashkernel,low reservation */ + if (!high) +@@ -299,14 +230,7 @@ static void __init reserve_crashkernel(void) + memblock_phys_free(crash_base, crash_size); + return; + } +- } else if (crash_high_mem_reserved) { +- /* +- * The crash memory is successfully allocated under 4G, and the +- * previously reserved high memory is no longer required. +- */ +- free_reserved_high_mem(); + } +- + pr_info("crashkernel reserved: 0x%016llx - 0x%016llx (%lld MB)\n", + crash_base, crash_base + crash_size, crash_size >> 20); + +@@ -520,10 +444,10 @@ void __init arm64_memblock_init(void) + + early_init_fdt_scan_reserved_mem(); + ++ arm64_dma_phys_limit = memblock_end_of_DRAM(); ++ + if (!IS_ENABLED(CONFIG_ZONE_DMA) && !IS_ENABLED(CONFIG_ZONE_DMA32)) + reserve_crashkernel(); +- else +- reserve_crashkernel_high(); + + high_memory = __va(memblock_end_of_DRAM() - 1) + 1; + } diff --git a/a/content_digest b/N1/content_digest index 3cc9dc6..045e7ef 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -7,10 +7,34 @@ "ref\0YmlphvZVMsGfFksp@arm.com\0" "ref\0YmoMvV1wzHT5V1aw@MiWiFi-R3L-srv\0" "From\0Baoquan He <bhe@redhat.com>\0" - "Subject\0[PATCH v22 5/9] arm64: kdump: Reimplement crashkernel=X\0" + "Subject\0Re: [PATCH v22 5/9] arm64: kdump: Reimplement crashkernel=X\0" "Date\0Thu, 28 Apr 2022 11:52:38 +0800\0" - "To\0kexec@lists.infradead.org\0" - "\00:1\0" + "To\0Catalin Marinas <catalin.marinas@arm.com>" + " Leizhen (ThunderTown) <thunder.leizhen@huawei.com>\0" + "Cc\0Thomas Gleixner <tglx@linutronix.de>" + Ingo Molnar <mingo@redhat.com> + Borislav Petkov <bp@alien8.de> + x86@kernel.org + H . Peter Anvin <hpa@zytor.com> + linux-kernel@vger.kernel.org + Dave Young <dyoung@redhat.com> + Vivek Goyal <vgoyal@redhat.com> + Eric Biederman <ebiederm@xmission.com> + kexec@lists.infradead.org + Will Deacon <will@kernel.org> + linux-arm-kernel@lists.infradead.org + Rob Herring <robh+dt@kernel.org> + Frank Rowand <frowand.list@gmail.com> + devicetree@vger.kernel.org + Jonathan Corbet <corbet@lwn.net> + linux-doc@vger.kernel.org + Randy Dunlap <rdunlap@infradead.org> + Feng Zhou <zhoufeng.zf@bytedance.com> + Kefeng Wang <wangkefeng.wang@huawei.com> + Chen Zhou <dingguo.cz@antgroup.com> + John Donnelly <John.p.donnelly@oracle.com> + " Dave Kleikamp <dave.kleikamp@oracle.com>\0" + "\01:1\0" "b\0" "On 04/28/22 at 11:40am, Baoquan He wrote:\n" "> Hi Catalin, Zhen Lei,\n" @@ -107,10 +131,10 @@ "\n" "By the way, we can also have a simple version with basic ,high, ,low\n" "support, no fallback. We can add fallback and other optimization later.\n" - "This can be plan B.\n" - "\n" - "\n" - "-------------- next part --------------\n" + This can be plan B. + "\01:2\0" + "fn\0diff.patch\0" + "b\0" "diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c\n" "index 4a8200f29b35..aa1fbea47c46 100644\n" "--- a/arch/arm64/mm/init.c\n" @@ -266,4 +290,4 @@ " \thigh_memory = __va(memblock_end_of_DRAM() - 1) + 1;\n" } -31238dc914bff0fd5075232d6e2bb1225f47c05a38c727194a067d9ddcbe19d2 +c9c4b3f5f3c391e41e62e1280d87927f844caae49a8eef151c3887341dc3eaef
diff --git a/a/1.txt b/N2/1.txt index 5b1955a..7a84715 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -94,160 +94,3 @@ Sorry, forgot attaching the draft patch. By the way, we can also have a simple version with basic ,high, ,low support, no fallback. We can add fallback and other optimization later. This can be plan B. - - --------------- next part -------------- -diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c -index 4a8200f29b35..aa1fbea47c46 100644 ---- a/arch/arm64/mm/init.c -+++ b/arch/arm64/mm/init.c -@@ -84,11 +84,7 @@ EXPORT_SYMBOL(memstart_addr); - * Note: Page-granularity mappings are necessary for crash kernel memory - * range for shrinking its size via /sys/kernel/kexec_crash_size interface. - */ --#if IS_ENABLED(CONFIG_ZONE_DMA) || IS_ENABLED(CONFIG_ZONE_DMA32) - phys_addr_t __ro_after_init arm64_dma_phys_limit; --#else --phys_addr_t __ro_after_init arm64_dma_phys_limit = PHYS_MASK + 1; --#endif - - bool crash_low_mem_page_map __initdata; - static bool crash_high_mem_reserved __initdata; -@@ -132,63 +128,6 @@ static int __init reserve_crashkernel_low(unsigned long long low_size) - return 0; - } - --static void __init reserve_crashkernel_high(void) --{ -- unsigned long long crash_base, crash_size; -- char *cmdline = boot_command_line; -- int ret; -- -- if (!IS_ENABLED(CONFIG_KEXEC_CORE)) -- return; -- -- /* crashkernel=X[@offset] */ -- ret = parse_crashkernel(cmdline, memblock_phys_mem_size(), -- &crash_size, &crash_base); -- if (ret || !crash_size) { -- ret = parse_crashkernel_high(cmdline, 0, &crash_size, &crash_base); -- if (ret || !crash_size) -- return; -- } else if (!crash_base) { -- crash_low_mem_page_map = true; -- } -- -- crash_size = PAGE_ALIGN(crash_size); -- -- /* -- * For the case crashkernel=X, may fall back to reserve memory above -- * 4G, make reservations here in advance. It will be released later if -- * the region is successfully reserved under 4G. -- */ -- if (!crash_base) { -- crash_base = memblock_phys_alloc_range(crash_size, CRASH_ALIGN, -- crash_base, CRASH_ADDR_HIGH_MAX); -- if (!crash_base) -- return; -- -- crash_high_mem_reserved = true; -- } -- -- /* Mark the memory range that requires page-level mappings */ -- crashk_res.start = crash_base; -- crashk_res.end = crash_base + crash_size - 1; --} -- --static void __init hand_over_reserved_high_mem(void) --{ -- crashk_res_high.start = crashk_res.start; -- crashk_res_high.end = crashk_res.end; -- -- crashk_res.start = 0; -- crashk_res.end = 0; --} -- --static void __init take_reserved_high_mem(unsigned long long *crash_base, -- unsigned long long *crash_size) --{ -- *crash_base = crashk_res_high.start; -- *crash_size = resource_size(&crashk_res_high); --} -- - static void __init free_reserved_high_mem(void) - { - memblock_phys_free(crashk_res_high.start, resource_size(&crashk_res_high)); -@@ -225,7 +164,8 @@ static void __init reserve_crashkernel(void) - if (!IS_ENABLED(CONFIG_KEXEC_CORE)) - return; - -- hand_over_reserved_high_mem(); -+ if (crashk_res.end) -+ return; - - /* crashkernel=X[@offset] */ - ret = parse_crashkernel(cmdline, memblock_phys_mem_size(), -@@ -245,11 +185,6 @@ static void __init reserve_crashkernel(void) - - high = true; - crash_max = CRASH_ADDR_HIGH_MAX; -- -- if (crash_high_mem_reserved) { -- take_reserved_high_mem(&crash_base, &crash_size); -- goto reserve_low; -- } - } - - fixed_base = !!crash_base; -@@ -267,12 +202,8 @@ static void __init reserve_crashkernel(void) - * to high memory, the minimum required low memory will be - * reserved later. - */ -- if (!fixed_base && (crash_max == CRASH_ADDR_LOW_MAX)) { -- if (crash_high_mem_reserved) { -- take_reserved_high_mem(&crash_base, &crash_size); -- goto reserve_low; -- } -- -+ if (!fixed_base && (crash_max == CRASH_ADDR_LOW_MAX -+ && crash_max <CRASH_ADDR_HIGH_MAX)) { - crash_max = CRASH_ADDR_HIGH_MAX; - goto retry; - } -@@ -289,7 +220,7 @@ static void __init reserve_crashkernel(void) - * description of "crashkernel=X,high" option, add below 'high' - * condition to make sure the crash low memory will be reserved. - */ -- if ((crash_base >= CRASH_ADDR_LOW_MAX) || high) { -+ if (crash_base >= CRASH_ADDR_LOW_MAX ) { - reserve_low: - /* case #3 of crashkernel,low reservation */ - if (!high) -@@ -299,14 +230,7 @@ static void __init reserve_crashkernel(void) - memblock_phys_free(crash_base, crash_size); - return; - } -- } else if (crash_high_mem_reserved) { -- /* -- * The crash memory is successfully allocated under 4G, and the -- * previously reserved high memory is no longer required. -- */ -- free_reserved_high_mem(); - } -- - pr_info("crashkernel reserved: 0x%016llx - 0x%016llx (%lld MB)\n", - crash_base, crash_base + crash_size, crash_size >> 20); - -@@ -520,10 +444,10 @@ void __init arm64_memblock_init(void) - - early_init_fdt_scan_reserved_mem(); - -+ arm64_dma_phys_limit = memblock_end_of_DRAM(); -+ - if (!IS_ENABLED(CONFIG_ZONE_DMA) && !IS_ENABLED(CONFIG_ZONE_DMA32)) - reserve_crashkernel(); -- else -- reserve_crashkernel_high(); - - high_memory = __va(memblock_end_of_DRAM() - 1) + 1; - } diff --git a/N2/2.hdr b/N2/2.hdr new file mode 100644 index 0000000..f865ebc --- /dev/null +++ b/N2/2.hdr @@ -0,0 +1,2 @@ +Content-Type: text/plain; charset=us-ascii +Content-Disposition: attachment; filename="diff.patch" diff --git a/N2/2.txt b/N2/2.txt new file mode 100644 index 0000000..4e249a8 --- /dev/null +++ b/N2/2.txt @@ -0,0 +1,154 @@ +diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c +index 4a8200f29b35..aa1fbea47c46 100644 +--- a/arch/arm64/mm/init.c ++++ b/arch/arm64/mm/init.c +@@ -84,11 +84,7 @@ EXPORT_SYMBOL(memstart_addr); + * Note: Page-granularity mappings are necessary for crash kernel memory + * range for shrinking its size via /sys/kernel/kexec_crash_size interface. + */ +-#if IS_ENABLED(CONFIG_ZONE_DMA) || IS_ENABLED(CONFIG_ZONE_DMA32) + phys_addr_t __ro_after_init arm64_dma_phys_limit; +-#else +-phys_addr_t __ro_after_init arm64_dma_phys_limit = PHYS_MASK + 1; +-#endif + + bool crash_low_mem_page_map __initdata; + static bool crash_high_mem_reserved __initdata; +@@ -132,63 +128,6 @@ static int __init reserve_crashkernel_low(unsigned long long low_size) + return 0; + } + +-static void __init reserve_crashkernel_high(void) +-{ +- unsigned long long crash_base, crash_size; +- char *cmdline = boot_command_line; +- int ret; +- +- if (!IS_ENABLED(CONFIG_KEXEC_CORE)) +- return; +- +- /* crashkernel=X[@offset] */ +- ret = parse_crashkernel(cmdline, memblock_phys_mem_size(), +- &crash_size, &crash_base); +- if (ret || !crash_size) { +- ret = parse_crashkernel_high(cmdline, 0, &crash_size, &crash_base); +- if (ret || !crash_size) +- return; +- } else if (!crash_base) { +- crash_low_mem_page_map = true; +- } +- +- crash_size = PAGE_ALIGN(crash_size); +- +- /* +- * For the case crashkernel=X, may fall back to reserve memory above +- * 4G, make reservations here in advance. It will be released later if +- * the region is successfully reserved under 4G. +- */ +- if (!crash_base) { +- crash_base = memblock_phys_alloc_range(crash_size, CRASH_ALIGN, +- crash_base, CRASH_ADDR_HIGH_MAX); +- if (!crash_base) +- return; +- +- crash_high_mem_reserved = true; +- } +- +- /* Mark the memory range that requires page-level mappings */ +- crashk_res.start = crash_base; +- crashk_res.end = crash_base + crash_size - 1; +-} +- +-static void __init hand_over_reserved_high_mem(void) +-{ +- crashk_res_high.start = crashk_res.start; +- crashk_res_high.end = crashk_res.end; +- +- crashk_res.start = 0; +- crashk_res.end = 0; +-} +- +-static void __init take_reserved_high_mem(unsigned long long *crash_base, +- unsigned long long *crash_size) +-{ +- *crash_base = crashk_res_high.start; +- *crash_size = resource_size(&crashk_res_high); +-} +- + static void __init free_reserved_high_mem(void) + { + memblock_phys_free(crashk_res_high.start, resource_size(&crashk_res_high)); +@@ -225,7 +164,8 @@ static void __init reserve_crashkernel(void) + if (!IS_ENABLED(CONFIG_KEXEC_CORE)) + return; + +- hand_over_reserved_high_mem(); ++ if (crashk_res.end) ++ return; + + /* crashkernel=X[@offset] */ + ret = parse_crashkernel(cmdline, memblock_phys_mem_size(), +@@ -245,11 +185,6 @@ static void __init reserve_crashkernel(void) + + high = true; + crash_max = CRASH_ADDR_HIGH_MAX; +- +- if (crash_high_mem_reserved) { +- take_reserved_high_mem(&crash_base, &crash_size); +- goto reserve_low; +- } + } + + fixed_base = !!crash_base; +@@ -267,12 +202,8 @@ static void __init reserve_crashkernel(void) + * to high memory, the minimum required low memory will be + * reserved later. + */ +- if (!fixed_base && (crash_max == CRASH_ADDR_LOW_MAX)) { +- if (crash_high_mem_reserved) { +- take_reserved_high_mem(&crash_base, &crash_size); +- goto reserve_low; +- } +- ++ if (!fixed_base && (crash_max == CRASH_ADDR_LOW_MAX ++ && crash_max <CRASH_ADDR_HIGH_MAX)) { + crash_max = CRASH_ADDR_HIGH_MAX; + goto retry; + } +@@ -289,7 +220,7 @@ static void __init reserve_crashkernel(void) + * description of "crashkernel=X,high" option, add below 'high' + * condition to make sure the crash low memory will be reserved. + */ +- if ((crash_base >= CRASH_ADDR_LOW_MAX) || high) { ++ if (crash_base >= CRASH_ADDR_LOW_MAX ) { + reserve_low: + /* case #3 of crashkernel,low reservation */ + if (!high) +@@ -299,14 +230,7 @@ static void __init reserve_crashkernel(void) + memblock_phys_free(crash_base, crash_size); + return; + } +- } else if (crash_high_mem_reserved) { +- /* +- * The crash memory is successfully allocated under 4G, and the +- * previously reserved high memory is no longer required. +- */ +- free_reserved_high_mem(); + } +- + pr_info("crashkernel reserved: 0x%016llx - 0x%016llx (%lld MB)\n", + crash_base, crash_base + crash_size, crash_size >> 20); + +@@ -520,10 +444,10 @@ void __init arm64_memblock_init(void) + + early_init_fdt_scan_reserved_mem(); + ++ arm64_dma_phys_limit = memblock_end_of_DRAM(); ++ + if (!IS_ENABLED(CONFIG_ZONE_DMA) && !IS_ENABLED(CONFIG_ZONE_DMA32)) + reserve_crashkernel(); +- else +- reserve_crashkernel_high(); + + high_memory = __va(memblock_end_of_DRAM() - 1) + 1; + } diff --git a/N2/3.hdr b/N2/3.hdr new file mode 100644 index 0000000..4b86001 --- /dev/null +++ b/N2/3.hdr @@ -0,0 +1,4 @@ +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Content-Disposition: inline diff --git a/N2/3.txt b/N2/3.txt new file mode 100644 index 0000000..8133cf0 --- /dev/null +++ b/N2/3.txt @@ -0,0 +1,4 @@ +_______________________________________________ +linux-arm-kernel mailing list +linux-arm-kernel@lists.infradead.org +http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/a/content_digest b/N2/content_digest index 3cc9dc6..a9f344a 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -7,10 +7,34 @@ "ref\0YmlphvZVMsGfFksp@arm.com\0" "ref\0YmoMvV1wzHT5V1aw@MiWiFi-R3L-srv\0" "From\0Baoquan He <bhe@redhat.com>\0" - "Subject\0[PATCH v22 5/9] arm64: kdump: Reimplement crashkernel=X\0" + "Subject\0Re: [PATCH v22 5/9] arm64: kdump: Reimplement crashkernel=X\0" "Date\0Thu, 28 Apr 2022 11:52:38 +0800\0" - "To\0kexec@lists.infradead.org\0" - "\00:1\0" + "To\0Catalin Marinas <catalin.marinas@arm.com>" + " Leizhen (ThunderTown) <thunder.leizhen@huawei.com>\0" + "Cc\0Thomas Gleixner <tglx@linutronix.de>" + Ingo Molnar <mingo@redhat.com> + Borislav Petkov <bp@alien8.de> + x86@kernel.org + H . Peter Anvin <hpa@zytor.com> + linux-kernel@vger.kernel.org + Dave Young <dyoung@redhat.com> + Vivek Goyal <vgoyal@redhat.com> + Eric Biederman <ebiederm@xmission.com> + kexec@lists.infradead.org + Will Deacon <will@kernel.org> + linux-arm-kernel@lists.infradead.org + Rob Herring <robh+dt@kernel.org> + Frank Rowand <frowand.list@gmail.com> + devicetree@vger.kernel.org + Jonathan Corbet <corbet@lwn.net> + linux-doc@vger.kernel.org + Randy Dunlap <rdunlap@infradead.org> + Feng Zhou <zhoufeng.zf@bytedance.com> + Kefeng Wang <wangkefeng.wang@huawei.com> + Chen Zhou <dingguo.cz@antgroup.com> + John Donnelly <John.p.donnelly@oracle.com> + " Dave Kleikamp <dave.kleikamp@oracle.com>\0" + "\01:1\0" "b\0" "On 04/28/22 at 11:40am, Baoquan He wrote:\n" "> Hi Catalin, Zhen Lei,\n" @@ -107,10 +131,10 @@ "\n" "By the way, we can also have a simple version with basic ,high, ,low\n" "support, no fallback. We can add fallback and other optimization later.\n" - "This can be plan B.\n" - "\n" - "\n" - "-------------- next part --------------\n" + This can be plan B. + "\01:2\0" + "fn\0diff.patch\0" + "b\0" "diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c\n" "index 4a8200f29b35..aa1fbea47c46 100644\n" "--- a/arch/arm64/mm/init.c\n" @@ -265,5 +289,11 @@ " \n" " \thigh_memory = __va(memblock_end_of_DRAM() - 1) + 1;\n" } + "\01:3\0" + "b\0" + "_______________________________________________\n" + "linux-arm-kernel mailing list\n" + "linux-arm-kernel@lists.infradead.org\n" + http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -31238dc914bff0fd5075232d6e2bb1225f47c05a38c727194a067d9ddcbe19d2 +1a56196d3cb1bbaf80878fa27b961b5e1a7a36586d4bcfe8c5c81e524377b6b3
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.