Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1718394ybh; Thu, 23 Jul 2020 16:21:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyictnVi94KS2nyzzvl7/2o40VexBn9onYtUDG8imtm0Op1JpLCmeODJWJfjjQciHsoAwPi X-Received: by 2002:a17:906:c7c3:: with SMTP id dc3mr6916590ejb.376.1595546482072; Thu, 23 Jul 2020 16:21:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595546482; cv=none; d=google.com; s=arc-20160816; b=J4Ps0PM4BWHNGE3YDlPhftSTREV1Zx1U53ruwYlISKtJuDZFHKb6Nrn84FDe51PsPj IAdkjUK8WVv0OcD0eSMvFEGIKhefN9CFP1fx/8z2Lipr4U+32R7RilyJwu5lieXv3e8D dIHDUkO0EB3gN/TAqumpfth2Pn7ve9/T3UE08ylZxD3BdbzKuaN7bMP3ILt5iwgwyngv V5y8eSOyurMvF+7jX8DcPyRSchF3Maln0JUMGQmi9aZrZ8D/1z9XzVihK7kognCJA4DC GPCHMhCP/qbpOC8NC2oNnD3e9GfFa+6e4SIlSBxQf6fi01H1Wv1Z9eaB0eWLI98SPPdm 76Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=x5Pe2/DF6z9Zlmic2KEOUGS2PomVNcLCir+YXCIoPuc=; b=gZAHMB+dhztWW9ef0WNJG5hIJJXr7ATED3E3mrinpicgFKLGNd87AQKfSspH9sLq0H 5gIz2YZk4Bk+ruAM+GuJUPRYcZpQJiEqcdJt/7/AJGAD+w/bOxnF+tnttBGqZiEfpaH2 pfBdyU4PNTIpTzWrtY5ei4DalCktyhBABvOpxIMHfo/ZcqFe3ZjnKQeKrlAXNuybqHym 4WzL8DN1KOxmsT3gtBJI/iw1ql0z5ID88IqDMkDKj5YAJ2NQn5Unn9K88V4k72v71U2/ IedR2hB+9ICQDtH39peeQdtTMKb5Pd3eEHsrGrXVETfvddRE5+lwLAGYIzRG995VpyhC OIRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EUcPK8R0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s15si2381726edy.608.2020.07.23.16.20.59; Thu, 23 Jul 2020 16:21:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EUcPK8R0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726855AbgGWXUt (ORCPT + 99 others); Thu, 23 Jul 2020 19:20:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:34242 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726657AbgGWXUt (ORCPT ); Thu, 23 Jul 2020 19:20:49 -0400 Received: from localhost (mobile-166-175-191-139.mycingular.net [166.175.191.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4A13F206E3; Thu, 23 Jul 2020 23:20:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595546448; bh=i+Ceq41gViZl1zByQdcr9xsP75TCnNB51e/Bimh3Pr0=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=EUcPK8R06MB++pnG74f+WhK4FLoWCqF2rEiQLgNYL6JcGZD/G19DSnX331wUy8Qt6 N9OBWObPxdpH6xfO/UyAsdwJwaERNeXFdian/Vl7i5UotFzUK6JbN1kYjXmpRD7NIP 1OxYe9M0ym7P3o3cjtxrd8hEvHPW6wIJK3byTYqU= Date: Thu, 23 Jul 2020 18:20:46 -0500 From: Bjorn Helgaas To: Shiju Jose Cc: linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, rjw@rjwysocki.net, bp@alien8.de, james.morse@arm.com, lenb@kernel.org, tony.luck@intel.com, dan.carpenter@oracle.com, zhangliguang@linux.alibaba.com, andriy.shevchenko@linux.intel.com, wangkefeng.wang@huawei.com, jroedel@suse.de, linuxarm@huawei.com, yangyicong@hisilicon.com, jonathan.cameron@huawei.com, tanxiaofei@huawei.com Subject: Re: [PATCH v13 1/2] ACPI / APEI: Add a notifier chain for unknown (vendor) CPER records Message-ID: <20200723232046.GA1468652@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200722103952.1009-2-shiju.jose@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 22, 2020 at 11:39:51AM +0100, Shiju Jose wrote: > CPER records describing a firmware-first error are identified by GUID. > The ghes driver currently logs, but ignores any unknown CPER records. > This prevents describing errors that can't be represented by a standard > entry, that would otherwise allow a driver to recover from an error. > The UEFI spec calls these 'Non-standard Section Body' (N.2.3 of > version 2.8). > +#ifdef CONFIG_ACPI_APEI_GHES > +/** > + * ghes_register_vendor_record_notifier - register a notifier for vendor > + * records that the kernel would otherwise ignore. > + * @nb: pointer to the notifier_block structure of the event handler. > + * > + * return 0 : SUCCESS, non-zero : FAIL > + */ > +int ghes_register_vendor_record_notifier(struct notifier_block *nb); > + > +/** > + * ghes_unregister_vendor_record_notifier - unregister the previously > + * registered vendor record notifier. > + * @nb: pointer to the notifier_block structure of the vendor record handler. > + */ > +void ghes_unregister_vendor_record_notifier(struct notifier_block *nb); > +#else > +static inline int ghes_register_vendor_record_notifier(struct notifier_block *nb) > +{ > + return -ENODEV; > +} > + > +static inline void ghes_unregister_vendor_record_notifier(struct notifier_block *nb) > +{ > +} If you made CONFIG_PCIE_HISI_ERR depend on CONFIG_ACPI_APEI_GHES, you'd be able to get rid of these stubs, wouldn't you? It doesn't look like there's any point in building pcie-hisi-error.c at all unless CONFIG_ACPI_APEI_GHES is enabled. > +#endif > + > int ghes_estatus_pool_init(int num_ghes); > > /* From drivers/edac/ghes_edac.c */ > -- > 2.17.1 > >