[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.22.394.2201251458550.2578@ubuntu200401>
Date: Tue, 25 Jan 2022 15:04:13 -0800 (PST)
From: Ilkka Koskinen <ilkka@...amperecomputing.com>
To: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
cc: Ilkka Koskinen <ilkka@...amperecomputing.com>,
guohanjun@...wei.com, sudeep.holla@....com, rafael@...nel.org,
linux@...linux.org.uk, lenb@...nel.org, robert.moore@...el.com,
linux-acpi@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, patches@...erecomputing.com,
scott@...amperecomputing.com, darren@...amperecomputing.com,
james.morse@....com
Subject: Re: [PATCH v3 2/2] ACPI: AGDI: Add driver for Arm Generic Diagnostic
Dump and Reset device
On Thu, 20 Jan 2022, Lorenzo Pieralisi wrote:
> On Thu, Jan 13, 2022 at 06:17:13PM -0800, Ilkka Koskinen wrote:
>>
>> Hi Lorenzo,
>>
>> On Wed, 5 Jan 2022, Ilkka Koskinen wrote:
>>>
>>> Hi Lorenzo,
>>>
>>> On Wed, 5 Jan 2022, Lorenzo Pieralisi wrote:
>>>> [+James, for SDEI bits]
>>>>
>>>> On Thu, Dec 30, 2021 at 07:37:25PM -0800, Ilkka Koskinen wrote:
>>>>> ACPI for Arm Components 1.1 Platform Design Document v1.1 [0] specifices
>>>>> Arm Generic Diagnostic Device Interface (AGDI). It allows an admin to
>>>>> issue diagnostic dump and reset via an SDEI event or an interrupt.
>>>>> This patch implements SDEI path.
>>>>>
>>>>> [0] https://developer.arm.com/documentation/den0093/latest/
>>>>>
>>>>> Signed-off-by: Ilkka Koskinen <ilkka@...amperecomputing.com>
>>>>> ---
>>>>> drivers/acpi/arm64/Kconfig | 8 +++
>>>>> drivers/acpi/arm64/Makefile | 1 +
>>>>> drivers/acpi/arm64/agdi.c | 125 ++++++++++++++++++++++++++++++++++++
>>>>> 3 files changed, 134 insertions(+)
>>>>> create mode 100644 drivers/acpi/arm64/agdi.c
>>
>> <snip>
>>
>>>>> diff --git a/drivers/acpi/arm64/agdi.c b/drivers/acpi/arm64/agdi.c
>>>>> new file mode 100644
>>>>> index 000000000000..6525ccbae5c1
>>>>> --- /dev/null
>>>>> +++ b/drivers/acpi/arm64/agdi.c
>>
>> <snip>
>>
>>>>>
>>>>> +static int __init agdi_init(void)
>>>>> +{
>>>>> + int ret;
>>>>> + acpi_status status;
>>>>> + struct acpi_table_agdi *agdi_table;
>>>>> + struct agdi_data pdata;
>>>>> + struct platform_device *pdev;
>>>>> +
>>>>> + if (acpi_disabled)
>>>>> + return 0;
>>>>
>>>> Why don't we call agdi_init() from acpi_init() as we do for IORT/VIOT ?
>>>>
>>>> I don't think it is necessary to add a device_initcall(), with related
>>>> ordering dependencies.
>>>
>>> That's a good point. I change it.
>>
>> Actually, I looked at this more carefully. acpi_init() is called in
>> subsys_initcall() while sdei_init() is called in subsys_initcall_sync().
>> That is, if I call this function in acpi_init(), SDEI driver won't be ready
>> and this driver fails to register the event.
>
> Maybe this will help:
>
> https://lore.kernel.org/linux-arm-kernel/20220120050522.23689-1-xueshuai@linux.alibaba.com/
Yep, that should work. I'll wait for his patch to get approved and make
the needed changes to mine before submitting the v5.
Cheers, Ilkka
Powered by blists - more mailing lists