[PATCH 2/3] LoongArch: Add kdump support

2022-08-28 Thread Youling Tang
This patch adds support for kdump, the kernel will reserve a region for the crash kernel and jump there on panic. Arch-specific functions are added to allow for implementing a crash dump file interface, /proc/vmcore, which can be viewed as a ELF file. A user space tool, like kexec-tools, is

[PATCH 0/3] LoongArch: Add kexec/kdump support

2022-08-28 Thread Youling Tang
This patch series to support kexec/kdump (only 64bit). Kexec is a system call that enables you to load and boot into another kernel from the currently running kernel. This is useful for kernel developers or other people who need to reboot very quickly without waiting for the whole BIOS boot

[PATCH 1/3] LoongArch: Add kexec support

2022-08-28 Thread Youling Tang
Add three new files, kexec.h, machine_kexec.c and relocate_kernel.S to the LoongArch architecture that add support for the kexec re-boot mechanis (CONFIG_KEXEC) on LoongArch platforms. Supports loading vmlinux (vmlinux.elf) in ELF format and vmlinux.efi in PE format. I tested this on LoongArch

[PATCH 3/3] LoongArch: Enable CONFIG_KEXEC

2022-08-28 Thread Youling Tang
Defaults enable CONFIG_KEXEC to convenient kexec operations. Signed-off-by: Youling Tang --- arch/loongarch/configs/loongson3_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/loongarch/configs/loongson3_defconfig b/arch/loongarch/configs/loongson3_defconfig index

Re: [PATCH RFC 1/2] coding-style.rst: document BUG() and WARN() rules ("do not crash the kernel")

2022-08-28 Thread Linus Torvalds
On Sun, Aug 28, 2022 at 6:56 PM Dave Young wrote: > > > John mentioned PANIC_ON(). > > I would vote for PANIC_ON(), it sounds like a good idea, because > BUG_ON() is not obvious and, PANIC_ON() can alert the code author that > this will cause a kernel panic and one will be more careful before >

Re: [PATCH RFC 1/2] coding-style.rst: document BUG() and WARN() rules ("do not crash the kernel")

2022-08-28 Thread Dave Young
Hi David, On Sat, 27 Aug 2022 at 01:02, David Hildenbrand wrote: > > On 26.08.22 03:43, Dave Young wrote: > > Hi David, > > > > [Added more people in cc] > > > > Hi Dave, > > thanks for your input! You are welcome :) > > [...] > > >> Side note: especially with kdump() I feel like we might see

Re: [PATCH 0/5] arm64/mm: remap crash kernel with base pages even if rodata_full disabled

2022-08-28 Thread Baoquan He
On 08/25/22 at 10:48am, Mike Rapoport wrote: .. > > > There were several rounds of discussion how to remap with base pages only > > > the crash kernel area, the latest one here: > > > > > > https://lore.kernel.org/all/1656777473-73887-1-git-send-email-guanghuif...@linux.alibaba.com > > > >