android_kernel_xiaomi_sm8350/arch/powerpc/sysdev
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
..
qe_lib [POWERPC] Fix the UCC rx/tx clock of QE 2006-10-25 13:49:22 +10:00
cpm2_common.c POWERPC: overhaul with cpm2_map mechanism 2006-09-21 22:38:05 +04:00
cpm2_pic.c [POWERPC] Fix up after irq changes 2006-10-07 22:08:26 +10:00
cpm2_pic.h [POWERPC] Fix up after irq changes 2006-10-07 22:08:26 +10:00
dart_iommu.c [POWERPC] Use 4kB iommu pages even on 64kB-page systems 2006-11-01 14:52:48 +11:00
dart.h [POWERPC] Use 4kB iommu pages even on 64kB-page systems 2006-11-01 14:52:48 +11:00
dcr.S
fsl_soc.c [POWERPC] Fix fsl_soc build breaks 2006-10-07 10:10:13 +10:00
fsl_soc.h Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/vitb/linux-2.6-PQ 2006-09-28 07:18:28 +10:00
grackle.c
i8259.c [POWERPC] Fix CHRP platforms with only 8259 2006-10-25 13:49:22 +10:00
indirect_pci.c
ipic.c [POWERPC] IPIC: Fix spinlock recursion in set_irq_handler 2006-10-25 13:49:22 +10:00
ipic.h [POWERPC] Adapt ipic driver to new host_ops interface, add set_irq_type to set IRQ sense 2006-08-30 10:34:33 +10:00
Makefile [POWERPC] Add QUICC Engine (QE) infrastructure 2006-10-04 15:24:27 +10:00
mmio_nvram.c [POWERPC] Constify & voidify get_property() 2006-07-31 15:55:04 +10:00
mpic.c [POWERPC] Fix up after irq changes 2006-10-07 22:08:26 +10:00
todc.c [POWERPC] todc: add support for Time-Of-Day-Clock 2006-06-29 16:22:46 +10:00
tsi108_dev.c [POWERPC] Fix compiler warning message on get_property call 2006-10-23 18:20:12 +10:00
tsi108_pci.c [POWERPC] Fix up after irq changes 2006-10-07 22:08:26 +10:00