Re: msm: iommu: what is iommu_ctx?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hi Stephan,
>
> Now I'm implementing Tegra IOMMU, refering to MSM IOMMU, and I don't
> understandt what "ctx" means and how it's used in msm iommu. Could you
> please clarify a bit about this?
>
> According to "devices-iommu.c", there seems 12 physical iommu H/Ws,
> which represent each platform_device. But there are also 21
> ctx_devices, which are also platform_device. So what's this ctx? Is
> thie a client device for an IOMMU h/w? Is this ctx device supposed to
> be used with the coming "arm_iommu_attach_device()"?
>
> Any comment would be readlly appreciated.
>
>   Hiroshi DOYU
>

Hello

The "ctx" devices you are referring to are IOMMU translation context
devices. For the purposes of the IOMMU API, these can be thought of as
separate and independent IOMMUs, with each context device having its own
set of registers (including page table pointer) and having its own address
space. Thus, the attach_dev and detach_dev calls would operate on these
"ctx" devices rather than the top-level IOMMU devices you mentioned (which
don't really interact directly with the IOMMU API).

In reality, an IOMMU device can internally contain one or more IOMMU
context devices, though some hardware resources do end up being shared
between the context devices within the same IOMMU device. This is why
there is a parent-child relationship between the IOMMU devices and the
context devices - the driver needs to know about and deal with the fact
that some internal resources (such as the TLB) may be shared between
several context devices within the same IOMMU.

I hope this answers your question. Please let me know if you would like me
to clarify anything.

Steve

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux