From: Baoquan He <bhe@redhat.com>
To: kernel test robot <lkp@intel.com>, akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
oe-kbuild-all@lists.linux.dev, akpm@linux-foundation.org,
thunder.leizhen@huawei.com, catalin.marinas@arm.com,
chenjiahao16@huawei.com, kexec@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-riscv@lists.infradead.org, x86@kernel.org
Subject: Re: [PATCH v3 6/9] x86: kdump: use generic interface to simplify crashkernel reservation code
Date: Fri, 15 Sep 2023 21:13:47 +0800 [thread overview]
Message-ID: <ZQRYixr2AtJtRFrh@MiWiFi-R3L-srv> (raw)
In-Reply-To: <202309141534.moH4dTcz-lkp@intel.com>
On 09/14/23 at 04:12pm, kernel test robot wrote:
> Hi Baoquan,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on powerpc/next]
> [also build test WARNING on powerpc/fixes linus/master v6.6-rc1 next-20230914]
> [cannot apply to arm64/for-next/core tip/x86/core]
> [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#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Baoquan-He/crash_core-c-remove-unnecessary-parameter-of-function/20230914-113546
> base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
> patch link: https://lore.kernel.org/r/20230914033142.676708-7-bhe%40redhat.com
> patch subject: [PATCH v3 6/9] x86: kdump: use generic interface to simplify crashkernel reservation code
> config: i386-allnoconfig (https://download.01.org/0day-ci/archive/20230914/202309141534.moH4dTcz-lkp@intel.com/config)
> compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230914/202309141534.moH4dTcz-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202309141534.moH4dTcz-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> >> arch/x86/kernel/setup.c:476:15: warning: no previous prototype for function 'crash_low_size_default' [-Wmissing-prototypes]
> unsigned long crash_low_size_default(void)
> ^
> arch/x86/kernel/setup.c:476:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> unsigned long crash_low_size_default(void)
> ^
> static
> 1 warning generated.
Thanks for reporting this. I can reproduced this warning on x86_64
machine by retrieving the LKP's config and build it with below command:
make ARCH=i386 -j128 W=1 arch/x86/kernel/
I can fix it by moving crash_low_size_default() into arch/x86/include/asm/crash_core.h
and make it as static inline as below draft change.
Hi Andrew,
I should post v4 of the whole series or just v4 of this patch?
[PATCH v3 6/9] x86: kdump: use generic interface to simplify crashkernel reservation code
diff --git a/arch/x86/include/asm/crash_core.h b/arch/x86/include/asm/crash_core.h
index 5fc5e4f94521..76af98f4e801 100644
--- a/arch/x86/include/asm/crash_core.h
+++ b/arch/x86/include/asm/crash_core.h
@@ -18,6 +18,7 @@
* no good way to detect the paging mode of the target kernel which will be
* loaded for dumping.
*/
+extern unsigned long swiotlb_size_or_default(void);
#ifdef CONFIG_X86_32
# define CRASH_ADDR_LOW_MAX SZ_512M
@@ -29,6 +30,13 @@
# define DEFAULT_CRASH_KERNEL_LOW_SIZE crash_low_size_default()
-extern unsigned long crash_low_size_default(void);
+static inline unsigned long crash_low_size_default(void)
+{
+#ifdef CONFIG_X86_64
+ return max(swiotlb_size_or_default() + (8UL << 20), 256UL << 20);
+#else
+ return 0;
+#endif
+}
#endif /* _X86_CRASH_CORE_H */
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 0acc86587fc0..d7baa567c68e 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -470,18 +470,6 @@ static void __init memblock_x86_reserve_range_setup_data(void)
}
}
-/*
- * --------- Crashkernel reservation ------------------------------
- */
-unsigned long crash_low_size_default(void)
-{
-#ifdef CONFIG_X86_64
- return max(swiotlb_size_or_default() + (8UL << 20), 256UL << 20);
-#else
- return 0;
-#endif
-}
-
static void __init arch_reserve_crashkernel(void)
{
unsigned long long crash_base, crash_size, low_size = 0;
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-09-15 13:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-14 3:31 [PATCH v3 0/9] kdump: use generic functions to simplify crashkernel reservation in arch Baoquan He
2023-09-14 3:31 ` [PATCH v3 1/9] crash_core.c: remove unnecessary parameter of function Baoquan He
2023-09-14 3:31 ` [PATCH v3 2/9] crash_core: change the prototype of function parse_crashkernel() Baoquan He
2023-09-14 3:31 ` [PATCH v3 3/9] crash_core: change parse_crashkernel() to support crashkernel=,high|low parsing Baoquan He
2023-09-18 12:41 ` Leizhen (ThunderTown)
2023-09-14 3:31 ` [PATCH v3 4/9] crash_core: add generic function to do reservation Baoquan He
2023-09-18 12:44 ` Leizhen (ThunderTown)
2023-09-14 3:31 ` [PATCH v3 5/9] crash_core: move crashk_*res definition into crash_core.c Baoquan He
2023-09-18 12:58 ` Leizhen (ThunderTown)
2023-09-14 3:31 ` [PATCH v3 6/9] x86: kdump: use generic interface to simplify crashkernel reservation code Baoquan He
2023-09-14 8:12 ` kernel test robot
2023-09-15 13:13 ` Baoquan He [this message]
2023-09-16 0:29 ` [PATCH v4 " Baoquan He
2023-09-14 3:31 ` [PATCH v3 7/9] arm64: kdump: use generic interface to simplify crashkernel reservation Baoquan He
2023-09-14 3:31 ` [PATCH v3 8/9] riscv: " Baoquan He
2023-09-21 2:36 ` chenjiahao (C)
2023-09-21 5:00 ` Baoquan He
2023-09-14 3:31 ` [PATCH v3 9/9] crash_core.c: remove unneeded functions Baoquan He
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZQRYixr2AtJtRFrh@MiWiFi-R3L-srv \
--to=bhe@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=chenjiahao16@huawei.com \
--cc=kexec@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=thunder.leizhen@huawei.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).