linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V5 0/2] Support VMCOREINFO export for RISCV64
@ 2022-10-26 14:42 Xianting Tian
  2022-10-26 14:42 ` [PATCH V5 1/2] RISC-V: Add arch_crash_save_vmcoreinfo support Xianting Tian
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Xianting Tian @ 2022-10-26 14:42 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou, anup, heiko, guoren, mick,
	alexandre.ghiti, bhe, vgoyal, dyoung, corbet, Conor.Dooley,
	bagasdotme
  Cc: kexec, linux-doc, linux-riscv, linux-kernel, crash-utility,
	heinrich.schuchardt, k-hagio-ab, hschauhan, yixun.lan,
	Xianting Tian

As disscussed in below patch set, the patch of 'describe VMCOREINFO export in Documentation'
need to update according to Bagas's comments. 
https://lore.kernel.org/linux-riscv/22AAF52E-8CC8-4D11-99CB-88DE4D113444@kernel.org/

As others patches in above patch set already applied, so this patch set only contains below two
patches.

------
Changes:
   Fix commit message in patch 2: use "Document these RISCV64 exports above" instead of
   "This patch just add the description of VMCOREINFO export for RISCV64."
V1 -> V2:
   Remove unnecessary overline above header text in patch 2.
V2 -> V3:
   Fix commit message in patch 1,2; 
   Use 'space' instead of 'region' for vmemmap description in patch 2.
V3 -> V4:
   Remove unnecessary kernel space export:
   KASAN_SHADOW_START ~ KASAN_SHADOW_END,
   ADDRESS_SPACE_END
V4 -> V5:
   Remove IS_ENABLED() judgement for KERNEL_LINK_ADDR in patch 1.

Xianting Tian (2):
  RISC-V: Add arch_crash_save_vmcoreinfo support
  Documentation: kdump: describe VMCOREINFO export for RISCV64

 .../admin-guide/kdump/vmcoreinfo.rst          | 29 +++++++++++++++++++
 arch/riscv/kernel/Makefile                    |  1 +
 arch/riscv/kernel/crash_core.c                | 21 ++++++++++++++
 3 files changed, 51 insertions(+)
 create mode 100644 arch/riscv/kernel/crash_core.c

-- 
2.17.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH V5 1/2] RISC-V: Add arch_crash_save_vmcoreinfo support
  2022-10-26 14:42 [PATCH V5 0/2] Support VMCOREINFO export for RISCV64 Xianting Tian
@ 2022-10-26 14:42 ` Xianting Tian
  2022-11-17  4:15   ` Deepak Gupta
  2022-11-17 15:43   ` Guo Ren
  2022-10-26 14:42 ` [PATCH V5 2/2] Documentation: kdump: describe VMCOREINFO export for RISCV64 Xianting Tian
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 14+ messages in thread
From: Xianting Tian @ 2022-10-26 14:42 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou, anup, heiko, guoren, mick,
	alexandre.ghiti, bhe, vgoyal, dyoung, corbet, Conor.Dooley,
	bagasdotme
  Cc: kexec, linux-doc, linux-riscv, linux-kernel, crash-utility,
	heinrich.schuchardt, k-hagio-ab, hschauhan, yixun.lan,
	Xianting Tian

Add arch_crash_save_vmcoreinfo(), which exports VM layout(MODULES, VMALLOC,
VMEMMAP ranges and KERNEL_LINK_ADDR), va bits and ram base for vmcore.

Default pagetable levels and PAGE_OFFSET aren't same for different kernel
version as below. For pagetable levels, it sets sv57 by default and falls
back to setting sv48 at boot time if sv57 is not supported by the hardware.

For ram base, the default value is 0x80200000 for qemu riscv64 env and,
for example, is 0x200000 on the XuanTie 910 CPU.

 * Linux Kernel 5.18 ~
 *      PGTABLE_LEVELS = 5
 *      PAGE_OFFSET = 0xff60000000000000
 * Linux Kernel 5.17 ~
 *      PGTABLE_LEVELS = 4
 *      PAGE_OFFSET = 0xffffaf8000000000
 * Linux Kernel 4.19 ~
 *      PGTABLE_LEVELS = 3
 *      PAGE_OFFSET = 0xffffffe000000000

Since these configurations change from time to time and version to version,
it is preferable to export them via vmcoreinfo than to change the crash's
code frequently, it can simplify the development of crash tool.

Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
---
 arch/riscv/kernel/Makefile     |  1 +
 arch/riscv/kernel/crash_core.c | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 arch/riscv/kernel/crash_core.c

diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile
index db6e4b1294ba..4cf303a779ab 100644
--- a/arch/riscv/kernel/Makefile
+++ b/arch/riscv/kernel/Makefile
@@ -81,6 +81,7 @@ obj-$(CONFIG_KGDB)		+= kgdb.o
 obj-$(CONFIG_KEXEC_CORE)	+= kexec_relocate.o crash_save_regs.o machine_kexec.o
 obj-$(CONFIG_KEXEC_FILE)	+= elf_kexec.o machine_kexec_file.o
 obj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
+obj-$(CONFIG_CRASH_CORE)	+= crash_core.o
 
 obj-$(CONFIG_JUMP_LABEL)	+= jump_label.o
 
diff --git a/arch/riscv/kernel/crash_core.c b/arch/riscv/kernel/crash_core.c
new file mode 100644
index 000000000000..b351a3c01355
--- /dev/null
+++ b/arch/riscv/kernel/crash_core.c
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include <linux/crash_core.h>
+#include <linux/pagemap.h>
+
+void arch_crash_save_vmcoreinfo(void)
+{
+	VMCOREINFO_NUMBER(VA_BITS);
+	VMCOREINFO_NUMBER(phys_ram_base);
+
+	vmcoreinfo_append_str("NUMBER(PAGE_OFFSET)=0x%lx\n", PAGE_OFFSET);
+	vmcoreinfo_append_str("NUMBER(VMALLOC_START)=0x%lx\n", VMALLOC_START);
+	vmcoreinfo_append_str("NUMBER(VMALLOC_END)=0x%lx\n", VMALLOC_END);
+	vmcoreinfo_append_str("NUMBER(VMEMMAP_START)=0x%lx\n", VMEMMAP_START);
+	vmcoreinfo_append_str("NUMBER(VMEMMAP_END)=0x%lx\n", VMEMMAP_END);
+#ifdef CONFIG_64BIT
+	vmcoreinfo_append_str("NUMBER(MODULES_VADDR)=0x%lx\n", MODULES_VADDR);
+	vmcoreinfo_append_str("NUMBER(MODULES_END)=0x%lx\n", MODULES_END);
+#endif
+	vmcoreinfo_append_str("NUMBER(KERNEL_LINK_ADDR)=0x%lx\n", KERNEL_LINK_ADDR);
+}
-- 
2.17.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH V5 2/2] Documentation: kdump: describe VMCOREINFO export for RISCV64
  2022-10-26 14:42 [PATCH V5 0/2] Support VMCOREINFO export for RISCV64 Xianting Tian
  2022-10-26 14:42 ` [PATCH V5 1/2] RISC-V: Add arch_crash_save_vmcoreinfo support Xianting Tian
@ 2022-10-26 14:42 ` Xianting Tian
  2022-10-31  9:17 ` [PATCH V5 0/2] Support " Baoquan He
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 14+ messages in thread
From: Xianting Tian @ 2022-10-26 14:42 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou, anup, heiko, guoren, mick,
	alexandre.ghiti, bhe, vgoyal, dyoung, corbet, Conor.Dooley,
	bagasdotme
  Cc: kexec, linux-doc, linux-riscv, linux-kernel, crash-utility,
	heinrich.schuchardt, k-hagio-ab, hschauhan, yixun.lan,
	Xianting Tian

The following interrelated definitions and ranges are needed by the kdump
crash tool, which are exported by "arch/riscv/kernel/crash_core.c":
    VA_BITS,
    PAGE_OFFSET,
    phys_ram_base,
    KERNEL_LINK_ADDR,
    MODULES_VADDR ~ MODULES_END,
    VMALLOC_START ~ VMALLOC_END,
    VMEMMAP_START ~ VMEMMAP_END,

Document these RISCV64 exports above.

Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
---
 .../admin-guide/kdump/vmcoreinfo.rst          | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/Documentation/admin-guide/kdump/vmcoreinfo.rst b/Documentation/admin-guide/kdump/vmcoreinfo.rst
index 6726f439958c..86fd88492870 100644
--- a/Documentation/admin-guide/kdump/vmcoreinfo.rst
+++ b/Documentation/admin-guide/kdump/vmcoreinfo.rst
@@ -595,3 +595,32 @@ X2TLB
 -----
 
 Indicates whether the crashed kernel enabled SH extended mode.
+
+RISCV64
+=======
+
+VA_BITS
+-------
+
+The maximum number of bits for virtual addresses. Used to compute the
+virtual memory ranges.
+
+PAGE_OFFSET
+-----------
+
+Indicates the virtual kernel start address of the direct-mapped RAM region.
+
+phys_ram_base
+-------------
+
+Indicates the start physical RAM address.
+
+MODULES_VADDR|MODULES_END|VMALLOC_START|VMALLOC_END|VMEMMAP_START|VMEMMAP_END|KERNEL_LINK_ADDR
+----------------------------------------------------------------------------------------------
+
+Used to get the correct ranges:
+
+  * MODULES_VADDR ~ MODULES_END : Kernel module space.
+  * VMALLOC_START ~ VMALLOC_END : vmalloc() / ioremap() space.
+  * VMEMMAP_START ~ VMEMMAP_END : vmemmap space, used for struct page array.
+  * KERNEL_LINK_ADDR : start address of Kernel link and BPF
-- 
2.17.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH V5 0/2] Support VMCOREINFO export for RISCV64
  2022-10-26 14:42 [PATCH V5 0/2] Support VMCOREINFO export for RISCV64 Xianting Tian
  2022-10-26 14:42 ` [PATCH V5 1/2] RISC-V: Add arch_crash_save_vmcoreinfo support Xianting Tian
  2022-10-26 14:42 ` [PATCH V5 2/2] Documentation: kdump: describe VMCOREINFO export for RISCV64 Xianting Tian
@ 2022-10-31  9:17 ` Baoquan He
  2022-11-18  0:11 ` Baoquan He
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 14+ messages in thread
From: Baoquan He @ 2022-10-31  9:17 UTC (permalink / raw)
  To: Xianting Tian
  Cc: paul.walmsley, palmer, aou, anup, heiko, guoren, mick,
	alexandre.ghiti, vgoyal, dyoung, corbet, Conor.Dooley,
	bagasdotme, kexec, linux-doc, linux-riscv, linux-kernel,
	crash-utility, heinrich.schuchardt, k-hagio-ab, hschauhan,
	yixun.lan

On 10/26/22 at 10:42pm, Xianting Tian wrote:
> As disscussed in below patch set, the patch of 'describe VMCOREINFO export in Documentation'
> need to update according to Bagas's comments. 
> https://lore.kernel.org/linux-riscv/22AAF52E-8CC8-4D11-99CB-88DE4D113444@kernel.org/
> 
> As others patches in above patch set already applied, so this patch set only contains below two
> patches.
> 
> ------
> Changes:
>    Fix commit message in patch 2: use "Document these RISCV64 exports above" instead of
>    "This patch just add the description of VMCOREINFO export for RISCV64."
> V1 -> V2:
>    Remove unnecessary overline above header text in patch 2.
> V2 -> V3:
>    Fix commit message in patch 1,2; 
>    Use 'space' instead of 'region' for vmemmap description in patch 2.
> V3 -> V4:
>    Remove unnecessary kernel space export:
>    KASAN_SHADOW_START ~ KASAN_SHADOW_END,
>    ADDRESS_SPACE_END
> V4 -> V5:
>    Remove IS_ENABLED() judgement for KERNEL_LINK_ADDR in patch 1.

This series looks good to me, thanks.

Acked-by: Baoquan He <bhe@redhat.com>


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH V5 1/2] RISC-V: Add arch_crash_save_vmcoreinfo support
  2022-10-26 14:42 ` [PATCH V5 1/2] RISC-V: Add arch_crash_save_vmcoreinfo support Xianting Tian
@ 2022-11-17  4:15   ` Deepak Gupta
  2022-11-17 15:43   ` Guo Ren
  1 sibling, 0 replies; 14+ messages in thread
From: Deepak Gupta @ 2022-11-17  4:15 UTC (permalink / raw)
  To: Xianting Tian
  Cc: paul.walmsley, palmer, aou, anup, heiko, guoren, mick,
	alexandre.ghiti, bhe, vgoyal, dyoung, corbet, Conor.Dooley,
	bagasdotme, kexec, linux-doc, linux-riscv, linux-kernel,
	crash-utility, heinrich.schuchardt, k-hagio-ab, hschauhan,
	yixun.lan

On Wed, Oct 26, 2022 at 10:42:07PM +0800, Xianting Tian wrote:
>Add arch_crash_save_vmcoreinfo(), which exports VM layout(MODULES, VMALLOC,
>VMEMMAP ranges and KERNEL_LINK_ADDR), va bits and ram base for vmcore.
>
>Default pagetable levels and PAGE_OFFSET aren't same for different kernel
>version as below. For pagetable levels, it sets sv57 by default and falls
>back to setting sv48 at boot time if sv57 is not supported by the hardware.
>
>For ram base, the default value is 0x80200000 for qemu riscv64 env and,
>for example, is 0x200000 on the XuanTie 910 CPU.
>
> * Linux Kernel 5.18 ~
> *      PGTABLE_LEVELS = 5
> *      PAGE_OFFSET = 0xff60000000000000
> * Linux Kernel 5.17 ~
> *      PGTABLE_LEVELS = 4
> *      PAGE_OFFSET = 0xffffaf8000000000
> * Linux Kernel 4.19 ~
> *      PGTABLE_LEVELS = 3
> *      PAGE_OFFSET = 0xffffffe000000000
>
>Since these configurations change from time to time and version to version,
>it is preferable to export them via vmcoreinfo than to change the crash's
>code frequently, it can simplify the development of crash tool.
>
>Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
>---
> arch/riscv/kernel/Makefile     |  1 +
> arch/riscv/kernel/crash_core.c | 21 +++++++++++++++++++++
> 2 files changed, 22 insertions(+)
> create mode 100644 arch/riscv/kernel/crash_core.c
>
>diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile
>index db6e4b1294ba..4cf303a779ab 100644
>--- a/arch/riscv/kernel/Makefile
>+++ b/arch/riscv/kernel/Makefile
>@@ -81,6 +81,7 @@ obj-$(CONFIG_KGDB)		+= kgdb.o
> obj-$(CONFIG_KEXEC_CORE)	+= kexec_relocate.o crash_save_regs.o machine_kexec.o
> obj-$(CONFIG_KEXEC_FILE)	+= elf_kexec.o machine_kexec_file.o
> obj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
>+obj-$(CONFIG_CRASH_CORE)	+= crash_core.o
>
> obj-$(CONFIG_JUMP_LABEL)	+= jump_label.o
>
>diff --git a/arch/riscv/kernel/crash_core.c b/arch/riscv/kernel/crash_core.c
>new file mode 100644
>index 000000000000..b351a3c01355
>--- /dev/null
>+++ b/arch/riscv/kernel/crash_core.c
>@@ -0,0 +1,21 @@
>+// SPDX-License-Identifier: GPL-2.0-only
>+
>+#include <linux/crash_core.h>
>+#include <linux/pagemap.h>
>+
>+void arch_crash_save_vmcoreinfo(void)
>+{
>+	VMCOREINFO_NUMBER(VA_BITS);
>+	VMCOREINFO_NUMBER(phys_ram_base);
>+
>+	vmcoreinfo_append_str("NUMBER(PAGE_OFFSET)=0x%lx\n", PAGE_OFFSET);
>+	vmcoreinfo_append_str("NUMBER(VMALLOC_START)=0x%lx\n", VMALLOC_START);
>+	vmcoreinfo_append_str("NUMBER(VMALLOC_END)=0x%lx\n", VMALLOC_END);
>+	vmcoreinfo_append_str("NUMBER(VMEMMAP_START)=0x%lx\n", VMEMMAP_START);
>+	vmcoreinfo_append_str("NUMBER(VMEMMAP_END)=0x%lx\n", VMEMMAP_END);
>+#ifdef CONFIG_64BIT
>+	vmcoreinfo_append_str("NUMBER(MODULES_VADDR)=0x%lx\n", MODULES_VADDR);
>+	vmcoreinfo_append_str("NUMBER(MODULES_END)=0x%lx\n", MODULES_END);
>+#endif
>+	vmcoreinfo_append_str("NUMBER(KERNEL_LINK_ADDR)=0x%lx\n", KERNEL_LINK_ADDR);
>+}
>-- 
>2.17.1
>

I had been looking around to play around with crash-utility.
Applied v5 patches, triggered a crash and have been able to use crash tool with commands 
like vtop/bt.

Tested-by: Deepak Gupta <debug@rivosinc.com>

Thanks
debug


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH V5 1/2] RISC-V: Add arch_crash_save_vmcoreinfo support
  2022-10-26 14:42 ` [PATCH V5 1/2] RISC-V: Add arch_crash_save_vmcoreinfo support Xianting Tian
  2022-11-17  4:15   ` Deepak Gupta
@ 2022-11-17 15:43   ` Guo Ren
  1 sibling, 0 replies; 14+ messages in thread
From: Guo Ren @ 2022-11-17 15:43 UTC (permalink / raw)
  To: Xianting Tian
  Cc: paul.walmsley, palmer, aou, anup, heiko, mick, alexandre.ghiti,
	bhe, vgoyal, dyoung, corbet, Conor.Dooley, bagasdotme, kexec,
	linux-doc, linux-riscv, linux-kernel, crash-utility,
	heinrich.schuchardt, k-hagio-ab, hschauhan, yixun.lan

Tested-by: Guo Ren <guoren@kernel.org>

On Wed, Oct 26, 2022 at 10:42 PM Xianting Tian
<xianting.tian@linux.alibaba.com> wrote:
>
> Add arch_crash_save_vmcoreinfo(), which exports VM layout(MODULES, VMALLOC,
> VMEMMAP ranges and KERNEL_LINK_ADDR), va bits and ram base for vmcore.
>
> Default pagetable levels and PAGE_OFFSET aren't same for different kernel
> version as below. For pagetable levels, it sets sv57 by default and falls
> back to setting sv48 at boot time if sv57 is not supported by the hardware.
>
> For ram base, the default value is 0x80200000 for qemu riscv64 env and,
> for example, is 0x200000 on the XuanTie 910 CPU.
>
>  * Linux Kernel 5.18 ~
>  *      PGTABLE_LEVELS = 5
>  *      PAGE_OFFSET = 0xff60000000000000
>  * Linux Kernel 5.17 ~
>  *      PGTABLE_LEVELS = 4
>  *      PAGE_OFFSET = 0xffffaf8000000000
>  * Linux Kernel 4.19 ~
>  *      PGTABLE_LEVELS = 3
>  *      PAGE_OFFSET = 0xffffffe000000000
>
> Since these configurations change from time to time and version to version,
> it is preferable to export them via vmcoreinfo than to change the crash's
> code frequently, it can simplify the development of crash tool.
>
> Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
> ---
>  arch/riscv/kernel/Makefile     |  1 +
>  arch/riscv/kernel/crash_core.c | 21 +++++++++++++++++++++
>  2 files changed, 22 insertions(+)
>  create mode 100644 arch/riscv/kernel/crash_core.c
>
> diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile
> index db6e4b1294ba..4cf303a779ab 100644
> --- a/arch/riscv/kernel/Makefile
> +++ b/arch/riscv/kernel/Makefile
> @@ -81,6 +81,7 @@ obj-$(CONFIG_KGDB)            += kgdb.o
>  obj-$(CONFIG_KEXEC_CORE)       += kexec_relocate.o crash_save_regs.o machine_kexec.o
>  obj-$(CONFIG_KEXEC_FILE)       += elf_kexec.o machine_kexec_file.o
>  obj-$(CONFIG_CRASH_DUMP)       += crash_dump.o
> +obj-$(CONFIG_CRASH_CORE)       += crash_core.o
>
>  obj-$(CONFIG_JUMP_LABEL)       += jump_label.o
>
> diff --git a/arch/riscv/kernel/crash_core.c b/arch/riscv/kernel/crash_core.c
> new file mode 100644
> index 000000000000..b351a3c01355
> --- /dev/null
> +++ b/arch/riscv/kernel/crash_core.c
> @@ -0,0 +1,21 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +
> +#include <linux/crash_core.h>
> +#include <linux/pagemap.h>
> +
> +void arch_crash_save_vmcoreinfo(void)
> +{
> +       VMCOREINFO_NUMBER(VA_BITS);
> +       VMCOREINFO_NUMBER(phys_ram_base);
> +
> +       vmcoreinfo_append_str("NUMBER(PAGE_OFFSET)=0x%lx\n", PAGE_OFFSET);
> +       vmcoreinfo_append_str("NUMBER(VMALLOC_START)=0x%lx\n", VMALLOC_START);
> +       vmcoreinfo_append_str("NUMBER(VMALLOC_END)=0x%lx\n", VMALLOC_END);
> +       vmcoreinfo_append_str("NUMBER(VMEMMAP_START)=0x%lx\n", VMEMMAP_START);
> +       vmcoreinfo_append_str("NUMBER(VMEMMAP_END)=0x%lx\n", VMEMMAP_END);
> +#ifdef CONFIG_64BIT
> +       vmcoreinfo_append_str("NUMBER(MODULES_VADDR)=0x%lx\n", MODULES_VADDR);
> +       vmcoreinfo_append_str("NUMBER(MODULES_END)=0x%lx\n", MODULES_END);
> +#endif
> +       vmcoreinfo_append_str("NUMBER(KERNEL_LINK_ADDR)=0x%lx\n", KERNEL_LINK_ADDR);
> +}
> --
> 2.17.1
>


-- 
Best Regards
 Guo Ren

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH V5 0/2] Support VMCOREINFO export for RISCV64
  2022-10-26 14:42 [PATCH V5 0/2] Support VMCOREINFO export for RISCV64 Xianting Tian
                   ` (2 preceding siblings ...)
  2022-10-31  9:17 ` [PATCH V5 0/2] Support " Baoquan He
@ 2022-11-18  0:11 ` Baoquan He
  2022-12-03  0:49 ` Palmer Dabbelt
  2022-12-03  1:00 ` patchwork-bot+linux-riscv
  5 siblings, 0 replies; 14+ messages in thread
From: Baoquan He @ 2022-11-18  0:11 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou
  Cc: Xianting Tian, anup, heiko, guoren, mick, alexandre.ghiti,
	vgoyal, dyoung, corbet, Conor.Dooley, bagasdotme, kexec,
	linux-doc, linux-riscv, linux-kernel, crash-utility,
	heinrich.schuchardt, k-hagio-ab, hschauhan, yixun.lan

Hi risc-v maintainers,

On 10/26/22 at 10:42pm, Xianting Tian wrote:
> As disscussed in below patch set, the patch of 'describe VMCOREINFO export in Documentation'
> need to update according to Bagas's comments. 
> https://lore.kernel.org/linux-riscv/22AAF52E-8CC8-4D11-99CB-88DE4D113444@kernel.org/
> 
> As others patches in above patch set already applied, so this patch set only contains below two
> patches.

Could you pick this patchset into risc-v tree since it has got acks
and two Tested-by?

Thanks
Baoquan


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH V5 0/2] Support VMCOREINFO export for RISCV64
  2022-10-26 14:42 [PATCH V5 0/2] Support VMCOREINFO export for RISCV64 Xianting Tian
                   ` (3 preceding siblings ...)
  2022-11-18  0:11 ` Baoquan He
@ 2022-12-03  0:49 ` Palmer Dabbelt
  2022-12-03  7:53   ` Guo Ren
  2022-12-06 23:05   ` Conor Dooley
  2022-12-03  1:00 ` patchwork-bot+linux-riscv
  5 siblings, 2 replies; 14+ messages in thread
From: Palmer Dabbelt @ 2022-12-03  0:49 UTC (permalink / raw)
  To: mick, corbet, alexandre.ghiti, vgoyal, bhe, Paul Walmsley,
	Conor Dooley, bagasdotme, dyoung, Palmer Dabbelt, heiko,
	Xianting Tian, guoren, anup, aou
  Cc: hschauhan, yixun.lan, kexec, heinrich.schuchardt, linux-doc,
	crash-utility, linux-kernel, k-hagio-ab, linux-riscv

On Wed, 26 Oct 2022 22:42:06 +0800, Xianting Tian wrote:
> As disscussed in below patch set, the patch of 'describe VMCOREINFO export in Documentation'
> need to update according to Bagas's comments.
> https://lore.kernel.org/linux-riscv/22AAF52E-8CC8-4D11-99CB-88DE4D113444@kernel.org/
> 
> As others patches in above patch set already applied, so this patch set only contains below two
> patches.
> 
> [...]

Applied, thanks!

[1/2] RISC-V: Add arch_crash_save_vmcoreinfo support
      https://git.kernel.org/palmer/c/649d6b1019a2
[2/2] Documentation: kdump: describe VMCOREINFO export for RISCV64
      https://git.kernel.org/palmer/c/c5b4216929eb

Best regards,
-- 
Palmer Dabbelt <palmer@rivosinc.com>

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH V5 0/2] Support VMCOREINFO export for RISCV64
  2022-10-26 14:42 [PATCH V5 0/2] Support VMCOREINFO export for RISCV64 Xianting Tian
                   ` (4 preceding siblings ...)
  2022-12-03  0:49 ` Palmer Dabbelt
@ 2022-12-03  1:00 ` patchwork-bot+linux-riscv
  5 siblings, 0 replies; 14+ messages in thread
From: patchwork-bot+linux-riscv @ 2022-12-03  1:00 UTC (permalink / raw)
  To: Xianting Tian
  Cc: linux-riscv, paul.walmsley, palmer, aou, anup, heiko, guoren,
	mick, alexandre.ghiti, bhe, vgoyal, dyoung, corbet, Conor.Dooley,
	bagasdotme, kexec, linux-doc, linux-kernel, crash-utility,
	heinrich.schuchardt, k-hagio-ab, hschauhan, yixun.lan

Hello:

This series was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Wed, 26 Oct 2022 22:42:06 +0800 you wrote:
> As disscussed in below patch set, the patch of 'describe VMCOREINFO export in Documentation'
> need to update according to Bagas's comments.
> https://lore.kernel.org/linux-riscv/22AAF52E-8CC8-4D11-99CB-88DE4D113444@kernel.org/
> 
> As others patches in above patch set already applied, so this patch set only contains below two
> patches.
> 
> [...]

Here is the summary with links:
  - [V5,1/2] RISC-V: Add arch_crash_save_vmcoreinfo support
    https://git.kernel.org/riscv/c/649d6b1019a2
  - [V5,2/2] Documentation: kdump: describe VMCOREINFO export for RISCV64
    https://git.kernel.org/riscv/c/c5b4216929eb

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH V5 0/2] Support VMCOREINFO export for RISCV64
  2022-12-03  0:49 ` Palmer Dabbelt
@ 2022-12-03  7:53   ` Guo Ren
  2022-12-06 23:05   ` Conor Dooley
  1 sibling, 0 replies; 14+ messages in thread
From: Guo Ren @ 2022-12-03  7:53 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: mick, corbet, alexandre.ghiti, vgoyal, bhe, Paul Walmsley,
	Conor Dooley, bagasdotme, dyoung, Palmer Dabbelt, heiko,
	Xianting Tian, anup, aou, hschauhan, yixun.lan, kexec,
	heinrich.schuchardt, linux-doc, crash-utility, linux-kernel,
	k-hagio-ab, linux-riscv

Hi Palmer,

Here are another two fix-up patches of kdump for the crash tool.

https://lore.kernel.org/linux-riscv/20221020141603.2856206-3-guoren@kernel.org/
https://lore.kernel.org/linux-riscv/20221020141603.2856206-2-guoren@kernel.org/

On Sat, Dec 3, 2022 at 8:56 AM Palmer Dabbelt <palmer@rivosinc.com> wrote:
>
> On Wed, 26 Oct 2022 22:42:06 +0800, Xianting Tian wrote:
> > As disscussed in below patch set, the patch of 'describe VMCOREINFO export in Documentation'
> > need to update according to Bagas's comments.
> > https://lore.kernel.org/linux-riscv/22AAF52E-8CC8-4D11-99CB-88DE4D113444@kernel.org/
> >
> > As others patches in above patch set already applied, so this patch set only contains below two
> > patches.
> >
> > [...]
>
> Applied, thanks!
>
> [1/2] RISC-V: Add arch_crash_save_vmcoreinfo support
>       https://git.kernel.org/palmer/c/649d6b1019a2
> [2/2] Documentation: kdump: describe VMCOREINFO export for RISCV64
>       https://git.kernel.org/palmer/c/c5b4216929eb
>
> Best regards,
> --
> Palmer Dabbelt <palmer@rivosinc.com>



-- 
Best Regards
 Guo Ren

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH V5 0/2] Support VMCOREINFO export for RISCV64
  2022-12-03  0:49 ` Palmer Dabbelt
  2022-12-03  7:53   ` Guo Ren
@ 2022-12-06 23:05   ` Conor Dooley
  2022-12-07  3:34     ` Guo Ren
  1 sibling, 1 reply; 14+ messages in thread
From: Conor Dooley @ 2022-12-06 23:05 UTC (permalink / raw)
  To: Palmer Dabbelt, Xianting Tian
  Cc: mick, corbet, alexandre.ghiti, vgoyal, bhe, Paul Walmsley,
	Conor Dooley, bagasdotme, dyoung, Palmer Dabbelt, heiko,
	Xianting Tian, guoren, anup, aou, hschauhan, yixun.lan, kexec,
	heinrich.schuchardt, linux-doc, crash-utility, linux-kernel,
	k-hagio-ab, linux-riscv


[-- Attachment #1.1: Type: text/plain, Size: 1078 bytes --]

Hey Palmer, Xianting,

On Fri, Dec 02, 2022 at 04:49:39PM -0800, Palmer Dabbelt wrote:
> On Wed, 26 Oct 2022 22:42:06 +0800, Xianting Tian wrote:
> > As disscussed in below patch set, the patch of 'describe VMCOREINFO export in Documentation'
> > need to update according to Bagas's comments.
> > https://lore.kernel.org/linux-riscv/22AAF52E-8CC8-4D11-99CB-88DE4D113444@kernel.org/
> > 
> > As others patches in above patch set already applied, so this patch set only contains below two
> > patches.
> > 
> > [...]
> 
> Applied, thanks!
> 
> [1/2] RISC-V: Add arch_crash_save_vmcoreinfo support
>       https://git.kernel.org/palmer/c/649d6b1019a2

So this patch seems to be causing issues for the nommu build:
https://lore.kernel.org/oe-kbuild-all/202212062250.tR0otHcz-lkp@intel.com/

I had a bit of a poke at trying to see if there were some headers we
could pull in before actually checking the .config only to see:
# CONFIG_MMU is not set

Do we have to wrap the whole thing in a `#ifdef CONFIG_MMU` to fix
compilation here?

Thanks,
Conor.


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH V5 0/2] Support VMCOREINFO export for RISCV64
  2022-12-06 23:05   ` Conor Dooley
@ 2022-12-07  3:34     ` Guo Ren
  2022-12-07  8:08       ` Conor Dooley
  0 siblings, 1 reply; 14+ messages in thread
From: Guo Ren @ 2022-12-07  3:34 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Palmer Dabbelt, Xianting Tian, mick, corbet, alexandre.ghiti,
	vgoyal, bhe, Paul Walmsley, Conor Dooley, bagasdotme, dyoung,
	Palmer Dabbelt, heiko, anup, aou, hschauhan, yixun.lan, kexec,
	heinrich.schuchardt, linux-doc, crash-utility, linux-kernel,
	k-hagio-ab, linux-riscv

On Wed, Dec 7, 2022 at 7:05 AM Conor Dooley <conor@kernel.org> wrote:
>
> Hey Palmer, Xianting,
>
> On Fri, Dec 02, 2022 at 04:49:39PM -0800, Palmer Dabbelt wrote:
> > On Wed, 26 Oct 2022 22:42:06 +0800, Xianting Tian wrote:
> > > As disscussed in below patch set, the patch of 'describe VMCOREINFO export in Documentation'
> > > need to update according to Bagas's comments.
> > > https://lore.kernel.org/linux-riscv/22AAF52E-8CC8-4D11-99CB-88DE4D113444@kernel.org/
> > >
> > > As others patches in above patch set already applied, so this patch set only contains below two
> > > patches.
> > >
> > > [...]
> >
> > Applied, thanks!
> >
> > [1/2] RISC-V: Add arch_crash_save_vmcoreinfo support
> >       https://git.kernel.org/palmer/c/649d6b1019a2
>
> So this patch seems to be causing issues for the nommu build:
> https://lore.kernel.org/oe-kbuild-all/202212062250.tR0otHcz-lkp@intel.com/
>
> I had a bit of a poke at trying to see if there were some headers we
> could pull in before actually checking the .config only to see:
> # CONFIG_MMU is not set
>
> Do we have to wrap the whole thing in a `#ifdef CONFIG_MMU` to fix
> compilation here?
The problem does not belong to the patch.

Could I send a fixup patch? like this?

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index ef8d66de5f38..d8c07999426c 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -512,6 +512,7 @@ config ARCH_HAS_KEXEC_PURGATORY

 config CRASH_DUMP
        bool "Build kdump crash kernel"
+       depends on KEXEC
        help
          Generate crash dump after being started by kexec. This should
          be normally only set in special crash dump kernels which are

>
> Thanks,
> Conor.
>


-- 
Best Regards
 Guo Ren

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH V5 0/2] Support VMCOREINFO export for RISCV64
  2022-12-07  3:34     ` Guo Ren
@ 2022-12-07  8:08       ` Conor Dooley
  2022-12-07  9:15         ` Guo Ren
  0 siblings, 1 reply; 14+ messages in thread
From: Conor Dooley @ 2022-12-07  8:08 UTC (permalink / raw)
  To: Guo Ren
  Cc: Palmer Dabbelt, Xianting Tian, mick, corbet, alexandre.ghiti,
	vgoyal, bhe, Paul Walmsley, Conor Dooley, bagasdotme, dyoung,
	Palmer Dabbelt, heiko, anup, aou, hschauhan, yixun.lan, kexec,
	heinrich.schuchardt, linux-doc, crash-utility, linux-kernel,
	k-hagio-ab, linux-riscv


[-- Attachment #1.1: Type: text/plain, Size: 2053 bytes --]

On Wed, Dec 07, 2022 at 11:34:57AM +0800, Guo Ren wrote:
> On Wed, Dec 7, 2022 at 7:05 AM Conor Dooley <conor@kernel.org> wrote:
> >
> > Hey Palmer, Xianting,
> >
> > On Fri, Dec 02, 2022 at 04:49:39PM -0800, Palmer Dabbelt wrote:
> > > On Wed, 26 Oct 2022 22:42:06 +0800, Xianting Tian wrote:
> > > > As disscussed in below patch set, the patch of 'describe VMCOREINFO export in Documentation'
> > > > need to update according to Bagas's comments.
> > > > https://lore.kernel.org/linux-riscv/22AAF52E-8CC8-4D11-99CB-88DE4D113444@kernel.org/
> > > >
> > > > As others patches in above patch set already applied, so this patch set only contains below two
> > > > patches.
> > > >
> > > > [...]
> > >
> > > Applied, thanks!
> > >
> > > [1/2] RISC-V: Add arch_crash_save_vmcoreinfo support
> > >       https://git.kernel.org/palmer/c/649d6b1019a2
> >
> > So this patch seems to be causing issues for the nommu build:
> > https://lore.kernel.org/oe-kbuild-all/202212062250.tR0otHcz-lkp@intel.com/
> >
> > I had a bit of a poke at trying to see if there were some headers we
> > could pull in before actually checking the .config only to see:
> > # CONFIG_MMU is not set
> >
> > Do we have to wrap the whole thing in a `#ifdef CONFIG_MMU` to fix
> > compilation here?
> The problem does not belong to the patch.
> 
> Could I send a fixup patch? like this?

That seems like a sane dependancy, but did you build that config?
This doesn't fix the problem for me :/

> 
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index ef8d66de5f38..d8c07999426c 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -512,6 +512,7 @@ config ARCH_HAS_KEXEC_PURGATORY
> 
>  config CRASH_DUMP
>         bool "Build kdump crash kernel"
> +       depends on KEXEC
>         help
>           Generate crash dump after being started by kexec. This should
>           be normally only set in special crash dump kernels which are
> 
> >
> > Thanks,
> > Conor.
> >
> 
> 
> -- 
> Best Regards
>  Guo Ren

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH V5 0/2] Support VMCOREINFO export for RISCV64
  2022-12-07  8:08       ` Conor Dooley
@ 2022-12-07  9:15         ` Guo Ren
  0 siblings, 0 replies; 14+ messages in thread
From: Guo Ren @ 2022-12-07  9:15 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Palmer Dabbelt, Xianting Tian, mick, corbet, alexandre.ghiti,
	vgoyal, bhe, Paul Walmsley, Conor Dooley, bagasdotme, dyoung,
	Palmer Dabbelt, heiko, anup, aou, hschauhan, yixun.lan, kexec,
	heinrich.schuchardt, linux-doc, crash-utility, linux-kernel,
	k-hagio-ab, linux-riscv

On Wed, Dec 7, 2022 at 4:08 PM Conor Dooley <conor@kernel.org> wrote:
>
> On Wed, Dec 07, 2022 at 11:34:57AM +0800, Guo Ren wrote:
> > On Wed, Dec 7, 2022 at 7:05 AM Conor Dooley <conor@kernel.org> wrote:
> > >
> > > Hey Palmer, Xianting,
> > >
> > > On Fri, Dec 02, 2022 at 04:49:39PM -0800, Palmer Dabbelt wrote:
> > > > On Wed, 26 Oct 2022 22:42:06 +0800, Xianting Tian wrote:
> > > > > As disscussed in below patch set, the patch of 'describe VMCOREINFO export in Documentation'
> > > > > need to update according to Bagas's comments.
> > > > > https://lore.kernel.org/linux-riscv/22AAF52E-8CC8-4D11-99CB-88DE4D113444@kernel.org/
> > > > >
> > > > > As others patches in above patch set already applied, so this patch set only contains below two
> > > > > patches.
> > > > >
> > > > > [...]
> > > >
> > > > Applied, thanks!
> > > >
> > > > [1/2] RISC-V: Add arch_crash_save_vmcoreinfo support
> > > >       https://git.kernel.org/palmer/c/649d6b1019a2
> > >
> > > So this patch seems to be causing issues for the nommu build:
> > > https://lore.kernel.org/oe-kbuild-all/202212062250.tR0otHcz-lkp@intel.com/
> > >
> > > I had a bit of a poke at trying to see if there were some headers we
> > > could pull in before actually checking the .config only to see:
> > > # CONFIG_MMU is not set
> > >
> > > Do we have to wrap the whole thing in a `#ifdef CONFIG_MMU` to fix
> > > compilation here?
> > The problem does not belong to the patch.
> >
> > Could I send a fixup patch? like this?
>
> That seems like a sane dependancy, but did you build that config?
> This doesn't fix the problem for me :/
Sorry, It's the wrong fixup. Here is the new version, and tested. Thx
for the report.

https://lore.kernel.org/linux-riscv/20221207091112.2258674-1-guoren@kernel.org/

>
> >
> > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> > index ef8d66de5f38..d8c07999426c 100644
> > --- a/arch/riscv/Kconfig
> > +++ b/arch/riscv/Kconfig
> > @@ -512,6 +512,7 @@ config ARCH_HAS_KEXEC_PURGATORY
> >
> >  config CRASH_DUMP
> >         bool "Build kdump crash kernel"
> > +       depends on KEXEC
> >         help
> >           Generate crash dump after being started by kexec. This should
> >           be normally only set in special crash dump kernels which are
> >
> > >
> > > Thanks,
> > > Conor.
> > >
> >
> >
> > --
> > Best Regards
> >  Guo Ren



-- 
Best Regards
 Guo Ren

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-12-07  9:16 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-26 14:42 [PATCH V5 0/2] Support VMCOREINFO export for RISCV64 Xianting Tian
2022-10-26 14:42 ` [PATCH V5 1/2] RISC-V: Add arch_crash_save_vmcoreinfo support Xianting Tian
2022-11-17  4:15   ` Deepak Gupta
2022-11-17 15:43   ` Guo Ren
2022-10-26 14:42 ` [PATCH V5 2/2] Documentation: kdump: describe VMCOREINFO export for RISCV64 Xianting Tian
2022-10-31  9:17 ` [PATCH V5 0/2] Support " Baoquan He
2022-11-18  0:11 ` Baoquan He
2022-12-03  0:49 ` Palmer Dabbelt
2022-12-03  7:53   ` Guo Ren
2022-12-06 23:05   ` Conor Dooley
2022-12-07  3:34     ` Guo Ren
2022-12-07  8:08       ` Conor Dooley
2022-12-07  9:15         ` Guo Ren
2022-12-03  1:00 ` patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).