From: Baoquan He <bhe@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org,
linux-s390@vger.kernel.org, akpm@linux-foundation.org,
ignat@cloudflare.com, eric_devolder@yahoo.com,
Baoquan He <bhe@redhat.com>
Subject: [PATCH 2/3] drivers/base/cpu: crash data showing should depends on KEXEC_CORE
Date: Thu, 23 Nov 2023 15:36:51 +0800 [thread overview]
Message-ID: <20231123073652.507034-3-bhe@redhat.com> (raw)
In-Reply-To: <20231123073652.507034-1-bhe@redhat.com>
When below kernel config items are set, compiling error are triggered.
CONFIG_CRASH_CORE=y
CONFIG_KEXEC_CORE=y
CONFIG_CRASH_DUMP=y
CONFIG_CRASH_HOTPLUG=y
------------------------------------------------------
drivers/base/cpu.c: In function ‘crash_hotplug_show’:
drivers/base/cpu.c:309:40: error: implicit declaration of function ‘crash_hotplug_cpu_support’; did you mean ‘crash_hotplug_show’? [-Werror=implicit-function-declaration]
309 | return sysfs_emit(buf, "%d\n", crash_hotplug_cpu_support());
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| crash_hotplug_show
cc1: some warnings being treated as errors
------------------------------------------------------
CONFIG_KEXEC is used to enable kexec_load interface, the
crash_notes/crash_notes_size/crash_hotplug showing depends on
CONFIG_KEXEC is incorrect. It should depend on KEXEC_CORE instead.
Fix it now.
Signed-off-by: Baoquan He <bhe@redhat.com>
---
drivers/base/cpu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 9ea22e165acd..548491de818e 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -144,7 +144,7 @@ static DEVICE_ATTR(release, S_IWUSR, NULL, cpu_release_store);
#endif /* CONFIG_ARCH_CPU_PROBE_RELEASE */
#endif /* CONFIG_HOTPLUG_CPU */
-#ifdef CONFIG_KEXEC
+#ifdef CONFIG_KEXEC_CORE
#include <linux/kexec.h>
static ssize_t crash_notes_show(struct device *dev,
@@ -189,14 +189,14 @@ static const struct attribute_group crash_note_cpu_attr_group = {
#endif
static const struct attribute_group *common_cpu_attr_groups[] = {
-#ifdef CONFIG_KEXEC
+#ifdef CONFIG_KEXEC_CORE
&crash_note_cpu_attr_group,
#endif
NULL
};
static const struct attribute_group *hotplugable_cpu_attr_groups[] = {
-#ifdef CONFIG_KEXEC
+#ifdef CONFIG_KEXEC_CORE
&crash_note_cpu_attr_group,
#endif
NULL
--
2.41.0
next prev parent reply other threads:[~2023-11-23 7:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-23 7:36 [PATCH 0/3] kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP Baoquan He
2023-11-23 7:36 ` [PATCH 1/3] " Baoquan He
2023-11-23 8:23 ` Ignat Korchagin
2023-11-23 11:07 ` Baoquan He
2023-11-23 7:36 ` Baoquan He [this message]
2023-11-23 8:34 ` [PATCH 2/3] drivers/base/cpu: crash data showing should depends on KEXEC_CORE Ignat Korchagin
2023-11-23 11:15 ` Baoquan He
2023-11-24 16:44 ` Andrew Morton
2023-11-25 2:29 ` Baoquan He
2023-11-23 14:13 ` Alexander Gordeev
2023-11-23 14:27 ` Baoquan He
2023-11-23 7:36 ` [PATCH 3/3] s390/Kconfig: drop select of KEXEC Baoquan He
2023-11-23 13:43 ` Alexander Gordeev
2023-11-23 14:31 ` Baoquan He
[not found] ` <5ab45f48-9ec2-4611-81a2-4dc2f1854c4f@yahoo.com>
2023-11-27 3:29 ` [PATCH 0/3] kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP 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=20231123073652.507034-3-bhe@redhat.com \
--to=bhe@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=eric_devolder@yahoo.com \
--cc=ignat@cloudflare.com \
--cc=kexec@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox