android_kernel_xiaomi_sm8350/arch/powerpc/platforms/iseries
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
..
call_hpt.h
call_pci.h
call_sm.h
dt.c Merge branch 'mpe' 2006-07-14 17:27:26 +10:00
htab.c
hvcall.S
hvlog.c
hvlpconfig.c
iommu.c [POWERPC] Use 4kB iommu pages even on 64kB-page systems 2006-11-01 14:52:48 +11:00
ipl_parms.h
irq.c [POWERPC] Fix up after irq changes 2006-10-07 22:08:26 +10:00
irq.h [POWERPC] Fix up after irq changes 2006-10-07 22:08:26 +10:00
it_exp_vpd_panel.h
it_lp_naca.h
Kconfig [POWERPC] iseries: A new iSeries console 2006-07-13 18:51:22 +10:00
ksyms.c
lpardata.c
lpevents.c [POWERPC] Fix up after irq changes 2006-10-07 22:08:26 +10:00
main_store.h [POWERPC] iseries: remove some gcc 4.1 warnings 2006-08-25 13:27:35 +10:00
Makefile
mf.c [POWERPC] Fix up after irq changes 2006-10-07 22:08:26 +10:00
misc.S
naca.h
pci.c [POWERPC] iSeries does not need pcibios_fixup_resources 2006-10-03 16:50:11 +10:00
pci.h
proc.c
processor_vpd.h
release_data.h
setup.c [POWERPC] Consolidate feature fixup code 2006-10-25 11:42:10 +10:00
setup.h
smp.c [POWERPC] Fix iseries/smp.c for irq breakage 2006-10-07 10:10:30 +10:00
smp.h [POWERPC] Fix iseries/smp.c for irq breakage 2006-10-07 10:10:30 +10:00
spcomm_area.h
viopath.c [POWERPC] Fix up after irq changes 2006-10-07 22:08:26 +10:00
vpd_areas.h
vpdinfo.c [POWERPC] iseries: Fix a compiler warning in platforms/iseries/vpdinfo.c 2006-07-13 18:43:12 +10:00