* [PATCH v2 0/3] arm64: mm: Do not defer reserve_crashkernel()
@ 2022-03-31 2:59 Kefeng Wang
2022-03-31 2:59 ` [PATCH v2 1/3] arm64: mm: Do not defer reserve_crashkernel() if only ZONE_DMA32 Kefeng Wang
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Kefeng Wang @ 2022-03-31 2:59 UTC (permalink / raw)
To: catalin.marinas, will, linux-arm-kernel, linux-kernel
Cc: vijayb, f.fainelli, Kefeng Wang
Commit 031495635b46 ("arm64: Do not defer reserve_crashkernel() for
platforms with no DMA memory zones"), this lets the kernel benifit
due to BLOCK_MAPPINGS, we could do more if ZONE_DMA and ZONE_DMA32
enabled.
1) Don't defer reserve_crashkernel() if only ZONE_DMA32
2) Don't defer reserve_crashkernel() if ZONE_DMA with dma_force_32bit
kernel parameter(newly added)
Unixbench benchmark result shows between the block mapping and page mapping.
----------------+------------------+-------------------
| block mapping | page mapping
----------------+------------------+-------------------
Process Creation| 5,030.7 | 4,711.8
(in unixbench) | |
----------------+------------------+-------------------
note: RODATA_FULL_DEFAULT_ENABLED is not enabled
v2:
- update patch1 according to Vijay and Florian, and RB of Vijay
- add new patch2
Kefeng Wang (3):
arm64: mm: Do not defer reserve_crashkernel() if only ZONE_DMA32
arm64: mm: Don't defer reserve_crashkernel() with dma_force_32bit
arm64: mm: Cleanup useless parameters in zone_sizes_init()
arch/arm64/include/asm/kexec.h | 1 +
arch/arm64/mm/init.c | 59 +++++++++++++++++++++++++---------
arch/arm64/mm/mmu.c | 6 ++--
3 files changed, 46 insertions(+), 20 deletions(-)
--
2.26.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH v2 1/3] arm64: mm: Do not defer reserve_crashkernel() if only ZONE_DMA32 2022-03-31 2:59 [PATCH v2 0/3] arm64: mm: Do not defer reserve_crashkernel() Kefeng Wang @ 2022-03-31 2:59 ` Kefeng Wang 2022-03-31 2:59 ` [PATCH v2 2/3] arm64: mm: Don't defer reserve_crashkernel() with dma_force_32bit Kefeng Wang 2022-03-31 2:59 ` [PATCH v2 3/3] arm64: mm: Cleanup useless parameters in zone_sizes_init() Kefeng Wang 2 siblings, 0 replies; 6+ messages in thread From: Kefeng Wang @ 2022-03-31 2:59 UTC (permalink / raw) To: catalin.marinas, will, linux-arm-kernel, linux-kernel Cc: vijayb, f.fainelli, Kefeng Wang, Pasha Tatashin The kernel could be benefit due to BLOCK_MAPPINGS, see commit 031495635b46 ("arm64: Do not defer reserve_crashkernel() for platforms with no DMA memory zones"), if only with ZONE_DMA32, set arm64_dma_phys_limit to max_zone_phys(32) earlier in arm64_memblock_init(), so platforms with just ZONE_DMA32 config enabled will be benefit. Cc: Vijay Balakrishna <vijayb@linux.microsoft.com> Cc: Pasha Tatashin <pasha.tatashin@soleen.com> Cc: Will Deacon <will@kernel.org> Reviewed-by: Vijay Balakrishna <vijayb@linux.microsoft.com> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- arch/arm64/mm/init.c | 23 +++++++++++++---------- arch/arm64/mm/mmu.c | 6 ++---- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 8ac25f19084e..fb01eb489fa9 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -65,8 +65,9 @@ EXPORT_SYMBOL(memstart_addr); * Memory reservation for crash kernel either done early or deferred * depending on DMA memory zones configs (ZONE_DMA) -- * - * In absence of ZONE_DMA configs arm64_dma_phys_limit initialized - * here instead of max_zone_phys(). This lets early reservation of + * In absence of ZONE_DMA and ZONE_DMA32 configs arm64_dma_phys_limit + * initialized here and if only with ZONE_DMA32 arm64_dma_phys_limit + * initialised to dma32_phys_limit. This lets early reservation of * crash kernel memory which has a dependency on arm64_dma_phys_limit. * Reserving memory early for crash kernel allows linear creation of block * mappings (greater than page-granularity) for all the memory bank rangs. @@ -84,6 +85,7 @@ EXPORT_SYMBOL(memstart_addr); * Note: Page-granularity mapppings are necessary for crash kernel memory * range for shrinking its size via /sys/kernel/kexec_crash_size interface. */ +static phys_addr_t __ro_after_init dma32_phys_limit; #if IS_ENABLED(CONFIG_ZONE_DMA) || IS_ENABLED(CONFIG_ZONE_DMA32) phys_addr_t __ro_after_init arm64_dma_phys_limit; #else @@ -160,11 +162,10 @@ static phys_addr_t __init max_zone_phys(unsigned int zone_bits) static void __init zone_sizes_init(unsigned long min, unsigned long max) { unsigned long max_zone_pfns[MAX_NR_ZONES] = {0}; - unsigned int __maybe_unused acpi_zone_dma_bits; - unsigned int __maybe_unused dt_zone_dma_bits; - phys_addr_t __maybe_unused dma32_phys_limit = max_zone_phys(32); - #ifdef CONFIG_ZONE_DMA + unsigned int acpi_zone_dma_bits; + unsigned int dt_zone_dma_bits; + acpi_zone_dma_bits = fls64(acpi_iort_dma_get_max_cpu_address()); dt_zone_dma_bits = fls64(of_dma_get_max_cpu_address(NULL)); zone_dma_bits = min3(32U, dt_zone_dma_bits, acpi_zone_dma_bits); @@ -173,8 +174,6 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max) #endif #ifdef CONFIG_ZONE_DMA32 max_zone_pfns[ZONE_DMA32] = PFN_DOWN(dma32_phys_limit); - if (!arm64_dma_phys_limit) - arm64_dma_phys_limit = dma32_phys_limit; #endif max_zone_pfns[ZONE_NORMAL] = max; @@ -336,8 +335,12 @@ void __init arm64_memblock_init(void) early_init_fdt_scan_reserved_mem(); - if (!IS_ENABLED(CONFIG_ZONE_DMA) && !IS_ENABLED(CONFIG_ZONE_DMA32)) + dma32_phys_limit = max_zone_phys(32); + if (!IS_ENABLED(CONFIG_ZONE_DMA)) { + if (IS_ENABLED(CONFIG_ZONE_DMA32)) + arm64_dma_phys_limit = dma32_phys_limit; reserve_crashkernel(); + } high_memory = __va(memblock_end_of_DRAM() - 1) + 1; } @@ -385,7 +388,7 @@ void __init bootmem_init(void) * request_standard_resources() depends on crashkernel's memory being * reserved, so do it here. */ - if (IS_ENABLED(CONFIG_ZONE_DMA) || IS_ENABLED(CONFIG_ZONE_DMA32)) + if (IS_ENABLED(CONFIG_ZONE_DMA)) reserve_crashkernel(); memblock_dump_all(); diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 626ec32873c6..23734481318a 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -529,8 +529,7 @@ static void __init map_mem(pgd_t *pgdp) #ifdef CONFIG_KEXEC_CORE if (crash_mem_map) { - if (IS_ENABLED(CONFIG_ZONE_DMA) || - IS_ENABLED(CONFIG_ZONE_DMA32)) + if (IS_ENABLED(CONFIG_ZONE_DMA)) flags |= NO_BLOCK_MAPPINGS | NO_CONT_MAPPINGS; else if (crashk_res.end) memblock_mark_nomap(crashk_res.start, @@ -571,8 +570,7 @@ static void __init map_mem(pgd_t *pgdp) * through /sys/kernel/kexec_crash_size interface. */ #ifdef CONFIG_KEXEC_CORE - if (crash_mem_map && - !IS_ENABLED(CONFIG_ZONE_DMA) && !IS_ENABLED(CONFIG_ZONE_DMA32)) { + if (crash_mem_map && !IS_ENABLED(CONFIG_ZONE_DMA)) { if (crashk_res.end) { __map_memblock(pgdp, crashk_res.start, crashk_res.end + 1, -- 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/3] arm64: mm: Don't defer reserve_crashkernel() with dma_force_32bit 2022-03-31 2:59 [PATCH v2 0/3] arm64: mm: Do not defer reserve_crashkernel() Kefeng Wang 2022-03-31 2:59 ` [PATCH v2 1/3] arm64: mm: Do not defer reserve_crashkernel() if only ZONE_DMA32 Kefeng Wang @ 2022-03-31 2:59 ` Kefeng Wang 2022-03-31 7:01 ` kernel test robot 2022-03-31 2:59 ` [PATCH v2 3/3] arm64: mm: Cleanup useless parameters in zone_sizes_init() Kefeng Wang 2 siblings, 1 reply; 6+ messages in thread From: Kefeng Wang @ 2022-03-31 2:59 UTC (permalink / raw) To: catalin.marinas, will, linux-arm-kernel, linux-kernel Cc: vijayb, f.fainelli, Kefeng Wang ARM64 enable ZONE_DMA by default, and with ZONE_DMA crash kernel memory reservation is delayed until DMA zone memory range size initilazation performed in zone_sizes_init(), but for most platforms use 32bit dma_zone_bits, so add dma_force_32bit kernel parameter if ZONE_DMA enabled, and initialize arm64_dma_phys_limit to dma32_phys_limit in arm64_memblock_init() if dma_force_32bit is setup, this could let the crash kernel reservation earlier, and allows linear creation with block mapping. Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- arch/arm64/include/asm/kexec.h | 1 + arch/arm64/mm/init.c | 42 ++++++++++++++++++++++++++-------- arch/arm64/mm/mmu.c | 4 ++-- 3 files changed, 36 insertions(+), 11 deletions(-) diff --git a/arch/arm64/include/asm/kexec.h b/arch/arm64/include/asm/kexec.h index 9839bfc163d7..653b16acd09a 100644 --- a/arch/arm64/include/asm/kexec.h +++ b/arch/arm64/include/asm/kexec.h @@ -94,6 +94,7 @@ static inline void crash_post_resume(void) {} void cpu_soft_restart(unsigned long el2_switch, unsigned long entry, unsigned long arg0, unsigned long arg1, unsigned long arg2); +bool crashkernel_could_early_reserve(void) #endif #define ARCH_HAS_KIMAGE_ARCH diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index fb01eb489fa9..329e236c3c52 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -66,7 +66,8 @@ EXPORT_SYMBOL(memstart_addr); * depending on DMA memory zones configs (ZONE_DMA) -- * * In absence of ZONE_DMA and ZONE_DMA32 configs arm64_dma_phys_limit - * initialized here and if only with ZONE_DMA32 arm64_dma_phys_limit + * initialized here, and if only with ZONE_DMA32 or if with ZONE_DMA + * and dma_force_32bit kernel parameter, the arm64_dma_phys_limit is * initialised to dma32_phys_limit. This lets early reservation of * crash kernel memory which has a dependency on arm64_dma_phys_limit. * Reserving memory early for crash kernel allows linear creation of block @@ -92,6 +93,27 @@ phys_addr_t __ro_after_init arm64_dma_phys_limit; phys_addr_t __ro_after_init arm64_dma_phys_limit = PHYS_MASK + 1; #endif +static bool __ro_after_init arm64_dma_force_32bit; +#ifdef CONFIG_ZONE_DMA +static int __init arm64_dma_force_32bit_setup(char *p) +{ + zone_dma_bits = 32; + arm64_dma_force_32bit = true; + + return 0; +} +early_param("dma_force_32bit", arm64_dma_force_32bit_setup); +#endif + +bool __init crashkernel_could_early_reserve(void) +{ + if (!IS_ENABLED(CONFIG_ZONE_DMA)) + return true; + if (arm64_dma_force_32bit) + return true; + return false; +} + /* * reserve_crashkernel() - reserves memory for crash kernel * @@ -163,12 +185,14 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max) { unsigned long max_zone_pfns[MAX_NR_ZONES] = {0}; #ifdef CONFIG_ZONE_DMA - unsigned int acpi_zone_dma_bits; - unsigned int dt_zone_dma_bits; + if (!arm64_dma_force_32bit) { + unsigned int acpi_zone_dma_bits; + unsigned int dt_zone_dma_bits; - acpi_zone_dma_bits = fls64(acpi_iort_dma_get_max_cpu_address()); - dt_zone_dma_bits = fls64(of_dma_get_max_cpu_address(NULL)); - zone_dma_bits = min3(32U, dt_zone_dma_bits, acpi_zone_dma_bits); + acpi_zone_dma_bits = fls64(acpi_iort_dma_get_max_cpu_address()); + dt_zone_dma_bits = fls64(of_dma_get_max_cpu_address(NULL)); + zone_dma_bits = min3(32U, dt_zone_dma_bits, acpi_zone_dma_bits); + } arm64_dma_phys_limit = max_zone_phys(zone_dma_bits); max_zone_pfns[ZONE_DMA] = PFN_DOWN(arm64_dma_phys_limit); #endif @@ -336,8 +360,8 @@ void __init arm64_memblock_init(void) early_init_fdt_scan_reserved_mem(); dma32_phys_limit = max_zone_phys(32); - if (!IS_ENABLED(CONFIG_ZONE_DMA)) { - if (IS_ENABLED(CONFIG_ZONE_DMA32)) + if (crashkernel_could_early_reserve()) { + if (IS_ENABLED(CONFIG_ZONE_DMA32) || dma_force_32bit) arm64_dma_phys_limit = dma32_phys_limit; reserve_crashkernel(); } @@ -388,7 +412,7 @@ void __init bootmem_init(void) * request_standard_resources() depends on crashkernel's memory being * reserved, so do it here. */ - if (IS_ENABLED(CONFIG_ZONE_DMA)) + if (!crashkernel_could_early_reserve()) reserve_crashkernel(); memblock_dump_all(); diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 23734481318a..8f7e8452d906 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -529,7 +529,7 @@ static void __init map_mem(pgd_t *pgdp) #ifdef CONFIG_KEXEC_CORE if (crash_mem_map) { - if (IS_ENABLED(CONFIG_ZONE_DMA)) + if (!crashkernel_could_early_reserve()) flags |= NO_BLOCK_MAPPINGS | NO_CONT_MAPPINGS; else if (crashk_res.end) memblock_mark_nomap(crashk_res.start, @@ -570,7 +570,7 @@ static void __init map_mem(pgd_t *pgdp) * through /sys/kernel/kexec_crash_size interface. */ #ifdef CONFIG_KEXEC_CORE - if (crash_mem_map && !IS_ENABLED(CONFIG_ZONE_DMA)) { + if (crash_mem_map && crashkernel_could_early_reserve()) { if (crashk_res.end) { __map_memblock(pgdp, crashk_res.start, crashk_res.end + 1, -- 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/3] arm64: mm: Don't defer reserve_crashkernel() with dma_force_32bit 2022-03-31 2:59 ` [PATCH v2 2/3] arm64: mm: Don't defer reserve_crashkernel() with dma_force_32bit Kefeng Wang @ 2022-03-31 7:01 ` kernel test robot 2022-03-31 7:10 ` Kefeng Wang 0 siblings, 1 reply; 6+ messages in thread From: kernel test robot @ 2022-03-31 7:01 UTC (permalink / raw) To: Kefeng Wang, catalin.marinas, will, linux-arm-kernel, linux-kernel Cc: kbuild-all, vijayb, f.fainelli, Kefeng Wang Hi Kefeng, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20220330] [cannot apply to arm64/for-next/core v5.17 v5.17-rc8 v5.17-rc7 v5.17] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/intel-lab-lkp/linux/commits/Kefeng-Wang/arm64-mm-Do-not-defer-reserve_crashkernel/20220331-105429 base: a67ba3cf9551f8c92d5ec9d7eae1aadbb9127b57 config: arm64-randconfig-r035-20220331 (https://download.01.org/0day-ci/archive/20220331/202203311421.VENALFHe-lkp@intel.com/config) compiler: aarch64-linux-gcc (GCC) 11.2.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/05592b78cd421b988704f52eba353278a3c22ee4 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Kefeng-Wang/arm64-mm-Do-not-defer-reserve_crashkernel/20220331-105429 git checkout 05592b78cd421b988704f52eba353278a3c22ee4 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 prepare If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All error/warnings (new ones prefixed by >>): In file included from include/linux/kexec.h:34, from arch/arm64/kernel/asm-offsets.c:12: >> arch/arm64/include/asm/kexec.h:97:6: warning: no previous prototype for 'crashkernel_could_early_reserve' [-Wmissing-prototypes] 97 | bool crashkernel_could_early_reserve(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/arm64/include/asm/kexec.h: In function 'crashkernel_could_early_reserve': >> arch/arm64/include/asm/kexec.h:102:1: warning: empty declaration 102 | struct kimage_arch { | ^~~~~~ >> arch/arm64/include/asm/kexec.h:115:36: error: storage class specified for parameter 'kexec_image_ops' 115 | extern const struct kexec_file_ops kexec_image_ops; | ^~~~~~~~~~~~~~~ arch/arm64/include/asm/kexec.h:117:1: warning: empty declaration 117 | struct kimage; | ^~~~~~ >> arch/arm64/include/asm/kexec.h:119:12: error: storage class specified for parameter 'arch_kimage_file_post_load_cleanup' 119 | extern int arch_kimage_file_post_load_cleanup(struct kimage *image); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> arch/arm64/include/asm/kexec.h:120:12: error: storage class specified for parameter 'load_other_segments' 120 | extern int load_other_segments(struct kimage *image, | ^~~~~~~~~~~~~~~~~~~ In file included from arch/arm64/kernel/asm-offsets.c:12: >> include/linux/kexec.h:77:23: error: storage class specified for parameter 'kimage_entry_t' 77 | typedef unsigned long kimage_entry_t; | ^~~~~~~~~~~~~~ >> include/linux/kexec.h:79:1: warning: empty declaration 79 | struct kexec_segment { | ^~~~~~ include/linux/kexec.h:107:1: warning: empty declaration 107 | struct purgatory_info { | ^~~~~~ include/linux/kexec.h:125:1: warning: empty declaration 125 | struct kimage; | ^~~~~~ >> include/linux/kexec.h:127:14: error: storage class specified for parameter 'kexec_probe_t' 127 | typedef int (kexec_probe_t)(const char *kernel_buf, unsigned long kernel_size); | ^~~~~~~~~~~~~ >> include/linux/kexec.h:128:16: error: storage class specified for parameter 'kexec_load_t' 128 | typedef void *(kexec_load_t)(struct kimage *image, char *kernel_buf, | ^~~~~~~~~~~~ >> include/linux/kexec.h:132:14: error: storage class specified for parameter 'kexec_cleanup_t' 132 | typedef int (kexec_cleanup_t)(void *loader_data); | ^~~~~~~~~~~~~~~ >> include/linux/kexec.h:135:14: error: storage class specified for parameter 'kexec_verify_sig_t' 135 | typedef int (kexec_verify_sig_t)(const char *kernel_buf, | ^~~~~~~~~~~~~~~~~~ >> include/linux/kexec.h:140:9: error: expected specifier-qualifier-list before 'kexec_probe_t' 140 | kexec_probe_t *probe; | ^~~~~~~~~~~~~ include/linux/kexec.h:139:1: warning: empty declaration 139 | struct kexec_file_ops { | ^~~~~~ >> include/linux/kexec.h:148:44: error: storage class specified for parameter 'kexec_file_loaders' 148 | extern const struct kexec_file_ops * const kexec_file_loaders[]; | ^~~~~~~~~~~~~~~~~~ include/linux/kexec.h:174:1: warning: empty declaration 174 | struct kexec_buf { | ^~~~~~ >> include/linux/kexec.h:204:5: error: redefinition of parameter 'arch_kimage_file_post_load_cleanup' 204 | int arch_kimage_file_post_load_cleanup(struct kimage *image); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/kexec.h:34, from arch/arm64/kernel/asm-offsets.c:12: arch/arm64/include/asm/kexec.h:119:12: note: previous definition of 'arch_kimage_file_post_load_cleanup' with type 'int (*)(struct kimage *)' 119 | extern int arch_kimage_file_post_load_cleanup(struct kimage *image); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from arch/arm64/kernel/asm-offsets.c:12: >> include/linux/kexec.h:211:12: error: storage class specified for parameter 'kexec_add_buffer' 211 | extern int kexec_add_buffer(struct kexec_buf *kbuf); | ^~~~~~~~~~~~~~~~ include/linux/kexec.h:217:1: warning: empty declaration 217 | struct crash_mem_range { | ^~~~~~ include/linux/kexec.h:221:1: warning: empty declaration 221 | struct crash_mem { | ^~~~~~ >> include/linux/kexec.h:227:12: error: storage class specified for parameter 'crash_exclude_mem_range' 227 | extern int crash_exclude_mem_range(struct crash_mem *mem, | ^~~~~~~~~~~~~~~~~~~~~~~ >> include/linux/kexec.h:230:12: error: storage class specified for parameter 'crash_prepare_elf64_headers' 230 | extern int crash_prepare_elf64_headers(struct crash_mem *mem, int kernel_map, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ >> include/linux/kexec.h:258:9: error: expected specifier-qualifier-list before 'kimage_entry_t' 258 | kimage_entry_t head; | ^~~~~~~~~~~~~~ include/linux/kexec.h:257:1: warning: empty declaration 257 | struct kimage { | ^~~~~~ >> include/linux/kexec.h:325:13: error: storage class specified for parameter 'machine_kexec' 325 | extern void machine_kexec(struct kimage *image); | ^~~~~~~~~~~~~ >> include/linux/kexec.h:326:12: error: storage class specified for parameter 'machine_kexec_prepare' 326 | extern int machine_kexec_prepare(struct kimage *image); | ^~~~~~~~~~~~~~~~~~~~~ include/linux/kexec.h:327:13: error: storage class specified for parameter 'machine_kexec_cleanup' 327 | extern void machine_kexec_cleanup(struct kimage *image); | ^~~~~~~~~~~~~~~~~~~~~ include/linux/kexec.h:328:12: error: storage class specified for parameter 'kernel_kexec' 328 | extern int kernel_kexec(void); | ^~~~~~~~~~~~ include/linux/kexec.h:329:21: error: storage class specified for parameter 'kimage_alloc_control_pages' 329 | extern struct page *kimage_alloc_control_pages(struct kimage *image, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kexec.h:333:13: error: storage class specified for parameter '__crash_kexec' 333 | extern void __crash_kexec(struct pt_regs *); | ^~~~~~~~~~~~~ include/linux/kexec.h:334:13: error: storage class specified for parameter 'crash_kexec' 334 | extern void crash_kexec(struct pt_regs *); | ^~~~~~~~~~~ include/linux/kexec.h:338:12: error: storage class specified for parameter 'kimage_crash_copy_vmcoreinfo' 338 | extern int kimage_crash_copy_vmcoreinfo(struct kimage *image); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kexec.h:340:23: error: storage class specified for parameter 'kexec_image' 340 | extern struct kimage *kexec_image; | ^~~~~~~~~~~ include/linux/kexec.h:341:23: error: storage class specified for parameter 'kexec_crash_image' 341 | extern struct kimage *kexec_crash_image; | ^~~~~~~~~~~~~~~~~ include/linux/kexec.h:342:12: error: storage class specified for parameter 'kexec_load_disabled' 342 | extern int kexec_load_disabled; | ^~~~~~~~~~~~~~~~~~~ include/linux/kexec.h:360:13: error: storage class specified for parameter 'kexec_in_progress' 360 | extern bool kexec_in_progress; | ^~~~~~~~~~~~~~~~~ include/linux/kexec.h:371:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 371 | { | ^ include/linux/kexec.h:378:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 378 | { | ^ include/linux/kexec.h:385:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 385 | { | ^ include/linux/kexec.h:392:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 392 | { | ^ include/linux/kexec.h:398:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 398 | { | ^ include/linux/kexec.h:403:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 403 | { | ^ include/linux/kexec.h:408:91: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 408 | static inline int arch_kexec_post_alloc_pages(void *vaddr, unsigned int pages, gfp_t gfp) { return 0; } | ^ include/linux/kexec.h:412:79: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 412 | static inline void arch_kexec_pre_free_pages(void *vaddr, unsigned int pages) { } | ^ In file included from include/linux/dma-mapping.h:9, from arch/arm64/kernel/asm-offsets.c:14: include/linux/dma-direction.h:5:1: warning: empty declaration 5 | enum dma_data_direction { | ^~~~ include/linux/dma-direction.h:13:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 13 | { | ^ In file included from include/linux/dma-mapping.h:10, from arch/arm64/kernel/asm-offsets.c:14: include/linux/scatterlist.h:11:1: warning: empty declaration 11 | struct scatterlist { | ^~~~~~ include/linux/scatterlist.h:36:1: warning: empty declaration 36 | struct sg_table { | ^~~~~~ include/linux/scatterlist.h:42:1: warning: empty declaration 42 | struct sg_append_table { | ^~~~~~ include/linux/scatterlist.h:75:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 75 | { | ^ include/linux/scatterlist.h:80:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 80 | { | ^ include/linux/scatterlist.h:85:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 85 | { | ^ include/linux/scatterlist.h:90:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 90 | { | ^ include/linux/scatterlist.h:105:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 105 | { | ^ include/linux/scatterlist.h:135:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 135 | { | ^ include/linux/scatterlist.h:142:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 142 | { | ^ include/linux/scatterlist.h:158:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 158 | { | ^ include/linux/scatterlist.h:187:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token vim +/kexec_image_ops +115 arch/arm64/include/asm/kexec.h 254a41c0ba0573 AKASHI Takahiro 2017-04-03 92 7a2512fa649397 Pasha Tatashin 2021-09-30 93 #if defined(CONFIG_KEXEC_CORE) 7a2512fa649397 Pasha Tatashin 2021-09-30 94 void cpu_soft_restart(unsigned long el2_switch, unsigned long entry, 7a2512fa649397 Pasha Tatashin 2021-09-30 95 unsigned long arg0, unsigned long arg1, 7a2512fa649397 Pasha Tatashin 2021-09-30 96 unsigned long arg2); 05592b78cd421b Kefeng Wang 2022-03-31 @97 bool crashkernel_could_early_reserve(void) 7a2512fa649397 Pasha Tatashin 2021-09-30 98 #endif 7a2512fa649397 Pasha Tatashin 2021-09-30 99 52b2a8af743604 AKASHI Takahiro 2018-11-15 100 #define ARCH_HAS_KIMAGE_ARCH 52b2a8af743604 AKASHI Takahiro 2018-11-15 101 52b2a8af743604 AKASHI Takahiro 2018-11-15 @102 struct kimage_arch { 52b2a8af743604 AKASHI Takahiro 2018-11-15 103 void *dtb; 117cda9a784728 Pavel Tatashin 2021-01-25 104 phys_addr_t dtb_mem; 4c3c31230c912d Pavel Tatashin 2021-01-25 105 phys_addr_t kern_reloc; 08eae0ef618f34 Pasha Tatashin 2021-09-30 106 phys_addr_t el2_vectors; efc2d0f20a9dab Pasha Tatashin 2021-09-30 107 phys_addr_t ttbr0; 3744b5280e67f5 Pasha Tatashin 2021-09-30 108 phys_addr_t ttbr1; 3744b5280e67f5 Pasha Tatashin 2021-09-30 109 phys_addr_t zero_page; efc2d0f20a9dab Pasha Tatashin 2021-09-30 110 unsigned long phys_offset; efc2d0f20a9dab Pasha Tatashin 2021-09-30 111 unsigned long t0sz; 52b2a8af743604 AKASHI Takahiro 2018-11-15 112 }; 52b2a8af743604 AKASHI Takahiro 2018-11-15 113 117cda9a784728 Pavel Tatashin 2021-01-25 114 #ifdef CONFIG_KEXEC_FILE f3b70e50942960 AKASHI Takahiro 2018-11-15 @115 extern const struct kexec_file_ops kexec_image_ops; f3b70e50942960 AKASHI Takahiro 2018-11-15 116 52b2a8af743604 AKASHI Takahiro 2018-11-15 117 struct kimage; 52b2a8af743604 AKASHI Takahiro 2018-11-15 118 52b2a8af743604 AKASHI Takahiro 2018-11-15 @119 extern int arch_kimage_file_post_load_cleanup(struct kimage *image); 52b2a8af743604 AKASHI Takahiro 2018-11-15 @120 extern int load_other_segments(struct kimage *image, 52b2a8af743604 AKASHI Takahiro 2018-11-15 121 unsigned long kernel_load_addr, unsigned long kernel_size, 52b2a8af743604 AKASHI Takahiro 2018-11-15 122 char *initrd, unsigned long initrd_len, 52b2a8af743604 AKASHI Takahiro 2018-11-15 123 char *cmdline); 52b2a8af743604 AKASHI Takahiro 2018-11-15 124 #endif 52b2a8af743604 AKASHI Takahiro 2018-11-15 125 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/3] arm64: mm: Don't defer reserve_crashkernel() with dma_force_32bit 2022-03-31 7:01 ` kernel test robot @ 2022-03-31 7:10 ` Kefeng Wang 0 siblings, 0 replies; 6+ messages in thread From: Kefeng Wang @ 2022-03-31 7:10 UTC (permalink / raw) To: kernel test robot, catalin.marinas, will, linux-arm-kernel, linux-kernel Cc: kbuild-all, vijayb, f.fainelli On 2022/3/31 15:01, kernel test robot wrote: > Hi Kefeng, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on next-20220330] > [cannot apply to arm64/for-next/core v5.17 v5.17-rc8 v5.17-rc7 v5.17] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch] Thanks, will resend this patchset. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 3/3] arm64: mm: Cleanup useless parameters in zone_sizes_init() 2022-03-31 2:59 [PATCH v2 0/3] arm64: mm: Do not defer reserve_crashkernel() Kefeng Wang 2022-03-31 2:59 ` [PATCH v2 1/3] arm64: mm: Do not defer reserve_crashkernel() if only ZONE_DMA32 Kefeng Wang 2022-03-31 2:59 ` [PATCH v2 2/3] arm64: mm: Don't defer reserve_crashkernel() with dma_force_32bit Kefeng Wang @ 2022-03-31 2:59 ` Kefeng Wang 2 siblings, 0 replies; 6+ messages in thread From: Kefeng Wang @ 2022-03-31 2:59 UTC (permalink / raw) To: catalin.marinas, will, linux-arm-kernel, linux-kernel Cc: vijayb, f.fainelli, Kefeng Wang Directly use max_pfn for max and no one use min, kill them. Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- arch/arm64/mm/init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 329e236c3c52..174360429f2a 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -181,7 +181,7 @@ static phys_addr_t __init max_zone_phys(unsigned int zone_bits) return min(zone_mask, memblock_end_of_DRAM() - 1) + 1; } -static void __init zone_sizes_init(unsigned long min, unsigned long max) +static void __init zone_sizes_init(void) { unsigned long max_zone_pfns[MAX_NR_ZONES] = {0}; #ifdef CONFIG_ZONE_DMA @@ -199,7 +199,7 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max) #ifdef CONFIG_ZONE_DMA32 max_zone_pfns[ZONE_DMA32] = PFN_DOWN(dma32_phys_limit); #endif - max_zone_pfns[ZONE_NORMAL] = max; + max_zone_pfns[ZONE_NORMAL] = max_pfn; free_area_init(max_zone_pfns); } @@ -401,7 +401,7 @@ void __init bootmem_init(void) * done after the fixed reservations */ sparse_init(); - zone_sizes_init(min, max); + zone_sizes_init(); /* * Reserve the CMA area after arm64_dma_phys_limit was initialised. -- 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-03-31 7:11 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-03-31 2:59 [PATCH v2 0/3] arm64: mm: Do not defer reserve_crashkernel() Kefeng Wang 2022-03-31 2:59 ` [PATCH v2 1/3] arm64: mm: Do not defer reserve_crashkernel() if only ZONE_DMA32 Kefeng Wang 2022-03-31 2:59 ` [PATCH v2 2/3] arm64: mm: Don't defer reserve_crashkernel() with dma_force_32bit Kefeng Wang 2022-03-31 7:01 ` kernel test robot 2022-03-31 7:10 ` Kefeng Wang 2022-03-31 2:59 ` [PATCH v2 3/3] arm64: mm: Cleanup useless parameters in zone_sizes_init() Kefeng Wang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox