From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Hiroshi Doyu <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/6] iommu/tegra: smmu: Pass swgroup info from DT
Date: Wed, 16 Jan 2013 14:07:53 -0700 [thread overview]
Message-ID: <50F716A9.9060607@wwwdotorg.org> (raw)
In-Reply-To: <1358237848-968-2-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
On 01/15/2013 01:17 AM, Hiroshi Doyu wrote:
> Pass available H/W client component(software client group) info from
> DT in bitmap. This info is specific to a certain generation of Tegra
> SoC. With this, Tegra SMMU driver could be identical among Tegra
> generations. This also removes the old way of passing this bit from
> each device pdata, which could configure(enable/disable) each device
> IOMMU'able, but it belongs to a kind of "policy", which can be done by
> kernel/system later. Now DT passes just pure H/W info.
> diff --git a/Documentation/devicetree/bindings/iommu/nvidia,tegra30-smmu.txt b/Documentation/devicetree/bindings/iommu/nvidia,tegra30-smmu.txt
> index 89fb543..de449d0 100644
> --- a/Documentation/devicetree/bindings/iommu/nvidia,tegra30-smmu.txt
> +++ b/Documentation/devicetree/bindings/iommu/nvidia,tegra30-smmu.txt
> @@ -8,6 +8,46 @@ Required properties:
> - nvidia,#asids : # of ASIDs
> - dma-window : IOVA start address and length.
> - nvidia,ahb : phandle to the ahb bus connected to SMMU.
> +- nvidia,swgroups: Available H/W client component(software client
> + group) in bitmap in SoC. Those IDs are calculated as below:
> +
> + <ID> = (<OFFSET> - MC_SMMU_AFI_ASID_0) / 4;
OK, so I understand the addition to the DT defines which clients exist,
and hence which ASID-selection registers exist. This addition makes
sense to me.
> diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
> /*
> * Per client for address space
> @@ -263,7 +192,6 @@ struct smmu_client {
> struct device *dev;
> struct list_head list;
> struct smmu_as *as;
> - u32 swgrp;
> };
What I don't quite understand is that change, but perhaps that's because
I'm not sure what that field meant before, and/or where the
client<->ASID mapping comes from.
Before this patch, did each client use that removed "u32 swgrp" to tell
the SMMU driver which ASID-selection register was used to configure it,
and then the SMMU took the union of all clients to know which
ASID-selection registers existed? If so, then perhaps this change makes
more sense than I thought... But, how does the SMMU driver know which of
the bits in the new nvidia,swgroups property is related to each struct
smmu_client?
Or, did the removed "u32 swgrp" indicate which of the SMMU's ASIDs
should be assigned to the client?
I guess what I'm missing is: How does the SMMU know which ASID to assign
to each client, either before or after this change? Or, does the driver
just assign every client to ASID 0 right now, and there's no provision
for separate ASIDs?
next prev parent reply other threads:[~2013-01-16 21:07 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 8:17 [PATCH 1/6] iommu/tegra: Rename -i hw{grp,group} to sw{grp,group} Hiroshi Doyu
[not found] ` <1358237848-968-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-15 8:17 ` [PATCH 2/6] iommu/tegra: smmu: Pass swgroup info from DT Hiroshi Doyu
[not found] ` <1358237848-968-2-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-16 21:07 ` Stephen Warren [this message]
2013-01-15 8:17 ` [PATCH 3/6] iommu/tegra: smmu: Support variable length of swgroups bitmap Hiroshi Doyu
2013-01-15 8:17 ` [PATCH 4/6] iommu/tegra: smmu: Support variable MMIO range Hiroshi Doyu
[not found] ` <1358237848-968-4-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-16 21:12 ` Stephen Warren
[not found] ` <50F717B8.6050800-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-18 9:05 ` Hiroshi Doyu
[not found] ` <20130118.110546.1909336134474854222.hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-18 16:44 ` Stephen Warren
[not found] ` <50F97BDD.8010502-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-21 7:36 ` Hiroshi Doyu
2013-01-21 7:36 ` Hiroshi Doyu
[not found] ` <20130121.093603.449745485344660335.hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-21 17:04 ` Stephen Warren
[not found] ` <50FD752A.6060706-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-29 8:34 ` [v2 1/1] iommu/tegra: smmu: Support variable MMIO ranges/blocks Hiroshi Doyu
[not found] ` <1359448450-24894-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-29 17:03 ` Stephen Warren
[not found] ` <510800F7.7020507-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-29 17:40 ` Hiroshi Doyu
[not found] ` <20130129.194007.2143867447969494923.hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-29 17:57 ` Stephen Warren
2013-01-29 17:56 ` [v3 " Hiroshi Doyu
[not found] ` <1359482169-26756-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-29 17:58 ` Stephen Warren
2013-01-15 8:17 ` [PATCH 5/6] ARM: dt: tegra114: Add AHB entry Hiroshi Doyu
[not found] ` <1358237848-968-5-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-28 19:00 ` Stephen Warren
2013-01-15 8:17 ` [PATCH 6/6] ARM: dt: tegra114: Add SMMU entry Hiroshi Doyu
[not found] ` <1358237848-968-6-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-16 21:17 ` Stephen Warren
2013-01-15 13:22 ` [PATCH 7/6] iommu/tegra: smmu: Add dependency on ARCH_TEGRA_114_SOC Hiroshi Doyu
[not found] ` <1358256149-28700-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-16 21:18 ` Stephen Warren
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=50F716A9.9060607@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.