Re: [PATCH v2 13/17] x86/setup: simplify initrd relocation and reservation

2020-08-04 Thread Baoquan He
isk_size) > @@ -312,12 +308,6 @@ static void __init reserve_initrd(void) > > initrd_start = 0; > > - mapped_size = memblock_mem_size(max_pfn_mapped); > - if (ramdisk_size >= (mapped_size>>1)) > - panic("initrd too large to hand

Re: [PATCH v2 11/17] arch, mm: replace for_each_memblock() with for_each_mem_pfn_range()

2020-08-04 Thread Baoquan He
| 7 ++- > arch/s390/mm/page-states.c | 6 ++ > arch/sh/mm/init.c| 9 +++-- > mm/memblock.c| 6 ++ > mm/sparse.c | 10 -- > 9 files changed, 35 insertions(+), 51 deletions(-) > Reviewed-by: Baoquan He

Re: [PATCH v2 02/17] dma-contiguous: simplify cma_early_percent_memory()

2020-08-04 Thread Baoquan He
_region_memory_end_pfn(reg) - > -memblock_region_memory_base_pfn(reg); > + unsigned long total_pages = PHYS_PFN(memblock_phys_mem_size()); Reviewed-by: Baoquan He > > return (total_pages * CONFIG_CMA_SIZE_PERCENTAGE / 100) << PAGE_SHIFT; > } > -- > 2.26.2 >

Re: [PATCH v2 15/17] memblock: remove unused memblock_mem_size()

2020-08-05 Thread Baoquan He
_pfn_range(i, MAX_NUMNODES, _pfn, _pfn, NULL) { > - start_pfn = min_t(unsigned long, start_pfn, limit_pfn); > - end_pfn = min_t(unsigned long, end_pfn, limit_pfn); > - pages += end_pfn - start_pfn; > - } > - > - return PFN_PHYS(pages); > -} Reviewed-by: Baoquan He

Re: [PATCH v2 16/17] memblock: implement for_each_reserved_mem_region() using __next_mem_region()

2020-08-05 Thread Baoquan He
2 +- > arch/arm64/kernel/setup.c| 2 +- > drivers/irqchip/irq-gic-v3-its.c | 2 +- > include/linux/memblock.h | 12 +++-- > mm/memblock.c| 46 +++- > 5 files changed, 17 insertions(+), 47 deletions(-) Reviewed-by: Baoquan He

Re: [PATCH v2 14/17] x86/setup: simplify reserve_crashkernel()

2020-08-05 Thread Baoquan He
insertions(+), 26 deletions(-) Applied this patch on top of 5.8, crashkernel reservation works well. And the code change looks good. Reviewed-by: Baoquan He > > diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c > index d8de4053c5e8..d7ced6982524 100644 > --- a/arch

Re: [PATCH v2 17/17] memblock: use separate iterators for memory and reserved regions

2020-08-05 Thread Baoquan He
lock.memblock_type.regions + > memblock.memblock_type.cnt);\ > +/** > + * for_each_mem_region - itereate over registered memory regions ~~~~~ Wonder why emphasize 'registered' memory. Other than this confusion to me, this patch looks good. Reviewed-by: Baoquan He

Re: [PATCH 14/15] x86/numa: remove redundant iteration over memblock.reserved

2020-07-28 Thread Baoquan He
On 07/28/20 at 08:11am, Mike Rapoport wrote: > From: Mike Rapoport > > numa_clear_kernel_node_hotplug() function first traverses numa_meminfo > regions to set node ID in memblock.reserved and than traverses > memblock.reserved to update reserved_nodemask to include node IDs that were > set in

Re: [PATCH 14/15] x86/numa: remove redundant iteration over memblock.reserved

2020-07-28 Thread Baoquan He
On 07/28/20 at 05:15pm, Mike Rapoport wrote: > On Tue, Jul 28, 2020 at 07:02:54PM +0800, Baoquan He wrote: > > On 07/28/20 at 08:11am, Mike Rapoport wrote: > > > From: Mike Rapoport > > > > > > numa_clear_kernel_node_hotplug() function first traverses numa_

Re: [PATCH 09/15] memblock: make for_each_memblock_type() iterator private

2020-07-29 Thread Baoquan He
memblock = { > .current_limit = MEMBLOCK_ALLOC_ANYWHERE, > }; > > +#define for_each_memblock_type(i, memblock_type, rgn) > \ > + for (i = 0, rgn = _type->regions[0]; \ > + i < memblock_type->cnt;\ > + i++, rgn = _type->regions[i]) > + Reviewed-by: Baoquan He

Re: [PATCH] crash_core, vmcoreinfo: Append 'SECTION_SIZE_BITS' to vmcoreinfo

2021-06-08 Thread Baoquan He
On 06/08/21 at 02:14pm, Andrew Morton wrote: > On Tue, 8 Jun 2021 22:24:32 +0800 Baoquan He wrote: > > > On 06/08/21 at 06:33am, Pingfan Liu wrote: > > > As mentioned in kernel commit 1d50e5d0c505 ("crash_core, vmcoreinfo: > > > Append 'MAX_PHYSMEM_BITS'

Re: [PATCH] crash_core, vmcoreinfo: Append 'SECTION_SIZE_BITS' to vmcoreinfo

2021-06-08 Thread Baoquan He
CTION_SIZE_BITS"). But user space wants a stable interface to get this > info. Such info is impossible to be deduced from a crashdump vmcore. > Hence append SECTION_SIZE_BITS to vmcoreinfo. > > Signed-off-by: Pingfan Liu > Cc: Bhupesh Sharma > Cc: Kazuhito Hagio > Cc: Dave Yo

Re: [PATCH v2 0/6] KEXEC_SIG with appended signature

2021-11-30 Thread Baoquan He
Hi, On 11/25/21 at 07:02pm, Michal Suchanek wrote: > Hello, > > This is resend of the KEXEC_SIG patchset. > > The first patch is new because it'a a cleanup that does not require any > change to the module verification code. > > The second patch is the only one that is intended to change any >

Re: [RFC PATCH 0/5] Avoid kdump service reload on CPU hotplug events

2022-02-21 Thread Baoquan He
Hi, On 02/21/22 at 02:16pm, Sourabh Jain wrote: > On hotplug event (CPU/memory) the CPU information prepared for the kdump > kernel > becomes stale unless it is prepared again. To keep the CPU information > up-to-date a kdump service reload is triggered via the udev rule. > > The above approach

Re: [PATCH 1/2] vmcore: allow alternate dump capturing methods to export vmcore without is_kdump_kernel()

2023-09-02 Thread Baoquan He
Hi Hari, On 09/02/23 at 12:34am, Hari Bathini wrote: > Currently, is_kdump_kernel() returns true when elfcorehdr_addr is set. > While elfcorehdr_addr is set for kexec based kernel dump mechanism, > alternate dump capturing methods like fadump [1] also set it to export > the vmcore.

Re: [PATCH V3 01/14] blk-mq: add blk_mq_max_nr_hw_queues()

2023-09-04 Thread Baoquan He
Hi Hari, Michael On 08/11/23 at 01:23pm, Hari Bathini wrote: > > > On 10/08/23 8:31 am, Baoquan He wrote: > > On 08/10/23 at 10:06am, Ming Lei wrote: > > > On Thu, Aug 10, 2023 at 09:18:27AM +0800, Baoquan He wrote: > > > > On 08/10/23 at 08:09am, Ming Lei w

Re: [PATCH 1/2] vmcore: allow alternate dump capturing methods to export vmcore without is_kdump_kernel()

2023-09-04 Thread Baoquan He
On 09/04/23 at 08:04pm, Hari Bathini wrote: > Hi Baoquan, > > Thanks for the review... > > On 03/09/23 9:06 am, Baoquan He wrote: > > Hi Hari, > > > > On 09/02/23 at 12:34am, Hari Bathini wrote: > > > Currently, is_kdump_kernel() returns tru

Re: [PATCH v2 1/3] powerpc/fadump: make is_fadump_active() visible for exporting vmcore

2023-09-06 Thread Baoquan He
is exported when fadump is active. > > Signed-off-by: Hari Bathini Thanks, Hari. The whole series looks good to me. Acked-by: Baoquan He Since it's a power specific change, should be picked into powerpc tree? Thanks Baoquan > --- > > Changes in v2: > * New patch based

Re: [PATCH v2 2/3] vmcore: allow fadump to export vmcore even if is_kdump_kernel() is false

2023-09-11 Thread Baoquan He
On 09/11/23 at 05:13pm, Michael Ellerman wrote: > Hari Bathini writes: > > Currently, is_kdump_kernel() returns true when elfcorehdr_addr is set. > > While elfcorehdr_addr is set for kexec based kernel dump mechanism, > > alternate dump capturing methods like fadump [1] also set it to export > >

Re: [PATCH v3 1/2] vmcore: remove dependency with is_kdump_kernel() for exporting vmcore

2023-09-13 Thread Baoquan He
vmcore_unusable() from is_kdump_kernel() > as suggested here: > > https://lore.kernel.org/linuxppc-dev/ZP7si3UMVpPfYV+w@MiWiFi-R3L-srv/T/#m13ae5a7e4ba6f4d8397f0f66581832292eee3a85 > > > include/linux/crash_dump.h | 8 +++++--- > 1 file changed, 5 insertions(+)

Re: [PATCH v3 2/2] powerpc/fadump: make is_kdump_kernel() return false when fadump is active

2023-09-13 Thread Baoquan He
/powerpc/include/asm/kexec.h | 8 ++-- > arch/powerpc/kernel/crash_dump.c | 12 > 2 files changed, 18 insertions(+), 2 deletions(-) LGTM, Acked-by: Baoquan He > > diff --git a/arch/powerpc/include/asm/kexec.h > b/arch/powerpc/include/asm/kexec.h > index a1ddba01e7d1..e

Re: [PATCH 1/2] kexec: fix KEXEC_FILE dependencies

2023-11-02 Thread Baoquan He
Hi Arnd, On 10/24/23 at 03:17pm, Arnd Bergmann wrote: > On Tue, Oct 24, 2023, at 14:44, Baoquan He wrote: > > Just add people and mailing list to CC since I didn't find this mail in > > my box, just drag it via 'b4 am'. > > > > On 10/23/23 at 01:01pm, Arnd Bergmann wro

Re: [PATCH 1/2] kexec: fix KEXEC_FILE dependencies

2023-10-25 Thread Baoquan He
On 10/24/23 at 03:17pm, Arnd Bergmann wrote: > On Tue, Oct 24, 2023, at 14:44, Baoquan He wrote: > > Just add people and mailing list to CC since I didn't find this mail in > > my box, just drag it via 'b4 am'. > > > > On 10/23/23 at 01:01pm, Arnd Bergmann wrote: &g

[PATCH v5 3/4] arch/*/io.h: remove ioremap_uc in some architectures

2023-09-21 Thread Baoquan He
. If any new invocation of ioremap_uc() need be added, please consider using ioremap() intead or adding a ARCH specific version if necessary. Signed-off-by: Baoquan He Acked-by: Geert Uytterhoeven Acked-by: Michael Ellerman (powerpc) Acked-by: Helge Deller # parisc Cc: linux-al

Re: [PATCH 1/2] kexec: fix KEXEC_FILE dependencies

2023-10-24 Thread Baoquan He
Just add people and mailing list to CC since I didn't find this mail in my box, just drag it via 'b4 am'. On 10/23/23 at 01:01pm, Arnd Bergmann wrote: .. > --- > arch/powerpc/Kconfig | 4 ++-- > arch/riscv/Kconfig | 4 +--- > arch/s390/Kconfig| 4 ++-- > arch/x86/Kconfig | 4 ++-- >

Re: [PATCH 2/2] kexec: select CRYPTO from KEXEC_FILE instead of depending on it

2023-10-23 Thread Baoquan He
u > Cc: "David S. Miller" > Cc: linux-cry...@vger.kernel.org > Signed-off-by: Arnd Bergmann > --- > kernel/Kconfig.kexec | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) LGTM, Acked-by: Baoquan He > > diff --git a/kernel/Kconfig.kexec b/kernel/Kcon

Re: [PATCH 2/2] kexec: select CRYPTO from KEXEC_FILE instead of depending on it

2023-10-23 Thread Baoquan He
On 10/24/23 at 11:55am, Baoquan He wrote: > On 10/23/23 at 01:01pm, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > All other users of crypto code use 'select' instead of 'depends on', > > so do the same thing with KEXEC_FILE for consistency. > > >

Re: [PATCH] kexec_file: Drop pr_err in weak implementations of arch_kexec_apply_relocations[_add]

2022-05-17 Thread Baoquan He
On 04/25/22 at 11:11pm, Naveen N. Rao wrote: > kexec_load_purgatory() can fail for many reasons - there is no need to > print an error when encountering unsupported relocations. > > This solves a build issue on powerpc with binutils v2.36 and newer [1]. > Since commit d1bcae833b32f1 ("ELF: Don't

Re: [PATCH] kexec_file: Drop weak attribute from arch_kexec_apply_relocations[_add]

2022-05-20 Thread Baoquan He
On 05/19/22 at 12:59pm, Eric W. Biederman wrote: > Baoquan He writes: > > > Hi Eric, > > > > On 05/18/22 at 04:59pm, Eric W. Biederman wrote: > >> "Naveen N. Rao" writes: > >> > >> > Since commit d1bcae833b32f1 ("ELF

Re: [PATCH] kexec_file: Drop weak attribute from arch_kexec_apply_relocations[_add]

2022-05-18 Thread Baoquan He
Hi Eric, On 05/18/22 at 04:59pm, Eric W. Biederman wrote: > "Naveen N. Rao" writes: > > > Since commit d1bcae833b32f1 ("ELF: Don't generate unused section > > symbols") [1], binutils (v2.36+) started dropping section symbols that > > it thought were unused. This isn't an issue in general, but

Re: [PATCH 24/30] panic: Refactor the panic path

2022-05-24 Thread Baoquan He
On 05/20/22 at 08:23am, Guilherme G. Piccoli wrote: > On 19/05/2022 20:45, Baoquan He wrote: > > [...] > >> I really appreciate the summary skill you have, to convert complex > >> problems in very clear and concise ideas. Thanks for that, very useful! > >> I

Re: [PATCH 24/30] panic: Refactor the panic path

2022-05-24 Thread Baoquan He
On 05/24/22 at 10:01am, Petr Mladek wrote: > On Fri 2022-05-20 08:23:33, Guilherme G. Piccoli wrote: > > On 19/05/2022 20:45, Baoquan He wrote: > > > [...] > > >> I really appreciate the summary skill you have, to convert complex > > >> proble

Re: [PATCH] kexec_file: Drop pr_err in weak implementations of arch_kexec_apply_relocations[_add]

2022-05-18 Thread Baoquan He
dmesg makes it harder to work > out why the syscall failed. But it's a kernel bug if there are unhandled > relocations in the kernel-supplied purgatory code, so a user really has > no way to do anything about the error even if it is printed. > > > "Naveen N. Rao"

Re: [PATCH 24/30] panic: Refactor the panic path

2022-05-19 Thread Baoquan He
On 05/15/22 at 07:47pm, Guilherme G. Piccoli wrote: > On 12/05/2022 11:03, Petr Mladek wrote: .. > > OK, the question is how to make it better. Let's start with > > a clear picture of the problem: > > > > 1. panic() has basically two funtions: > > > > + show/store debug information

Re: [PATCH] kexec_file: Drop pr_err in weak implementations of arch_kexec_apply_relocations[_add]

2022-05-18 Thread Baoquan He
On 05/18/22 at 02:48pm, Naveen N. Rao wrote: > Baoquan He wrote: > > On 05/18/22 at 12:26pm, Michael Ellerman wrote: > > > > > > It seems that recordmcount is not really maintained anymore now that x86 > > > uses objtool? > > > > > > T

Re: [PATCH] kexec: replace crash_mem_range with range

2022-06-23 Thread Baoquan He
Hi, On 06/15/22 at 07:37pm, Li Chen wrote: > Hi Baoquan, > > On Wed, 15 Jun 2022 19:03:53 -0700 Baoquan He wrote > > > On 06/14/22 at 10:04pm, Li Chen wrote: > > > From: Li Chen > > > > > > We already have struct range, so just u

Re: [PATCH] kexec: replace crash_mem_range with range

2022-06-15 Thread Baoquan He
On 06/14/22 at 10:04pm, Li Chen wrote: > From: Li Chen > > We already have struct range, so just use it. Looks good, have you tested it? > > Signed-off-by: Li Chen > --- > arch/powerpc/kexec/file_load_64.c | 2 +- > arch/powerpc/kexec/ranges.c | 8 > include/linux/kexec.h

[PATCH RESEND 3/4] kexec: replace crash_mem_range with range

2022-09-28 Thread Baoquan He
From: Li Chen We already have struct range, so just use it. Signed-off-by: Li Chen Acked-by: Baoquan He Signed-off-by: Baoquan He Cc: linuxppc-dev Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras --- Baoquan: - Rebased to the latest linus's master branch, fix

[PATCH v2 6/7] powerpc: mm: add VM_IOREMAP flag to the vmalloc area

2022-12-16 Thread Baoquan He
in flag to make it handled correctly as above. Signed-off-by: Baoquan He Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: "Pali Roh??r" Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/kernel/pci_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH v1 6/7] powerpc: mm: add VM_IOREMAP flag to the vmalloc area

2022-12-03 Thread Baoquan He
in flag to make it handled correctly as above. Signed-off-by: Baoquan He Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: "Pali Rohár" Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/kernel/pci_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH v4 3/4] arch/*/io.h: remove ioremap_uc in some architectures

2023-03-08 Thread Baoquan He
. If any new invocation of ioremap_uc() need be added, please consider using ioremap() intead or adding a ARCH specific version if necessary. Acked-by: Geert Uytterhoeven Signed-off-by: Baoquan He Cc: linux-al...@vger.kernel.org Cc: linux-hexa...@vger.kernel.org Cc: linux-m...@lists.linux-m68k.org

Re: [PATCH v4 3/4] arch/*/io.h: remove ioremap_uc in some architectures

2023-03-09 Thread Baoquan He
On 03/09/23 at 03:36pm, Thomas Bogendoerfer wrote: > On Wed, Mar 08, 2023 at 09:07:09PM +0800, Baoquan He wrote: > > ioremap_uc() is only meaningful on old x86-32 systems with the PAT > > extension, and on ia64 with its slightly unconventional ioremap() > > behavior. So

Re: [PATCH v3 2/2] arch/*/io.h: remove ioremap_uc in some architectures

2023-03-06 Thread Baoquan He
On 03/07/23 at 11:58am, Michael Ellerman wrote: > "Arnd Bergmann" writes: > > On Sun, Mar 5, 2023, at 10:29, Geert Uytterhoeven wrote: > >> On Sun, Mar 5, 2023 at 10:23 AM Michael Ellerman > >> wrote: > >>> Maybe that exact code path is only reachable on x86/ia64? But if so > >>> please explain

[PATCH v3 2/2] arch/*/io.h: remove ioremap_uc in some architectures

2023-03-03 Thread Baoquan He
ioremap_uc() can be added in the ARCH. Link: https://lore.kernel.org/all/20191112105507.ga7...@lst.de/#t Acked-by: Geert Uytterhoeven Signed-off-by: Baoquan He Cc: linux-al...@vger.kernel.org Cc: linux-hexa...@vger.kernel.org Cc: linux-m...@lists.linux-m68k.org Cc: linux-m...@vger.kernel.org Cc: linux-par

[PATCH v4 14/16] powerpc: mm: Convert to GENERIC_IOREMAP

2023-02-16 Thread Baoquan He
() for powerpc's special operation when ioremap() and iounmap(). Signed-off-by: Christophe Leroy Signed-off-by: Baoquan He Cc: Michael Ellerman Cc: Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/io.h | 8 +++- arch

[PATCH v5 01/17] asm-generic/iomap.h: remove ARCH_HAS_IOREMAP_xx macros

2023-02-28 Thread Baoquan He
d with the one in , let's rely on the latter. x86: - selected GENERIC_IOMAP, remove #include at the middle of . Let's rely on . This is a preparation patch so that Later patch don't need to add ARCH_HAS_IOREMAP_xx macro. Signed-off-by: Baoquan He Cc: loonga...@lists.linux.dev Cc: linu

Re: [PATCH v5 01/17] asm-generic/iomap.h: remove ARCH_HAS_IOREMAP_xx macros

2023-03-01 Thread Baoquan He
On 03/01/23 at 05:11am, Matthew Wilcox wrote: > On Wed, Mar 01, 2023 at 04:38:10AM +, Edward Cree wrote: > > On 01/03/2023 03:42, Baoquan He wrote: > > > diff --git a/drivers/net/ethernet/sfc/io.h b/drivers/net/ethernet/sfc/io.h > > > index 30439cc83a89..07f99ad14bf3

[PATCH v8 17/19] powerpc: mm: Convert to GENERIC_IOREMAP

2023-07-06 Thread Baoquan He
() for powerpc's special operation when ioremap() and iounmap(). Signed-off-by: Christophe Leroy Signed-off-by: Baoquan He Reviewed-by: Christoph Hellwig Reviewed-by: Mike Rapoport (IBM) Cc: Michael Ellerman Cc: Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/Kconfig

Re: [PATCH 2/2] nvme-pci: use blk_mq_max_nr_hw_queues() to calculate io queues

2023-07-10 Thread Baoquan He
On 07/10/23 at 05:14pm, Ming Lei wrote: > On Mon, Jul 10, 2023 at 08:41:09AM +0200, Christoph Hellwig wrote: > > On Sat, Jul 08, 2023 at 10:02:59AM +0800, Ming Lei wrote: > > > Take blk-mq's knowledge into account for calculating io queues. > > > > > > Fix wrong queue mapping in case of kdump

Re: [PATCH 2/2] nvme-pci: use blk_mq_max_nr_hw_queues() to calculate io queues

2023-07-11 Thread Baoquan He
On 07/11/23 at 11:53am, Ming Lei wrote: > Hi Baoquan, > > On Tue, Jul 11, 2023 at 11:35:50AM +0800, Baoquan He wrote: > > On 07/10/23 at 05:14pm, Ming Lei wrote: > > > On Mon, Jul 10, 2023 at 08:41:09AM +0200, Christoph Hellwig wrote: > > > > On Sat, Jul 08

[PATCH v6 17/19] powerpc: mm: Convert to GENERIC_IOREMAP

2023-06-09 Thread Baoquan He
() for powerpc's special operation when ioremap() and iounmap(). Signed-off-by: Christophe Leroy Signed-off-by: Baoquan He Reviewed-by: Christoph Hellwig Reviewed-by: Mike Rapoport (IBM) Cc: Michael Ellerman Cc: Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/Kconfig

Re: [PATCH V3 01/14] blk-mq: add blk_mq_max_nr_hw_queues()

2023-08-09 Thread Baoquan He
On 08/10/23 at 08:09am, Ming Lei wrote: > On Wed, Aug 09, 2023 at 03:44:01PM +0200, Christoph Hellwig wrote: > > I'm starting to sound like a broken record, but we can't just do random > > is_kdump checks, and it's not going to get better by resending it again and > > again. If kdump kernels

Re: [PATCH V3 01/14] blk-mq: add blk_mq_max_nr_hw_queues()

2023-08-09 Thread Baoquan He
On 08/10/23 at 10:06am, Ming Lei wrote: > On Thu, Aug 10, 2023 at 09:18:27AM +0800, Baoquan He wrote: > > On 08/10/23 at 08:09am, Ming Lei wrote: > > > On Wed, Aug 09, 2023 at 03:44:01PM +0200, Christoph Hellwig wrote: > > > > I'm starting to sound like a broken recor

Re: [PATCH v2 02/13] x86/kexec: refactor for kernel/Kconfig.kexec

2023-06-21 Thread Baoquan He
Hi Eric, On 06/19/23 at 10:57am, Eric DeVolder wrote: .. > +config ARCH_SUPPORTS_KEXEC > + def_bool y > > -config ARCH_HAS_KEXEC_PURGATORY > - def_bool KEXEC_FILE > +config ARCH_SUPPORTS_KEXEC_FILE > + def_bool X86_64 && CRYPTO && CRYPTO_SHA256 .. > +config

Re: [PATCH v2 02/13] x86/kexec: refactor for kernel/Kconfig.kexec

2023-06-21 Thread Baoquan He
On 06/20/23 at 07:56am, Eric DeVolder wrote: > > > On 6/20/23 03:21, Baoquan He wrote: > > Hi Eric, > > > > On 06/19/23 at 10:57am, Eric DeVolder wrote: > > .. > > > +config ARCH_SUPPORTS_KEXEC > > > + def_bool y > > >

[PATCH v7 17/19] powerpc: mm: Convert to GENERIC_IOREMAP

2023-06-20 Thread Baoquan He
() for powerpc's special operation when ioremap() and iounmap(). Signed-off-by: Christophe Leroy Signed-off-by: Baoquan He Reviewed-by: Christoph Hellwig Reviewed-by: Mike Rapoport (IBM) Cc: Michael Ellerman Cc: Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/Kconfig

[PATCH v5 RESEND 01/17] asm-generic/iomap.h: remove ARCH_HAS_IOREMAP_xx macros

2023-05-15 Thread Baoquan He
remove #include in the middle of . Let's rely on . Signed-off-by: Baoquan He Cc: loonga...@lists.linux.dev Cc: linux-m...@lists.linux-m68k.org Cc: linux-m...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: x...@kernel.org Cc: net...@vger.kernel.org Cc: linux-a...@vger.kernel.org --- arch

[PATCH v5 RESEND 15/17] powerpc: mm: Convert to GENERIC_IOREMAP

2023-05-15 Thread Baoquan He
() for powerpc's special operation when ioremap() and iounmap(). Signed-off-by: Christophe Leroy Signed-off-by: Baoquan He Cc: Michael Ellerman Cc: Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/io.h | 8 +++- arch

Re: [PATCH v5 RESEND 01/17] asm-generic/iomap.h: remove ARCH_HAS_IOREMAP_xx macros

2023-05-16 Thread Baoquan He
On 05/16/23 at 09:15am, Mike Rapoport wrote: > Hi, > > On Mon, May 15, 2023 at 05:08:32PM +0800, Baoquan He wrote: > > Let's use '#define ioremap_xx' and "#ifdef ioremap_xx" instead. > > > > For each architecture to remove defined ARCH_HAS_IOREMAP_

Re: [PATCH v2 11/14] arm, crash: wrap crash dumping code into crash related ifdefs

2024-01-20 Thread Baoquan He
If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: > https://github.com/intel-lab-lkp/linux/commits/Baoquan-He/k

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

2024-01-23 Thread Baoquan He
ASH_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): kexec: split crashkernel reservation code out from crash_core.c

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 confi

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

2024-01-23 Thread Baoquan He
if 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 11/14] mips, crash: wrap crash dumping code into crash related ifdefs

2024-01-23 Thread Baoquan He
-by: 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 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 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 04/14] crash: split crash dumping code out from kexec_core.c

2024-01-23 Thread Baoquan He
-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 + kernel

[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.kexec ind

[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 14/14] loongarch, crash: wrap crash dumping code into crash related ifdefs

2024-01-23 Thread Baoquan He
-by: 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 03/14] crash: remove dependency of FA_DUMP on CRASH_DUMP

2024-01-23 Thread Baoquan He
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 kernel/kexec_internal.h | 2 ++ 4 fi

[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
nly 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 +- arch

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

2024-01-23 Thread Baoquan He
if 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 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

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

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-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 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

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 v16 2/5] crash: add a new kexec flag for hotplug support

2024-02-21 Thread Baoquan He
et 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. > > > &g

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 mak

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 v3 5/7] kexec_file, ricv: print out debugging message if required

2023-12-06 Thread Baoquan He
On 12/04/23 at 04:14pm, Conor Dooley wrote: > On Mon, Dec 04, 2023 at 11:38:05PM +0800, Baoquan He wrote: > > On 12/01/23 at 10:38am, Conor Dooley wrote: > > > On Thu, Nov 30, 2023 at 10:39:53AM +0800, Baoquan He wrote: > > > > > > $subject has a typo in the a

Re: [PATCH v4 5/7] kexec_file, ricv: print out debugging message if required

2023-12-19 Thread Baoquan He
On 12/19/23 at 02:44pm, Conor Dooley wrote: > On Wed, Dec 13, 2023 at 01:57:45PM +0800, Baoquan He wrote: > > Then when specifying '-d' for kexec_file_load interface, loaded > > locations of kernel/initrd/cmdline etc can be printed out to help debug. > > > > Here replac

Re: [PATCH v14 2/6] crash: make CPU and Memory hotplug support reporting flexible

2023-12-14 Thread Baoquan He
gt; interface. These functions take the necessary locks needed to access the > `kexec_crash_image` object and then forward it to the > architecture-specific handler to do the rest. > > Signed-off-by: Sourabh Jain > Cc: Akhil Raj > Cc: Andrew Morton > Cc: Aneesh Kumar K.V > Cc: Baoquan H

Re: [PATCH v14 3/6] crash: add a new kexec flag for FDT update

2023-12-16 Thread Baoquan He
On 12/15/23 at 12:17pm, Sourabh Jain wrote: .. > > > diff --git a/include/linux/kexec.h b/include/linux/kexec.h > > > index 0f6ea35879ee..bcedb7625b1f 100644 > > > --- a/include/linux/kexec.h > > > +++ b/include/linux/kexec.h > > > @@ -319,6 +319,7 @@ struct kimage { > > > #ifdef

Re: [PATCH v14 6/6] powerpc: add crash memory hotplug support

2023-12-15 Thread Baoquan He
On 12/15/23 at 11:29am, Sourabh Jain wrote: .. > > > +static void update_crash_elfcorehdr(struct kimage *image, struct > > > memory_notify *mn) > > > +{ > > > + int ret; > > > + struct crash_mem *cmem = NULL; > > > + struct kexec_segment *ksegment; > > > + void *ptr, *mem, *elfbuf = NULL; > >

Re: [PATCH v14 6/6] powerpc: add crash memory hotplug support

2023-12-14 Thread Baoquan He
On 12/11/23 at 02:00pm, Sourabh Jain wrote: .. > diff --git a/arch/powerpc/include/asm/kexec_ranges.h > b/arch/powerpc/include/asm/kexec_ranges.h > index f83866a19e87..802abf580cf0 100644 > --- a/arch/powerpc/include/asm/kexec_ranges.h > +++ b/arch/powerpc/include/asm/kexec_ranges.h > @@

Re: [PATCH v14 3/6] crash: add a new kexec flag for FDT update

2023-12-14 Thread Baoquan He
ntaining the backward compatibility with older kexec tools that > do not have these newly introduced flags. > > Signed-off-by: Sourabh Jain > Cc: Akhil Raj > Cc: Andrew Morton > Cc: Aneesh Kumar K.V > Cc: Baoquan He > Cc: Borislav Petkov (AMD) > Cc: Boris Ostr

Re: [PATCH v14 3/6] crash: add a new kexec flag for FDT update

2023-12-16 Thread Baoquan He
On 12/17/23 at 12:27am, Sourabh Jain wrote: > > > On 16/12/23 15:11, Baoquan He wrote: > > On 12/15/23 at 12:17pm, Sourabh Jain wrote: > > .. > > > > > diff --git a/include/linux/kexec.h b/include/linux/kexec.h > > > > > index 0f6ea35879ee

Re: [PATCH v3 5/7] kexec_file, ricv: print out debugging message if required

2023-12-12 Thread Baoquan He
On 12/07/23 at 07:22am, Baoquan He wrote: > On 12/06/23 at 04:54pm, Conor Dooley wrote: > > On Wed, Dec 06, 2023 at 11:37:52PM +0800, Baoquan He wrote: > > > On 12/04/23 at 04:14pm, Conor Dooley wrote: > > > > On Mon, Dec 04, 2023 at 11:38:05PM +0800, Baoquan He wrot

[PATCH v4 3/7] kexec_file, x86: print out debugging message if required

2023-12-12 Thread Baoquan He
as kexec_load interface has been doing. Signed-off-by: Baoquan He --- arch/x86/kernel/crash.c | 4 ++-- arch/x86/kernel/kexec-bzimage64.c | 23 ++- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c index

[PATCH v4 4/7] kexec_file, arm64: print out debugging message if required

2023-12-12 Thread Baoquan He
use the generic code has done the printing. Signed-off-by: Baoquan He --- arch/arm64/kernel/kexec_image.c| 6 +++--- arch/arm64/kernel/machine_kexec.c | 26 ++ arch/arm64/kernel/machine_kexec_file.c | 12 ++-- 3 files changed, 15 insertions(+), 29 deleti

[PATCH v4 0/7] kexec_file: print out debugging message if required

2023-12-12 Thread Baoquan He
of patch 2 in kernel/crash_core.c reported by LKP. - Fix building warning on arm64 in patch 4 reported by LKP. Baoquan He (7): kexec_file: add kexec_file flag to control debug printing kexec_file: print out debugging message if required kexec_file, x86: print out debugging message if

[PATCH v4 1/7] kexec_file: add kexec_file flag to control debug printing

2023-12-12 Thread Baoquan He
() to facilitate the printing. This is a preparation, later kexec_dprintk() will be used to replace the existing pr_debug(). Once 'kexec -s -d' is specified, it will print out kexec/kdump loading information. If '-d' is not specified, it regresses to pr_debug(). Signed-off-by: Baoquan He

[PATCH v4 2/7] kexec_file: print out debugging message if required

2023-12-12 Thread Baoquan He
to help debug. Signed-off-by: Baoquan He --- kernel/crash_core.c| 8 +--- kernel/kexec_file.c| 11 --- security/integrity/ima/ima_kexec.c | 4 ++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/kernel/crash_core.c b/kernel/crash_core.c

[PATCH v4 7/7] kexec_file, parisc: print out debugging message if required

2023-12-12 Thread Baoquan He
Then when specifying '-d' for kexec_file_load interface, loaded locations of kernel/initrd/cmdline etc can be printed out to help debug. Here replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. Signed-off-by: Baoquan He --- arch/parisc/kernel

[PATCH v4 6/7] kexec_file, power: print out debugging message if required

2023-12-12 Thread Baoquan He
Then when specifying '-d' for kexec_file_load interface, loaded locations of kernel/initrd/cmdline etc can be printed out to help debug. Here replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. Signed-off-by: Baoquan He --- arch/powerpc/kexec/elf_64.c

<    1   2   3   4   >