Linux-ACPI Archive on lore.kernel.org
 help / color / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
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.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
Date: Thu, 23 Jul 2020 18:20:46 -0500
Message-ID: <20200723232046.GA1468652@bjorn-Precision-5520> (raw)
In-Reply-To: <20200722103952.1009-2-shiju.jose@huawei.com>

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
> 
> 

  parent 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 [this message]
2020-07-24  9:00     ` Shiju Jose
2020-07-24 12:53       ` Bjorn Helgaas
2020-07-24 13:32         ` Shiju Jose

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=20200723232046.GA1468652@bjorn-Precision-5520 \
    --to=helgaas@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dan.carpenter@oracle.com \
    --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=shiju.jose@huawei.com \
    --cc=tanxiaofei@huawei.com \
    --cc=tony.luck@intel.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=yangyicong@hisilicon.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