[PATCH v14 01/11] x86: kdump: replace the hard-coded alignment with macro CRASH_ALIGN

2021-01-29 Thread Chen Zhou
-by: Baoquan He Signed-off-by: Chen Zhou Tested-by: John Donnelly --- arch/x86/include/asm/kexec.h | 3 +++ arch/x86/kernel/setup.c | 5 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h index 6802c59e8252..be18dc7ae51f

[PATCH v14 04/11] x86: kdump: move xen_pv_domain() check and insert_resource() to setup_arch()

2021-01-29 Thread Chen Zhou
-by: Mike Rapoport Signed-off-by: Chen Zhou Tested-by: John Donnelly --- arch/x86/kernel/setup.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 086a04235be4..5d676efc32f6 100644 --- a/arch/x86

[PATCH v14 06/11] x86/elf: Move vmcore_elf_check_arch_cross to arch/x86/include/asm/elf.h

2021-01-29 Thread Chen Zhou
nclude/asm/elf.h to fix the warning. Fixes: 2db65f1db17d ("x86: kdump: move reserve_crashkernel[_low]() into crash_core.c") Reported-by: kernel test robot Suggested-by: Mike Rapoport Signed-off-by: Chen Zhou --- arch/x86/include/asm/elf.h | 3 +++ arch/x86/include/asm/kexec.h | 3 -

[PATCH v14 00/11] support reserving crashkernel above 4G on arm64 kdump

2021-01-29 Thread Chen Zhou
20/7/2/1443 [v11]: https://lkml.org/lkml/2020/8/1/150 [v12]: https://lkml.org/lkml/2020/9/7/1037 [v13]: https://lkml.org/lkml/2020/10/31/34 Chen Zhou (11): x86: kdump: replace the hard-coded alignment with macro CRASH_ALIGN x86: kdump: make the lower bound of crash kernel reservation consi

[PATCH v14 11/11] kdump: update Documentation about crashkernel

2021-01-29 Thread Chen Zhou
n DMA zone automatically and "crashkernel=Y,low" can be used to allocate specified size low memory. So update the Documentation. Signed-off-by: Chen Zhou Tested-by: John Donnelly --- Documentation/admin-guide/kdump/kdump.rst | 22 --- .../admin-guide/kernel-paramet

[PATCH v14 07/11] arm64: kdump: introduce some macroes for crash kernel reservation

2021-01-29 Thread Chen Zhou
-off-by: Chen Zhou Tested-by: John Donnelly --- arch/arm64/include/asm/kexec.h | 6 ++ arch/arm64/mm/init.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/arm64/include/asm/kexec.h b/arch/arm64/include/asm/kexec.h index d24b527e8c00..3f6ecae0bc68

[PATCH v14 03/11] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-01-29 Thread Chen Zhou
To make the functions reserve_crashkernel() as generic, replace some hard-coded numbers with macro CRASH_ADDR_LOW_MAX. Signed-off-by: Chen Zhou Tested-by: John Donnelly --- arch/x86/kernel/setup.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel

[PATCH v14 09/11] x86, arm64: Add ARCH_WANT_RESERVE_CRASH_KERNEL config

2021-01-29 Thread Chen Zhou
this by X86 and ARM64. Suggested-by: Mike Rapoport Suggested-by: Baoquan He Signed-off-by: Chen Zhou --- arch/Kconfig| 3 +++ arch/arm64/Kconfig | 1 + arch/x86/Kconfig| 2 ++ kernel/crash_core.c | 7 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/Kconfig b

[PATCH v14 10/11] arm64: kdump: add memory for devices by DT property linux, usable-memory-range

2021-01-29 Thread Chen Zhou
ange() has been called. Signed-off-by: Chen Zhou Tested-by: John Donnelly --- arch/arm64/mm/init.c | 43 +-- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index d20f5c444ebf..180a25b67f55 100644

[PATCH v14 08/11] arm64: kdump: reimplement crashkernel=X

2021-01-29 Thread Chen Zhou
ools, rename the low region as "Crash kernel (low)". Signed-off-by: Chen Zhou Tested-by: John Donnelly --- arch/arm64/include/asm/kexec.h | 4 ++ arch/arm64/kernel/setup.c | 13 ++- arch/arm64/mm/init.c | 68 ++ kernel/crash_core.

[PATCH v14 05/11] x86: kdump: move reserve_crashkernel[_low]() into crash_core.c

2021-01-29 Thread Chen Zhou
Make the functions reserve_crashkernel[_low]() as generic. Arm64 will use these to reimplement crashkernel=X. Signed-off-by: Chen Zhou Tested-by: John Donnelly --- arch/x86/include/asm/kexec.h | 25 ++ arch/x86/kernel/setup.c | 143 +-- include/linux

[PATCH v14 02/11] x86: kdump: make the lower bound of crash kernel reservation consistent

2021-01-29 Thread Chen Zhou
The lower bounds of crash kernel reservation and crash kernel low reservation are different, use the consistent value CRASH_ALIGN. Suggested-by: Dave Young Signed-off-by: Chen Zhou Tested-by: John Donnelly --- arch/x86/kernel/setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH v13 1/8] x86: kdump: replace the hard-coded alignment with macro CRASH_ALIGN

2020-10-31 Thread Chen Zhou
Move CRASH_ALIGN to header asm/kexec.h and replace the hard-coded alignment with macro CRASH_ALIGN in function reserve_crashkernel(). Suggested-by: Dave Young Signed-off-by: Chen Zhou Tested-by: John Donnelly --- arch/x86/include/asm/kexec.h | 3 +++ arch/x86/kernel/setup.c | 5 + 2

[PATCH v13 2/8] x86: kdump: make the lower bound of crash kernel reservation consistent

2020-10-31 Thread Chen Zhou
The lower bounds of crash kernel reservation and crash kernel low reservation are different, use the consistent value CRASH_ALIGN. Suggested-by: Dave Young Signed-off-by: Chen Zhou Tested-by: John Donnelly --- arch/x86/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v13 0/8] support reserving crashkernel above 4G on arm64 kdump

2020-10-31 Thread Chen Zhou
0/5/21/213 [v9]: https://lkml.org/lkml/2020/6/28/73 [v10]: https://lkml.org/lkml/2020/7/2/1443 [v11]: https://lkml.org/lkml/2020/8/1/150 [v12]: https://lkml.org/lkml/2020/9/7/1037 Chen Zhou (8): x86: kdump: replace the hard-coded alignment with macro CRASH_ALIGN x86: kdump: make the lowe

[PATCH v13 4/8] x86: kdump: move reserve_crashkernel[_low]() into crash_core.c

2020-10-31 Thread Chen Zhou
Make the functions reserve_crashkernel[_low]() as generic. Arm64 will use these to reimplement crashkernel=X. Signed-off-by: Chen Zhou Tested-by: John Donnelly --- arch/x86/include/asm/kexec.h | 25 ++ arch/x86/kernel/setup.c | 151 +--- include/linux

[PATCH v13 7/8] arm64: kdump: add memory for devices by DT property linux, usable-memory-range

2020-10-31 Thread Chen Zhou
ange() has been called. Signed-off-by: Chen Zhou Tested-by: John Donnelly --- arch/arm64/mm/init.c | 43 +-- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 888c4f7eadc3..794f992cb200 100644

[PATCH v13 3/8] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2020-10-31 Thread Chen Zhou
To make the functions reserve_crashkernel() as generic, replace some hard-coded numbers with macro CRASH_ADDR_LOW_MAX. Signed-off-by: Chen Zhou Tested-by: John Donnelly --- arch/x86/kernel/setup.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel

[PATCH v13 5/8] arm64: kdump: introduce some macroes for crash kernel reservation

2020-10-31 Thread Chen Zhou
-off-by: Chen Zhou Tested-by: John Donnelly --- arch/arm64/include/asm/kexec.h | 6 ++ arch/arm64/include/asm/processor.h | 1 + arch/arm64/mm/init.c | 8 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/arch/arm64/include/asm/kexec.h b/arch/arm64

[PATCH v13 6/8] arm64: kdump: reimplement crashkernel=X

2020-10-31 Thread Chen Zhou
f existing kexec-tools, rename the low region as "Crash kernel (low)". Signed-off-by: Chen Zhou Tested-by: John Donnelly --- arch/arm64/include/asm/kexec.h | 9 + arch/arm64/kernel/setup.c | 13 +++- arch/arm64/mm/init.c | 60 ++-

[PATCH v13 8/8] kdump: update Documentation about crashkernel

2020-10-31 Thread Chen Zhou
o allocate at least 256M low memory in DMA zone automatically (or the DMA32 zone if CONFIG_ZONE_DMA is disabled). "crashkernel=Y,low" can be used to allocate specified size low memory. So update the Documentation. Signed-off-by: Chen Zhou Tested-by: John Donnelly --- Documentati

[PATCH v12 6/9] arm64: kdump: reimplement crashkernel=X

2020-09-07 Thread Chen Zhou
ename the low region as "Crash kernel (low)". Signed-off-by: Chen Zhou --- arch/arm64/include/asm/kexec.h | 9 + arch/arm64/kernel/setup.c | 13 +++- arch/arm64/mm/init.c | 60 ++ arch/arm64/mm/mmu.c| 4 +++ kernel/cra

[PATCH v12 8/9] arm64: kdump: add memory for devices by DT property linux, usable-memory-range

2020-09-07 Thread Chen Zhou
ange() has been called. Signed-off-by: Chen Zhou --- arch/arm64/mm/init.c | 43 +-- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index e56a0e5d5b77..2af8c38279d9 100644 --- a/arch/arm64/mm/in

[PATCH v12 3/9] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel[_low]()

2020-09-07 Thread Chen Zhou
To make the functions reserve_crashkernel[_low]() as generic, replace some hard-coded numbers with macro CRASH_ADDR_LOW_MAX. Signed-off-by: Chen Zhou --- arch/x86/kernel/setup.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/setup.c b/arch/x86

[PATCH v12 0/9] support reserving crashkernel above 4G on arm64 kdump

2020-09-07 Thread Chen Zhou
.org/lkml/2019/5/6/1360 [v6]: https://lkml.org/lkml/2019/8/30/142 [v7]: https://lkml.org/lkml/2019/12/23/411 [v8]: https://lkml.org/lkml/2020/5/21/213 [v9]: https://lkml.org/lkml/2020/6/28/73 [v10]: https://lkml.org/lkml/2020/7/2/1443 [v11]: https://lkml.org/lkml/2020/8/1/150 Chen Zhou (9): x86:

[PATCH v12 4/9] x86: kdump: move reserve_crashkernel[_low]() into crash_core.c

2020-09-07 Thread Chen Zhou
Make the functions reserve_crashkernel[_low]() as generic. Arm64 will use these to reimplement crashkernel=X. There is no functional change. Signed-off-by: Chen Zhou --- arch/x86/include/asm/kexec.h | 25 + arch/x86/kernel/setup.c | 163 +-- include/linux

[PATCH v12 9/9] kdump: update Documentation about crashkernel

2020-09-07 Thread Chen Zhou
ttle free low memory after low allocation, the system may not work well. So add a threshold and go for high allocation directly if the required size is too large. The threshold is set as the half of low memory. So update the Documentation. Signed-off-by: Chen Zhou --- Documentation/admin-g

[PATCH v12 5/9] arm64: kdump: introduce some macroes for crash kernel reservation

2020-09-07 Thread Chen Zhou
-off-by: Chen Zhou --- arch/arm64/include/asm/kexec.h | 6 ++ arch/arm64/include/asm/processor.h | 1 + arch/arm64/mm/init.c | 8 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/arch/arm64/include/asm/kexec.h b/arch/arm64/include/asm/kexec.h index

[PATCH v12 7/9] kdump: add threshold for the required memory

2020-09-07 Thread Chen Zhou
. Signed-off-by: Chen Zhou --- kernel/crash_core.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/kernel/crash_core.c b/kernel/crash_core.c index 3f735cb37ace..d11d597a470d 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_core.c @@ -378,6 +378,15 @@ int __init

[PATCH v12 2/9] x86: kdump: make the lower bound of crash kernel reservation consistent

2020-09-07 Thread Chen Zhou
The lower bounds of crash kernel reservation and crash kernel low reservation are different, use the consistent value CRASH_ALIGN. Suggested-by: Dave Young Signed-off-by: Chen Zhou --- arch/x86/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel

[PATCH v12 1/9] x86: kdump: move CRASH_ALIGN to 2M

2020-09-07 Thread Chen Zhou
-off-by: Chen Zhou --- arch/x86/include/asm/kexec.h | 3 +++ arch/x86/kernel/setup.c | 5 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h index 6802c59e8252..83f200dd54a1 100644 --- a/arch/x86/include/asm/kexec.h

[PATCH v11 5/5] kdump: update Documentation about crashkernel

2020-08-01 Thread Chen Zhou
platforms, change ZONE_DMA memtioned above to ZONE_DMA32. So update the Documentation. Signed-off-by: Chen Zhou --- Documentation/admin-guide/kdump/kdump.rst | 21 --- .../admin-guide/kernel-parameters.txt | 11 -- 2 files changed, 27 insertions(+), 5 deletion

[PATCH v11 0/5] support reserving crashkernel above 4G on arm64 kdump

2020-08-01 Thread Chen Zhou
rg/lkml/2019/5/6/1360 [v6]: https://lkml.org/lkml/2019/8/30/142 [v7]: https://lkml.org/lkml/2019/12/23/411 [v8]: https://lkml.org/lkml/2020/5/21/213 [v9]: https://lkml.org/lkml/2020/6/28/73 [v10]: https://lkml.org/lkml/2020/7/2/1443 Chen Zhou (5): arm64: kdump: add macro CRASH_ALIGN and

[PATCH v11 4/5] arm64: kdump: add memory for devices by DT property linux, usable-memory-range

2020-08-01 Thread Chen Zhou
ange() has been called. Signed-off-by: Chen Zhou --- arch/arm64/mm/init.c | 44 ++-- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 53c8916fd32f..f385a8281d1b 100644 --- a/arch/arm64/mm/in

[PATCH v11 2/5] x86: kdump: move reserve_crashkernel_low() into crash_core.c

2020-08-01 Thread Chen Zhou
In preparation for supporting reserve_crashkernel_low in arm64 as x86_64 does, move reserve_crashkernel_low() into kernel/crash_core.c. BTW, move x86_64 CRASH_ALIGN to 2M suggested by Dave. CONFIG_PHYSICAL_ALIGN can be selected from 2M to 16M, move to the same as arm64. Signed-off-by: Chen Zhou

[PATCH v11 3/5] arm64: kdump: reimplement crashkernel=X

2020-08-01 Thread Chen Zhou
ZONE_DMA32. Another minor change, there may be two regions reserved for crash dump kernel, in order to distinct from the high region and make no effect to the use of existing kexec-tools, rename the low region as "Crash kernel (low)". Signed-off-by: Chen Zhou --- arch/arm64/include/as

[PATCH v11 1/5] arm64: kdump: add macro CRASH_ALIGN and CRASH_ADDR_LOW_MAX

2020-08-01 Thread Chen Zhou
Expose variable arm64_dma32_phys_limit for followup, and add macro CRASH_ALIGN for alignment, macro CRASH_ADDR_LOW_MAX for upper bound of low crash memory. Use macros instead. Signed-off-by: Chen Zhou --- arch/arm64/include/asm/kexec.h | 5 + arch/arm64/include/asm/processor.h | 1

[PATCH v10 1/5] x86: kdump: move reserve_crashkernel_low() into crash_core.c

2020-07-02 Thread Chen Zhou
reserve low memory if and only if crashkernel=X,low is specified. Different with x86_64, don't set low memory automatically. Reported-by: kbuild test robot Signed-off-by: Chen Zhou Tested-by: John Donnelly Tested-by: Prabhakar Kushwaha Acked-by: Dave Young --- arch/x86/kernel/setup.c| 66

[PATCH v10 5/5] kdump: update Documentation about crashkernel on arm64

2020-07-02 Thread Chen Zhou
Now we support crashkernel=X,[low] on arm64, update the Documentation. We could use parameters "crashkernel=X crashkernel=Y,low" to reserve memory above 4G. Signed-off-by: Chen Zhou Tested-by: John Donnelly Tested-by: Prabhakar Kushwaha --- Documentation/admin-guide/kdump/kdump.rst

[PATCH v10 0/5] support reserving crashkernel above 4G on arm64 kdump

2020-07-02 Thread Chen Zhou
/9/86 [v3]: https://lkml.org/lkml/2019/4/9/306 [v4]: https://lkml.org/lkml/2019/4/15/273 [v5]: https://lkml.org/lkml/2019/5/6/1360 [v6]: https://lkml.org/lkml/2019/8/30/142 [v7]: https://lkml.org/lkml/2019/12/23/411 [v8]: https://lkml.org/lkml/2020/5/21/213 [v9]: https://lkml.org/lkml/2020/6/28/73 C

[PATCH v10 3/5] arm64: kdump: add memory for devices by DT property linux, usable-memory-range

2020-07-02 Thread Chen Zhou
roperty at boot time and call memblock_add() to add the low memory region after memblock_cap_memory_range() has been called. Signed-off-by: Chen Zhou Tested-by: John Donnelly Tested-by: Prabhakar Kushwaha --- arch/arm64/mm/init.c | 43 +-- 1 file changed,

[PATCH v10 4/5] arm64: kdump: fix kdump broken with ZONE_DMA reintroduced

2020-07-02 Thread Chen Zhou
eters "crashkernel=X crashkernel=Y,low". Signed-off-by: Chen Zhou --- kernel/crash_core.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/crash_core.c b/kernel/crash_core.c index a7580d291c37..e8ecbbc761a3 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_

[PATCH v10 2/5] arm64: kdump: reserve crashkenel above 4G for crash dump kernel

2020-07-02 Thread Chen Zhou
. As memtioned above, if crashkernel=X,low is specified simultaneously, reserve spcified size low memory for crash kdump kernel devices firstly and then reserve memory above 4G, which is much simpler. Signed-off-by: Chen Zhou Tested-by: John Donnelly Tested-by: Prabhakar Kushwaha --- arch/arm64

[PATCH v9 2/5] arm64: kdump: reserve crashkenel above 4G for crash dump kernel

2020-06-28 Thread Chen Zhou
. As memtioned above, if crashkernel=X,low is specified simultaneously, reserve spcified size low memory for crash kdump kernel devices firstly and then reserve memory above 4G, which is much simpler. Signed-off-by: Chen Zhou Tested-by: John Donnelly Tested-by: Prabhakar Kushwaha --- arch/arm64

[PATCH v9 3/5] arm64: kdump: add memory for devices by DT property linux, usable-memory-range

2020-06-28 Thread Chen Zhou
roperty at boot time and call memblock_add() to add the low memory region after memblock_cap_memory_range() has been called. Signed-off-by: Chen Zhou Tested-by: John Donnelly Tested-by: Prabhakar Kushwaha --- arch/arm64/mm/init.c | 43 +-- 1 file changed,

[PATCH v9 0/5] support reserving crashkernel above 4G on arm64 kdump

2020-06-28 Thread Chen Zhou
360 [v6]: https://lkml.org/lkml/2019/8/30/142 [v7]: https://lkml.org/lkml/2019/12/23/411 [v8]: https://lkml.org/lkml/2020/5/21/213 Chen Zhou (5): x86: kdump: move reserve_crashkernel_low() into crash_core.c arm64: kdump: reserve crashkenel above 4G for crash dump kernel arm64: kdump:

[PATCH v9 1/5] x86: kdump: move reserve_crashkernel_low() into crash_core.c

2020-06-28 Thread Chen Zhou
reserve low memory if and only if crashkernel=X,low is specified. Different with x86_64, don't set low memory automatically. Reported-by: kbuild test robot Signed-off-by: Chen Zhou Tested-by: John Donnelly Tested-by: Prabhakar Kushwaha --- arch/x86/kernel/setup.c| 66

[PATCH v9 5/5] kdump: update Documentation about crashkernel on arm64

2020-06-28 Thread Chen Zhou
Now we support crashkernel=X,[low] on arm64, update the Documentation. We could use parameters "crashkernel=X crashkernel=Y,low" to reserve memory above 4G. Signed-off-by: Chen Zhou Tested-by: John Donnelly Tested-by: Prabhakar Kushwaha --- Documentation/admin-guide/kdump/kdump.rst

[PATCH v9 4/5] arm64: kdump: fix kdump broken with ZONE_DMA reintroduced

2020-06-28 Thread Chen Zhou
eters "crashkernel=X crashkernel=Y,low". Signed-off-by: Chen Zhou --- kernel/crash_core.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/crash_core.c b/kernel/crash_core.c index a7580d291c37..e8ecbbc761a3 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_

[PATCH v4] arm64: support more than one crash kernel regions

2020-06-27 Thread Chen Zhou
ing user-space and older kdump kernels. Signed-off-by: Chen Zhou --- For "support reserving crashkernel above 4G on arm64 kdump", we need to modify the kexec-tools. Changes since [v3]: - Reuse DT property "linux,usable-memory-range". Reuse DT property "linux,usable-memor

[PATCH v8 3/5] arm64: kdump: add memory for devices by DT property, low-memory-range

2020-05-21 Thread Chen Zhou
erty under /chosen, linux,low-memory-range= Crash dump kernel reads this property at boot time and call memblock_add() after memblock_cap_memory_range() has been called. Signed-off-by: Chen Zhou Tested-by: John Donnelly Tested-by: Prabhakar Kushwaha --- arch/arm64/mm/i

[PATCH v8 4/5] kdump: update Documentation about crashkernel on arm64

2020-05-21 Thread Chen Zhou
Now we support crashkernel=X,[low] on arm64, update the Documentation. Signed-off-by: Chen Zhou Tested-by: John Donnelly Tested-by: Prabhakar Kushwaha --- Documentation/admin-guide/kdump/kdump.rst | 13 +++-- Documentation/admin-guide/kernel-parameters.txt | 12 +++- 2

[PATCH v8 5/5] dt-bindings: chosen: Document linux, low-memory-range for arm64 kdump

2020-05-21 Thread Chen Zhou
Add documentation for DT property used by arm64 kdump: linux,low-memory-range. "linux,low-memory-range" is an another memory region used for crash dump kernel devices. Signed-off-by: Chen Zhou --- Documentation/devicetree/bindings/chosen.txt | 25 1 file c

[PATCH v8 1/5] x86: kdump: move reserve_crashkernel_low() into crash_core.c

2020-05-21 Thread Chen Zhou
automatically. Reported-by: kbuild test robot Signed-off-by: Chen Zhou Tested-by: John Donnelly Tested-by: Prabhakar Kushwaha --- arch/x86/kernel/setup.c| 66 - include/linux/crash_core.h | 3 ++ include/linux/kexec.h | 2 - kernel/crash_core.c

[PATCH v8 2/5] arm64: kdump: reserve crashkenel above 4G for crash dump kernel

2020-05-21 Thread Chen Zhou
Crashkernel=X tries to reserve memory for the crash dump kernel under 4G. If crashkernel=X,low is specified simultaneously, reserve spcified size low memory for crash kdump kernel devices firstly and then reserve memory above 4G. Signed-off-by: Chen Zhou Tested-by: John Donnelly Tested

[PATCH v8 0/5] support reserving crashkernel above 4G on arm64 kdump

2020-05-21 Thread Chen Zhou
l/2019/4/9/306 [v4]: https://lkml.org/lkml/2019/4/15/273 [v5]: https://lkml.org/lkml/2019/5/6/1360 [v6]: https://lkml.org/lkml/2019/8/30/142 [v7]: https://lkml.org/lkml/2019/12/23/411 Chen Zhou (5): x86: kdump: move reserve_crashkernel_low() into crash_core.c arm64: kdump: reserve crashken

[PATCH v3] arm64: kdump: add another DT property to crash dump kernel's dtb

2020-05-21 Thread Chen Zhou
Currently, there is only one crash kernel region on arm64, we add another region "crash kernel low" used for crash dump kernel devices. To do this, we add DT property "linux,low-memory-range" to crash dump kernel's dtb to pass the low region. Signed-off-by: Chen Zhou --- Fo

Re: [PATCH v7 1/4] x86: kdump: move reserve_crashkernel_low() into crash_core.c

2020-04-03 Thread Chen Zhou
Hi Dave/James, On 2020/1/17 11:58, Dave Young wrote: > On 01/16/20 at 03:17pm, James Morse wrote: >> Hi guys, >> >> On 28/12/2019 09:32, Dave Young wrote: >>> On 12/27/19 at 07:04pm, Chen Zhou wrote: >>>> On 2019/12/27 13:54, Dave Young wrote: >

Re: [PATCH v7 1/4] x86: kdump: move reserve_crashkernel_low() into crash_core.c

2020-04-03 Thread Chen Zhou
Hi Dave, On 2019/12/31 9:39, Chen Zhou wrote: > Hi Dave, > > On 2019/12/28 17:32, Dave Young wrote: >> On 12/27/19 at 07:04pm, Chen Zhou wrote: >>> Hi Dave >>> >>> On 2019/12/27 13:54, Dave Young wrote: >>>> Hi, >>>> On 12/23/1

Re: [PATCH v7 0/4] support reserving crashkernel above 4G on arm64 kdump

2020-03-25 Thread Chen Zhou
Hi all, Friendly ping... On 2019/12/23 23:23, Chen Zhou wrote: > This patch series enable reserving crashkernel above 4G in arm64. > > There are following issues in arm64 kdump: > 1. We use crashkernel=X to reserve crashkernel below 4G, which will fail > when there is no enough

Re: [PATCH v7 2/4] arm64: kdump: reserve crashkenel above 4G for crash dump kernel

2020-03-07 Thread Chen Zhou
On 2020/3/5 18:13, Prabhakar Kushwaha wrote: > On Mon, Dec 23, 2019 at 8:57 PM Chen Zhou wrote: >> >> Crashkernel=X tries to reserve memory for the crash dump kernel under >> 4G. If crashkernel=X,low is specified simultaneously, reserve spcified >> size low me

Re: [PATCH v7 1/4] x86: kdump: move reserve_crashkernel_low() into crash_core.c

2020-03-01 Thread Chen Zhou
On 2020/2/24 23:25, John Donnelly wrote: > > >> On Jan 16, 2020, at 9:47 AM, John Donnelly >> wrote: >> >> >> >>> On Jan 16, 2020, at 9:17 AM, James Morse wrote: >>> >>> Hi guys, >>> >>> On 28/12/2019 09:32, Da

Re: [PATCH v7 0/4] support reserving crashkernel above 4G on arm64 kdump

2020-02-12 Thread Chen Zhou
Hi John, On 2020/2/12 21:20, John Donnelly wrote: > On 12/23/19 9:23 AM, Chen Zhou wrote: >> This patch series enable reserving crashkernel above 4G in arm64. >> >> There are following issues in arm64 kdump: >> 1. We use crashkernel=X to reserve crashkernel below

Re: [PATCH v7 1/4] x86: kdump: move reserve_crashkernel_low() into crash_core.c

2019-12-30 Thread Chen Zhou
Hi Dave, On 2019/12/28 17:32, Dave Young wrote: > On 12/27/19 at 07:04pm, Chen Zhou wrote: >> Hi Dave >> >> On 2019/12/27 13:54, Dave Young wrote: >>> Hi, >>> On 12/23/19 at 11:23pm, Chen Zhou wrote: >>>> In preparation for supporting reserve

Re: [PATCH v7 1/4] x86: kdump: move reserve_crashkernel_low() into crash_core.c

2019-12-27 Thread Chen Zhou
Hi Dave On 2019/12/27 13:54, Dave Young wrote: > Hi, > On 12/23/19 at 11:23pm, Chen Zhou wrote: >> In preparation for supporting reserve_crashkernel_low in arm64 as >> x86_64 does, move reserve_crashkernel_low() into kernel/crash_core.c. >> >> Note, in arm64, we

[PATCH v7 4/4] kdump: update Documentation about crashkernel on arm64

2019-12-23 Thread Chen Zhou
Now we support crashkernel=X,[low] on arm64, update the Documentation. Signed-off-by: Chen Zhou --- Documentation/admin-guide/kdump/kdump.rst | 13 +++-- Documentation/admin-guide/kernel-parameters.txt | 12 +++- 2 files changed, 22 insertions(+), 3 deletions(-) diff

[PATCH v7 3/4] arm64: kdump: add memory for devices by DT property, low-memory-range

2019-12-23 Thread Chen Zhou
erty under /chosen, linux,low-memory-range= Crash dump kernel reads this property at boot time and call memblock_add() after memblock_cap_memory_range() has been called. Signed-off-by: Chen Zhou --- arch/arm64/mm/init.c | 30 +- 1 file changed, 29 insert

[PATCH v7 1/4] x86: kdump: move reserve_crashkernel_low() into crash_core.c

2019-12-23 Thread Chen Zhou
-by: kbuild test robot Signed-off-by: Chen Zhou --- arch/x86/kernel/setup.c| 62 - include/linux/crash_core.h | 3 ++ include/linux/kexec.h | 2 -- kernel/crash_core.c| 87 ++ kernel/kexec_core.c| 17

[PATCH v7 2/4] arm64: kdump: reserve crashkenel above 4G for crash dump kernel

2019-12-23 Thread Chen Zhou
Crashkernel=X tries to reserve memory for the crash dump kernel under 4G. If crashkernel=X,low is specified simultaneously, reserve spcified size low memory for crash kdump kernel devices firstly and then reserve memory above 4G. Signed-off-by: Chen Zhou --- arch/arm64/kernel/setup.c | 8

[PATCH v7 0/4] support reserving crashkernel above 4G on arm64 kdump

2019-12-23 Thread Chen Zhou
l/2019/4/9/306 [v4]: https://lkml.org/lkml/2019/4/15/273 [v5]: https://lkml.org/lkml/2019/5/6/1360 [v6]: https://lkml.org/lkml/2019/8/30/142 Chen Zhou (4): x86: kdump: move reserve_crashkernel_low() into crash_core.c arm64: kdump: reserve crashkenel above 4G for crash dump kernel arm64: kd

Re: `

2019-12-19 Thread Chen Zhou
Hi John, On 2019/12/20 2:33, John Donnelly wrote: > > >> On Dec 18, 2019, at 8:56 PM, Chen Zhou wrote: >> >> Hi John, >> >> On 2019/12/19 1:18, John Donnelly wrote: >>> HI >>> >>> SEE INLINE ON A QUESTION : >>&

Re: [PATCH v6 0/4] support reserving crashkernel above 4G on arm64 kdump

2019-12-18 Thread Chen Zhou
Hi John, On 2019/12/19 1:18, John Donnelly wrote: > HI > > SEE INLINE ON A QUESTION : > >> On Dec 17, 2019, at 8:07 PM, Chen Zhou wrote: >> >> Hi all, >> >> Friendly ping... >> >> On 2019/8/30 15:11, Chen Zhou wrote: >>> I am bu

Re: [PATCH v6 0/4] support reserving crashkernel above 4G on arm64 kdump

2019-12-18 Thread Chen Zhou
Hi Will On 2019/12/18 17:09, Will Deacon wrote: > On Wed, Dec 18, 2019 at 10:07:59AM +0800, Chen Zhou wrote: >> Friendly ping... > > You broke the build: > > https://lore.kernel.org/lkml/201909010744.cde940pv%...@intel.com > https://lore.kernel.org/lkml/20190901070

Re: [PATCH v6 0/4] support reserving crashkernel above 4G on arm64 kdump

2019-12-17 Thread Chen Zhou
Hi all, Friendly ping... On 2019/8/30 15:11, Chen Zhou wrote: > I am busy with other things, so it was a long time before this version was > released. > > This patch series enable reserving crashkernel above 4G in arm64. > > There are following issues in arm64 kdump: > 1.

[PATCH v6 4/4] kdump: update Documentation about crashkernel on arm64

2019-08-30 Thread Chen Zhou
Now we support crashkernel=X,[low] on arm64, update the Documentation. Signed-off-by: Chen Zhou --- Documentation/admin-guide/kdump/kdump.rst | 13 +++-- Documentation/admin-guide/kernel-parameters.txt | 12 +++- 2 files changed, 22 insertions(+), 3 deletions(-) diff

[PATCH v6 3/4] arm64: kdump: add memory for devices by DT property, low-memory-range

2019-08-30 Thread Chen Zhou
erty under /chosen, linux,low-memory-range= Crash dump kernel reads this property at boot time and call memblock_add() after memblock_cap_memory_range() has been called. Signed-off-by: Chen Zhou --- arch/arm64/mm/init.c | 30 +- 1 file changed, 29 insert

[PATCH v6 0/4] support reserving crashkernel above 4G on arm64 kdump

2019-08-30 Thread Chen Zhou
/lkml.org/lkml/2019/4/9/306 [v4]: https://lkml.org/lkml/2019/4/15/273 [v5]: https://lkml.org/lkml/2019/5/6/1360 Chen Zhou (4): x86: kdump: move reserve_crashkernel_low() into crash_core.c arm64: kdump: reserve crashkenel above 4G for crash dump kernel arm64: kdump: add memory for devices by

[PATCH v6 1/4] x86: kdump: move reserve_crashkernel_low() into crash_core.c

2019-08-30 Thread Chen Zhou
-by: Chen Zhou --- arch/x86/include/asm/kexec.h | 3 ++ arch/x86/kernel/setup.c | 65 include/linux/crash_core.h | 4 +++ include/linux/kexec.h| 1 - kernel/crash_core.c | 65 5 files

[PATCH v6 2/4] arm64: kdump: reserve crashkenel above 4G for crash dump kernel

2019-08-30 Thread Chen Zhou
Crashkernel=X tries to reserve memory for the crash dump kernel under 4G. If crashkernel=X,low is specified simultaneously, reserve spcified size low memory for crash kdump kernel devices firstly and then reserve memory above 4G. Signed-off-by: Chen Zhou --- arch/arm64/include/asm/kexec.h | 3

[PATCH v2] arm64: kdump: add another DT property to crash dump kernel's dtb

2019-08-30 Thread Chen Zhou
Currently, there is only one crash kernel region on arm64, we add another region "crash kernel low" used for crash dump kernel devices. To do this, we add DT property "linux,low-memory-range" to crash dump kernel's dtb to pass the low region. Signed-off-by: Chen Zhou --- Fo

Re: [PATCH 1/4] x86: kdump: move reserve_crashkernel_low() into kexec_core.c

2019-06-13 Thread Chen Zhou
Hi Dave, On 2019/6/12 16:45, Dave Young wrote: > Other than the comments from James, can you move the function into > kernel/crash_core.c, we already have some functions moved there for > sharing. Sure. Thanks, Chen Zhou ___ kexec mailing l

Re: [PATCH 0/4] support reserving crashkernel above 4G on arm64 kdump

2019-06-13 Thread Chen Zhou
On 2019/6/6 0:32, James Morse wrote: > Hi! > > On 07/05/2019 04:50, Chen Zhou wrote: >> We use crashkernel=X to reserve crashkernel below 4G, which will fail >> when there is no enough memory. Currently, crashkernel=Y@X can be used >> to reserve crashkernel above 4

Re: [PATCH 2/4] arm64: kdump: support reserving crashkernel above 4G

2019-06-13 Thread Chen Zhou
Hi James, On 2019/6/6 0:29, James Morse wrote: > Hello, > > On 07/05/2019 04:50, Chen Zhou wrote: >> When crashkernel is reserved above 4G in memory, kernel should >> reserve some amount of low memory for swiotlb and some DMA buffers. > >> Meanwhile, support cra

Re: [PATCH 1/4] x86: kdump: move reserve_crashkernel_low() into kexec_core.c

2019-06-13 Thread Chen Zhou
Hi James, Thanks for your review. On 2019/6/6 0:29, James Morse wrote: > Hello, > > On 07/05/2019 04:50, Chen Zhou wrote: >> In preparation for supporting reserving crashkernel above 4G >> in arm64 as x86_64 does, move reserve_crashkernel_low() into >> kexec/kexec_

Re: [PATCH 0/4] support reserving crashkernel above 4G on arm64 kdump

2019-06-02 Thread Chen Zhou
Hi Catalin, Sorry to ping you. What's your suggestion about this patch series? I am looking forward to your replay. Thanks, Chen Zhou On 2019/5/16 11:19, Chen Zhou wrote: > Hi Bhupesh, > > On 2019/5/15 13:06, Bhupesh Sharma wrote: >> +Cc kexec-list. >> >> Hi Chen,

Re: [PATCH] arm64: support more than one crash kernel regions

2019-06-02 Thread Chen Zhou
Hi Simon, On 2019/5/31 17:28, Simon Horman wrote: > On Wed, Apr 03, 2019 at 10:55:04AM +0800, Chen Zhou wrote: >> When crashkernel is reserved above 4G in memory, kernel should >> reserve some amount of low memory for swiotlb and some DMA buffers. >> So there may be two cras

Re: [PATCH 4/4] kdump: update Documentation about crashkernel on arm64

2019-05-15 Thread Chen Zhou
On 2019/5/15 13:16, Bhupesh Sharma wrote: > On 05/07/2019 09:20 AM, Chen Zhou wrote: >> Now we support crashkernel=X,[high,low] on arm64, update the >> Documentation. >> >> Signed-off-by: Chen Zhou >> --- >> Documentation/admin-guide/kernel-parameter

Re: [PATCH 0/4] support reserving crashkernel above 4G on arm64 kdump

2019-05-15 Thread Chen Zhou
across a larger range. > > Some comments inline and in respective patch threads.. > > On 05/07/2019 09:20 AM, Chen Zhou wrote: >> This patch series enable reserving crashkernel on high memory in arm64. > > Please fix the patch subject, it should be v5. > Also ple

[PATCH 2/4] arm64: kdump: support reserving crashkernel above 4G

2019-05-06 Thread Chen Zhou
,high" is specified. Signed-off-by: Chen Zhou --- arch/arm64/include/asm/kexec.h | 3 +++ arch/arm64/kernel/setup.c | 3 +++ arch/arm64/mm/init.c | 34 -- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/arch/arm64/include/asm

[PATCH 3/4] memblock: extend memblock_cap_memory_range to multiple ranges

2019-05-06 Thread Chen Zhou
the unneeded memory. Enable use of this function in arm64 for reservation of multiple regions for the crash kernel. Signed-off-by: Mike Rapoport Signed-off-by: Chen Zhou --- arch/arm64/mm/init.c | 38 -- include/linux/memblock.h | 2 +- mm/memblock.c

[PATCH 1/4] x86: kdump: move reserve_crashkernel_low() into kexec_core.c

2019-05-06 Thread Chen Zhou
In preparation for supporting reserving crashkernel above 4G in arm64 as x86_64 does, move reserve_crashkernel_low() into kexec/kexec_core.c. Signed-off-by: Chen Zhou --- arch/x86/include/asm/kexec.h | 3 ++ arch/x86/kernel/setup.c | 66

[PATCH 0/4] support reserving crashkernel above 4G on arm64 kdump

2019-05-06 Thread Chen Zhou
g/lkml/2019/4/2/1174 [v2]: https://lkml.org/lkml/2019/4/9/86 [v3]: https://lkml.org/lkml/2019/4/9/306 [v4]: https://lkml.org/lkml/2019/4/15/273 Chen Zhou (3): x86: kdump: move reserve_crashkernel_low() into kexec_core.c arm64: kdump: support reserving crashkernel above 4G kdump: update

[PATCH 4/4] kdump: update Documentation about crashkernel on arm64

2019-05-06 Thread Chen Zhou
Now we support crashkernel=X,[high,low] on arm64, update the Documentation. Signed-off-by: Chen Zhou --- Documentation/admin-guide/kernel-parameters.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation

[RESEND PATCH v5 4/4] kdump: update Documentation about crashkernel on arm64

2019-04-16 Thread Chen Zhou
Now we support crashkernel=X,[high,low] on arm64, update the Documentation. Signed-off-by: Chen Zhou --- Documentation/admin-guide/kernel-parameters.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin

[RESEND PATCH v5 2/4] arm64: kdump: support reserving crashkernel above 4G

2019-04-16 Thread Chen Zhou
-off-by: Chen Zhou --- arch/arm64/include/asm/kexec.h | 3 +++ arch/arm64/kernel/setup.c | 3 +++ arch/arm64/mm/init.c | 25 - 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/kexec.h b/arch/arm64/include/asm/kexec.h

[RESEND PATCH v5 3/4] memblock: extend memblock_cap_memory_range to multiple ranges

2019-04-16 Thread Chen Zhou
the unneeded memory. Enable use of this function in arm64 for reservation of multiple regions for the crash kernel. Signed-off-by: Mike Rapoport Signed-off-by: Chen Zhou --- arch/arm64/mm/init.c | 34 -- include/linux/memblock.h | 2 +- mm/memblock.c

[RESEND PATCH v5 0/4] support reserving crashkernel above 4G on arm64 kdump

2019-04-16 Thread Chen Zhou
g/pipermail/kexec/2019-April/022792.html [v1]: https://lkml.org/lkml/2019/4/8/628 [v2]: https://lkml.org/lkml/2019/4/9/86 [v3]: https://lkml.org/lkml/2019/4/15/6 [v4]: https://lkml.org/lkml/2019/4/15/273 Chen Zhou (3): x86: kdump: move reserve_crashkernel_low() into kexec_core.c arm64: kdump

[RESEND PATCH v5 1/4] x86: kdump: move reserve_crashkernel_low() into kexec_core.c

2019-04-16 Thread Chen Zhou
In preparation for supporting more than one crash kernel regions in arm64 as x86_64 does, move reserve_crashkernel_low() into kexec/kexec_core.c. Signed-off-by: Chen Zhou --- arch/x86/include/asm/kexec.h | 3 ++ arch/x86/kernel/setup.c | 66

[PATCH v5 3/4] memblock: extend memblock_cap_memory_range to multiple ranges

2019-04-16 Thread Chen Zhou
. Enable use of this function in arm64 for reservation of multiple regions for the crash kernel. Signed-off-by: Chen Zhou --- arch/arm64/mm/init.c | 34 -- include/linux/memblock.h | 2 +- mm/memblock.c| 44 3

[PATCH v5 2/4] arm64: kdump: support reserving crashkernel above 4G

2019-04-16 Thread Chen Zhou
-off-by: Chen Zhou --- arch/arm64/include/asm/kexec.h | 3 +++ arch/arm64/kernel/setup.c | 3 +++ arch/arm64/mm/init.c | 25 - 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/kexec.h b/arch/arm64/include/asm/kexec.h

  1   2   >