Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp186995rdh; Thu, 23 Nov 2023 00:34:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9DQDEClYSPWQ4iUNceZ3y2gHE+VrLuBRp8nZway1pvP+sTMWmdngocz9y11qfftgS4Cxf X-Received: by 2002:a05:6a00:1acb:b0:6cb:b9cb:614 with SMTP id f11-20020a056a001acb00b006cbb9cb0614mr4522478pfv.5.1700728480016; Thu, 23 Nov 2023 00:34:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700728480; cv=none; d=google.com; s=arc-20160816; b=uw+dMXqOMWLdJMM1IMINyH+Iw8AuiJrdhrWhRYIA5Fe8CxM7X7NmAC0MpKznYSCw46 2aL1TNl2ZHQViki9ImFWIPnxFKWwhI+fPrnCL31Yak7IE1zttm7sST++pszmrNMr9J7Q JiNXfYAOoit+k4C/FwUrtPl6HbY+HQYvgrRLYyUO0dkwrbIDn5hwzY4WC9ue0vVnGL0z fN3SS3hWZV7p+oU1qxutegE86q4Omf8GVWZxtJ+IF0IIOq6cQwuYIeYWBiS7W86ejfBx exdTdleN3iUCOCBCoHmdoLQ+8t9Kcm2Rwgnt7myBM/NilfBUJti0riZ1lWUlJvLjA5vu pcPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ZwJpO+HiDZw/9/oXGeHCL3JIdqDb9YbJK2ol1m1T6nA=; fh=qn/Q3cSz37JbXJ3nME2kzoJGKw51uJuMHyf252ZQh94=; b=ntUBqG8SX+0U2UAeHmrihjZADawfa9XWm5wolFoy3O+aHiifUiIhEDNp2iTdOCKRE3 bTqYgJwFBw8LZrZvajRwMEiSxj4jacVp2rv9gYSmzocJ3QDRM4dmEkqr4J2ymMOft4IC DnqPphB+ZkWgCW5LsZ4T6DwOCLQ7Wcdnf6BcRcwJK+4H45u77cL3cApLUl5DG/Kb0y14 B3lTPCgTU5uSZLKDcgl2J/fyXlzKbjyvCC4dCeTA+uw03JaBctzjNuIAdf5wTpsvvXPd abpC5wmGAexaee+l7uTPlaqEfFMczpdAdPfhDMooT4lYlLW8Uu/ZaDOLl66ZYiFEwkPo D7hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google09082023 header.b=GEZd4owe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id y23-20020aa79437000000b006cb90b336dcsi811123pfo.267.2023.11.23.00.34.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 00:34:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google09082023 header.b=GEZd4owe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 759A480756C4; Thu, 23 Nov 2023 00:34:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344934AbjKWIeW (ORCPT + 99 others); Thu, 23 Nov 2023 03:34:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231394AbjKWIeV (ORCPT ); Thu, 23 Nov 2023 03:34:21 -0500 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F1BAA3 for ; Thu, 23 Nov 2023 00:34:28 -0800 (PST) Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-5c186f027cfso403980a12.3 for ; Thu, 23 Nov 2023 00:34:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google09082023; t=1700728467; x=1701333267; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ZwJpO+HiDZw/9/oXGeHCL3JIdqDb9YbJK2ol1m1T6nA=; b=GEZd4oweSHcp4kBEPXdvoaKGWXqivQgFLMznVgBnMsjhFPbA5Bp2Vs+YfxkX4uaRRr fCcbCQNNsmAiXN8IHGz/QwNCZpWkdN1Ex2VzzFMrtVU2pcC6ObbB+65M690mPdZyWHdc Y3hDgTfiOoG2fjlYlC0434HBqYuwH88O4ZwvEcQryyzubdTzs33zkhNY7l+DLe+SNJqY LnKNkS0tJ6uxDaGlTbh7kXUin3+vU7gffK7S8gRmJ6g9WJOdrZ8hf/Maom9cUx4/PrIj ak2Ze5daHXMF8/7Qg42qdYoBArqK+CSr0nvugrxknddekveyYkFCqlSm6alGbJp4e1Tv vbNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700728467; x=1701333267; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZwJpO+HiDZw/9/oXGeHCL3JIdqDb9YbJK2ol1m1T6nA=; b=oeglM/Cr91JAhKh8ZlI2cS7np3Q9240LUmxIZru41hZc8KZf8S66VcCv4sx1XDGcjp NDhkbDvFnphH+BbpvpM2govVY0WVlVSebfHn7HXuRNWyvJKOri3sNg9SbgsT/sbEmA/9 iU8fLnv0clnUozeXee8dwKd/Ci7IYrYug8u6dmRBKsBmN0eBGGqimvtq78PxDt8mWIGN wQqAa78DZgdzI234/A3PdQegkic7mMo8Kp6J5FZ4F8p9RkoqxMkBdtaZtsFmOkAP5xYz xJ3XDD++sjmIzebsIpLDkplnCdDXgsPKjIqpUzzWawAjcvONCcqeZLcBIoVmsPQHnPDY +hKg== X-Gm-Message-State: AOJu0YzZ6SVdWHSkj6ggzoHIepM00VKmPJ8iDWnULw49Y7kPLt15Raja s+3MhliYc92rDQKx8quJbQBeJ35ktXBs0qVgLqwosA== X-Received: by 2002:a17:90b:350c:b0:280:4829:52cc with SMTP id ls12-20020a17090b350c00b00280482952ccmr5402011pjb.37.1700728467437; Thu, 23 Nov 2023 00:34:27 -0800 (PST) MIME-Version: 1.0 References: <20231123073652.507034-1-bhe@redhat.com> <20231123073652.507034-3-bhe@redhat.com> In-Reply-To: <20231123073652.507034-3-bhe@redhat.com> From: Ignat Korchagin Date: Thu, 23 Nov 2023 08:34:16 +0000 Message-ID: Subject: Re: [PATCH 2/3] drivers/base/cpu: crash data showing should depends on KEXEC_CORE To: Baoquan He 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,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 howler.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 (howler.vger.email [0.0.0.0]); Thu, 23 Nov 2023 00:34:37 -0800 (PST) On Thu, Nov 23, 2023 at 7:37=E2=80=AFAM Baoquan He wrote: > > When below kernel config items are set, compiling error are triggered. > > CONFIG_CRASH_CORE=3Dy > CONFIG_KEXEC_CORE=3Dy > CONFIG_CRASH_DUMP=3Dy > CONFIG_CRASH_HOTPLUG=3Dy > > ------------------------------------------------------ > drivers/base/cpu.c: In function =E2=80=98crash_hotplug_show=E2=80=99: > drivers/base/cpu.c:309:40: error: implicit declaration of function =E2=80= =98crash_hotplug_cpu_support=E2=80=99; did you mean =E2=80=98crash_hotplug_= show=E2=80=99? [-Werror=3Dimplicit-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 > --- > 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_releas= e_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 =3D { > #endif > > static const struct attribute_group *common_cpu_attr_groups[] =3D { > -#ifdef CONFIG_KEXEC > +#ifdef CONFIG_KEXEC_CORE > &crash_note_cpu_attr_group, > #endif > NULL > }; > > static const struct attribute_group *hotplugable_cpu_attr_groups[] =3D { > -#ifdef CONFIG_KEXEC > +#ifdef CONFIG_KEXEC_CORE > &crash_note_cpu_attr_group, > #endif > NULL > -- > 2.41.0 >