<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/iommu.h, branch T20_LinuxImageV2.0Beta1_20121218</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>iommu: Fix compile error with !IOMMU_API</title>
<updated>2012-01-23T09:11:38+00:00</updated>
<author>
<name>Joerg Roedel</name>
<email>joerg.roedel@amd.com</email>
</author>
<published>2011-11-15T11:48:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b385da44ae246572d93c294782067efa57ebaa20'/>
<id>b385da44ae246572d93c294782067efa57ebaa20</id>
<content type='text'>
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iommu: Add iommu_device_group callback and iommu_group sysfs entry</title>
<updated>2012-01-23T09:11:37+00:00</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2011-10-21T19:56:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dce548fee8c930256b057313dd408a989326a519'/>
<id>dce548fee8c930256b057313dd408a989326a519</id>
<content type='text'>
An IOMMU group is a set of devices for which the IOMMU cannot
distinguish transactions.  For PCI devices, a group often occurs
when a PCI bridge is involved.  Transactions from any device
behind the bridge appear to be sourced from the bridge itself.
We leave it to the IOMMU driver to define the grouping restraints
for their platform.

Using this new interface, the group for a device can be retrieved
using the iommu_device_group() callback.  Users will compare the
value returned against the value returned for other devices to
determine whether they are part of the same group.  Devices with
no group are not translated by the IOMMU.  There should be no
expectations about the group numbers as they may be arbitrarily
assigned by the IOMMU driver and may not be persistent across boots.

We also provide a sysfs interface to the group numbers here so
that userspace can understand IOMMU dependencies between devices
for managing safe, userspace drivers.

[Some code changes by Joerg Roedel &lt;joerg.roedel@amd.com&gt;]

Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;

Conflicts:

	include/linux/iommu.h

Change-Id: I524607da569e42730bdc706759c49c4e0783555c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An IOMMU group is a set of devices for which the IOMMU cannot
distinguish transactions.  For PCI devices, a group often occurs
when a PCI bridge is involved.  Transactions from any device
behind the bridge appear to be sourced from the bridge itself.
We leave it to the IOMMU driver to define the grouping restraints
for their platform.

Using this new interface, the group for a device can be retrieved
using the iommu_device_group() callback.  Users will compare the
value returned against the value returned for other devices to
determine whether they are part of the same group.  Devices with
no group are not translated by the IOMMU.  There should be no
expectations about the group numbers as they may be arbitrarily
assigned by the IOMMU driver and may not be persistent across boots.

We also provide a sysfs interface to the group numbers here so
that userspace can understand IOMMU dependencies between devices
for managing safe, userspace drivers.

[Some code changes by Joerg Roedel &lt;joerg.roedel@amd.com&gt;]

Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;

Conflicts:

	include/linux/iommu.h

Change-Id: I524607da569e42730bdc706759c49c4e0783555c
</pre>
</div>
</content>
</entry>
<entry>
<title>iommu/core: split mapping to page sizes as supported by the hardware</title>
<updated>2012-01-23T09:11:36+00:00</updated>
<author>
<name>Ohad Ben-Cohen</name>
<email>ohad@wizery.com</email>
</author>
<published>2011-11-10T09:32:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f0235074c551b8ce5706cbbeb8913424f5be2cde'/>
<id>f0235074c551b8ce5706cbbeb8913424f5be2cde</id>
<content type='text'>
When mapping a memory region, split it to page sizes as supported
by the iommu hardware. Always prefer bigger pages, when possible,
in order to reduce the TLB pressure.

The logic to do that is now added to the IOMMU core, so neither the iommu
drivers themselves nor users of the IOMMU API have to duplicate it.

This allows a more lenient granularity of mappings; traditionally the
IOMMU API took 'order' (of a page) as a mapping size, and directly let
the low level iommu drivers handle the mapping, but now that the IOMMU
core can split arbitrary memory regions into pages, we can remove this
limitation, so users don't have to split those regions by themselves.

Currently the supported page sizes are advertised once and they then
remain static. That works well for OMAP and MSM but it would probably
not fly well with intel's hardware, where the page size capabilities
seem to have the potential to be different between several DMA
remapping devices.

register_iommu() currently sets a default pgsize behavior, so we can convert
the IOMMU drivers in subsequent patches. After all the drivers
are converted, the temporary default settings will be removed.

Mainline users of the IOMMU API (kvm and omap-iovmm) are adopted
to deal with bytes instead of page order.

Many thanks to Joerg Roedel &lt;Joerg.Roedel@amd.com&gt; for significant review!

Signed-off-by: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
Cc: David Brown &lt;davidb@codeaurora.org&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Joerg Roedel &lt;Joerg.Roedel@amd.com&gt;
Cc: Stepan Moskovchenko &lt;stepanm@codeaurora.org&gt;
Cc: KyongHo Cho &lt;pullip.cho@samsung.com&gt;
Cc: Hiroshi DOYU &lt;hdoyu@nvidia.com&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Cc: kvm@vger.kernel.org
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When mapping a memory region, split it to page sizes as supported
by the iommu hardware. Always prefer bigger pages, when possible,
in order to reduce the TLB pressure.

The logic to do that is now added to the IOMMU core, so neither the iommu
drivers themselves nor users of the IOMMU API have to duplicate it.

This allows a more lenient granularity of mappings; traditionally the
IOMMU API took 'order' (of a page) as a mapping size, and directly let
the low level iommu drivers handle the mapping, but now that the IOMMU
core can split arbitrary memory regions into pages, we can remove this
limitation, so users don't have to split those regions by themselves.

Currently the supported page sizes are advertised once and they then
remain static. That works well for OMAP and MSM but it would probably
not fly well with intel's hardware, where the page size capabilities
seem to have the potential to be different between several DMA
remapping devices.

register_iommu() currently sets a default pgsize behavior, so we can convert
the IOMMU drivers in subsequent patches. After all the drivers
are converted, the temporary default settings will be removed.

Mainline users of the IOMMU API (kvm and omap-iovmm) are adopted
to deal with bytes instead of page order.

Many thanks to Joerg Roedel &lt;Joerg.Roedel@amd.com&gt; for significant review!

Signed-off-by: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
Cc: David Brown &lt;davidb@codeaurora.org&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Joerg Roedel &lt;Joerg.Roedel@amd.com&gt;
Cc: Stepan Moskovchenko &lt;stepanm@codeaurora.org&gt;
Cc: KyongHo Cho &lt;pullip.cho@samsung.com&gt;
Cc: Hiroshi DOYU &lt;hdoyu@nvidia.com&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Cc: kvm@vger.kernel.org
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iommu/core: stop converting bytes to page order back and forth</title>
<updated>2012-01-23T09:11:36+00:00</updated>
<author>
<name>Ohad Ben-Cohen</name>
<email>ohad@wizery.com</email>
</author>
<published>2011-11-10T09:32:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b69cec764b7b6060f2375262c9e90c262e782e65'/>
<id>b69cec764b7b6060f2375262c9e90c262e782e65</id>
<content type='text'>
Express sizes in bytes rather than in page order, to eliminate the
size-&gt;order-&gt;size conversions we have whenever the IOMMU API is calling
the low level drivers' map/unmap methods.

Adopt all existing drivers.

Signed-off-by: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
Cc: David Brown &lt;davidb@codeaurora.org&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Joerg Roedel &lt;Joerg.Roedel@amd.com&gt;
Cc: Stepan Moskovchenko &lt;stepanm@codeaurora.org&gt;
Cc: KyongHo Cho &lt;pullip.cho@samsung.com&gt;
Cc: Hiroshi DOYU &lt;hdoyu@nvidia.com&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Express sizes in bytes rather than in page order, to eliminate the
size-&gt;order-&gt;size conversions we have whenever the IOMMU API is calling
the low level drivers' map/unmap methods.

Adopt all existing drivers.

Signed-off-by: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
Cc: David Brown &lt;davidb@codeaurora.org&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Joerg Roedel &lt;Joerg.Roedel@amd.com&gt;
Cc: Stepan Moskovchenko &lt;stepanm@codeaurora.org&gt;
Cc: KyongHo Cho &lt;pullip.cho@samsung.com&gt;
Cc: Hiroshi DOYU &lt;hdoyu@nvidia.com&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iommu/core: Remove global iommu_ops and register_iommu</title>
<updated>2012-01-23T09:11:36+00:00</updated>
<author>
<name>Joerg Roedel</name>
<email>joerg.roedel@amd.com</email>
</author>
<published>2011-09-06T16:58:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1bf55a7a38cb1e71e41a47f56f1b340fcd3ac672'/>
<id>1bf55a7a38cb1e71e41a47f56f1b340fcd3ac672</id>
<content type='text'>
With all IOMMU drivers being converted to bus_set_iommu the
global iommu_ops are no longer required. The same is true
for the deprecated register_iommu function.

Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With all IOMMU drivers being converted to bus_set_iommu the
global iommu_ops are no longer required. The same is true
for the deprecated register_iommu function.

Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iommu/core: Convert iommu_found to iommu_present</title>
<updated>2012-01-23T09:11:35+00:00</updated>
<author>
<name>Joerg Roedel</name>
<email>joerg.roedel@amd.com</email>
</author>
<published>2011-09-06T16:46:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ea24aff99a8e41f716eb4b0607747cc2a208788b'/>
<id>ea24aff99a8e41f716eb4b0607747cc2a208788b</id>
<content type='text'>
With per-bus iommu_ops the iommu_found function needs to
work on a bus_type too. This patch adds a bus_type parameter
to that function and converts all call-places.
The function is also renamed to iommu_present because the
function now checks if an iommu is present for a given bus
and does not check for a global iommu anymore.

Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With per-bus iommu_ops the iommu_found function needs to
work on a bus_type too. This patch adds a bus_type parameter
to that function and converts all call-places.
The function is also renamed to iommu_present because the
function now checks if an iommu is present for a given bus
and does not check for a global iommu anymore.

Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iommu/core: Add bus_type parameter to iommu_domain_alloc</title>
<updated>2012-01-23T09:11:35+00:00</updated>
<author>
<name>Joerg Roedel</name>
<email>joerg.roedel@amd.com</email>
</author>
<published>2011-09-06T14:03:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=78062e1936961716a272b3c30bf5db231300dffa'/>
<id>78062e1936961716a272b3c30bf5db231300dffa</id>
<content type='text'>
This is necessary to store a pointer to the bus-specific
iommu_ops in the iommu-domain structure. It will be used
later to call into bus-specific iommu-ops.

Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;

Conflicts:

	drivers/iommu/iommu.c

Change-Id: Iddbd561739552b663a4be293f1992314eb0f775a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is necessary to store a pointer to the bus-specific
iommu_ops in the iommu-domain structure. It will be used
later to call into bus-specific iommu-ops.

Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;

Conflicts:

	drivers/iommu/iommu.c

Change-Id: Iddbd561739552b663a4be293f1992314eb0f775a
</pre>
</div>
</content>
</entry>
<entry>
<title>Driver core: Add iommu_ops to bus_type</title>
<updated>2012-01-23T09:11:35+00:00</updated>
<author>
<name>Joerg Roedel</name>
<email>joerg.roedel@amd.com</email>
</author>
<published>2011-08-26T14:48:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d27fe92f870a09254674a6b6a4f32a7725238248'/>
<id>d27fe92f870a09254674a6b6a4f32a7725238248</id>
<content type='text'>
This is the starting point to make the iommu_ops used for
the iommu-api a per-bus-type structure. It is required to
easily implement bus-specific setup in the iommu-layer.
The first user will be the iommu-group attribute in sysfs.

Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the starting point to make the iommu_ops used for
the iommu-api a per-bus-type structure. It is required to
easily implement bus-specific setup in the iommu-layer.
The first user will be the iommu-group attribute in sysfs.

Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iommu/core: Define iommu_ops and register_iommu only with CONFIG_IOMMU_API</title>
<updated>2012-01-23T09:11:34+00:00</updated>
<author>
<name>Joerg Roedel</name>
<email>joerg.roedel@amd.com</email>
</author>
<published>2011-09-06T14:48:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6264ec29d5b6584b585ff04b816950784ec7e1f8'/>
<id>6264ec29d5b6584b585ff04b816950784ec7e1f8</id>
<content type='text'>
This makes it impossible to compile an iommu driver into the
kernel without selecting CONFIG_IOMMU_API.

Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes it impossible to compile an iommu driver into the
kernel without selecting CONFIG_IOMMU_API.

Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iommu/core: let drivers know if an iommu fault handler isn't installed</title>
<updated>2012-01-23T09:11:34+00:00</updated>
<author>
<name>Ohad Ben-Cohen</name>
<email>ohad@wizery.com</email>
</author>
<published>2011-09-27T11:36:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=683f4a129f0415ded14ae968740642f69c1f5b19'/>
<id>683f4a129f0415ded14ae968740642f69c1f5b19</id>
<content type='text'>
Make report_iommu_fault() return -ENOSYS whenever an iommu fault
handler isn't installed, so IOMMU drivers can then do their own
platform-specific default behavior if they wanted.

Fault handlers can still return -ENOSYS in case they want to elicit the
default behavior of the IOMMU drivers.

Signed-off-by: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make report_iommu_fault() return -ENOSYS whenever an iommu fault
handler isn't installed, so IOMMU drivers can then do their own
platform-specific default behavior if they wanted.

Fault handlers can still return -ENOSYS in case they want to elicit the
default behavior of the IOMMU drivers.

Signed-off-by: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
