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

2021-01-30 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 06/11] x86/elf: Move vmcore_elf_check_arch_cross to arch/x86/include/asm/elf.h

2021-01-30 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 02/11] x86: kdump: make the lower bound of crash kernel reservation consistent

2021-01-30 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 v14 00/11] support reserving crashkernel above 4G on arm64 kdump

2021-01-30 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-30 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 05/11] x86: kdump: move reserve_crashkernel[_low]() into crash_core.c

2021-01-30 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 03/11] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-01-30 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 08/11] arm64: kdump: reimplement crashkernel=X

2021-01-30 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 10/11] arm64: kdump: add memory for devices by DT property linux,usable-memory-range

2021-01-30 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 07/11] arm64: kdump: introduce some macroes for crash kernel reservation

2021-01-30 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 01/11] x86: kdump: replace the hard-coded alignment with macro CRASH_ALIGN

2021-01-30 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-30 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 v3] cgroup-v1: add disabled controller check in cgroup1_parse_param()

2021-01-15 Thread Chen Zhou
oup: take options parsing into ->parse_monolithic()") Signed-off-by: Chen Zhou Reviewed-by: Zefan Li --- Changes in v3: - Update the description of commit message. - Add Reviewed-by from Zefan. Changes in v2: - Fix line over 80 characters warning. --- kernel/cgroup/cgroup-v1.c | 3 +++ 1 file cha

[PATCH v2 1/3] arm64: mm: update the comments about ZONE_DMA

2020-12-30 Thread Chen Zhou
e comments. Signed-off-by: Chen Zhou Reviewed-by: Nicolas Saenz Julienne --- arch/arm64/mm/init.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 75addb36354a..7b9809e39927 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64

[PATCH v2 0/3] arm64: mm: reserve CMA and crashkernel in ZONE_DMA if enabled

2020-12-30 Thread Chen Zhou
for patch 1 from Nicolas. - Suggested by Nicolas, also reserve CMA in ZONE_DMA if enabled. Chen Zhou (3): arm64: mm: update the comments about ZONE_DMA arm64: mm: move dma_contiguous_reserve() to bootmem_init() arm64: mm: reserve CMA and crashkernel in ZONE_DMA if enabled arch/arm64/mm/i

[PATCH v2 2/3] arm64: mm: move dma_contiguous_reserve() to bootmem_init()

2020-12-30 Thread Chen Zhou
Like crashkernel, CMA might also reserve memory located in ZONE_DMA, so move dma_contiguous_reserve() to bootmem_init() to make sure that arm64_dma_phys_limit is populated. Just place dma_contiguous_reserve() after reserve_crashkernel() as before. Signed-off-by: Chen Zhou Suggested-by: Nicolas

[PATCH v2 3/3] arm64: mm: reserve CMA and crashkernel in ZONE_DMA if enabled

2020-12-30 Thread Chen Zhou
eserve CMA and crashkernel in ZONE_DMA if CONFIG_ZONE_DMA is enabled, otherwise, reserving in ZONE_DMA32. Signed-off-by: Chen Zhou Suggested-by: Nicolas Saenz Julienne --- arch/arm64/mm/init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64

[PATCH 2/2] arm64: mm: fix kdump broken with ZONE_DMA reintroduced

2020-12-25 Thread Chen Zhou
e CMA and crashkernel in ZONE_DMA32") Signed-off-by: Chen Zhou --- arch/arm64/mm/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 7b9809e39927..5074e945f1a6 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.

[PATCH 1/2] arm64: mm: update the comments about ZONE_DMA

2020-12-25 Thread Chen Zhou
e comments. Signed-off-by: Chen Zhou --- arch/arm64/mm/init.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 75addb36354a..7b9809e39927 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -53,10 +53

[PATCH 0/2] arm64: mm: fix kdump broken with ZONE_DMA reintroduced

2020-12-25 Thread Chen Zhou
the ZONE_DMA. Patch 2 fix kdump broken. Chen Zhou (2): arm64: mm: update the comments about ZONE_DMA arm64: mm: fix kdump broken with ZONE_DMA reintroduced arch/arm64/mm/init.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) -- 2.20.1

[PATCH v2] cgroup-v1: add disabled controller check in cgroup1_parse_param()

2020-12-17 Thread Chen Zhou
When mounting a cgroup hierarchy with disabled controller in cgroup v1, all available controllers will be attached. Add disabled controller check in cgroup1_parse_param() and return directly if the specified controller is disabled. Signed-off-by: Chen Zhou --- Changes in v2: - Fix line over 80

[PATCH] drm/msm/dpu: Fix error return code in dpu_mdss_init()

2020-11-16 Thread Chen Zhou
Fix to return a negative error code from the error handling case instead of 0 in function dpu_mdss_init(), as done elsewhere in this function. Fixes: 070e64dc1bbc ("drm/msm/dpu: Convert to a chained irq chip") Reported-by: Hulk Robot Signed-off-by: Chen Zhou --- drivers/gpu/drm/msm

[PATCH] KVM: SVM: fix error return code in svm_create_vcpu()

2020-11-16 Thread Chen Zhou
Fix to return a negative error code from the error handling case instead of 0 in function svm_create_vcpu(), as done elsewhere in this function. Fixes: f4c847a95654 ("KVM: SVM: refactor msr permission bitmap allocation") Reported-by: Hulk Robot Signed-off-by: Chen Zhou --- arch/x

[PATCH v2] usb: gadget: mass_storage: fix error return code in msg_bind()

2020-11-12 Thread Chen Zhou
Fix to return a negative error code from the error handling case instead of 0 in function msg_bind(), as done elsewhere in this function. Fixes: d86788979761 ("usb: gadget: mass_storage: allocate and init otg descriptor by otg capabilities") Reported-by: Hulk Robot Signed-off-by:

[PATCH v2] selinux: Fix error return code in sel_ib_pkey_sid_slow()

2020-11-12 Thread Chen Zhou
Fix to return a negative error code from the error handling case instead of 0 in function sel_ib_pkey_sid_slow(), as done elsewhere in this function. Fixes: 409dcf31538a ("selinux: Add a cache for quicker retreival of PKey SIDs") Reported-by: Hulk Robot Signed-off-by: Chen Zhou ---

[PATCH] RDMA/core: Fix error return code in _ib_modify_qp()

2020-11-12 Thread Chen Zhou
Fix to return a negative error code from the error handling case instead of 0 in function _ib_modify_qp(), as done elsewhere in this function. Fixes: 51aab12631dd ("RDMA/core: Get xmit slave for LAG") Reported-by: Hulk Robot Signed-off-by: Chen Zhou --- drivers/infiniband/core/v

[PATCH] selinux: Fix error return code in sel_ib_pkey_sid_slow()

2020-11-12 Thread Chen Zhou
Fix to return a negative error code from the error handling case instead of 0 in function sel_ib_pkey_sid_slow(), as done elsewhere in this function. Fixes: 409dcf31538a ("selinux: Add a cache for quicker retreival of PKey SIDs") Reported-by: Hulk Robot Signed-off-by: Chen Zhou ---

[PATCH] usb: gadget: mass_storage: fix error return code in msg_bind()

2020-11-12 Thread Chen Zhou
Fix to return a negative error code from the error handling case instead of 0 in function msg_bind(), as done elsewhere in this function. Fixes: d86788979761 ("usb: gadget: mass_storage: allocate and init otg descriptor by otg capabilities") Reported-by: Hulk Robot Signed-off-by:

[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 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 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 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 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 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 -next] drm/amd/display: Remove duplicate include

2020-09-08 Thread Chen Zhou
Remove duplicate header which is included twice. Signed-off-by: Chen Zhou --- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c index

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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] docs/zh_CN: update sysfs.txt about show() usage

2020-06-09 Thread Chen Zhou
Update the show() usage according to the English version. Signed-off-by: Chen Zhou --- Documentation/translations/zh_CN/filesystems/sysfs.txt | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/translations/zh_CN/filesystems/sysfs.txt b/Documentation

[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 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 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 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 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 -next 1/2] sparc: use snprintf() in show_pciobppath_attr() in pci.c

2020-05-09 Thread Chen Zhou
snprintf() returns the number of bytes that would be written, which may be greater than the the actual length to be written. show_pciobppath_attr() should return the number of bytes printed into the buffer. This is the return value of scnprintf(). Signed-off-by: Chen Zhou --- arch/sparc/kernel

[PATCH -next 2/2] sparc: use snprintf() in show_pciobppath_attr() in vio.c

2020-05-09 Thread Chen Zhou
snprintf() returns the number of bytes that would be written, which may be greater than the the actual length to be written. show_pciobppath_attr() should return the number of bytes printed into the buffer. This is the return value of scnprintf(). Signed-off-by: Chen Zhou --- arch/sparc/kernel

[PATCH -next 0/2] sparc: use snprintf() in show() methods

2020-05-09 Thread Chen Zhou
snprintf() returns the number of bytes that would be written, which may be greater than the the actual length to be written. show() methods should return the number of bytes printed into the buffer. This is the return value of scnprintf(). Chen Zhou (2): sparc: use snprintf

[PATCH -next 3/3] s390/protvirt: use scnprintf() instead of snprintf()

2020-05-09 Thread Chen Zhou
-by: Chen Zhou --- arch/s390/kernel/uv.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/s390/kernel/uv.c b/arch/s390/kernel/uv.c index 4c0677fc8904..e7ea82a2bf63 100644 --- a/arch/s390/kernel/uv.c +++ b/arch/s390/kernel/uv.c @@ -331,7 +331,7 @@ EXPORT_SYMBOL_GPL

[PATCH -next 2/3] s390: use scnprintf() in sys_##_prefix##_##_name##_show

2020-05-09 Thread Chen Zhou
snprintf() returns the number of bytes that would be written, which may be greater than the the actual length to be written. show() methods should return the number of bytes printed into the buffer. This is the return value of scnprintf(). Signed-off-by: Chen Zhou --- arch/s390/kernel/ipl.c

[PATCH -next 1/3] s390/crypto: use scnprintf() instead of snprintf()

2020-05-09 Thread Chen Zhou
snprintf() returns the number of bytes that would be written, which may be greater than the the actual length to be written. show() methods should return the number of bytes printed into the buffer. This is the return value of scnprintf(). Signed-off-by: Chen Zhou --- arch/s390/crypto/prng.c

[PATCH -next 0/3] s390: use scnprintf() in show() methods

2020-05-09 Thread Chen Zhou
snprintf() returns the number of bytes that would be written, which may be greater than the the actual length to be written. show() methods should return the number of bytes printed into the buffer. This is the return value of scnprintf(). Chen Zhou (3): s390/crypto: use scnprintf

[PATCH -next] arch/arm: use scnprintf() in l2x0_pmu_event_show()

2020-05-09 Thread Chen Zhou
snprintf() returns the number of bytes that would be written, which may be greater than the the actual length to be written. show() methods should return the number of bytes printed into the buffer. This is the return value of scnprintf(). Signed-off-by: Chen Zhou --- arch/arm/mm/cache-l2x0

[PATCH -next] powerpc/powernv: add NULL check after kzalloc

2020-05-08 Thread Chen Zhou
Fixes coccicheck warning: ./arch/powerpc/platforms/powernv/opal.c:813:1-5: alloc with no test, possible model on line 814 Add NULL check after kzalloc. Signed-off-by: Chen Zhou --- arch/powerpc/platforms/powernv/opal.c | 4 1 file changed, 4 insertions(+) diff --git a/arch

[PATCH -next] media: coda: jpeg: add NULL check after kmalloc

2020-05-08 Thread Chen Zhou
Fixes coccicheck warning: ./drivers/media/platform/coda/coda-jpeg.c:331:3-31: alloc with no test, possible model on line 354 Add NULL check after kmalloc. Signed-off-by: Chen Zhou --- drivers/media/platform/coda/coda-jpeg.c | 5 - 1 file changed, 4 insertions(+), 1 deletion

[PATCH -next] sunrpc: use kmemdup_nul() in gssp_stringify()

2020-05-08 Thread Chen Zhou
It is more efficient to use kmemdup_nul() if the size is known exactly . According to doc: "Note: Use kmemdup_nul() instead if the size is known exactly." Signed-off-by: Chen Zhou --- net/sunrpc/auth_gss/gss_rpc_upcall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PATCH -next] xfs: remove duplicate headers

2020-05-08 Thread Chen Zhou
Remove duplicate headers which are included twice. Signed-off-by: Chen Zhou --- fs/xfs/xfs_xattr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/xfs/xfs_xattr.c b/fs/xfs/xfs_xattr.c index fc5d7276026e..bca48b308c02 100644 --- a/fs/xfs/xfs_xattr.c +++ b/fs/xfs/xfs_xattr.c @@ -12,7 +12,6

[PATCH -next] NFS: remove duplicate headers

2020-05-08 Thread Chen Zhou
Remove duplicate headers which are included twice. Signed-off-by: Chen Zhou --- fs/nfs/dns_resolve.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c index 963800037609..e87d500ad95a 100644 --- a/fs/nfs/dns_resolve.c +++ b/fs/nfs/dns_resolve.c

[PATCH -next] PCI: endpoint: use kmemdup_nul() in pci_epf_create()

2020-05-08 Thread Chen Zhou
It is more efficient to use kmemdup_nul() if the size is known exactly. The doc in kernel: "Note: Use kmemdup_nul() instead if the size is known exactly." Signed-off-by: Chen Zhou --- drivers/pci/endpoint/pci-epf-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH -next] nvmet: replace kstrndup() with kmemdup_nul()

2020-05-08 Thread Chen Zhou
It is more efficient to use kmemdup_nul() if the size is known exactly. The doc in kernel: "Note: Use kmemdup_nul() instead if the size is known exactly." Signed-off-by: Chen Zhou --- drivers/nvme/target/configfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH -next] iommu: remove set but not used variable 'data'

2020-05-07 Thread Chen Zhou
Fixes gcc '-Wunused-but-set-variable' warning: drivers/iommu/mtk_iommu_v1.c:467:25: warning: variable ‘data’ set but not used [-Wunused-but-set-variable] struct mtk_iommu_data *data; Reported-by: Hulk Robot Signed-off-by: Chen Zhou --- drivers/iommu/mtk_iommu_v1.c | 3 +-- 1 file changed, 1

[PATCH -next] iommu/arm-smmu-v3: remove set but not used variable 'smmu'

2020-05-07 Thread Chen Zhou
Fixes gcc '-Wunused-but-set-variable' warning: drivers/iommu/arm-smmu-v3.c:2989:26: warning: variable ‘smmu’ set but not used [-Wunused-but-set-variable] struct arm_smmu_device *smmu; Reported-by: Hulk Robot Signed-off-by: Chen Zhou --- drivers/iommu/arm-smmu-v3.c | 2 -- 1 file changed, 2

[PATCH -next] brcmfmac: make non-global functions static

2020-05-07 Thread Chen Zhou
Fix sparse warning: drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:2206:5: warning: symbol 'brcmf_p2p_get_conn_idx' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Chen Zhou --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 2 +- 1 file

[PATCH -next] drm/amd/display: remove duplicate headers

2020-05-07 Thread Chen Zhou
Remove duplicate headers which are included twice. Signed-off-by: Chen Zhou --- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c index

[PATCH -next] net: ipa: remove duplicate headers

2020-05-07 Thread Chen Zhou
Remove duplicate headers which are included twice. Signed-off-by: Chen Zhou --- drivers/net/ipa/ipa_mem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ipa/ipa_mem.c b/drivers/net/ipa/ipa_mem.c index aa8f6b0f3d50..3ef814119aab 100644 --- a/drivers/net/ipa/ipa_mem.c +++ b

[PATCH -next] cxgb4: remove duplicate headers

2020-05-07 Thread Chen Zhou
Remove duplicate headers which are included twice. Signed-off-by: Chen Zhou --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h index e46a14f44a6f

[PATCH -next] kernel.h: remove duplicate headers

2020-05-07 Thread Chen Zhou
Remove duplicate headers which are included twice. Signed-off-by: Chen Zhou --- include/linux/kernel.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 04a5885cec1b..12fe1afebfd9 100644 --- a/include/linux/kernel.h +++ b/include/linux

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 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: [Question] panic when write file cpuset.cpus

2019-06-05 Thread Chen Zhou
+Cc linux-kernel@vger.kernel.org On 2019/6/6 11:04, Chen Zhou wrote: > Hi all, > > I hit the following issue in linux 4.4 which is hard to reproduce. > > [20190527221106][bsp_pci_device_get_bar]--- pBasePhyAddr :3a00800, > len:400 --- > [20190527221106]Unable to

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

2019-04-16 Thread Chen Zhou
permail/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 (4): x86: kdump: move reserve_crashkernel_low() into kexec_core.c arm64: kdump: support r

Re: [PATCH v3 3/4] arm64: kdump: support more than one crash kernel regions

2019-04-14 Thread Chen Zhou
Hi Mike, On 2019/4/14 20:13, Mike Rapoport wrote: > Hi, > > On Tue, Apr 09, 2019 at 06:28:18PM +0800, Chen Zhou wrote: >> After commit (arm64: kdump: support reserving crashkernel above 4G), >> there may be two crash kernel regions, one is below 4G, the other is >>

  1   2   >