All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] misc: fastrpc: Update number of max fastrpc sessions
@ 2021-09-20  7:34 Jeya R
  2021-09-20  7:51 ` Greg KH
  2021-09-21 14:47 ` Srinivas Kandagatla
  0 siblings, 2 replies; 5+ messages in thread
From: Jeya R @ 2021-09-20  7:34 UTC (permalink / raw)
  To: linux-arm-msm, srinivas.kandagatla
  Cc: Jeya R, gregkh, linux-kernel, fastrpc.upstream

For latest chipsets, upto 13 fastrpc sessions can be
supported. This includes 12 compute sessions and 1 cpz
session. Not updating this might result to out of bounds
memory access issues if more than 9 context bank nodes
are added to the DT file.

Signed-off-by: Jeya R <jeyr@codeaurora.org>
---
 drivers/misc/fastrpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index beda610..bd7811e 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -24,7 +24,7 @@
 #define SDSP_DOMAIN_ID (2)
 #define CDSP_DOMAIN_ID (3)
 #define FASTRPC_DEV_MAX		4 /* adsp, mdsp, slpi, cdsp*/
-#define FASTRPC_MAX_SESSIONS	9 /*8 compute, 1 cpz*/
+#define FASTRPC_MAX_SESSIONS	13 /*12 compute, 1 cpz*/
 #define FASTRPC_ALIGN		128
 #define FASTRPC_MAX_FDLIST	16
 #define FASTRPC_MAX_CRCLIST	64
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] misc: fastrpc: Update number of max fastrpc sessions
  2021-09-20  7:34 [PATCH] misc: fastrpc: Update number of max fastrpc sessions Jeya R
@ 2021-09-20  7:51 ` Greg KH
  2021-09-20 12:53   ` Srinivas Kandagatla
  2021-09-21 14:47 ` Srinivas Kandagatla
  1 sibling, 1 reply; 5+ messages in thread
From: Greg KH @ 2021-09-20  7:51 UTC (permalink / raw)
  To: Jeya R; +Cc: linux-arm-msm, srinivas.kandagatla, linux-kernel, fastrpc.upstream

On Mon, Sep 20, 2021 at 01:04:34PM +0530, Jeya R wrote:
> For latest chipsets, upto 13 fastrpc sessions can be
> supported. This includes 12 compute sessions and 1 cpz
> session. Not updating this might result to out of bounds
> memory access issues if more than 9 context bank nodes
> are added to the DT file.
> 
> Signed-off-by: Jeya R <jeyr@codeaurora.org>
> ---
>  drivers/misc/fastrpc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
> index beda610..bd7811e 100644
> --- a/drivers/misc/fastrpc.c
> +++ b/drivers/misc/fastrpc.c
> @@ -24,7 +24,7 @@
>  #define SDSP_DOMAIN_ID (2)
>  #define CDSP_DOMAIN_ID (3)
>  #define FASTRPC_DEV_MAX		4 /* adsp, mdsp, slpi, cdsp*/
> -#define FASTRPC_MAX_SESSIONS	9 /*8 compute, 1 cpz*/
> +#define FASTRPC_MAX_SESSIONS	13 /*12 compute, 1 cpz*/
>  #define FASTRPC_ALIGN		128
>  #define FASTRPC_MAX_FDLIST	16
>  #define FASTRPC_MAX_CRCLIST	64
> -- 
> 2.7.4
> 

What happens if you run this on "older" chipsets?

And is this an issue now, or can this wait to 5.16-rc1?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] misc: fastrpc: Update number of max fastrpc sessions
  2021-09-20  7:51 ` Greg KH
@ 2021-09-20 12:53   ` Srinivas Kandagatla
  2021-09-21 14:12     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Srinivas Kandagatla @ 2021-09-20 12:53 UTC (permalink / raw)
  To: Greg KH, Jeya R; +Cc: linux-arm-msm, linux-kernel, fastrpc.upstream



On 20/09/2021 08:51, Greg KH wrote:
> On Mon, Sep 20, 2021 at 01:04:34PM +0530, Jeya R wrote:
>> For latest chipsets, upto 13 fastrpc sessions can be
>> supported. This includes 12 compute sessions and 1 cpz
>> session. Not updating this might result to out of bounds
>> memory access issues if more than 9 context bank nodes
>> are added to the DT file.
>>
>> Signed-off-by: Jeya R <jeyr@codeaurora.org>
>> ---
>>   drivers/misc/fastrpc.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
>> index beda610..bd7811e 100644
>> --- a/drivers/misc/fastrpc.c
>> +++ b/drivers/misc/fastrpc.c
>> @@ -24,7 +24,7 @@
>>   #define SDSP_DOMAIN_ID (2)
>>   #define CDSP_DOMAIN_ID (3)
>>   #define FASTRPC_DEV_MAX		4 /* adsp, mdsp, slpi, cdsp*/
>> -#define FASTRPC_MAX_SESSIONS	9 /*8 compute, 1 cpz*/
>> +#define FASTRPC_MAX_SESSIONS	13 /*12 compute, 1 cpz*/
>>   #define FASTRPC_ALIGN		128
>>   #define FASTRPC_MAX_FDLIST	16
>>   #define FASTRPC_MAX_CRCLIST	64
>> -- 
>> 2.7.4
>>
> 
> What happens if you run this on "older" chipsets?

This change should not have any implications on the older chips, as the 
existing compute context bank device tree entries will not exceed 9.

> 
> And is this an issue now, or can this wait to 5.16-rc1?

We could wait take in 5.16-rc1, as its an enhancement to allow more 
compute context banks.

--srini
> 
> thanks,
> 
> greg k-h
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] misc: fastrpc: Update number of max fastrpc sessions
  2021-09-20 12:53   ` Srinivas Kandagatla
@ 2021-09-21 14:12     ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2021-09-21 14:12 UTC (permalink / raw)
  To: Srinivas Kandagatla; +Cc: Jeya R, linux-arm-msm, linux-kernel, fastrpc.upstream

On Mon, Sep 20, 2021 at 01:53:39PM +0100, Srinivas Kandagatla wrote:
> 
> 
> On 20/09/2021 08:51, Greg KH wrote:
> > On Mon, Sep 20, 2021 at 01:04:34PM +0530, Jeya R wrote:
> > > For latest chipsets, upto 13 fastrpc sessions can be
> > > supported. This includes 12 compute sessions and 1 cpz
> > > session. Not updating this might result to out of bounds
> > > memory access issues if more than 9 context bank nodes
> > > are added to the DT file.
> > > 
> > > Signed-off-by: Jeya R <jeyr@codeaurora.org>
> > > ---
> > >   drivers/misc/fastrpc.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
> > > index beda610..bd7811e 100644
> > > --- a/drivers/misc/fastrpc.c
> > > +++ b/drivers/misc/fastrpc.c
> > > @@ -24,7 +24,7 @@
> > >   #define SDSP_DOMAIN_ID (2)
> > >   #define CDSP_DOMAIN_ID (3)
> > >   #define FASTRPC_DEV_MAX		4 /* adsp, mdsp, slpi, cdsp*/
> > > -#define FASTRPC_MAX_SESSIONS	9 /*8 compute, 1 cpz*/
> > > +#define FASTRPC_MAX_SESSIONS	13 /*12 compute, 1 cpz*/
> > >   #define FASTRPC_ALIGN		128
> > >   #define FASTRPC_MAX_FDLIST	16
> > >   #define FASTRPC_MAX_CRCLIST	64
> > > -- 
> > > 2.7.4
> > > 
> > 
> > What happens if you run this on "older" chipsets?
> 
> This change should not have any implications on the older chips, as the
> existing compute context bank device tree entries will not exceed 9.
> 
> > 
> > And is this an issue now, or can this wait to 5.16-rc1?
> 
> We could wait take in 5.16-rc1, as its an enhancement to allow more compute
> context banks.

Ok, can I get a reviewed-by: for this?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] misc: fastrpc: Update number of max fastrpc sessions
  2021-09-20  7:34 [PATCH] misc: fastrpc: Update number of max fastrpc sessions Jeya R
  2021-09-20  7:51 ` Greg KH
@ 2021-09-21 14:47 ` Srinivas Kandagatla
  1 sibling, 0 replies; 5+ messages in thread
From: Srinivas Kandagatla @ 2021-09-21 14:47 UTC (permalink / raw)
  To: Jeya R, linux-arm-msm; +Cc: gregkh, linux-kernel, fastrpc.upstream



On 20/09/2021 08:34, Jeya R wrote:
> For latest chipsets, upto 13 fastrpc sessions can be
> supported. This includes 12 compute sessions and 1 cpz
> session. Not updating this might result to out of bounds
> memory access issues if more than 9 context bank nodes
> are added to the DT file.
> 
> Signed-off-by: Jeya R <jeyr@codeaurora.org>

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

> ---
>   drivers/misc/fastrpc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
> index beda610..bd7811e 100644
> --- a/drivers/misc/fastrpc.c
> +++ b/drivers/misc/fastrpc.c
> @@ -24,7 +24,7 @@
>   #define SDSP_DOMAIN_ID (2)
>   #define CDSP_DOMAIN_ID (3)
>   #define FASTRPC_DEV_MAX		4 /* adsp, mdsp, slpi, cdsp*/
> -#define FASTRPC_MAX_SESSIONS	9 /*8 compute, 1 cpz*/
> +#define FASTRPC_MAX_SESSIONS	13 /*12 compute, 1 cpz*/
>   #define FASTRPC_ALIGN		128
>   #define FASTRPC_MAX_FDLIST	16
>   #define FASTRPC_MAX_CRCLIST	64
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-21 14:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20  7:34 [PATCH] misc: fastrpc: Update number of max fastrpc sessions Jeya R
2021-09-20  7:51 ` Greg KH
2021-09-20 12:53   ` Srinivas Kandagatla
2021-09-21 14:12     ` Greg KH
2021-09-21 14:47 ` Srinivas Kandagatla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.