From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, lkp@intel.com, bhe@redhat.com,
akpm@linux-foundation.org
Subject: + x86-kdump-use-generic-interface-to-simplify-crashkernel-reservation-code-fix.patch added to mm-nonmm-unstable branch
Date: Wed, 20 Sep 2023 10:00:36 -0700 [thread overview]
Message-ID: <20230920170037.AC063C433C8@smtp.kernel.org> (raw)
The patch titled
Subject: x86: kdump: move crash_low_size_default() code into <asm/crash_core.h>
has been added to the -mm mm-nonmm-unstable branch. Its filename is
x86-kdump-use-generic-interface-to-simplify-crashkernel-reservation-code-fix.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/x86-kdump-use-generic-interface-to-simplify-crashkernel-reservation-code-fix.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Baoquan He <bhe@redhat.com>
Subject: x86: kdump: move crash_low_size_default() code into <asm/crash_core.h>
Content-type: text/plain
LKP reported below error with 'W=1' and randconfig.
=========
>> 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.
=========
In that config, CONFIG_KEXEC is not set. So all KEXEC/CRASH related
configs depending on CONFIG_KEXEC are all unset. Then the declaration
in <asm/crash_core.h> won't be seen. Finally the warning is caused.
So move the code of crash_low_size_default() into x86's
<asm/crash_core.h>, and make it static inline to fix the warning.
Link: https://lkml.kernel.org/r/ZQpeAjOmuMJBFw1/@MiWiFi-R3L-srv
Signed-off-by: Baoquan He <bhe@redhat.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309141534.moH4dTcz-lkp@intel.com/
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/x86/include/asm/crash_core.h | 10 +++++++++-
arch/x86/kernel/setup.c | 12 ------------
2 files changed, 9 insertions(+), 13 deletions(-)
--- a/arch/x86/include/asm/crash_core.h~x86-kdump-use-generic-interface-to-simplify-crashkernel-reservation-code-fix
+++ a/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 */
--- a/arch/x86/kernel/setup.c~x86-kdump-use-generic-interface-to-simplify-crashkernel-reservation-code-fix
+++ a/arch/x86/kernel/setup.c
@@ -470,18 +470,6 @@ static void __init memblock_x86_reserve_
}
}
-/*
- * --------- 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;
_
Patches currently in -mm which might be from bhe@redhat.com are
crash_corec-remove-unnecessary-parameter-of-function.patch
crash_core-change-the-prototype-of-function-parse_crashkernel.patch
crash_core-change-parse_crashkernel-to-support-crashkernel=highlow-parsing.patch
crash_core-add-generic-function-to-do-reservation.patch
crash_core-move-crashk_res-definition-into-crash_corec.patch
x86-kdump-use-generic-interface-to-simplify-crashkernel-reservation-code.patch
x86-kdump-use-generic-interface-to-simplify-crashkernel-reservation-code-fix.patch
arm64-kdump-use-generic-interface-to-simplify-crashkernel-reservation.patch
riscv-kdump-use-generic-interface-to-simplify-crashkernel-reservation.patch
crash_corec-remove-unneeded-functions.patch
reply other threads:[~2023-09-20 17:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230920170037.AC063C433C8@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mm-commits@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.