misc: fastrpc: Fix remote heap allocation request
authorEkansh Gupta <quic_ekangupt@quicinc.com>
Fri, 11 Aug 2023 11:56:41 +0000 (12:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Aug 2023 14:00:20 +0000 (16:00 +0200)
commitada6c2d99aedd1eac2f633d03c652e070bc2ea74
tree3438da4b91307132c1b1ec5bb1c97c02b74ba0ce
parent48e3210920b953f95737fcdd5bfd467735abe6bd
misc: fastrpc: Fix remote heap allocation request

Remote heap is used by DSP audioPD on need basis. This memory is
allocated from reserved CMA memory region and is then shared with
audioPD to use it for it's functionality.

Current implementation of remote heap is not allocating the memory
from CMA region, instead it is allocating the memory from SMMU
context bank. The arguments passed to scm call for the reassignment
of ownership is also not correct. Added changes to allocate CMA
memory and have a proper ownership reassignment.

Fixes: 532ad70c6d44 ("misc: fastrpc: Add mmap request assigning for static PD pool")
Cc: stable <stable@kernel.org>
Tested-by: Ekansh Gupta <quic_ekangupt@quicinc.com>
Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230811115643.38578-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/fastrpc.c