Linux-ACPI Archive on lore.kernel.org
 help / color / Atom feed
From: Shiju Jose <shiju.jose@huawei.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"rjw@rjwysocki.net" <rjw@rjwysocki.net>,
	"bp@alien8.de" <bp@alien8.de>,
	"james.morse@arm.com" <james.morse@arm.com>,
	"lenb@kernel.org" <lenb@kernel.org>,
	"tony.luck@intel.com" <tony.luck@intel.com>,
	"dan.carpenter@oracle.com" <dan.carpenter@oracle.com>,
	"zhangliguang@linux.alibaba.com" <zhangliguang@linux.alibaba.com>,
	"andriy.shevchenko@linux.intel.com" 
	<andriy.shevchenko@linux.intel.com>,
	"Wangkefeng (OS Kernel Lab)" <wangkefeng.wang@huawei.com>,
	"jroedel@suse.de" <jroedel@suse.de>,
	Linuxarm <linuxarm@huawei.com>,
	yangyicong <yangyicong@huawei.com>,
	Jonathan Cameron <jonathan.cameron@huawei.com>,
	tanxiaofei <tanxiaofei@huawei.com>
Subject: RE: [PATCH v13 1/2] ACPI / APEI: Add a notifier chain for unknown (vendor) CPER records
Date: Fri, 24 Jul 2020 13:32:52 +0000
Message-ID: <bb7c23fae649486aa0720c619fef2e8b@huawei.com> (raw)
In-Reply-To: <20200724125357.GA1510118@bjorn-Precision-5520>

>-----Original Message-----
>From: Bjorn Helgaas [mailto:helgaas@kernel.org]
>Sent: 24 July 2020 13:54
>To: Shiju Jose <shiju.jose@huawei.com>
>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 (OS Kernel Lab)
><wangkefeng.wang@huawei.com>; jroedel@suse.de; Linuxarm
><linuxarm@huawei.com>; yangyicong <yangyicong@huawei.com>; Jonathan
>Cameron <jonathan.cameron@huawei.com>; tanxiaofei
><tanxiaofei@huawei.com>
>Subject: Re: [PATCH v13 1/2] ACPI / APEI: Add a notifier chain for unknown
>(vendor) CPER records
>
>On Fri, Jul 24, 2020 at 09:00:41AM +0000, Shiju Jose wrote:
>> >-----Original Message-----
>> >From: Bjorn Helgaas [mailto:helgaas@kernel.org]
>> >Sent: 24 July 2020 00:21
>> >To: Shiju Jose <shiju.jose@huawei.com>
>> >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 (OS Kernel Lab)
>> ><wangkefeng.wang@huawei.com>; jroedel@suse.de; Linuxarm
>> ><linuxarm@huawei.com>; yangyicong <yangyicong@huawei.com>;
>Jonathan
>> >Cameron <jonathan.cameron@huawei.com>; tanxiaofei
>> ><tanxiaofei@huawei.com>
>> >Subject: Re: [PATCH v13 1/2] ACPI / APEI: Add a notifier chain for
>> >unknown
>> >(vendor) CPER records
>> >
>> >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.
>>
>> The stub is added because this interface is expected to use by the
>> other drivers as well.  Some drivers may not want add the build depend
>> on the CONFIG_ACPI_APEI_GHES if the error reporting has less priority
>> in the driver.  However we can add dependency on
>CONFIG_ACPI_APEI_GHES
>> for building pcie-hisi-error.c.
>
>The usual route is to add stubs when they're needed, not just in anticipation
>of some need that may never materialize.
ok. I will change in the next version.

Thanks,
Shiju

      reply index

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-22 10:39 [PATCH v13 0/2] ACPI / APEI: Add support to notify the vendor specific HW errors Shiju Jose
2020-07-22 10:39 ` [PATCH v13 1/2] ACPI / APEI: Add a notifier chain for unknown (vendor) CPER records Shiju Jose
2020-07-22 11:01   ` Andy Shevchenko
2020-07-22 12:34     ` Shiju Jose
2020-07-22 12:50       ` Andy Shevchenko
2020-07-31 13:47         ` James Morse
2020-07-31 14:07           ` Shiju Jose
2020-07-23 23:20   ` Bjorn Helgaas
2020-07-24  9:00     ` Shiju Jose
2020-07-24 12:53       ` Bjorn Helgaas
2020-07-24 13:32         ` Shiju Jose [this message]

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=bb7c23fae649486aa0720c619fef2e8b@huawei.com \
    --to=shiju.jose@huawei.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dan.carpenter@oracle.com \
    --cc=helgaas@kernel.org \
    --cc=james.morse@arm.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=jroedel@suse.de \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=rjw@rjwysocki.net \
    --cc=tanxiaofei@huawei.com \
    --cc=tony.luck@intel.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=yangyicong@huawei.com \
    --cc=zhangliguang@linux.alibaba.com \
    /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

Linux-ACPI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-acpi/0 linux-acpi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-acpi linux-acpi/ https://lore.kernel.org/linux-acpi \
		linux-acpi@vger.kernel.org
	public-inbox-index linux-acpi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-acpi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git