devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Rob Herring <robh@kernel.org>,
	Charan Teja Kalla <charan.kalla@oss.qualcomm.com>
Cc: joro@8bytes.org, will@kernel.org, robin.murphy@arm.com,
	saravanak@google.com, conor+dt@kernel.org, mchehab@kernel.org,
	bod@kernel.org, krzk+dt@kernel.org, abhinav.kumar@linux.dev,
	vikash.garodia@oss.qualcomm.com,
	dikshita.agarwal@oss.qualcomm.com, linux-media@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, iommu@lists.linux.dev
Subject: Re: [RFC PATCH 0/3] Introduce iommu-map-masked for platform devices
Date: Thu, 9 Oct 2025 09:26:43 +0900	[thread overview]
Message-ID: <1d36569c-55b9-4390-87d1-fd0c2f837014@kernel.org> (raw)
In-Reply-To: <CAL_JsqK9waZK=i+ov0jV-PonWSfddwHvE94Q+pks4zAEtKc+yg@mail.gmail.com>

On 29/09/2025 05:23, Rob Herring wrote:
> On Sun, Sep 28, 2025 at 12:17 PM Charan Teja Kalla
> <charan.kalla@oss.qualcomm.com> wrote:
>>
>> This series introduces a new iommu property called iommu-map-masked(may
>> be there is a better name), which is used to represent the IOMMU
>> specifier pairs for each function of a __multi-functional platform
>> device__, where each function can emit unique master id(s) that can be
>> associated with individual translation context.
>>
>> Currently, the iommu configuration - at least for arm architecture-
>> requires all the functions of a platform device will be represented
>> under single dt node thus endup in using only a single translation
>> context.
>>
>> A simple solution to associate individual translation context for each
>> function of a device can be through creating per function child nodes in
>> the device tree, but dt is only to just represent the soc layout to
>> linux kernel.
>>
>> Supporting such cases requires a new iommu property called,
>> iommu-map-masked(taking cue from iommu-map for pci devices) and syntax
>> is:
>>    iommu-map-masked = <FUNCTION_ID1 &iommu ID1 MASK1>,
>>                       <FUNCTION_ID2 &iommu ID2 MASK2>;
>> NOTE: As an RFC, it is considered that this property always expects 4
>> cells.
>>
>> During the probe phase of the driver for a multi-functional device
>> behind an IOMMU, a child device is instantiated for each FUNCTION_ID.
>> The call to of_dma_configure_id() on each child sets up the IOMMU
>> configuration, ensuring that each function of the device is associated
>> with a distinct translation context.
>>
>> This property can also be used in association with 'iommus=' when dt
>> bindings requires the presence of 'iommus=', example[2]. For these
>> cases, representation will be(on arm64):
>>    iommus = <&iommu sid mask>; //for default function.
>>    iommu-map-masked = <FUNCTION_ID &iommu sid mask>;//additional
>> function.
> 
> Where does the FUNCTION_ID value come from?
> 
> Why can't you just have multiple "iommus" entries where the index
> defines the default and any FUNCTION_ID entries? What's in each index
> is specific to the device.


We discussed the problem earlier and that is what I asked them to do.
Apparently I was just ignored so now two maintainers say the same. We
can get ignored still and the third maintainer will have to tell this.


Best regards,
Krzysztof

  reply	other threads:[~2025-10-09  0:26 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-28 17:17 [RFC PATCH 0/3] Introduce iommu-map-masked for platform devices Charan Teja Kalla
2025-09-28 17:17 ` [RFC PATCH 1/3] dtbindings: add binding for iommu-map-masked property Charan Teja Kalla
2025-09-28 17:17 ` [RFC PATCH 2/3] of: create a wrapper for of_map_id() Charan Teja Kalla
2025-09-28 17:17 ` [RFC PATCH 3/3] of: implment the 'iommu-map-masked' to represent multi-functional devices Charan Teja Kalla
2025-09-28 20:23 ` [RFC PATCH 0/3] Introduce iommu-map-masked for platform devices Rob Herring
2025-10-09  0:26   ` Krzysztof Kozlowski [this message]
2025-10-09 12:16     ` Robin Murphy
2025-10-09 13:16       ` Dmitry Baryshkov
2025-10-09 13:14     ` Dmitry Baryshkov
2025-10-09  3:05   ` Vikash Garodia
2025-09-29 10:20 ` Robin Murphy
2025-10-08 19:10   ` Charan Teja Kalla
2025-10-09 10:46     ` Robin Murphy
2025-10-09 13:19       ` Dmitry Baryshkov
2025-10-09 17:03         ` Robin Murphy
2025-10-09 18:25           ` Dmitry Baryshkov
2025-10-10 19:53             ` Charan Teja Kalla
2025-10-10 22:30               ` Rob Herring
2025-10-11  0:54                 ` Dmitry Baryshkov
2025-10-12 20:44               ` Bryan O'Donoghue
2025-10-12 21:57                 ` Bryan O'Donoghue
2025-10-12 22:47                 ` Dmitry Baryshkov
2025-10-13 10:18                   ` Bryan O'Donoghue
2025-10-13 11:20             ` Robin Murphy
2025-10-13 12:31               ` Dmitry Baryshkov
2025-10-14 14:07                 ` Robin Murphy
2025-10-14 18:33                   ` Dmitry Baryshkov
2025-10-15  8:32                   ` Charan Teja Kalla
2025-10-19 12:13                     ` Dmitry Baryshkov
2025-10-14 15:07                 ` Bryan O'Donoghue
2025-10-14 18:35                   ` Dmitry Baryshkov
2025-10-14 20:49                     ` Bryan O'Donoghue
2025-10-14 22:18                       ` Dmitry Baryshkov
2025-10-15  8:53                         ` Bryan O'Donoghue
2025-10-15 21:55                           ` Rob Herring
2025-10-14 22:38                       ` Dmitry Baryshkov

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=1d36569c-55b9-4390-87d1-fd0c2f837014@kernel.org \
    --to=krzk@kernel.org \
    --cc=abhinav.kumar@linux.dev \
    --cc=bod@kernel.org \
    --cc=charan.kalla@oss.qualcomm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dikshita.agarwal@oss.qualcomm.com \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=robh@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=saravanak@google.com \
    --cc=vikash.garodia@oss.qualcomm.com \
    --cc=will@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).