Skip to contentSkip to conversation

misc: fastrpc: Update number of max fastrpc sessions

PATCH In review Jeya R 3 participants 5 messages Sep 20, 2021 – Sep 21, 2021

Subsystems (3)
lore
Share & tools
lore

Jeya R

author
#0 lore raw

PATCH 1/1 misc: fastrpc: Update number of max fastrpc sessions

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.

---
 drivers/misc/fastrpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/fastrpc.c +1 -1
index beda610..bd7811e 100644
@@ -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
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 27 lines · Jeya R

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.

---
 drivers/misc/fastrpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/fastrpc.c +1 -1
index beda610..bd7811e 100644
@@ -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
Signature · 1 line
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

#2 lore raw
Quoted 22 lines · Greg KH
Quoted 21 lines · Jeya R

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.

---
  drivers/misc/fastrpc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/fastrpc.c +1 -1
index beda610..bd7811e 100644
@@ -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*/
Quoted 8 lines
Quoted 6 lines
drivers/misc/fastrpc.c +0 -0
  #define FASTRPC_ALIGN		128
  #define FASTRPC_MAX_FDLIST	16
  #define FASTRPC_MAX_CRCLIST	64
Signature · 1 line
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.

Quoted 2 lines

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

Quoted 5 lines

thanks,

greg k-h

maintainer
#3 lore raw
Quoted 34 lines · Srinivas Kandagatla
Quoted 22 lines · Greg KH
Quoted 21 lines · Jeya R

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.

---
  drivers/misc/fastrpc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/fastrpc.c +1 -1
index beda610..bd7811e 100644
@@ -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*/
Quoted 8 lines
Quoted 6 lines
drivers/misc/fastrpc.c +0 -0
  #define FASTRPC_ALIGN		128
  #define FASTRPC_MAX_FDLIST	16
  #define FASTRPC_MAX_CRCLIST	64
Signature · 1 line
2.7.4

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

Quoted 8 lines

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

Quoted 2 lines

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?

Reviewed-by on v1 1/1
#4 lore raw
In reply to Jeya R
Quoted 7 lines · Jeya R

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.

Quoted 18 lines
---
  drivers/misc/fastrpc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/fastrpc.c +1 -1
index beda610..bd7811e 100644
@@ -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