* [PATCH v1] misc: fastrpc: Increase user PD initmem size
@ 2024-06-17 8:50 Ekansh Gupta
2024-06-17 9:14 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Ekansh Gupta @ 2024-06-17 8:50 UTC (permalink / raw)
To: srinivas.kandagatla, linux-arm-msm
Cc: gregkh, quic_bkumar, linux-kernel, quic_chennak, stable
For user PD initialization, initmem is allocated and sent to DSP for
initial memory requirements like shell loading. For unsigned PD
offloading, current memory size is not sufficient which would
result in PD initialization failures. Increase initial memory size
to 5MB.
Fixes: 7f1f481263c3 ("misc: fastrpc: check before loading process to the DSP")
Cc: stable <stable@kernel.org>
Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com>
---
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 5204fda51da3..11a230af0b10 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -38,7 +38,7 @@
#define FASTRPC_INIT_HANDLE 1
#define FASTRPC_DSP_UTILITIES_HANDLE 2
#define FASTRPC_CTXID_MASK (0xFF0)
-#define INIT_FILELEN_MAX (2 * 1024 * 1024)
+#define INIT_FILELEN_MAX (5 * 1024 * 1024)
#define INIT_FILE_NAMELEN_MAX (128)
#define FASTRPC_DEVICE_NAME "fastrpc"
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] misc: fastrpc: Increase user PD initmem size
2024-06-17 8:50 [PATCH v1] misc: fastrpc: Increase user PD initmem size Ekansh Gupta
@ 2024-06-17 9:14 ` Greg KH
2024-06-18 4:22 ` Ekansh Gupta
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2024-06-17 9:14 UTC (permalink / raw)
To: Ekansh Gupta
Cc: srinivas.kandagatla, linux-arm-msm, quic_bkumar, linux-kernel,
quic_chennak, stable
On Mon, Jun 17, 2024 at 02:20:50PM +0530, Ekansh Gupta wrote:
> For user PD initialization, initmem is allocated and sent to DSP for
> initial memory requirements like shell loading. For unsigned PD
> offloading, current memory size is not sufficient which would
> result in PD initialization failures. Increase initial memory size
> to 5MB.
>
> Fixes: 7f1f481263c3 ("misc: fastrpc: check before loading process to the DSP")
> Cc: stable <stable@kernel.org>
> Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com>
> ---
> 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 5204fda51da3..11a230af0b10 100644
> --- a/drivers/misc/fastrpc.c
> +++ b/drivers/misc/fastrpc.c
> @@ -38,7 +38,7 @@
> #define FASTRPC_INIT_HANDLE 1
> #define FASTRPC_DSP_UTILITIES_HANDLE 2
> #define FASTRPC_CTXID_MASK (0xFF0)
> -#define INIT_FILELEN_MAX (2 * 1024 * 1024)
> +#define INIT_FILELEN_MAX (5 * 1024 * 1024)
That is still an arbritrary number, why not make it dynamic and properly
sized to what the hardware needs? Otherwise you will need to change
this again in the future, AND you are wasting memory that doesn't need
this, right?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] misc: fastrpc: Increase user PD initmem size
2024-06-17 9:14 ` Greg KH
@ 2024-06-18 4:22 ` Ekansh Gupta
0 siblings, 0 replies; 3+ messages in thread
From: Ekansh Gupta @ 2024-06-18 4:22 UTC (permalink / raw)
To: Greg KH
Cc: srinivas.kandagatla, linux-arm-msm, quic_bkumar, linux-kernel,
quic_chennak, stable
On 6/17/2024 2:44 PM, Greg KH wrote:
> On Mon, Jun 17, 2024 at 02:20:50PM +0530, Ekansh Gupta wrote:
>> For user PD initialization, initmem is allocated and sent to DSP for
>> initial memory requirements like shell loading. For unsigned PD
>> offloading, current memory size is not sufficient which would
>> result in PD initialization failures. Increase initial memory size
>> to 5MB.
>>
>> Fixes: 7f1f481263c3 ("misc: fastrpc: check before loading process to the DSP")
>> Cc: stable <stable@kernel.org>
>> Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com>
>> ---
>> 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 5204fda51da3..11a230af0b10 100644
>> --- a/drivers/misc/fastrpc.c
>> +++ b/drivers/misc/fastrpc.c
>> @@ -38,7 +38,7 @@
>> #define FASTRPC_INIT_HANDLE 1
>> #define FASTRPC_DSP_UTILITIES_HANDLE 2
>> #define FASTRPC_CTXID_MASK (0xFF0)
>> -#define INIT_FILELEN_MAX (2 * 1024 * 1024)
>> +#define INIT_FILELEN_MAX (5 * 1024 * 1024)
> That is still an arbritrary number, why not make it dynamic and properly
> sized to what the hardware needs? Otherwise you will need to change
> this again in the future, AND you are wasting memory that doesn't need
> this, right?
Thanks for reviewing the change, Greg.
The size is actually passed by user based on requirement which is then checked against this
INIT_FILELEN_MAX. Till now this was hasn't caused any problems but after introducing
unsigned PD, the size requirement got increased which is resulting in failures.
As for memory wastage, any additional memory passed during DSP PD init is used as the
PD heap in DSP, so the memory is not wasted. I'll add this information to the commit message.
--Ekansh
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-18 4:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-17 8:50 [PATCH v1] misc: fastrpc: Increase user PD initmem size Ekansh Gupta
2024-06-17 9:14 ` Greg KH
2024-06-18 4:22 ` Ekansh Gupta
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®