From: Adam Young <admiyo@amperemail.onmicrosoft.com>
To: Sudeep Holla <sudeep.holla@arm.com>,
admiyo@os.amperecomputing.com, lihuisong@huawei.com
Cc: Jassi Brar <jassisinghbrar@gmail.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>,
Robert Moore <robert.moore@intel.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Jeremy Kerr <jk@codeconstruct.com.au>,
Matt Johnston <matt@codeconstruct.com.au>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH v3 1/3] mctp pcc: Check before sending MCTP PCC response ACK
Date: Fri, 28 Jun 2024 14:13:20 -0400 [thread overview]
Message-ID: <cda3dac1-3ad4-4c52-8b07-15a1f8b002fc@amperemail.onmicrosoft.com> (raw)
In-Reply-To: <ZnwJH5lJpefkzaWg@bogus>
Huisong Li you wrote the original patch that I am working around.
What would I break if I disabled the IRQ ACK? It should not be the
default behavior as it is an optional feature.
There needs to be a mechanism for the driver to trigger the ACK, but it
needs to be based on the content of the message buffer.
I was thinking it should be in the return code of the callback, but
that breaks all of the other mailbox implementations.
I suspect a better approach would be to provide a function pointer to
the driver and let the driver decide whether or not to trigger the ACK.
On 6/26/24 08:27, Sudeep Holla wrote:
> On Tue, Jun 25, 2024 at 02:53:31PM -0400, admiyo@os.amperecomputing.com wrote:
>> From: Adam Young <admiyo@amperecomputing.com>
>>
>> Type 4 PCC channels have an option to send back a response
>> to the platform when they are done processing the request.
>> The flag to indicate whether or not to respond is inside
>> the message body, and thus is not available to the pcc
>> mailbox. Since only one message can be processed at once per
>> channel, the value of this flag is checked during message processing
>> and passed back via the channels global structure.
>>
>> Ideally, the mailbox callback function would return a value
>> indicating whether the message requires an ACK, but that
>> would be a change to the mailbox API. That would involve
>> some change to all (about 12) of the mailbox based drivers,
>> and the majority of them would not need to know about the
>> ACK call.
>>
> Next time when you post new series, I prefer to be cc-ed in all the patches.
> So far I ignored v1 and v2 thinking it has landed in my mbox my mistake and
> deleted them. But just checked the series on lore, sorry for that.
>
>> Signed-off-by: Adam Young <admiyo@os.amperecomputing.com>
>> ---
>> drivers/mailbox/pcc.c | 6 +++++-
>> include/acpi/pcc.h | 1 +
>> 2 files changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c
>> index 94885e411085..5cf792700d79 100644
>> --- a/drivers/mailbox/pcc.c
>> +++ b/drivers/mailbox/pcc.c
>> @@ -280,6 +280,7 @@ static irqreturn_t pcc_mbox_irq(int irq, void *p)
>> {
>> struct pcc_chan_info *pchan;
>> struct mbox_chan *chan = p;
>> + struct pcc_mbox_chan *pmchan;
>> u64 val;
>> int ret;
>>
>> @@ -304,6 +305,8 @@ static irqreturn_t pcc_mbox_irq(int irq, void *p)
>> if (pcc_chan_reg_read_modify_write(&pchan->plat_irq_ack))
>> return IRQ_NONE;
>>
>> + pmchan = &pchan->chan;
>> + pmchan->ack_rx = true; //TODO default to False
> Indeed, default must be false. You need to do this conditionally at runtime
> otherwise I see no need for this patch as it doesn't change anything as it
> stands. It needs to be fixed to get this change merged.
>
> Also we should set any such flag once at the boot, IRQ handler is not
> the right place for sure.
>
next prev parent reply other threads:[~2024-06-28 18:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-25 18:53 [PATCH v3 0/3] MCTP over PCC admiyo
2024-06-25 18:53 ` [PATCH v3 1/3] mctp pcc: Check before sending MCTP PCC response ACK admiyo
2024-06-26 12:27 ` Sudeep Holla
2024-06-26 17:14 ` Adam Young
2024-06-28 18:13 ` Adam Young [this message]
2024-06-25 18:53 ` [PATCH v3 2/3] mctp pcc: Allow PCC Data Type in MCTP resource admiyo
2024-06-25 18:53 ` [PATCH v3 3/3] mctp pcc: Implement MCTP over PCC Transport admiyo
2024-06-26 17:02 ` kernel test robot
2024-06-26 22:42 ` kernel test robot
2024-06-28 8:41 ` Jeremy Kerr
2024-06-28 16:51 ` Adam Young
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=cda3dac1-3ad4-4c52-8b07-15a1f8b002fc@amperemail.onmicrosoft.com \
--to=admiyo@amperemail.onmicrosoft.com \
--cc=admiyo@os.amperecomputing.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jassisinghbrar@gmail.com \
--cc=jk@codeconstruct.com.au \
--cc=kuba@kernel.org \
--cc=lenb@kernel.org \
--cc=lihuisong@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeconstruct.com.au \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rafael@kernel.org \
--cc=robert.moore@intel.com \
--cc=sudeep.holla@arm.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
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®