From: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
To: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Mailing List
<devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Maxime Ripard <maxime-R63rPqgGiG5yDzI6CaY1VQ@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] dt-bindings: reserved-memory: Add restricted-dma-pool constraints
Date: Thu, 17 Feb 2022 16:20:27 +0000 [thread overview]
Message-ID: <a0ddff19-9495-fa9f-5bec-b6658522c0bd@arm.com> (raw)
In-Reply-To: <CAL_JsqJh26LGyBH34y+68Jq0+NZEm86UfD4-u548YNz=AVYeug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 2022-02-17 16:05, Rob Herring wrote:
> On Thu, Feb 17, 2022 at 7:10 AM Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org> wrote:
>>
>> The "restricted-dma-pool" definition prohibits combination with either
>> of the "no-map" and "reusable" properties, but this is only stated in
>> the description text. Add those constraints to the schema so we can
>> properly validate them.
>>
>> Signed-off-by: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
>> ---
>> .../bindings/reserved-memory/shared-dma-pool.yaml | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/reserved-memory/shared-dma-pool.yaml b/Documentation/devicetree/bindings/reserved-memory/shared-dma-pool.yaml
>> index a4bf757d6881..01385581f663 100644
>> --- a/Documentation/devicetree/bindings/reserved-memory/shared-dma-pool.yaml
>> +++ b/Documentation/devicetree/bindings/reserved-memory/shared-dma-pool.yaml
>> @@ -56,6 +56,19 @@ properties:
>> If this property is present, then Linux will use the region for
>> the default pool of the consistent DMA allocator.
>>
>> +if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: restricted-dma-pool
>> +then:
>> + not:
>> + anyOf:
>> + - required:
>> + - no-map
>> + - required:
>> + - reusable
>
> I think it is a bit clearer to disallow properties like this:
>
> then:
> properties:
> no-map: false
> reusable: false
Aha! I was sure there must be a better way, but couldn't see the wood
for the trees, thanks!
Robin.
>
>
>> +
>> unevaluatedProperties: false
>>
>> examples:
>> --
>> 2.28.0.dirty
>>
prev parent reply other threads:[~2022-02-17 16:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-17 13:10 [PATCH] dt-bindings: reserved-memory: Add restricted-dma-pool constraints Robin Murphy
[not found] ` <79d1914ff04b44c3005072a990d14291c9ce6fce.1645103404.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
2022-02-17 16:05 ` Rob Herring
[not found] ` <CAL_JsqJh26LGyBH34y+68Jq0+NZEm86UfD4-u548YNz=AVYeug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-02-17 16:20 ` Robin Murphy [this message]
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=a0ddff19-9495-fa9f-5bec-b6658522c0bd@arm.com \
--to=robin.murphy-5wv7dgnigg8@public.gmane.org \
--cc=devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=maxime-R63rPqgGiG5yDzI6CaY1VQ@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 read-only IMAP folder(s) and NNTP newsgroup(s).