From: Sudeep Holla <sudeep.holla@arm.com>
To: Adam Young <admiyo@amperemail.onmicrosoft.com>
Cc: <admiyo@os.amperecomputing.com>,
Jassi Brar <jassisinghbrar@gmail.com>,
Sudeep Holla <sudeep.holla@arm.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>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Huisong Li <lihuisong@huawei.com>
Subject: Re: [PATCH v23 1/2] mailbox/pcc: support mailbox management of the shared buffer
Date: Mon, 8 Sep 2025 16:20:29 +0100 [thread overview]
Message-ID: <aL70PVhM-UVi5UrS@bogus> (raw)
In-Reply-To: <1ec0cb87-463c-4321-a1c7-05f120c607aa@amperemail.onmicrosoft.com>
On Mon, Sep 08, 2025 at 10:58:55AM -0400, Adam Young wrote:
>
> On 9/4/25 07:00, Sudeep Holla wrote:
> > On Mon, Jul 14, 2025 at 08:10:07PM -0400,admiyo@os.amperecomputing.com wrote:
> > > From: Adam Young<admiyo@os.amperecomputing.com>
> > >
> > > Define a new, optional, callback that allows the driver to
> > > specify how the return data buffer is allocated. If that callback
> > > is set, mailbox/pcc.c is now responsible for reading from and
> > > writing to the PCC shared buffer.
> > >
> > > This also allows for proper checks of the Commnand complete flag
> > > between the PCC sender and receiver.
> > >
> > > For Type 4 channels, initialize the command complete flag prior
> > > to accepting messages.
> > >
> > > Since the mailbox does not know what memory allocation scheme
> > > to use for response messages, the client now has an optional
> > > callback that allows it to allocate the buffer for a response
> > > message.
> > >
> > > When an outbound message is written to the buffer, the mailbox
> > > checks for the flag indicating the client wants an tx complete
> > > notification via IRQ. Upon receipt of the interrupt It will
> > > pair it with the outgoing message. The expected use is to
> > > free the kernel memory buffer for the previous outgoing message.
> > >
> > I know this is merged. Based on the discussions here, I may send a revert
> > to this as I don't think it is correct.
>
> Have you decided what to do? The MCTP over PCC driver depends on the
> behavior in this patch. If you do revert, I will need a path forward.
>
Sorry not yet. I still need to understand and analyse your last reply.
> Based on other code review feed back, I need to make an additional change:
> the rx_alloc callback function needs to be atomically set, and thus needs to
> move to the mailbox API. There it will pair with the prepare transaction
> function. It is a small change, but I expect some feedback from the mailbox
> maintainers.
>
> I know all of the other drivers that use the PCC mailbox currently do direct
> management of the shared buffer. I suspect that is the biggest change that
> is causing you concern. Are you OK with maintaining a mailbox-managed path
> to buffer management as well? I think it will be beneficial to other
> drivers in the long run.
>
If you are really interesting to consolidating, then move all the buffer
management into the core. Just don't introduce things that just work on
your platform and for your use case. You need move all the drivers to this
new model of accessing the buffers. Otherwise I see no point as it is just
another churn but in core mailbox PCC driver instead of a client driver
using PCC. So, I am not OK with the change as is and needs to be reworked
or reverted. I need sometime to understand your email and requirements.
--
Regards,
Sudeep
next prev parent reply other threads:[~2025-09-08 15:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 0:10 [PATCH v23 0/2] MCTP Over PCC Transport admiyo
2025-07-15 0:10 ` [PATCH v23 1/2] mailbox/pcc: support mailbox management of the shared buffer admiyo
2025-07-15 14:08 ` Simon Horman
2025-07-22 17:10 ` Adam Young
2025-07-31 19:35 ` Adam Young
[not found] ` <CABb+yY3VUpfM4PKQbvcv5eHnsEbDOY0aRjcXPTf0bsr322WGng@mail.gmail.com>
2025-08-06 15:28 ` Adam Young
2025-09-04 11:00 ` Sudeep Holla
2025-09-04 17:06 ` Adam Young
2025-09-05 14:37 ` Sudeep Holla
2025-09-05 16:57 ` Adam Young
2025-09-05 20:35 ` Adam Young
2025-09-08 14:58 ` Adam Young
2025-09-08 15:20 ` Sudeep Holla [this message]
2025-09-08 16:44 ` Adam Young
2025-09-12 15:54 ` Adam Young
2025-07-15 0:10 ` [PATCH v23 2/2] mctp pcc: Implement MCTP over PCC Transport admiyo
2025-07-15 14:08 ` Simon Horman
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=aL70PVhM-UVi5UrS@bogus \
--to=sudeep.holla@arm.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=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 \
/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;
as well as URLs for NNTP newsgroup(s).