mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "lihuisong (C)" <lihuisong@huawei.com>
To: Adam Young <admiyo@amperemail.onmicrosoft.com>,
	<admiyo@os.amperecomputing.com>
Cc: <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>, "Len Brown" <lenb@kernel.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Robert Moore <robert.moore@intel.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	"Sudeep Holla" <sudeep.holla@arm.com>
Subject: Re: [PATCH v6 1/2] mctp pcc: Check before sending MCTP PCC response ACK
Date: Fri, 1 Nov 2024 09:30:10 +0800	[thread overview]
Message-ID: <f44f9b12-5cb1-af1d-5e2f-9a06ad648347@huawei.com> (raw)
In-Reply-To: <38fab0d5-8a31-41be-8426-6f180e6d4203@amperemail.onmicrosoft.com>

Hi Adam,

All modifications in the patch is done for pcc instead of mctp.
Suggest that use the prefix "mailbox: pcc: xxxx".
Please find my following reply.


在 2024/11/1 8:16, Adam Young 写道:
>
> On 10/30/24 05:45, lihuisong (C) wrote:
>>> + check_and_ack(pchan, chan);
>>>       pchan->chan_in_use = false;
>>>         return IRQ_HANDLED;
>>> @@ -352,6 +368,9 @@ pcc_mbox_request_channel(struct mbox_client *cl, 
>>> int subspace_id)
>>>       if (rc)
>>>           return ERR_PTR(rc);
>>>   +    pchan->shmem_base_addr = devm_ioremap(chan->mbox->dev,
>>> +                          pchan->chan.shmem_base_addr,
>>> +                          pchan->chan.shmem_size);
>> Currently, the PCC mbox client does ioremap after requesting PCC 
>> channel.
>> Thus all current clients will ioremap twice. This is not good to me.
>> How about add a new interface and give the type4 client the right to 
>> decide whether to reply in rx_callback?
>
>
> I do agree that is a cleaner implementation, but I don't have a way of 
> testing the other drivers, and did not want to break them. I think 
> your driver is the only that makes use of it, so we can certainly come 
> up with a common approach.
I understand what you are concerned about.
But this duplicate ioremap also works for all PCC clients no matter 
which type they used. It has very wide influence.
My driver just uses type3 instead of type4. What's more, AFAICS, it 
doesn't seem there is type4 client driver in linux.
Therefore, determining whether type4 client driver needs to reply to 
platform has the minimum or even no impact in their rx_callback.
>
> The mailbox interface does not allow a return code from 
> mbox_chan_received_data, which is what I originally wanted.  If that 
> could return multiple status codes, one of them could indicate the 
> need  to send the interrupt back.  Otherwise, we need to query the 
> driver to read the shared memory again.
yes
>
> .

  reply	other threads:[~2024-11-01  1:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-29 16:54 [PATCH v6 0/2] MCTP Over PCC Transport admiyo
2024-10-29 16:54 ` [PATCH v6 1/2] mctp pcc: Check before sending MCTP PCC response ACK admiyo
2024-10-30  9:45   ` lihuisong (C)
2024-11-01  0:16     ` Adam Young
2024-11-01  1:30       ` lihuisong (C) [this message]
2024-11-02 15:34         ` Adam Young
2024-11-04  3:17           ` lihuisong (C)
2024-11-04 18:44             ` Adam Young
2024-10-29 16:54 ` [PATCH v6 2/2] mctp pcc: Implement MCTP over PCC Transport admiyo
2024-10-31  1:28   ` Jeremy Kerr
2024-10-31 15:50     ` Adam Young
2024-11-01  8:55       ` Jeremy Kerr
2024-11-01 21:19         ` Adam Young
2024-11-05 14:09           ` Jeremy Kerr
2024-11-06 15:59             ` Adam Young
2024-11-12  1:00               ` Jeremy Kerr
2024-11-13 18:41                 ` Adam Young
2024-11-05 20:16         ` Adam Young
2024-11-06 10:47           ` Jeremy Kerr
2024-10-31 11:26   ` kernel test robot
2024-10-31 12:07   ` kernel test robot
2024-10-31 12:38   ` kernel test robot
2024-10-31 13:09   ` kernel test robot

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=f44f9b12-5cb1-af1d-5e2f-9a06ad648347@huawei.com \
    --to=lihuisong@huawei.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=linux-kernel@vger.kernel.org \
    --cc=matt@codeconstruct.com.au \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rafael.j.wysocki@intel.com \
    --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®