Re: [PATCH v3 3/7] crash: Let arch decide usable memory range in reserved area

2025-01-31 Thread Baoquan he
ific APIs for memory hole allocation are done in a > subsequent patch titled "powerpc/crash: Use generic APIs to locate > memory hole for kdump. > > Cc: Andrew Morton > Cc: Baoquan he > Cc: Hari Bathini > Cc: Madhavan Srinivasan > Cc: Mahesh Salgaonka

Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-12 Thread Baoquan He
quot;kexec_load_disabled", > .data = &kexec_load_disabled, For the kexec/kdump part, Acked-by: Baoquan He ..

Re: [PATCH RESEND v1 5/5] crash: option to let arch decide mem range is usable

2025-01-08 Thread Baoquan he
On 01/08/25 at 03:44pm, Sourabh Jain wrote: ...snip... > diff --git a/include/linux/kexec.h b/include/linux/kexec.h > index f0e9f8eda7a3..407f8b0346aa 100644 > --- a/include/linux/kexec.h > +++ b/include/linux/kexec.h > @@ -205,6 +205,15 @@ static inline int > arch_kimage_file_post_load_cleanup(st

Re: [PATCH RESEND v1 2/5] crash: let arch decide crash memory export to iomem_resource

2025-01-08 Thread Baoquan he
Hi, On 01/08/25 at 03:44pm, Sourabh Jain wrote: > insert_crashkernel_resources() adds crash memory to iomem_resource if > generic crashkernel reservation is enabled on an architecture. > > On PowerPC, system RAM is added to iomem_resource. See commit > c40dd2f766440 ("powerpc: Add System RAM to /

Re: [PATCH RESEND v1 1/5] crash: remove an unused argument from reserve_crashkernel_generic()

2025-01-08 Thread Baoquan he
On 01/08/25 at 03:44pm, Sourabh Jain wrote: > cmdline argument is not used in reserve_crashkernel_generic() so remove > it. Correspondingly, all the callers have been updated as well. > > No functional change intended. > > Cc: Andrew Morton > Cc: Baoquan he > Cc: Hari

Re: [PATCH v2 0/5] elf: Define note name macros

2025-01-05 Thread Baoquan He
ps://lore.kernel.org/r/20241225-elf-v1-1-79e940350...@daynix.com The entire patchset looks good to me, thx. Acked-by: Baoquan He

Re: [PATCH v2 1/5] elf: Define note name macros

2025-01-05 Thread Baoquan He
On 01/06/25 at 02:07pm, Akihiko Odaki wrote: > On 2025/01/06 11:21, Baoquan He wrote: > > On 01/04/25 at 11:38pm, Akihiko Odaki wrote: > > > elf.h had a comment saying: > > > > Notes used in ET_CORE. Architectures export some of the arch register > > > > s

Re: [PATCH v2 1/5] elf: Define note name macros

2025-01-05 Thread Baoquan He
On 01/04/25 at 11:38pm, Akihiko Odaki wrote: > elf.h had a comment saying: > > Notes used in ET_CORE. Architectures export some of the arch register > > sets using the corresponding note types via the PTRACE_GETREGSET and > > PTRACE_SETREGSET requests. > > The note name for these types is "LINUX",

Re: [PATCH] kexec: Initialize ELF lowest address to ULONG_MAX

2024-12-11 Thread Baoquan he
as the > returned lowest PT_LOAD address would be invalid. This is resolved by > initializing lowest_addr to ULONG_MAX instead. > > This issue was discovered while implementing crashkernel high/low > reservation on the PowerPC architecture. > > Fixes: a0458284f062 ("powerpc:

Re: [PATCH v2] crash, powerpc: Default to CRASH_DUMP=n on PPC_BOOK3S_32

2024-11-12 Thread Baoquan He
Hi Andrew, On 09/19/24 at 10:57am, Baoquan He wrote: > On 09/17/24 at 12:37pm, Dave Vasilevsky wrote: > > Fixes boot failures on 6.9 on PPC_BOOK3S_32 machines using > > Open Firmware. On these machines, the kernel refuses to boot > > from non-zero PHYSICAL_START, which occu

Re: [PATCH v2] crash, powerpc: Default to CRASH_DUMP=n on PPC_BOOK3S_32

2024-09-19 Thread Baoquan He
/Kconfig | 3 +++ > arch/powerpc/Kconfig | 4 > arch/riscv/Kconfig | 3 +++ > arch/s390/Kconfig | 3 +++ > arch/sh/Kconfig| 3 +++ > arch/x86/Kconfig | 3 +++ > kernel/Kconfig.kexec | 2 +- > 10 files changed, 29 insertions(+), 1 deletion(-) T

Re: [PATCH RESEND v2] kexec/crash: no crash update when kexec in progress

2024-09-12 Thread Baoquan He
On 09/12/24 at 01:33pm, Sourabh Jain wrote: > Hello Baoquan, > > On 11/09/24 19:50, Baoquan He wrote: > > On 09/11/24 at 04:51pm, Sourabh Jain wrote: > > > The following errors are observed when kexec is done with SMT=off on > > > powerpc. > > > &

Re: [PATCH RESEND v2] kexec/crash: no crash update when kexec in progress

2024-09-11 Thread Baoquan He
s to the crash_check_hotplug_support() function. Return > 0 if kexec is in progress because kernel is not in a position to update > the kdump image. LGTM, thanks. Acked-by: Baoquan he > > Cc: Hari Bathini > Cc: Michael Ellerman > Cc: ke...@lists.infradead.org > Cc: linuxppc

Re: [PATCH] kexec/crash: no crash update when kexec in progress

2024-09-08 Thread Baoquan He
On 09/09/24 at 10:35am, Sourabh Jain wrote: > > > On 08/09/24 16:00, Baoquan He wrote: > > On 09/05/24 at 02:07pm, Sourabh Jain wrote: > > > Hello Baoquan, > > > > > > On 05/09/24 08:53, Baoquan He wrote: > > > > On 09/04/24 a

Re: [PATCH] crash: Default to CRASH_DUMP=n when support for it is unlikely

2024-09-08 Thread Baoquan He
On 09/08/24 at 03:57pm, Dave Vasilevsky wrote: > I received a notification from Patchwork that my patch is now in the state > "Handled Elsewhere".[0] Does that mean someone merged it somewhere? Or that I > should be using a different mailing list? Or something else? I guess it's powerpc dev's pa

Re: [PATCH] kexec/crash: no crash update when kexec in progress

2024-09-08 Thread Baoquan He
On 09/05/24 at 02:07pm, Sourabh Jain wrote: > Hello Baoquan, > > On 05/09/24 08:53, Baoquan He wrote: > > On 09/04/24 at 02:55pm, Sourabh Jain wrote: > > > Hello Baoquan, > > > > > > On 30/08/24 16:47, Baoquan He wrote: > > > > On 08/20/24 a

Re: [PATCH] [RFC] crash: Lock-free crash hotplug support reporting

2024-09-08 Thread Baoquan He
On 09/07/24 at 10:30am, Sourabh Jain wrote: > Hello Baoquan, > > Do you think this patch would help reduce lock contention when > CPU/Memory resources are removed in bulk from a system? .snip... -- > > include/linux/kexec.h | 11 --- > > kernel/crash_core.c | 27 +-

Re: [PATCH] kexec/crash: no crash update when kexec in progress

2024-09-04 Thread Baoquan He
On 09/04/24 at 02:55pm, Sourabh Jain wrote: > Hello Baoquan, > > On 30/08/24 16:47, Baoquan He wrote: > > On 08/20/24 at 12:10pm, Sourabh Jain wrote: > > > Hello Baoquan, > > > ..snip... > > > 2. A patch to return early from the `crash_handle

Re: [PATCH] kexec/crash: no crash update when kexec in progress

2024-08-30 Thread Baoquan He
On 08/20/24 at 12:10pm, Sourabh Jain wrote: > Hello Baoquan, > > On 19/08/24 11:45, Baoquan He wrote: > > On 08/19/24 at 09:45am, Sourabh Jain wrote: > > > Hello Michael and Boaquan > > > > > > On 01/08/24 12:21, Sourabh Jain wrote: > > >

Re: [PATCH] crash: Default to CRASH_DUMP=n when support for it is unlikely

2024-08-29 Thread Baoquan He
On 08/23/24 at 08:51am, Dave Vasilevsky wrote: > Fixes boot failures on 6.9 on PPC_BOOK3S_32 machines using > Open Firmware. On these machines, the kernel refuses to boot > from non-zero PHYSICAL_START, which occurs when CRASH_DUMP is on. > > Since most PPC_BOOK3S_32 machines boot via Open Firmwar

Re: [PATCH] crash: Default to CRASH_DUMP=n when support for it is unlikely

2024-08-29 Thread Baoquan He
On 08/29/24 at 11:37pm, Dave Vasilevsky wrote: > On 2024-08-29 23:15, Baoquan He wrote: > >> +config ARCH_DEFAULT_CRASH_DUMP > >> + def_bool n > > > > If we don't add ARCH_DEFAULT_CRASH_DUMP at all in sh arch, the > > CRASH_DUMP will be off by default

Re: [PATCH] crash: Default to CRASH_DUMP=n when support for it is unlikely

2024-08-29 Thread Baoquan He
Hi Dave, On 08/23/24 at 08:51am, Dave Vasilevsky wrote: ..snip.. > diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig > index 1aa3c4a0c5b2..b04cfa23378c 100644 > --- a/arch/sh/Kconfig > +++ b/arch/sh/Kconfig > @@ -549,6 +549,9 @@ config ARCH_SUPPORTS_KEXEC > config ARCH_SUPPORTS_CRASH_DUMP >

Re: [PATCH] crash: Default to CRASH_DUMP=n when support for it is unlikely

2024-08-27 Thread Baoquan He
On 08/27/24 at 08:37am, John Paul Adrian Glaubitz wrote: > On Tue, 2024-08-27 at 14:22 +0800, Baoquan He wrote: > > About why it's enabled by default, as Michael has explained in another > > thread, distros usualy needs to enable it by default because vmcore > > dumping i

Re: [PATCH] crash: Default to CRASH_DUMP=n when support for it is unlikely

2024-08-26 Thread Baoquan He
On 08/23/24 at 08:16pm, John Paul Adrian Glaubitz wrote: > Hi Geert, > > On Fri, 2024-08-23 at 15:13 +0200, Geert Uytterhoeven wrote: > > IMHO CRASH_DUMP should just default to n, like most kernel options, as > > it enables non-trivial extra functionality: the kernel source tree has > > more than

Re: [PATCH linux-next v3 05/14] crash: clean up kdump related config items

2024-08-22 Thread Baoquan He
On 08/22/24 at 08:41pm, Dave Vasilevsky wrote: > On 2024-08-22 20:04, Baoquan He wrote: > > If so, below patch possiblly can fix it. Can you help check if it's OK? > > That removes the possibility of enabling CRASH_DUMP on PPC_BOOK3S_32, even > when booting via other mec

Re: [PATCH linux-next v3 05/14] crash: clean up kdump related config items

2024-08-22 Thread Baoquan He
On 08/22/24 at 11:37am, John Paul Adrian Glaubitz wrote: > Hi Baoquan, > > On Thu, 2024-08-22 at 17:17 +0800, Baoquan He wrote: > > > The change to enable CONFIG_CRASH_DUMP by default apparently broke the > > > boot > > > on 32-bit Power Macintos

Re: [PATCH linux-next v3 05/14] crash: clean up kdump related config items

2024-08-22 Thread Baoquan He
On 08/22/24 at 09:33am, John Paul Adrian Glaubitz wrote: > Hi Baoquan, > > On Wed, 2024-01-24 at 13:12 +0800, Baoquan He wrote: > > By splitting CRASH_RESERVE and VMCORE_INFO out from CRASH_CORE, cleaning > > up the dependency of FA_DMUMP on CRASH_DUMP, and mo

Re: [PATCH v2] Document/kexec: Generalize crash hotplug description

2024-08-19 Thread Baoquan He
Add Jonathan and Andew. On 08/12/24 at 09:46am, Sourabh Jain wrote: > Commit 79365026f869 ("crash: add a new kexec flag for hotplug support") > generalizes the crash hotplug support to allow architectures to update > multiple kexec segments on CPU/Memory hotplug and not just elfcorehdr. > Therefor

Re: [PATCH] kexec/crash: no crash update when kexec in progress

2024-08-18 Thread Baoquan He
On 08/19/24 at 09:45am, Sourabh Jain wrote: > Hello Michael and Boaquan > > On 01/08/24 12:21, Sourabh Jain wrote: > > Hello Michael, > > > > On 01/08/24 08:04, Michael Ellerman wrote: > > > Sourabh Jain writes: > > > > The following errors are observed when kexec is done with SMT=off on > > > >

Re: [PATCH v2] Document/kexec: Generalize crash hotplug description

2024-08-13 Thread Baoquan He
On 08/13/24 at 10:58am, Sourabh Jain wrote: > Hello Baoquan, > > On 13/08/24 10:34, Baoquan He wrote: > > On 08/12/24 at 09:46am, Sourabh Jain wrote: > > .. > > > --- > > > > > > Changelog: > > > > > > Since v1:

Re: [PATCH v2] Document/kexec: Generalize crash hotplug description

2024-08-13 Thread Baoquan He
On 08/12/24 at 09:46am, Sourabh Jain wrote: .. > --- > > Changelog: > > Since v1: > https://lore.kernel.org/all/20240805050829.297171-1-sourabhj...@linux.ibm.com/ > - Update crash_hotplug sysfs document as suggested by Petr T > - Update an error message in crash_handle_hotplug_event and

Re: [PATCH] Document/kexec: Generalize crash hotplug description

2024-08-08 Thread Baoquan He
On 08/05/24 at 10:38am, Sourabh Jain wrote: > Commit 79365026f869 ("crash: add a new kexec flag for hotplug support") > generalizes the crash hotplug support to allow architectures to update > multiple kexec segments on CPU/Memory hotplug and not just elfcorehdr. > Therefore, update the relevant ke

Re: [PATCH v3] mm/mm_init: use node's number of cpus in deferred_page_init_max_threads

2024-05-29 Thread Baoquan He
threads returns unsigned and use max instead >of max_t. > - Make deferred_page_init_max_threads static since there are no more >override. > - Rephrase description. > - Add T-b and report from Michael Ellerman. > > arch/x86/mm/init_64.c| 12 > include/l

Re: [PATCH v2 4/6] mm/mm_init.c: remove meaningless calculation of zone->managed_pages in free_area_init_core()

2024-03-28 Thread Baoquan He
On 03/28/24 at 11:53am, Mike Rapoport wrote: > On Thu, Mar 28, 2024 at 04:32:38PM +0800, Baoquan He wrote: > > On 03/25/24 at 10:56pm, Baoquan He wrote: > > > > > > /* > > > - * Set an approximate value for lowmem here, it will be adjusted

[PATCH v3 4/6] mm/mm_init.c: remove meaningless calculation of zone->managed_pages in free_area_init_core()

2024-03-28 Thread Baoquan He
n also cover the ppc required arch_reserved_kernel_pages() case. And also clean up the outdated code comment above free_area_init_core(). And free_area_init_core() is easy to understand now, no need to add words to explain. Signed-off-by: Baoquan He --- v2->v3: - Change to initialize zone->managed_pages as zo

Re: [PATCH v2 4/6] mm/mm_init.c: remove meaningless calculation of zone->managed_pages in free_area_init_core()

2024-03-28 Thread Baoquan He
On 03/25/24 at 10:56pm, Baoquan He wrote: > Currently, in free_area_init_core(), when initialize zone's field, a > rough value is set to zone->managed_pages. That value is calculated by > (zone->present_pages - memmap_pages). > > In the meantime, add the value to nr_all

Re: [PATCH v2 5/6] mm/mm_init.c: remove unneeded calc_memmap_size()

2024-03-27 Thread Baoquan He
On 03/27/24 at 06:21pm, Mike Rapoport wrote: > On Mon, Mar 25, 2024 at 10:56:45PM +0800, Baoquan He wrote: > > Nobody calls calc_memmap_size() now. > > > > Signed-off-by: Baoquan He > > Reviewed-by: Mike Rapoport (IBM) > > Looks like I replied to patch 6/6 twi

Re: [PATCH v2 3/6] mm/mm_init.c: add new function calc_nr_all_pages()

2024-03-26 Thread Baoquan He
On 03/26/24 at 08:57am, Mike Rapoport wrote: > Hi Baoquan, > > On Mon, Mar 25, 2024 at 10:56:43PM +0800, Baoquan He wrote: > > This is a preparation to calculate nr_kernel_pages and nr_all_pages, > > both of which will be used later in alloc_large_system_hash(). > >

[PATCH v2 6/6] mm/mm_init.c: remove arch_reserved_kernel_pages()

2024-03-25 Thread Baoquan He
Since the current calculation of calc_nr_kernel_pages() has taken into consideration of kernel reserved memory, no need to have arch_reserved_kernel_pages() any more. Signed-off-by: Baoquan He --- arch/powerpc/include/asm/mmu.h | 4 arch/powerpc/kernel/fadump.c | 5 - include/linux

[PATCH v2 5/6] mm/mm_init.c: remove unneeded calc_memmap_size()

2024-03-25 Thread Baoquan He
Nobody calls calc_memmap_size() now. Signed-off-by: Baoquan He --- mm/mm_init.c | 20 1 file changed, 20 deletions(-) diff --git a/mm/mm_init.c b/mm/mm_init.c index 7f71e56e83f3..e269a724f70e 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -1331,26 +1331,6 @@ static void

[PATCH v2 4/6] mm/mm_init.c: remove meaningless calculation of zone->managed_pages in free_area_init_core()

2024-03-25 Thread Baoquan He
e than old way and simpler, and can also cover the ppc required arch_reserved_kernel_pages() case. And also clean up the outdated code comment above free_area_init_core(). And free_area_init_core() is easy to understand now, no need to add words to explain. Signed-off-by: Baoquan

[PATCH v2 3/6] mm/mm_init.c: add new function calc_nr_all_pages()

2024-03-25 Thread Baoquan He
low memory in memblock allocator, excluding HIGHMEM memory. Signed-off-by: Baoquan He --- mm/mm_init.c | 24 1 file changed, 24 insertions(+) diff --git a/mm/mm_init.c b/mm/mm_init.c index 153fb2dc666f..c57a7fc97a16 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -1264,6

[PATCH v2 2/6] mm/mm_init.c: remove the useless dma_reserve

2024-03-25 Thread Baoquan He
Now nobody calls set_dma_reserve() to set value for dma_reserve, remove set_dma_reserve(), global variable dma_reserve and the codes using it. Signed-off-by: Baoquan He --- include/linux/mm.h | 1 - mm/mm_init.c | 23 --- 2 files changed, 24 deletions(-) diff --git a

[PATCH v2 1/6] x86: remove unneeded memblock_find_dma_reserve()

2024-03-25 Thread Baoquan He
x27;s setting accuracy during free_area_init(). Hence, remove memblock_find_dma_reserve() to stop calculating and setting dma_reserve. Signed-off-by: Baoquan He --- arch/x86/include/asm/pgtable.h | 1 - arch/x86/kernel/setup.c| 2 -- arch/x86/mm/init.c | 47 ---

[PATCH v2 0/6] mm/mm_init.c: refactor free_area_init_core()

2024-03-25 Thread Baoquan He
e to initializ zone->managed_pages as 0 in free_area_init_core() as there isn't any page added into buddy system. And also improve the ambiguous description in log. These are all in patch 4. Baoquan He (6): x86: remove unneeded memblock_find_dma_reserve() mm/mm_init.c: remove the us

Re: [PATCH linux-next v3 02/14] crash: split vmcoreinfo exporting code out from crash_core.c

2024-03-25 Thread Baoquan He
On 03/25/24 at 09:24am, Geert Uytterhoeven wrote: > Hi Baoquan, > > On Wed, Jan 24, 2024 at 6:13 AM Baoquan He wrote: > > Now move the relevant codes into separate files: > > kernel/crash_reserve.c, include/linux/crash_reserve.h. > > > > And add config item CRAS

Re: [PATCH 2/6] x86: remove memblock_find_dma_reserve()

2024-03-20 Thread Baoquan He
On 03/20/24 at 11:36am, Mike Rapoport wrote: > On Wed, Mar 20, 2024 at 03:52:52PM +0800, Baoquan He wrote: > > On 03/19/24 at 05:49pm, Mike Rapoport wrote: > > > Hi Baoquan, > > > > > > On Mon, Mar 18, 2024 at 10:21:34PM +0800, Baoquan He wrote:

Re: [PATCH 4/6] mm/mm_init.c: remove meaningless calculation of zone->managed_pages in free_area_init_core()

2024-03-20 Thread Baoquan He
On 03/20/24 at 04:18pm, Baoquan He wrote: > On 03/19/24 at 06:17pm, Mike Rapoport wrote: > > On Mon, Mar 18, 2024 at 10:21:36PM +0800, Baoquan He wrote: > > > Currently, in free_area_init_core(), when initialize zone's field, a > > > rough value is set to zo

Re: [PATCH 4/6] mm/mm_init.c: remove meaningless calculation of zone->managed_pages in free_area_init_core()

2024-03-20 Thread Baoquan He
On 03/19/24 at 06:17pm, Mike Rapoport wrote: > On Mon, Mar 18, 2024 at 10:21:36PM +0800, Baoquan He wrote: > > Currently, in free_area_init_core(), when initialize zone's field, a > > rough value is set to zone->managed_pages. That value is calculated by > > (zone-

Re: [PATCH 2/6] x86: remove memblock_find_dma_reserve()

2024-03-20 Thread Baoquan He
On 03/19/24 at 05:49pm, Mike Rapoport wrote: > Hi Baoquan, > > On Mon, Mar 18, 2024 at 10:21:34PM +0800, Baoquan He wrote: > > This is not needed any more. > > I'd swap this and the first patch, so that the first patch would remove > memblock_find_dma_reserve() an

[PATCH 6/6] mm/mm_init.c: remove arch_reserved_kernel_pages()

2024-03-18 Thread Baoquan He
Since the current calculation of calc_nr_kernel_pages() has taken into consideration of kernel reserved memory, no need to have arch_reserved_kernel_pages() any more. Signed-off-by: Baoquan He --- arch/powerpc/include/asm/mmu.h | 4 arch/powerpc/kernel/fadump.c | 5 - include/linux

[PATCH 5/6] mm/mm_init.c: remove unneeded calc_memmap_size()

2024-03-18 Thread Baoquan He
Nobody calls calc_memmap_size() now. Signed-off-by: Baoquan He --- mm/mm_init.c | 20 1 file changed, 20 deletions(-) diff --git a/mm/mm_init.c b/mm/mm_init.c index 55a2b886b7a6..9ed4b9e77c4a 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -1331,26 +1331,6 @@ static void

[PATCH 4/6] mm/mm_init.c: remove meaningless calculation of zone->managed_pages in free_area_init_core()

2024-03-18 Thread Baoquan He
ed arch_reserved_kernel_pages() case. Signed-off-by: Baoquan He --- mm/mm_init.c | 38 ++ 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/mm/mm_init.c b/mm/mm_init.c index c57a7fc97a16..55a2b886b7a6 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @

[PATCH 3/6] mm/mm_init.c: add new function calc_nr_kernel_pages()

2024-03-18 Thread Baoquan He
low memory in memblock allocator, excluding HIGHMEM memory. Signed-off-by: Baoquan He --- mm/mm_init.c | 24 1 file changed, 24 insertions(+) diff --git a/mm/mm_init.c b/mm/mm_init.c index 153fb2dc666f..c57a7fc97a16 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -1264,6

[PATCH 2/6] x86: remove memblock_find_dma_reserve()

2024-03-18 Thread Baoquan He
This is not needed any more. Signed-off-by: Baoquan He --- arch/x86/include/asm/pgtable.h | 1 - arch/x86/kernel/setup.c| 2 -- arch/x86/mm/init.c | 45 -- 3 files changed, 48 deletions(-) diff --git a/arch/x86/include/asm/pgtable.h b/arch

[PATCH 1/6] mm/mm_init.c: remove the useless dma_reserve

2024-03-18 Thread Baoquan He
x27;s setting accuracy during free_area_init(). Hence, remove dma_reserve and its handling in free_area_init_core() because it's useless and causes confusion. Signed-off-by: Baoquan He --- arch/x86/mm/init.c | 2 -- include/linux/mm.h | 1 - mm/mm_init.c | 23 --

[PATCH 0/6] mm/mm_init.c: refactor free_area_init_core()

2024-03-18 Thread Baoquan He
emblock, then assign it to nr_all_pages and nr_kernel_pages after memmap pages are allocated. Baoquan He (6): mm/mm_init.c: remove the useless dma_reserve x86: remove unneeded memblock_find_dma_reserve() mm/mm_init.c: add new function calc_nr_all_pages() mm/mm_init.c: remove meaningles

Re: kexec verbose dumps with 6.8 [was: [PATCH v4 1/7] kexec_file: add kexec_file flag to control debug printing]

2024-03-13 Thread Baoquan He
On 03/13/24 at 06:58am, Jiri Slaby wrote: > Hi, > > > On 13. 03. 24, 1:48, Baoquan He wrote: > > Hi Jiri, > > > > On 03/12/24 at 10:58am, Jiri Slaby wrote: > > > On 13. 12. 23, 6:57, Baoquan He wrote: > > ... snip... > > > > --- a/

Re: kexec verbose dumps with 6.8 [was: [PATCH v4 1/7] kexec_file: add kexec_file flag to control debug printing]

2024-03-12 Thread Baoquan He
Hi Jiri, On 03/12/24 at 10:58am, Jiri Slaby wrote: > On 13. 12. 23, 6:57, Baoquan He wrote: ... snip... > > --- a/include/linux/kexec.h > > +++ b/include/linux/kexec.h > ... > > @@ -500,6 +500,13 @@ static inline int crash_hotplug_memory_support(void) { > > r

Re: [PATCH v17 0/6] powerpc/crash: Kernel handling of CPU and memory hotplug

2024-02-29 Thread Baoquan He
Hi Sourabh, On 02/26/24 at 02:11pm, Sourabh Jain wrote: > Commit 247262756121 ("crash: add generic infrastructure for crash > hotplug support") added a generic infrastructure that allows > architectures to selectively update the kdump image component during CPU > or memory add/remove events within

Re: [PATCH v17 3/6] powerpc/kexec: move *_memory_ranges functions to ranges.c

2024-02-29 Thread Baoquan He
On 02/26/24 at 02:11pm, Sourabh Jain wrote: > Move the following functions form kexec/{file_load_64.c => ranges.c} and > make them public so that components other KEXEC_FILE can also use these ^ 'than' missed? > fu

Re: [PATCH v17 2/6] crash: add a new kexec flag for hotplug support

2024-02-28 Thread Baoquan He
kexec_file.c > @@ -376,6 +376,11 @@ SYSCALL_DEFINE5(kexec_file_load, int, kernel_fd, int, > initrd_fd, > if (ret) > goto out; > > +#ifdef CONFIG_CRASH_HOTPLUG > + if ((flags & KEXEC_FILE_ON_CRASH) && arch_crash_hotplug_support(image, > flags)) > + image->hotplug_support = 1; > +#endif > + > ret = machine_kexec_prepare(image); > if (ret) > goto out; Other than the tiny part, the overall looks good to me. Acked-by: Baoquan He

Re: [PATCH v17 2/6] crash: add a new kexec flag for hotplug support

2024-02-28 Thread Baoquan He
kexec_load and kexec_file_load system calls. This > > simplifies kernel checks to identify hotplug support for the currently > > loaded kdump image by just examining the value of @hotplug_support. > > > > Signed-off-by: Sourabh Jain > > Cc: Akhil Raj > > Cc:

Re: [PATCH linux-next v2 0/3] powerpc/kexec: split CONFIG_CRASH_DUMP out from CONFIG_KEXEC_CORE

2024-02-28 Thread Baoquan He
On 02/26/24 at 04:00pm, Hari Bathini wrote: > This patch series is a follow-up to [1] based on discussions at [2] > about additional work needed to get it working on powerpc. > > The first patch in the series makes struct crash_mem available with or > without CONFIG_CRASH_DUMP enabled. The next pa

Re: [PATCH linux-next v2 1/3] kexec/kdump: make struct crash_mem available without CONFIG_CRASH_DUMP

2024-02-27 Thread Baoquan He
ucture for loading kexec kernel. Anyway, for the time being, this is the simplest way we can take. Thanks for the work on ppc to make crash split out from the kexec code. Acked-by: Baoquan He > definition of crash_mem structure available for !CONFIG_CRASH_DUMP > case too. > &g

Re: [PATCH v2 02/14] crash: split vmcoreinfo exporting code out from crash_core.c

2024-02-21 Thread Baoquan He
On 02/21/24 at 11:07pm, Sourabh Jain wrote: > Hello Baoquan, > > On 19/01/24 20:22, Baoquan He wrote: > > Now move the relevant codes into separate files: > > kernel/crash_reserve.c, include/linux/crash_reserve.h. > > > > And add config item CRASH_RESERVE to cont

Re: [PATCH v2 00/14] Split crash out from kexec and clean up related config items

2024-02-21 Thread Baoquan He
On 02/21/24 at 12:57pm, Andrew Morton wrote: > On Wed, 21 Feb 2024 11:15:00 +0530 Hari Bathini > wrote: > > > On 04/02/24 8:56 am, Baoquan He wrote: > > >>> Hope Hari and Pingfan can help have a look, see if > > >>> it's doable. Now, I ma

Re: [PATCH v16 2/5] crash: add a new kexec flag for hotplug support

2024-02-21 Thread Baoquan He
g hotplug support. Set the @hotplug_support member of struct > > kimage for both kexec_load and kexec_file_load system calls. This > > simplifies kernel checks to identify hotplug support for the currently > > loaded kdump image by just examining the value of @hotplug_support

Re: [PATCH v2 00/14] Split crash out from kexec and clean up related config items

2024-02-21 Thread Baoquan He
On 02/21/24 at 11:15am, Hari Bathini wrote: > Hi Baoquan, > > On 04/02/24 8:56 am, Baoquan He wrote: > > > > Hope Hari and Pingfan can help have a look, see if > > > > it's doable. Now, I make it either have both kexec and crash enabled, or &

Re: [PATCH linux-next 1/3] kexec/kdump: make struct crash_mem available without CONFIG_CRASH_DUMP

2024-02-20 Thread Baoquan He
On 02/13/24 at 05:01pm, Hari Bathini wrote: > struct crash_mem defined under include/linux/crash_core.h represents > a list of memory ranges. While it is used to represent memory ranges >From its name, it's not only representing memory ranges, it's representing crash memory ranges. Except of this,

Re: [PATCH v15 2/5] crash: add a new kexec flag for hotplug support

2024-02-12 Thread Baoquan He
On 02/12/24 at 07:27pm, Sourabh Jain wrote: > Hello Baoquan, > > On 05/02/24 08:40, Baoquan He wrote: > > Hi Sourabh, > > .. > > > diff --git a/include/linux/kexec.h b/include/linux/kexec.h > > > index 802052d9c64b..7880d74dc5c4 100644 > > >

Re: [PATCH v15 1/5] crash: forward memory_notify arg to arch crash hotplug handler

2024-02-04 Thread Baoquan He
--- > 4 files changed, 11 insertions(+), 10 deletions(-) LGTM, Acked-by: Baoquan He > > diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h > index c9f6a6c5de3c..9bb6607e864e 100644 > --- a/arch/x86/include/asm/kexec.h > +++ b/arch/x86/include/asm/kexec.h >

Re: [PATCH v15 2/5] crash: add a new kexec flag for hotplug support

2024-02-04 Thread Baoquan He
Hi Sourabh, Thanks for the great work. There are some concerns, please see inline comments. On 01/11/24 at 04:21pm, Sourabh Jain wrote: .. > Now, if the kexec tool sends KEXEC_CRASH_HOTPLUG_SUPPORT kexec flag to > the kernel, it indicates to the kernel that all the required kexec > segment is

Re: [PATCH v2 00/14] Split crash out from kexec and clean up related config items

2024-02-03 Thread Baoquan He
On 02/02/24 at 10:53am, Hari Bathini wrote: > Hi Baoquan, > > On 19/01/24 8:22 pm, Baoquan He wrote: > > Motivation: > > = > > Previously, LKP reported a building error. When investigating, it can't > > be resolved reasonablly wit

Re: [PATCH linux-next 1/3] x86, crash: don't nest CONFIG_CRASH_DUMP ifdef inside CONFIG_KEXEC_CODE ifdef scope

2024-01-29 Thread Baoquan He
On 01/30/24 at 01:39am, Michael Kelley wrote: > From: Baoquan He > > > > On 01/29/24 at 06:27pm, Michael Kelley wrote: > > > From: Baoquan He Sent: Monday, January 29, 2024 > > 5:51 AM > > > > > > > > Michael pointed out that the #ifdef C

Re: [PATCH v2 linux-next 1/3] x86, crash: don't nest CONFIG_CRASH_DUMP ifdef inside CONFIG_KEXEC_CODE ifdef scope

2024-01-29 Thread Baoquan He
d02.prod.outlook.com/T/#u Link: https://lore.kernel.org/all/20240126045551.GA126645@dev-arch.thelio-3990X/T/#u Signed-off-by: Baoquan He --- v1->v2: - Add missing words and fix typos in patch log pointed out by Michael. arch/x86/kernel/cpu/mshyperv.c | 10 ++ arch/x86/kernel/reb

Re: [PATCH linux-next 1/3] x86, crash: don't nest CONFIG_CRASH_DUMP ifdef inside CONFIG_KEXEC_CODE ifdef scope

2024-01-29 Thread Baoquan He
On 01/29/24 at 06:27pm, Michael Kelley wrote: > From: Baoquan He Sent: Monday, January 29, 2024 5:51 AM > > > > Michael pointed out that the #ifdef CONFIG_CRASH_DUMP is nested inside > > arch/x86/xen/enlighten_hvm.c. > > Did some words get left out in the above sen

[PATCH linux-next 3/3] arch, crash: move arch_crash_save_vmcoreinfo() out to file vmcore_info.c

2024-01-29 Thread Baoquan He
hancellor Closes: https://lore.kernel.org/all/20240126045551.GA126645@dev-arch.thelio-3990X/T/#u Signed-off-by: Baoquan He --- arch/arm/kernel/Makefile | 1 + arch/arm/kernel/machine_kexec.c | 7 --- arch/arm/kernel/vmcore_info.c| 10 ++ arch/powerpc/kexec/Makefile

[PATCH linux-next 2/3] crash: fix building error in generic codes

2024-01-29 Thread Baoquan He
scope to avoid building erorr when CONFIG_CRASH_DUMP is not set. Reported-by: Nathan Chancellor Closes: https://lore.kernel.org/all/20240126045551.GA126645@dev-arch.thelio-3990X/T/#u Signed-off-by: Baoquan He --- drivers/of/kexec.c | 2 ++ kernel/kexec_file.c | 2 ++ 2 files changed, 4 insertions(+) diff -

[PATCH linux-next 1/3] x86, crash: don't nest CONFIG_CRASH_DUMP ifdef inside CONFIG_KEXEC_CODE ifdef scope

2024-01-29 Thread Baoquan He
rence to `vmcoreinfo_note' Link: https://lore.kernel.org/all/sn6pr02mb4157931105fa68d72e3d3db8d4...@sn6pr02mb4157.namprd02.prod.outlook.com/T/#u Link: https://lore.kernel.org/all/20240126045551.GA126645@dev-arch.thelio-3990X/T/#u Signed-off-by: Baoquan He --- arch/x86/kernel/cpu/mshype

Re: [PATCH linux-next v3 01/14] kexec: split crashkernel reservation code out from crash_core.c

2024-01-28 Thread Baoquan He
On 01/28/24 at 02:28am, Klara Modin wrote: > Hi, > > On 2024-01-24 06:12, Baoquan He wrote: > > And also add config item CRASH_RESERVE to control its enabling of the > > codes. And update config items which has relationship with crashkernel > > reservation. > > &

Re: [PATCH linux-next v3 00/14] Split crash out from kexec and clean up related config items

2024-01-25 Thread Baoquan He
On 01/25/24 at 09:55pm, Nathan Chancellor wrote: .. > I am seeing a few build failures in my test matrix on next-20240125 that > appear to be caused by this series although I have not bisected. Some > reproduction steps: Thanks for trying this, I have reproduced the linking failure on arm, wi

Re: [PATCH linux-next v3 06/14] x86, crash: wrap crash dumping code into crash related ifdefs

2024-01-25 Thread Baoquan He
On 01/25/24 at 05:12am, Michael Kelley wrote: > From: Baoquan He Sent: Wednesday, January 24, 2024 8:10 PM > > > > On 01/24/24 at 11:02pm, Michael Kelley wrote: > > > > diff --git a/arch/x86/kernel/cpu/mshyperv.c > > > > b/arch/x86/kernel/cpu/mshyperv.c &

Re: [PATCH linux-next v3 06/14] x86, crash: wrap crash dumping code into crash related ifdefs

2024-01-24 Thread Baoquan He
On 01/24/24 at 11:02pm, Michael Kelley wrote: > > diff --git a/arch/x86/kernel/cpu/mshyperv.c > > b/arch/x86/kernel/cpu/mshyperv.c > > index 01fa06dd06b6..f8163a59026b 100644 > > --- a/arch/x86/kernel/cpu/mshyperv.c > > +++ b/arch/x86/kernel/cpu/mshyperv.c > > @@ -210,6 +210,7 @@ static void hv_mac

Re: [PATCH linux-next v3 10/14] sh, crash: wrap crash dumping code into crash related ifdefs

2024-01-24 Thread Baoquan He
On 01/24/24 at 09:13am, John Paul Adrian Glaubitz wrote: > Hello Baoquan, > > On Wed, 2024-01-24 at 13:12 +0800, Baoquan He wrote: > > Now crash codes under kernel/ folder has been split out from kexec > > code, crash dumping can be separated from kexec reboot in config >

[PATCH linux-next v3 14/14] loongarch, crash: wrap crash dumping code into crash related ifdefs

2024-01-23 Thread Baoquan He
: Baoquan He --- v2->v3: - Update code change regarding below commit: commit 78de91b45860 ("LoongArch: Use generic interface to support crashkernel=X,[high,low]") arch/loongarch/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/loongarch/ker

[PATCH linux-next v3 13/14] arm, crash: wrap crash dumping code into crash related ifdefs

2024-01-23 Thread Baoquan He
Now crash codes under kernel/ folder has been split out from kexec code, crash dumping can be separated from kexec reboot in config items on arm with some adjustments. Here use CONFIG_CRASH_RESERVE ifdef to replace CONFIG_KEXEC ifdef. Signed-off-by: Baoquan He --- v2->v3: - Fix the lkp repor

[PATCH linux-next v3 12/14] riscv, crash: wrap crash dumping code into crash related ifdefs

2024-01-23 Thread Baoquan He
compiling in the crashkernel reservation code. Signed-off-by: Baoquan He --- arch/riscv/kernel/elf_kexec.c | 9 +++-- arch/riscv/mm/init.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/riscv/kernel/elf_kexec.c b/arch/riscv/kernel/elf_kexec.c index

[PATCH linux-next v3 11/14] mips, crash: wrap crash dumping code into crash related ifdefs

2024-01-23 Thread Baoquan He
: Baoquan He --- arch/mips/kernel/setup.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 9c30de151597..12a1a4ffb602 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -442,8 +442,6

[PATCH linux-next v3 10/14] sh, crash: wrap crash dumping code into crash related ifdefs

2024-01-23 Thread Baoquan He
compiling in the crashkernel reservation code. Signed-off-by: Baoquan He --- arch/sh/kernel/machine_kexec.c | 3 +++ arch/sh/kernel/setup.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/sh/kernel/machine_kexec.c b/arch/sh/kernel/machine_kexec.c index fa3a7b36190a

[PATCH linux-next v3 09/14] s390, crash: wrap crash dumping code into crash related ifdefs

2024-01-23 Thread Baoquan He
Now crash codes under kernel/ folder has been split out from kexec code, crash dumping can be separated from kexec reboot in config items on s390 with some adjustments. Here wrap up crash dumping codes with CONFIG_CRASH_DUMP ifdeffery. Signed-off-by: Baoquan He --- arch/s390/kernel/kexec_elf.c

[PATCH linux-next v3 08/14] ppc, crash: enforce KEXEC and KEXEC_FILE to select CRASH_DUMP

2024-01-23 Thread Baoquan He
In PowerPC, the crash dumping and kexec reboot share code in arch_kexec_locate_mem_hole(), in which struct crash_mem is used. Here enfoce enforce KEXEC and KEXEC_FILE to select CRASH_DUMP for now. Signed-off-by: Baoquan He --- arch/powerpc/Kconfig | 5 + 1 file changed, 5 insertions

[PATCH linux-next v3 07/14] arm64, crash: wrap crash dumping code into crash related ifdefs

2024-01-23 Thread Baoquan He
Now crash codes under kernel/ folder has been split out from kexec code, crash dumping can be separated from kexec reboot in config items on arm64 with some adjustments. Here wrap up crash dumping codes with CONFIG_CRASH_DUMP ifdeffery. Signed-off-by: Baoquan He --- arch/arm64/include/asm

[PATCH linux-next v3 06/14] x86, crash: wrap crash dumping code into crash related ifdefs

2024-01-23 Thread Baoquan He
def CONFIG_CRASH_DUMP - (!IS_ENABLED(CONFIG_KEXEC_CORE)) - > (!IS_ENABLED(CONFIG_CRASH_RESERVE)) Signed-off-by: Baoquan He --- arch/x86/kernel/Makefile | 4 ++-- arch/x86/kernel/cpu/mshyperv.c | 4 arch/x86/kernel/kexec-bzimage64.c | 4 arch/x86/kernel/kvm.c

[PATCH linux-next v3 05/14] crash: clean up kdump related config items

2024-01-23 Thread Baoquan He
-|>PROC_VMCORE KEXEC_FILE --| \ | \>CRASH_HOTPLUG KEXEC --| |--> KEXEC_CORE--> kexec reboot KEXEC_FILE --| Signed-off-by: Baoquan He --- kernel/Kconfig.kexec | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/Kconfig.kexec b/kernel/Kconfig.kexe

[PATCH linux-next v3 04/14] crash: split crash dumping code out from kexec_core.c

2024-01-23 Thread Baoquan He
d-off-by: Baoquan He --- drivers/base/cpu.c | 6 +- include/linux/crash_core.h | 61 + include/linux/kexec.h | 45 +-- init/initramfs.c | 2 +- kernel/Makefile| 3 +- kernel/crash_core.c| 256 + k

[PATCH linux-next v3 03/14] crash: remove dependency of FA_DUMP on CRASH_DUMP

2024-01-23 Thread Baoquan He
o kernel/elfcorehdr.c, and build it when CONFIG_VMCORE_INFO is ebabled. With this, FA_DUMP doesn't need to depend on CRASH_DUMP. Signed-off-by: Baoquan He --- arch/powerpc/Kconfig | 1 - kernel/Makefile | 3 +-- kernel/{crash_dump.c => elfcorehdr.c} | 0 kerne

[PATCH linux-next v3 02/14] crash: split vmcoreinfo exporting code out from crash_core.c

2024-01-23 Thread Baoquan He
do renaming as follows: - arch/xxx/kernel/{crash_core.c => vmcore_info.c} because they are only related to vmcoreinfo exporting on x86, arm64, riscv. And also Remove config item CRASH_CORE, and rely on CONFIG_KEXEC_CORE to decide if build in crash_core.c. Signed-off-by: Baoquan He --- v2-

[PATCH linux-next v3 01/14] kexec: split crashkernel reservation code out from crash_core.c

2024-01-23 Thread Baoquan He
is only related to crashkernel reservation. Signed-off-by: Baoquan He --- arch/arm64/Kconfig| 2 +- .../asm/{crash_core.h => crash_reserve.h} | 4 +- arch/powerpc/Kconfig | 1 + arch/powerpc/mm/nohash/kaslr_booke.c | 4 +-

[PATCH linux-next v3 00/14] Split crash out from kexec and clean up related config items

2024-01-23 Thread Baoquan He
CRASH_RESERVE ifdef, giving up the earlier IS_ENABLED(CONFIG_CRASH_RESERVE) checking in v2. - In patch 14, update code change after below commit merged into mainline: - commit 78de91b45860 ("LoongArch: Use generic interface to support crashkernel=X,[high,low]") Baoquan He (14):

  1   2   3   4   >