android_kernel_samsung_msm8976/arch/powerpc/platforms
Linas Vepstas 5d2efba64b [POWERPC] Use 4kB iommu pages even on 64kB-page systems
The 10Gigabit ethernet device drivers appear to be able to chew
up all 256MB of TCE mappings on pSeries systems, as evidenced by
numerous error messages:

 iommu_alloc failed, tbl c0000000010d5c48 vaddr c0000000d875eff0 npages 1

Some experimentation indicates that this is essentially because
one 1500 byte ethernet MTU gets mapped as a 64K DMA region when
the large 64K pages are enabled. Thus, it doesn't take much to
exhaust all of the available DMA mappings for a high-speed card.

This patch changes the iommu allocator to work with its own
unique, distinct page size. Although the patch is long, its
actually quite simple: it just #defines a distinct IOMMU_PAGE_SIZE
and then uses this in all the places that matter.

As a side effect, it also dramatically improves network performance
on platforms with H-calls on iommu translation inserts/removes (since
we no longer call it 16 times for a 1500 bytes packet when the iommu HW
is still 4k).

In the future, we might want to make the IOMMU_PAGE_SIZE a variable
in the iommu_table instance, thus allowing support for different HW
page sizes in the iommu itself.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Olof Johansson <olof@lixom.net>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-11-01 14:52:48 +11:00
..
4xx ppc: Various minor compile fixes 2005-10-11 22:08:12 +10:00
8xx powerpc: Merge enough to start building in arch/powerpc. 2005-09-26 16:04:21 +10:00
82xx [HEADERS] Put linux/config.h out of its misery. 2006-10-09 19:13:51 -04:00
83xx [POWERPC] Add Makefile entry for MPC832x_mds support 2006-10-16 15:53:30 +10:00
85xx [POWERPC] Fix up after irq changes 2006-10-07 22:08:26 +10:00
86xx [POWERPC] Fix up after irq changes 2006-10-07 22:08:26 +10:00
apus powerpc: Merge enough to start building in arch/powerpc. 2005-09-26 16:04:21 +10:00
cell [POWERPC] spufs: fix another off-by-one bug in spufs_mbox_read 2006-10-25 12:10:41 +10:00
chrp [POWERPC] Fix CHRP platforms with only 8259 2006-10-25 13:49:22 +10:00
embedded6xx [POWERPC] Fix up after irq changes 2006-10-07 22:08:26 +10:00
iseries [POWERPC] Use 4kB iommu pages even on 64kB-page systems 2006-11-01 14:52:48 +11:00
maple [POWERPC] Fix Maple secondary IDE interrupt 2006-10-10 11:54:26 +10:00
pasemi [PATCH] trivial iomem annotations (arch/powerpc/platfroms/parsemi/pci.c) 2006-10-09 14:19:08 -07:00
powermac [POWERPC] Fix build breakage with CONFIG_PPC32 2006-10-23 18:23:17 +10:00
prep powerpc: Merge enough to start building in arch/powerpc. 2005-09-26 16:04:21 +10:00
pseries [POWERPC] Use 4kB iommu pages even on 64kB-page systems 2006-11-01 14:52:48 +11:00
Makefile [POWERPC] powerpc: PA Semi PWRficient platform support 2006-09-13 18:39:53 +10:00