lkml.org 
[lkml]   [2022]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6] ACPI: explicit init HEST, SDEI and GHES in apci_init
On Fri, Jan 21, 2022 at 11:43:25AM +0800, Shuai Xue wrote:
> 在 2022/1/21 AM12:22, Bjorn Helgaas 写道:
> > On Thu, Jan 20, 2022 at 01:05:22PM +0800, Shuai Xue wrote:
> >> 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()

> >> --- 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()?
> ...

> > 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.rst
>
> I 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

\
 
 \ /
  Last update: 2022-01-21 20:47    [W:0.085 / U:2.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site