Re: [PATCH v6] ACPI: explicit init HEST, SDEI and GHES in apci_init
From: Bjorn Helgaas <helgaas@kernel.org>
Date: 2022-01-21 19:46:14
Also in:
linux-acpi, linux-pci, lkml
On Fri, Jan 21, 2022 at 11:43:25AM +0800, Shuai Xue wrote:
在 2022/1/21 AM12:22, Bjorn Helgaas 写道:quoted
On Thu, Jan 20, 2022 at 01:05:22PM +0800, Shuai Xue wrote:quoted
From commit e147133a42cb ("ACPI / APEI: Make hest.c manage the estatus memory pool") was merged, ghes_init() relies on acpi_hest_init() to manage the estatus memory pool. On the other hand, ghes_init() relies on sdei_init() to detect the SDEI version and (un)register events. The dependencies are as follows: ghes_init() => acpi_hest_init() => acpi_bus_init() => acpi_init() ghes_init() => sdei_init() HEST is not PCI-specific and initcall ordering is implicit and not well-defined within a level. Based on above, remove acpi_hest_init() from acpi_pci_root_init() and convert ghes_init() and sdei_init() from initcalls to explicit calls in the following order: acpi_hest_init() sdei_init() ghes_init()
quoted
quoted
--- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c@@ -30,6 +30,7 @@ #include <linux/acpi_viot.h> #include <linux/pci.h> #include <acpi/apei.h> +#include <linux/arm_sdei.h>This "arm" looks a little out of place in this supposedly arch-generic code. Not really a new thing with this patch, since this #include already appears in drivers/acpi/apei/ghes.c. Maybe it's unavoidable.Yep, should we move sdei_init() into the beginning of ghes_init()? ...
quoted
Software Delegated Exception Interface (|SDEI|) is an Arm specification for Non-secure world to register handlers with firmware to receive notifications about system events. LINK: https://github.com/ARM-software/arm-trusted-firmware/blob/master/docs/components/sdei.rstI think SDEI is not a ACPI Specification but Arm specification so we should not rename sdei_init() with an "acpi_" prefix. If we move sdei_init() into ghes_init(), and rename ghes_init() to acpi_ghes_init(), then all looks fine? What's your opinion, Bjorn?
Makes sense to me, especially since drivers/acpi/apei/ghes.c already includes linux/arm_sdei.h. This is Rafael's area. Bjorn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel