<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/kernel/iommu.c, branch linux-3.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-11-15T02:01:04Z</updated>
<entry>
<title>powerpc/iommu: Use bitmap library</title>
<updated>2012-11-15T02:01:04Z</updated>
<author>
<name>Akinobu Mita</name>
</author>
<published>2012-11-04T02:03:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c5a0809a24c19fcefea5f3aeb07bde9a2dee5d80'/>
<id>urn:sha1:c5a0809a24c19fcefea5f3aeb07bde9a2dee5d80</id>
<content type='text'>
- Caluculate the bitmap size with BITS_TO_LONGS()
 - Use bitmap_empty() to verify that all bits are cleared

This also includes a printk to pr_warn() conversion.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/iommu: Fix multiple issues with IOMMU pools code</title>
<updated>2012-10-04T08:03:20Z</updated>
<author>
<name>Anton Blanchard</name>
</author>
<published>2012-10-03T18:57:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d900bd7366463fd96a907b2c212242e2b68b27d8'/>
<id>urn:sha1:d900bd7366463fd96a907b2c212242e2b68b27d8</id>
<content type='text'>
There are a number of issues in the recent IOMMU pools code:

- On a preempt kernel we might switch CPUs in the middle of building
  a scatter gather list. When this happens the handle hint passed in
  no longer falls within the local CPU's pool. Check for this and
  fall back to the pool hint.

- We were missing a spin_unlock/spin_lock in one spot where we
  switch pools.

- We need to provide locking around dart_tlb_invalidate_all and
  dart_tlb_invalidate_one now that the global lock is gone.

Reported-by: Alexander Graf &lt;agraf@suse.de&gt;
Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
CC: &lt;stable@kernel.org&gt; [v3.6]
</content>
</entry>
<entry>
<title>powerpc/iommu: Fix iommu pool initialization</title>
<updated>2012-07-13T07:45:49Z</updated>
<author>
<name>Benjamin Herrenschmidt</name>
</author>
<published>2012-07-13T07:45:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dcd261ba58d7a49f4624b34b3bd2d535f63643a2'/>
<id>urn:sha1:dcd261ba58d7a49f4624b34b3bd2d535f63643a2</id>
<content type='text'>
The iommu pool patch has a bug where it would cause a crash when using
only one pool (based on the size of the DMA window).

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: IOMMU fault injection</title>
<updated>2012-07-10T09:18:59Z</updated>
<author>
<name>Anton Blanchard</name>
</author>
<published>2012-06-24T18:26:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d6b9a81b2a45786384f5bd3516bd6ddfb4b772c6'/>
<id>urn:sha1:d6b9a81b2a45786384f5bd3516bd6ddfb4b772c6</id>
<content type='text'>
Add the ability to inject IOMMU faults. We enable this per device
via a fail_iommu sysfs property, similar to fault injection on other
subsystems.

An example:

...
0003:01:00.1 Ethernet controller: Emulex Corporation OneConnect 10Gb NIC (be3) (rev 02)

To inject one error to this device:

echo 1 &gt; /sys/bus/pci/devices/0003:01:00.1/fail_iommu
echo 1 &gt; /sys/kernel/debug/fail_iommu/probability
echo 1 &gt; /sys/kernel/debug/fail_iommu/times

As feared, the first failure injected on the be3 results in an
unrecoverable error, taking down both functions of the card
permanently:

be2net 0003:01:00.1: Unrecoverable error in the card

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/iommu: Implement IOMMU pools to improve multiqueue adapter performance</title>
<updated>2012-07-03T04:14:48Z</updated>
<author>
<name>Anton Blanchard</name>
</author>
<published>2012-06-07T18:14:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b4c3a8729ae57b4f84d661e16a192f828eca1d03'/>
<id>urn:sha1:b4c3a8729ae57b4f84d661e16a192f828eca1d03</id>
<content type='text'>
At the moment all queues in a multiqueue adapter will serialise
against the IOMMU table lock. This is proving to be a big issue,
especially with 10Gbit ethernet.

This patch creates 4 pools and tries to spread the load across
them. If the table is under 1GB in size we revert back to the
original behaviour of 1 pool and 1 largealloc pool.

We create a hash to map CPUs to pools. Since we prefer interrupts to
be affinitised to primary CPUs, without some form of hashing we are
very likely to end up using the same pool. As an example, POWER7
has 4 way SMT and with 4 pools all primary threads will map to the
same pool.

The largealloc pool is reduced from 1/2 to 1/4 of the space to
partially offset the overhead of breaking the table up into pools.

Some performance numbers were obtained with a Chelsio T3 adapter on
two POWER7 boxes, running a 100 session TCP round robin test.

Performance improved 69% with this patch applied.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/iommu: Push spinlock into iommu_range_alloc and __iommu_free</title>
<updated>2012-07-03T04:14:47Z</updated>
<author>
<name>Anton Blanchard</name>
</author>
<published>2012-06-03T19:44:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d362213722c8875b40d712796392682968ce685e'/>
<id>urn:sha1:d362213722c8875b40d712796392682968ce685e</id>
<content type='text'>
In preparation for IOMMU pools, push the spinlock into
iommu_range_alloc and __iommu_free.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/iommu: Reduce spinlock coverage in iommu_free</title>
<updated>2012-07-03T04:14:47Z</updated>
<author>
<name>Anton Blanchard</name>
</author>
<published>2012-06-03T19:43:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=67ca141567519a6b0ec81850a7b6569b6d8c2b52'/>
<id>urn:sha1:67ca141567519a6b0ec81850a7b6569b6d8c2b52</id>
<content type='text'>
This patch moves tce_free outside of the lock in iommu_free.

Some performance numbers were obtained with a Chelsio T3 adapter on
two POWER7 boxes, running a 100 session TCP round robin test.

Performance improved 25% with this patch applied.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/iommu: Reduce spinlock coverage in iommu_alloc and iommu_free</title>
<updated>2012-07-03T04:14:47Z</updated>
<author>
<name>Anton Blanchard</name>
</author>
<published>2012-06-03T19:43:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0e4bc95d87394364f408627067238453830bdbf3'/>
<id>urn:sha1:0e4bc95d87394364f408627067238453830bdbf3</id>
<content type='text'>
We currently hold the IOMMU spinlock around tce_build and tce_flush.
This causes our spinlock hold times to be much higher than required
and can impact multiqueue adapters.

This patch moves tce_build and tce_flush outside of the lock in
iommu_alloc, and tce_flush outside of the lock in iommu_free.

Some performance numbers were obtained with a Chelsio T3 adapter on
two POWER7 boxes, running a 100 session TCP round robin test.

Performance improved 32% with this patch applied.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>fadump: Register for firmware assisted dump.</title>
<updated>2012-02-22T23:50:01Z</updated>
<author>
<name>Mahesh Salgaonkar</name>
</author>
<published>2012-02-20T02:15:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ccc00a7e04ff7718c9aebb4b0c982571c798759'/>
<id>urn:sha1:3ccc00a7e04ff7718c9aebb4b0c982571c798759</id>
<content type='text'>
On 2012-02-20 11:02:51 Mon, Paul Mackerras wrote:
&gt; On Thu, Feb 16, 2012 at 04:44:30PM +0530, Mahesh J Salgaonkar wrote:
&gt;
&gt; If I have read the code correctly, we are going to get this printk on
&gt; non-pSeries machines or on older pSeries machines, even if the user
&gt; has not put the fadump=on option on the kernel command line.  The
&gt; printk will be annoying since there is no actual error condition.  It
&gt; seems to me that the condition for the printk should include
&gt; fw_dump.fadump_enabled.  In other words you should probably add
&gt;
&gt; 	if (!fw_dump.fadump_enabled)
&gt; 		return 0;
&gt;
&gt; at the beginning of the function.

Hi Paul,

Thanks for pointing it out. Please find the updated patch below.

The existing patches above this (4/10 through 10/10) cleanly applies
on this update.

Thanks,
-Mahesh.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Reserve iommu page 0</title>
<updated>2011-09-23T00:27:03Z</updated>
<author>
<name>Thadeu Lima de Souza Cascardo</name>
</author>
<published>2011-09-20T03:07:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d12b524f8b2f4e45cabe8bc1501e8b967d543111'/>
<id>urn:sha1:d12b524f8b2f4e45cabe8bc1501e8b967d543111</id>
<content type='text'>
Some devices have a dma-window that starts at the address 0. This allows
DMA addresses to be mapped to this address and returned to drivers as a
valid DMA address. Some drivers may not behave well in this case, since
the address 0 is considered an error or not allocated.

The solution to avoid this kind of error from happening is reserve the
page addressed as 0 so it cannot be allocated for a DMA mapping.

Signed-off-by: Thadeu Lima de Souza Cascardo &lt;cascardo@linux.vnet.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
</feed>
