From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Bjorn Andersson <quic_bjorande@quicinc.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] dt-bindings: reserved-memory: rmtfs: Allow guard pages
Date: Sun, 4 Jun 2023 12:25:19 +0200 [thread overview]
Message-ID: <6187d1a4-1667-21c5-00ba-4689caa6cac8@linaro.org> (raw)
In-Reply-To: <20230530233643.4044823-2-quic_bjorande@quicinc.com>
On 31/05/2023 01:36, Bjorn Andersson wrote:
> On some Qualcomm platforms it's required that the rmtfs memory is not
> placed adjacent to allocations performed by other clients. Some
> DeviceTree authors have solved this by reserving the space around
> the region, but this prevents such author to use rely on the OS to place
> the region, through the use of "size" (instead of a fixed location).
>
> So introduce a flag to indicate that guard pages should be carved at the
> beginning and end of the memory region. The user shall account for the
> two 4k blocks in the defined size.
>
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> ---
>
> Changes since v1:
> - Drop qcom,alloc-size in favour of using reserved-memory/size
> - Introduce explicit property to signal that guard pages should be
> carved out from this region (rather than always do it in the dynamic
> case).
>
> .../bindings/reserved-memory/qcom,rmtfs-mem.yaml | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml b/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml
> index bab982f00485..26e24e7b08cf 100644
> --- a/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml
> +++ b/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml
> @@ -26,6 +26,13 @@ properties:
> description: >
> identifier of the client to use this region for buffers
>
> + qcom,use-guard-pages:
> + type: boolean
> + description: >
> + Indicates that the OS should ignore the first and last 4k block of the
> + memory region, for the purpose of ensuring that the allocation is not
> + adjacent to other protected regions.
Property name and description: do not describe the OS behavior. Describe
the hardware or firmware. Describe the actual problem or characteristic
which will be then interpreted by OS to do what you want. DT is not for
instructing OS what to do.
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-06-04 10:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-30 23:36 [PATCH v2 0/3] soc: qcom: rmtfs: Support dynamic allocation Bjorn Andersson
2023-05-30 23:36 ` [PATCH v2 1/3] dt-bindings: reserved-memory: rmtfs: Allow guard pages Bjorn Andersson
2023-06-01 12:34 ` Stephan Gerhold
2023-06-04 10:25 ` Krzysztof Kozlowski [this message]
2023-05-30 23:36 ` [PATCH v2 2/3] soc: qcom: rmtfs: Support discarding " Bjorn Andersson
2023-05-31 0:08 ` Caleb Connolly
2023-05-31 0:09 ` Caleb Connolly
2023-06-01 12:26 ` Stephan Gerhold
2023-05-30 23:36 ` [PATCH v2 3/3] soc: qcom: rtmfs: Handle reserved-memory allocation issues Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6187d1a4-1667-21c5-00ba-4689caa6cac8@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_bjorande@quicinc.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).