]> www.infradead.org Git - users/jedix/linux-maple.git/commit
firmware: qcom: scm: enable the TZ mem allocator
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 27 May 2024 12:54:53 +0000 (14:54 +0200)
committerBjorn Andersson <andersson@kernel.org>
Sun, 23 Jun 2024 21:08:04 +0000 (16:08 -0500)
commit40289e35ca525f29a03989352ab207b6a9675475
tree89dab77253f1b53861db7d81b8f834014def9a37
parent84f5a7b67b61bfeb0a939ddc5eca8586cae101de
firmware: qcom: scm: enable the TZ mem allocator

Select the TrustZone memory allocator in Kconfig and create a pool of
memory shareable with the TrustZone when probing the SCM driver.

This will allow a gradual conversion of all relevant SCM calls to using
the dedicated allocator.

The policy used for the pool is "on-demand" and the initial size is 0
as - depending on the config - it's possible that no SCM calls needing
to allocate memory will be called. The sizes of possible allocations also
vary substiantially further warranting the "on-demand" approach.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-3-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/firmware/qcom/Kconfig
drivers/firmware/qcom/qcom_scm.c