soc: qcom: rmtfs: Support discarding guard pages
authorBjorn Andersson <quic_bjorande@quicinc.com>
Thu, 21 Sep 2023 02:37:31 +0000 (19:37 -0700)
committerBjorn Andersson <andersson@kernel.org>
Wed, 27 Sep 2023 23:05:58 +0000 (16:05 -0700)
commit9265bc6bce6919c771970e5a425a66551a1c78a0
tree7ca02fa6dd7c8df1e9873fb68fceafc408fbc5a6
parent3ad96787949a96256931ca59aff73ea604bc0e6c
soc: qcom: rmtfs: Support discarding guard pages

In some configurations, the exact placement of the rmtfs shared memory
region isn't so strict. The DeviceTree author can then choose to use the
"size" property and rely on the OS for placement (in combination with
"alloc-ranges", if desired).

But on some platforms the rmtfs memory region may not be allocated
adjacent to regions allocated by other clients. Add support for
discarding the first and last 4k block in the region, if
qcom,use-guard-pages is specified in DeviceTree.

Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20230920-rmtfs-mem-guard-pages-v3-2-305b37219b78@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/soc/qcom/rmtfs_mem.c