mbox series

[v2,0/2] mailbox: pcc: Support platform notification for type4 and shared interrupt

Message ID 20230314111135.16520-1-lihuisong@huawei.com
Headers show
Series mailbox: pcc: Support platform notification for type4 and shared interrupt | expand

Message

lihuisong (C) March 14, 2023, 11:11 a.m. UTC
PCC supports processing platform notification for slave subspaces and
shared interrupt for multiple subspaces.

---
 -v2: extract cmd complete code into a function.
      unrelated types regard chan_in_use as dummy.
 -v1: using subspace type to replace comm_flow_dir in patch [1/2]
 -rfc-v3: split V2 into two patches.
 -rfc-v2: don't use platform interrupt ack register to identify if the given
      channel should respond interrupt.

Huisong Li (2):
  mailbox: pcc: Add support for platform notification handling
  mailbox: pcc: Support shared interrupt for multiple subspaces

 drivers/mailbox/pcc.c | 90 +++++++++++++++++++++++++++++++++++++------
 1 file changed, 79 insertions(+), 11 deletions(-)

Comments

Sudeep Holla March 27, 2023, 11:33 a.m. UTC | #1
On Tue, Mar 14, 2023 at 07:11:33PM +0800, Huisong Li wrote:
> PCC supports processing platform notification for slave subspaces and
> shared interrupt for multiple subspaces.
>

Other than a super minor nit in the patch 1/2, this looks good to me.
It would be good if we can get tested-by from
Robbie King <robbiek@xsightlabs.com>

Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
lihuisong (C) March 27, 2023, 12:31 p.m. UTC | #2
在 2023/3/27 19:33, Sudeep Holla 写道:
> On Tue, Mar 14, 2023 at 07:11:33PM +0800, Huisong Li wrote:
>> PCC supports processing platform notification for slave subspaces and
>> shared interrupt for multiple subspaces.
>>
> Other than a super minor nit in the patch 1/2, this looks good to me.
> It would be good if we can get tested-by from
> Robbie King <robbiek@xsightlabs.com>
>
> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Thanks for your review.😁

@Robbie King, can you give us some feedback?
Looking forward to you reply.
lihuisong (C) April 10, 2023, 1:26 a.m. UTC | #3
在 2023/3/27 20:31, lihuisong (C) 写道:
>
> 在 2023/3/27 19:33, Sudeep Holla 写道:
>> On Tue, Mar 14, 2023 at 07:11:33PM +0800, Huisong Li wrote:
>>> PCC supports processing platform notification for slave subspaces and
>>> shared interrupt for multiple subspaces.
>>>
>> Other than a super minor nit in the patch 1/2, this looks good to me.
>> It would be good if we can get tested-by from
>> Robbie King <robbiek@xsightlabs.com>
>>
>> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
> Thanks for your review.😁
>
> @Robbie King, can you give us some feedback?
> Looking forward to you reply.
>
>
@Robbie King, kindly ping.
Robbie King April 11, 2023, 2:47 p.m. UTC | #4
Apologies, missed earlier emails.  Will make this a priority for the week.

-----Original Message-----
From: lihuisong (C) <lihuisong@huawei.com> 
Sent: Sunday, April 9, 2023 9:27 PM
To: Sudeep Holla <sudeep.holla@arm.com>; Robbie King <robbiek@xsightlabs.com>
Cc: linux-acpi@vger.kernel.org; linux-kernel@vger.kernel.org; rafael@kernel.org; rafael.j.wysocki@intel.com; wanghuiqiang@huawei.com; zhangzekun11@huawei.com; wangxiongfeng2@huawei.com; tanxiaofei@huawei.com; guohanjun@huawei.com; xiexiuqi@huawei.com; wangkefeng.wang@huawei.com; huangdaode@huawei.com
Subject: Re: [PATCH v2 0/2] mailbox: pcc: Support platform notification for type4 and shared interrupt


在 2023/3/27 20:31, lihuisong (C) 写道:
>
> 在 2023/3/27 19:33, Sudeep Holla 写道:
>> On Tue, Mar 14, 2023 at 07:11:33PM +0800, Huisong Li wrote:
>>> PCC supports processing platform notification for slave subspaces 
>>> and shared interrupt for multiple subspaces.
>>>
>> Other than a super minor nit in the patch 1/2, this looks good to me.
>> It would be good if we can get tested-by from Robbie King 
>> <robbiek@xsightlabs.com>
>>
>> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
> Thanks for your review.😁
>
> @Robbie King, can you give us some feedback?
> Looking forward to you reply.
>
>
@Robbie King, kindly ping.
lihuisong (C) April 14, 2023, 1:05 a.m. UTC | #5
在 2023/4/11 22:47, Robbie King 写道:
> Apologies, missed earlier emails.  Will make this a priority for the week.
Thanks. Looking forward to you reply.
>
> -----Original Message-----
> From: lihuisong (C) <lihuisong@huawei.com>
> Sent: Sunday, April 9, 2023 9:27 PM
> To: Sudeep Holla <sudeep.holla@arm.com>; Robbie King <robbiek@xsightlabs.com>
> Cc: linux-acpi@vger.kernel.org; linux-kernel@vger.kernel.org; rafael@kernel.org; rafael.j.wysocki@intel.com; wanghuiqiang@huawei.com; zhangzekun11@huawei.com; wangxiongfeng2@huawei.com; tanxiaofei@huawei.com; guohanjun@huawei.com; xiexiuqi@huawei.com; wangkefeng.wang@huawei.com; huangdaode@huawei.com
> Subject: Re: [PATCH v2 0/2] mailbox: pcc: Support platform notification for type4 and shared interrupt
>
>
> 在 2023/3/27 20:31, lihuisong (C) 写道:
>> 在 2023/3/27 19:33, Sudeep Holla 写道:
>>> On Tue, Mar 14, 2023 at 07:11:33PM +0800, Huisong Li wrote:
>>>> PCC supports processing platform notification for slave subspaces
>>>> and shared interrupt for multiple subspaces.
>>>>
>>> Other than a super minor nit in the patch 1/2, this looks good to me.
>>> It would be good if we can get tested-by from Robbie King
>>> <robbiek@xsightlabs.com>
>>>
>>> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
>> Thanks for your review.😁
>>
>> @Robbie King, can you give us some feedback?
>> Looking forward to you reply.
>>
>>
> @Robbie King, kindly ping.
Robbie King April 14, 2023, 1:48 p.m. UTC | #6
Sorry for the delay.  I ran my simple stress test against the patch set and
saw no issues.  For the record it is by no means a thorough regression, but it
has illuminated issues in the past.

The test itself uses a "heartbeat" module in the SCP firmware that generates
notifications at a programmable interval.  The stress test is simply generating
these heartbeats (SCP to AP notifications) while also generating protocol version
queries (AP to SCP).  The notifications are sequence numbered to verify none are
lost, however SCP to AP notification support does not support SCP generating
notifications faster than the AP can process them, so the heartbeat rate must be
reasonably slow (on the order of 10s of millliseconds).

-----Original Message-----
From: lihuisong (C) <lihuisong@huawei.com> 
Sent: Thursday, April 13, 2023 9:05 PM
To: Robbie King <robbiek@xsightlabs.com>; Sudeep Holla <sudeep.holla@arm.com>
Cc: linux-acpi@vger.kernel.org; linux-kernel@vger.kernel.org; rafael@kernel.org; rafael.j.wysocki@intel.com; wanghuiqiang@huawei.com; zhangzekun11@huawei.com; wangxiongfeng2@huawei.com; tanxiaofei@huawei.com; guohanjun@huawei.com; xiexiuqi@huawei.com; wangkefeng.wang@huawei.com; huangdaode@huawei.com
Subject: Re: [PATCH v2 0/2] mailbox: pcc: Support platform notification for type4 and shared interrupt


在 2023/4/11 22:47, Robbie King 写道:
> Apologies, missed earlier emails.  Will make this a priority for the week.
Thanks. Looking forward to you reply.
>
> -----Original Message-----
> From: lihuisong (C) <lihuisong@huawei.com>
> Sent: Sunday, April 9, 2023 9:27 PM
> To: Sudeep Holla <sudeep.holla@arm.com>; Robbie King 
> <robbiek@xsightlabs.com>
> Cc: linux-acpi@vger.kernel.org; linux-kernel@vger.kernel.org; 
> rafael@kernel.org; rafael.j.wysocki@intel.com; 
> wanghuiqiang@huawei.com; zhangzekun11@huawei.com; 
> wangxiongfeng2@huawei.com; tanxiaofei@huawei.com; 
> guohanjun@huawei.com; xiexiuqi@huawei.com; wangkefeng.wang@huawei.com; 
> huangdaode@huawei.com
> Subject: Re: [PATCH v2 0/2] mailbox: pcc: Support platform 
> notification for type4 and shared interrupt
>
>
> 在 2023/3/27 20:31, lihuisong (C) 写道:
>> 在 2023/3/27 19:33, Sudeep Holla 写道:
>>> On Tue, Mar 14, 2023 at 07:11:33PM +0800, Huisong Li wrote:
>>>> PCC supports processing platform notification for slave subspaces 
>>>> and shared interrupt for multiple subspaces.
>>>>
>>> Other than a super minor nit in the patch 1/2, this looks good to me.
>>> It would be good if we can get tested-by from Robbie King 
>>> <robbiek@xsightlabs.com>
>>>
>>> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
>> Thanks for your review.😁
>>
>> @Robbie King, can you give us some feedback?
>> Looking forward to you reply.
>>
>>
> @Robbie King, kindly ping.
lihuisong (C) April 18, 2023, 2:21 a.m. UTC | #7
在 2023/4/14 21:48, Robbie King 写道:
> Sorry for the delay.  I ran my simple stress test against the patch set and
> saw no issues.  For the record it is by no means a thorough regression, but it
> has illuminated issues in the past.
Thanks for your testing.
>
> The test itself uses a "heartbeat" module in the SCP firmware that generates
> notifications at a programmable interval.  The stress test is simply generating
> these heartbeats (SCP to AP notifications) while also generating protocol version
> queries (AP to SCP).  The notifications are sequence numbered to verify none are
> lost, however SCP to AP notification support does not support SCP generating
> notifications faster than the AP can process them, so the heartbeat rate must be
> reasonably slow (on the order of 10s of millliseconds).
I understand your concern. I think this doesn't get int the way of what 
we are doing.

My stress tests were also run in type3 and type4 concurrent scenarios.
There were two drivers using type3 to send command looply on platform.
In the firmware terminal window,
there were two channels for type4 to generate notifications from 
platform at the 1ms(even shorter) interval.
I didn't find anything issues in this stress after running a couple of 
hours.

@Robbie King and @Sudeep, what do you think of my test?

>
> -----Original Message-----
> From: lihuisong (C) <lihuisong@huawei.com>
> Sent: Thursday, April 13, 2023 9:05 PM
> To: Robbie King <robbiek@xsightlabs.com>; Sudeep Holla <sudeep.holla@arm.com>
> Cc: linux-acpi@vger.kernel.org; linux-kernel@vger.kernel.org; rafael@kernel.org; rafael.j.wysocki@intel.com; wanghuiqiang@huawei.com; zhangzekun11@huawei.com; wangxiongfeng2@huawei.com; tanxiaofei@huawei.com; guohanjun@huawei.com; xiexiuqi@huawei.com; wangkefeng.wang@huawei.com; huangdaode@huawei.com
> Subject: Re: [PATCH v2 0/2] mailbox: pcc: Support platform notification for type4 and shared interrupt
>
>
> 在 2023/4/11 22:47, Robbie King 写道:
>> Apologies, missed earlier emails.  Will make this a priority for the week.
> Thanks. Looking forward to you reply.
>> -----Original Message-----
>> From: lihuisong (C) <lihuisong@huawei.com>
>> Sent: Sunday, April 9, 2023 9:27 PM
>> To: Sudeep Holla <sudeep.holla@arm.com>; Robbie King
>> <robbiek@xsightlabs.com>
>> Cc: linux-acpi@vger.kernel.org; linux-kernel@vger.kernel.org;
>> rafael@kernel.org; rafael.j.wysocki@intel.com;
>> wanghuiqiang@huawei.com; zhangzekun11@huawei.com;
>> wangxiongfeng2@huawei.com; tanxiaofei@huawei.com;
>> guohanjun@huawei.com; xiexiuqi@huawei.com; wangkefeng.wang@huawei.com;
>> huangdaode@huawei.com
>> Subject: Re: [PATCH v2 0/2] mailbox: pcc: Support platform
>> notification for type4 and shared interrupt
>>
>>
>> 在 2023/3/27 20:31, lihuisong (C) 写道:
>>> 在 2023/3/27 19:33, Sudeep Holla 写道:
>>>> On Tue, Mar 14, 2023 at 07:11:33PM +0800, Huisong Li wrote:
>>>>> PCC supports processing platform notification for slave subspaces
>>>>> and shared interrupt for multiple subspaces.
>>>>>
>>>> Other than a super minor nit in the patch 1/2, this looks good to me.
>>>> It would be good if we can get tested-by from Robbie King
>>>> <robbiek@xsightlabs.com>
>>>>
>>>> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
>>> Thanks for your review.😁
>>>
>>> @Robbie King, can you give us some feedback?
>>> Looking forward to you reply.
>>>
>>>
>> @Robbie King, kindly ping.
Sudeep Holla April 21, 2023, 10:55 a.m. UTC | #8
On Tue, Apr 18, 2023 at 10:21:54AM +0800, lihuisong (C) wrote:
> 
> 在 2023/4/14 21:48, Robbie King 写道:
> > Sorry for the delay.  I ran my simple stress test against the patch set and
> > saw no issues.  For the record it is by no means a thorough regression, but it
> > has illuminated issues in the past.
> Thanks for your testing.
> > 
> > The test itself uses a "heartbeat" module in the SCP firmware that generates
> > notifications at a programmable interval.  The stress test is simply generating
> > these heartbeats (SCP to AP notifications) while also generating protocol version
> > queries (AP to SCP).  The notifications are sequence numbered to verify none are
> > lost, however SCP to AP notification support does not support SCP generating
> > notifications faster than the AP can process them, so the heartbeat rate must be
> > reasonably slow (on the order of 10s of millliseconds).
> I understand your concern. I think this doesn't get int the way of what we
> are doing.
> 
> My stress tests were also run in type3 and type4 concurrent scenarios.
> There were two drivers using type3 to send command looply on platform.
> In the firmware terminal window,
> there were two channels for type4 to generate notifications from platform at
> the 1ms(even shorter) interval.
> I didn't find anything issues in this stress after running a couple of
> hours.
> 
> @Robbie King and @Sudeep, what do you think of my test?
>

IMO if there is a need to have this driver changes upstream, then it is good
enough test as it is the best that can be done at this time. We can always fix
the bugs or extend to new use-cases in the future.

Since it is merge window next week, it is quite late now. But sometimes
Rafael picks up additional patches late. So please post v3 even if there
are no changes with my reviewed-by and Robbie's tested-by so that I can ask
Rafael to pick it up.
lihuisong (C) April 25, 2023, 1:22 p.m. UTC | #9
在 2023/4/21 18:55, Sudeep Holla 写道:
> On Tue, Apr 18, 2023 at 10:21:54AM +0800, lihuisong (C) wrote:
>> 在 2023/4/14 21:48, Robbie King 写道:
>>> Sorry for the delay.  I ran my simple stress test against the patch set and
>>> saw no issues.  For the record it is by no means a thorough regression, but it
>>> has illuminated issues in the past.
>> Thanks for your testing.
>>> The test itself uses a "heartbeat" module in the SCP firmware that generates
>>> notifications at a programmable interval.  The stress test is simply generating
>>> these heartbeats (SCP to AP notifications) while also generating protocol version
>>> queries (AP to SCP).  The notifications are sequence numbered to verify none are
>>> lost, however SCP to AP notification support does not support SCP generating
>>> notifications faster than the AP can process them, so the heartbeat rate must be
>>> reasonably slow (on the order of 10s of millliseconds).
>> I understand your concern. I think this doesn't get int the way of what we
>> are doing.
>>
>> My stress tests were also run in type3 and type4 concurrent scenarios.
>> There were two drivers using type3 to send command looply on platform.
>> In the firmware terminal window,
>> there were two channels for type4 to generate notifications from platform at
>> the 1ms(even shorter) interval.
>> I didn't find anything issues in this stress after running a couple of
>> hours.
>>
>> @Robbie King and @Sudeep, what do you think of my test?
>>
> IMO if there is a need to have this driver changes upstream, then it is good
> enough test as it is the best that can be done at this time. We can always fix
> the bugs or extend to new use-cases in the future.
>
> Since it is merge window next week, it is quite late now. But sometimes
> Rafael picks up additional patches late. So please post v3 even if there
> are no changes with my reviewed-by and Robbie's tested-by so that I can ask
> Rafael to pick it up.
Hi Robbie and Sudeep,

v3 has been sent.
Can you take a look at this series again?
Looking forward to your reply.
>