Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp256884rdh; Thu, 23 Nov 2023 03:16:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IEO6ddGFusqj0ym4eEv3rClxbCnQjmNBnNmKU1L4h7FMd+YJdoFSVV9hzK65b1CoD642h4A X-Received: by 2002:aca:1004:0:b0:3ae:12f6:ac51 with SMTP id 4-20020aca1004000000b003ae12f6ac51mr5599084oiq.41.1700738168719; Thu, 23 Nov 2023 03:16:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700738168; cv=none; d=google.com; s=arc-20160816; b=nrsB5LVvDkaVx/aKjphsNrt3HQ332DdsgD4KQXIaDmD64bsFiGwILRzyJWY4moD/B4 q+7Aa7vzkBZlZRryXVxTJNVKUimQqs7M9J1CYcRs9bpKlZW5zuciChjDlfan1byaRPZa k6UYsm7SZ8RSrtMulnWFWpvjA+HC0hrelf0jxY2NhG8fQaQ9omSq6h8/KnA/OSVG+tVQ 2E50sAA5pA7UQ73C2rUg80ngJfW+srm6ScNIjXmrIJF5plOa4EJt+lhgqO+D+l1YoXkp kcy7ruPHW7ckpqS8WN7QzJ3P1XP7LDTrcxU2BZDIHZrEdBOet1OhoR8DuGdB35Ac75q6 +djA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=UPT2U9J2gb9jrypkSZPZI2ymrj+w1YFF8nXGNIVDMoo=; fh=aaHoqsHmLsMDfF5mexhCrlIYGgNAhJwRUsAFWKc/acw=; b=sgYM/v3UBZIu/gvvaK1++biyPANqK4BHtI5DSHjAsfnVz96OnpepJNMZU0j7B0cvvu lCNNjatUMt1cDMLmfC8ZB2hSiAbZ/7UEKitaYQkn/kr9LGmawWpG2T2rxLjRVmZlLHa9 gATUAvowjKBNJzkNITIcH/ZaRM4AFOUVAr3CNw9UEn76434TeCLmUI7jDww7meN74TbX +GyDbwfCh+Uf+Ugh0lpLdd65Y13h0s4vYkAsyj2rPc5WoW7qsTXfGaDxdhNaE2tbhbJ6 7xpua2rl1FMeqDVorZcCtOghJ7iLxoo2cel42xrCEXmXJgTCh1273Dxtcu8yNlkrshp+ MmSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EBR14AYd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id y28-20020a634b1c000000b005be1ee5dfc7si1092617pga.9.2023.11.23.03.16.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 03:16:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EBR14AYd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 0A3F780758CD; Thu, 23 Nov 2023 03:16:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344961AbjKWLPr (ORCPT + 99 others); Thu, 23 Nov 2023 06:15:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345008AbjKWLPo (ORCPT ); Thu, 23 Nov 2023 06:15:44 -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 39409B9 for ; Thu, 23 Nov 2023 03:15:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700738150; 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=UPT2U9J2gb9jrypkSZPZI2ymrj+w1YFF8nXGNIVDMoo=; b=EBR14AYd5KVFMw8xqXGqRTOyJ7LVsoq0Ve4NIvaEYGiagtp2P9/HI4a37RilxR44so5Wc0 VA0OmfKCsi7+RgXEoAnWjcKRGCnS8PDFxw9xrgHB+uKIGl0AoBohTGhOti6Ky2CGiKKKIg Q0l9yLtBcSBCOpUIgWkWEQUmp+LWiRc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-609-dJ5YYMAQPvK5kn4CTwm6KA-1; Thu, 23 Nov 2023 06:15:47 -0500 X-MC-Unique: dJ5YYMAQPvK5kn4CTwm6KA-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 D78BD811E7E; Thu, 23 Nov 2023 11:15:46 +0000 (UTC) Received: from localhost (unknown [10.72.112.97]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 35424492BFA; Thu, 23 Nov 2023 11:15:45 +0000 (UTC) Date: Thu, 23 Nov 2023 19:15:43 +0800 From: Baoquan He To: Ignat Korchagin Cc: linux-kernel@vger.kernel.org, kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, akpm@linux-foundation.org, eric_devolder@yahoo.com, kernel-team Subject: Re: [PATCH 2/3] drivers/base/cpu: crash data showing should depends on KEXEC_CORE Message-ID: References: <20231123073652.507034-1-bhe@redhat.com> <20231123073652.507034-3-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Spam-Status: No, score=-0.9 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 morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 23 Nov 2023 03:16:01 -0800 (PST) On 11/23/23 at 08:34am, Ignat Korchagin wrote: > On Thu, Nov 23, 2023 at 7:37 AM 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. > > 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 > > --- > > 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 > > > > 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 > > >