mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hanjun Guo <guohanjun@huawei.com>
To: "Kazuhiro Abe (Fujitsu)" <fj1078ii@fujitsu.com>,
	Will Deacon <will@kernel.org>
Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Ilkka Koskinen <ilkka@os.amperecomputing.com>,
	Catalin Marinas <catalin.marinas@arm.com>
Subject: Re: [PATCH v4] ACPI: AGDI: Add interrupt signaling mode support
Date: Thu, 20 Nov 2025 21:27:26 +0800	[thread overview]
Message-ID: <6d110b4f-a1e6-2092-f529-bd527fc00f6d@huawei.com> (raw)
In-Reply-To: <OSCPR01MB163100DEFA746D8A44FA0A1E3D5D6A@OSCPR01MB16310.jpnprd01.prod.outlook.com>

On 2025/11/18 18:09, Kazuhiro Abe (Fujitsu) wrote:
> Hi Hanjun,
> 
> Thanks for your comments.
> 
>>>>> AGDI has two types of signaling modes: SDEI and interrupt.
>>>>> Currently, the AGDI driver only supports SDEI.
>>>>> Therefore, add support for interrupt signaling mode The interrupt
>>>>> vector is retrieved from the AGDI table, and call panic function
>>>>> when an interrupt occurs.
>>>>>
>>>>> Reviewed-by: Ilkka Koskinen<ilkka@os.amperecomputing.com>
>>>>> Signed-off-by: Kazuhiro Abe<fj1078ii@aa.jp.fujitsu.com>
>>>>> ---
>>>>> Hanjun, I have addressed all your comments.
>>>>> Please review them.
>>>>>
>>>>> v3->v4
>>>>>     - Add a comment to the flags member.
>>>>>     - Fix agdi_interrupt_probe.
>>>>>     - Fix agdi_interrupt_remove.
>>>>>     - Add space in struct initializsation.
>>>>>     - Delete curly braces.
>>>> Looks good to me,
>>>>
>>>> Acked-by: Hanjun Guo<guohanjun@huawei.com>
>>> I wasn't cc'd on the original patch but I couldn't figure out why it
>>> uses IRQF_NO_AUTOEN when requesting the irq given that the first thing
>>> it does is enable it.
>> Sorry for the late reply, seems this comment was addressed.
>>
>> But when I go back to read the latest AGDI spec [0], I see the signaling mode
>> can be SDEI*and*  interrupt:
>>
>> Flags node structures 1 36 Bits [1:0]: Signaling mode:
>>
>> 2: Both SDEI and Interrupt-based signaling is supported. While an SDEI event
>> handler is registered, the platform is allowed to not generate the wired interrupt
>>
>> So which means we need to support both SDEI and interrupt when the
>> signaling mode is 2, but for now, the code is
>>
>> +	if (agdi_table->flags & ACPI_AGDI_SIGNALING_MODE)
>> +		pdata.gsiv = agdi_table->gsiv;
>> +	else
>> +		pdata.sdei_event = agdi_table->sdei_event;
>>
>> Kazuhiro, could you take a look again?
> I don't think enabling both interrupt and SDEI makes sense.
> Therefore, we need to choose one but we can't know which one is preferred for each platform.
> On the other hand, before this patch the code is:
> 
>         if (agdi_table->flags & ACPI_AGDI_SIGNALING_MODE) {
>                 pr_warn("Interrupt signaling is not supported");
>                 goto err_put_table;
>         }
> 
> ...and SDEI is used when mode is 2. This behavior will not be changed by this patch.
> Therefore, It seems for me this patch is reasonable for now.
> I would appreciate your thoughts on this.

I had a talk to firmware guy about this, they say even with both
supported, the platform will use the same interrupt number to
trigger, and the spec says:

While an SDEI event handler is registered, the platform is allowed to
not generate the wired interrupt

I think this patch is ready to go.

Thanks
Hanjun

  reply	other threads:[~2025-11-20 13:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17  7:39 Kazuhiro Abe
2025-10-20 13:23 ` Hanjun Guo
2025-11-04 16:06   ` Will Deacon
2025-11-06  1:19     ` Kazuhiro Abe (Fujitsu)
2025-11-10  7:38       ` Kazuhiro Abe (Fujitsu)
2025-11-12  4:42         ` Charles Mirabile
2025-11-12  9:18           ` Kazuhiro Abe (Fujitsu)
2025-11-12  9:50           ` Lorenzo Pieralisi
2025-11-14  8:21           ` Kazuhiro Abe (Fujitsu)
2025-11-14 15:20             ` Charles Mirabile
2025-11-14 15:23               ` Will Deacon
2025-11-18  7:29     ` Hanjun Guo
2025-11-18 10:09       ` Kazuhiro Abe (Fujitsu)
2025-11-20 13:27         ` Hanjun Guo [this message]
2025-11-21  2:31           ` Kazuhiro Abe (Fujitsu)

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=6d110b4f-a1e6-2092-f529-bd527fc00f6d@huawei.com \
    --to=guohanjun@huawei.com \
    --cc=catalin.marinas@arm.com \
    --cc=fj1078ii@fujitsu.com \
    --cc=ilkka@os.amperecomputing.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=rafael@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=will@kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®