Message ID | 20231123073652.507034-3-bhe@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp277215vqx; Wed, 22 Nov 2023 23:37:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IEUERaGimJuxQUHUolcwA2o8syWfftuYsYUf7/q8rGFoB4FOW0AT86mY9CHFnCx26knSKX6 X-Received: by 2002:a05:6830:13d5:b0:6d6:47e5:af6d with SMTP id e21-20020a05683013d500b006d647e5af6dmr4994668otq.13.1700725049262; Wed, 22 Nov 2023 23:37:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700725049; cv=none; d=google.com; s=arc-20160816; b=uXbpi+HVMUAgBhFiesmhObO2ets3gERHmYmSiKpHQ1r1s/+ugaAR004HOelOXC3cEy GgUOrskXEdgaGbBVRwzjpppkSclhhYYoNbPxntXR0pFi8qF86uCLvg5FUxqYejOaZICN DZRbHcdaV3AVzkD6Hzi53SvjRl278z04xVMXNAYXX3Fljz84jnTX31ErLwzbKBNb72sp JZMCOLxqJOE+RnhFDk0NvBF0R0dB6jeVOFBoXvHZAad6kM2/ddl6U7oKziouN5IHiCs0 L89Y7KraslxrJyG6vmFkZuppFvpXX+GQC3wdVuR7fH5JtqGhX8hSEz/HFFhrG1DhHIwQ V1Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dNqYLkFiIJwwuHzYUt5fu8IOSkWjg/NNK5Ec2zATJ28=; fh=vL7x4bgFLl4JXLQ25ukDrYi2Fznm1zAkzIBXuJ1+XwQ=; b=z3pYS62KGUMGG0oglkkyBdgcIs2DhFh8QeoV4dHV3L5wxp2xh49rhlDTjzi6YO0JBO JBz1F3SC4PkY2D9XVjRktnVLGxqrgJbP0z0kEldldnq7o6LTJCafPaAtevJ4nlwgJCZE Y+Y76r7w37jkWox3TWmxdzEiw4CPbyNqCcaLW9z41040rTg6dzkB+vWdg4Q6p7aigwll FabLPrk4iGrH8D2ZugSqNTaW5VSbznX7eTgmKXanucijiDOFmJa99Ej2AHHa9GAUtA2t RfVoNtYEXs3XS45sn/bZ89pTNoeEo7uShXZjvcFyhSCIS/W0WIALrK5MA1BJClPv1lMN 1BfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AMYESRL6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id a20-20020a63e854000000b005ac4854b202si805471pgk.321.2023.11.22.23.37.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 23:37:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AMYESRL6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 2DDA9807753C; Wed, 22 Nov 2023 23:37:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234612AbjKWHhF (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Thu, 23 Nov 2023 02:37:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344880AbjKWHhD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 23 Nov 2023 02:37:03 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27B3F110 for <linux-kernel@vger.kernel.org>; Wed, 22 Nov 2023 23:37:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700725028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dNqYLkFiIJwwuHzYUt5fu8IOSkWjg/NNK5Ec2zATJ28=; b=AMYESRL6E2wbSOiqmjlZA2EphTfl6qGgi+O3OZHCF7cV1Ki2UtvHUBvFtOE8b2ElfkeybX nDP06rikRxGR2j7h66a4TEE1B1rfNIcygtgGmpK9g2G861HpzCHCVgL9bmsp8DWS15ieCx mLMGmkLM8OlQj0SWYOg236k7oo3HyNc= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-67-pvhi0avYMXu46SHWzNgkjw-1; Thu, 23 Nov 2023 02:37:06 -0500 X-MC-Unique: pvhi0avYMXu46SHWzNgkjw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5F8C61C05ABA; Thu, 23 Nov 2023 07:37:06 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (unknown [10.72.112.97]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48D6C492BFA; Thu, 23 Nov 2023 07:37:02 +0000 (UTC) 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 Message-ID: <20231123073652.507034-3-bhe@redhat.com> In-Reply-To: <20231123073652.507034-1-bhe@redhat.com> References: <20231123073652.507034-1-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 22 Nov 2023 23:37:25 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783339468963360285 X-GMAIL-MSGID: 1783339468963360285 |
Series |
kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP
|
|
Commit Message
Baoquan He
Nov. 23, 2023, 7:36 a.m. UTC
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(-)
Comments
On Thu, Nov 23, 2023 at 7:37 AM Baoquan He <bhe@redhat.com> wrote: > > 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. Can we add Fixes/CC stable, so it gets eventually backported into 6.6? > 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 >
On 11/23/23 at 08:34am, Ignat Korchagin wrote: > On Thu, Nov 23, 2023 at 7:37 AM Baoquan He <bhe@redhat.com> wrote: > > > > 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. > > Can we add Fixes/CC stable, so it gets eventually backported into 6.6? Makes sense. Will add it in v2 since I need respin to add the missing stuff in patch 1. Thanks. > > > 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 > > >
On Thu, Nov 23, 2023 at 03:36:51PM +0800, Baoquan He wrote: > 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. If this error introduced with the prevous patch? If so, the patches need to be swapped I guess. > Signed-off-by: Baoquan He <bhe@redhat.com>
On 11/23/23 at 03:13pm, Alexander Gordeev wrote: > On Thu, Nov 23, 2023 at 03:36:51PM +0800, Baoquan He wrote: > > 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. > > If this error introduced with the prevous patch? > If so, the patches need to be swapped I guess. From the phenomenon, yes. In fact it's the patch 1 which exposes the wrong ifdeffery. I can shift the order in v2. Thanks. > > > Signed-off-by: Baoquan He <bhe@redhat.com> >
On Thu, 23 Nov 2023 19:15:43 +0800 Baoquan He <bhe@redhat.com> wrote: > > > 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. > > > > Can we add Fixes/CC stable, so it gets eventually backported into 6.6? > > Makes sense. Will add it in v2 since I need respin to add the missing > stuff in patch 1. Thanks. Please avoid mixing cc:stable patches and this-merge-window fixes in the same series as next-merge-window material. Because I'll just have to separate them out anyway, causing what-I-merged to unnecessarily differ from what-you-sent.
On 11/24/23 at 08:44am, Andrew Morton wrote: > On Thu, 23 Nov 2023 19:15:43 +0800 Baoquan He <bhe@redhat.com> wrote: > > > > > 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. > > > > > > Can we add Fixes/CC stable, so it gets eventually backported into 6.6? > > > > Makes sense. Will add it in v2 since I need respin to add the missing > > stuff in patch 1. Thanks. > > Please avoid mixing cc:stable patches and this-merge-window fixes in > the same series as next-merge-window material. Because I'll just have > to separate them out anyway, causing what-I-merged to unnecessarily > differ from what-you-sent. Got it, will send them separately because the issue that this patch is fixing has been there for very long time. Thanks for noticing.
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