android_kernel_xiaomi_sm8350/arch/powerpc/platforms/pseries
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
..
eeh_cache.c [POWERPC] EEH: balance pcidev_get/put calls 2006-09-21 22:59:08 +10:00
eeh_driver.c [POWERPC] EEH: support MMIO enable recovery step 2006-09-21 22:59:20 +10:00
eeh_event.c [POWERPC] pseries: Constify & voidify get_property() 2006-07-31 15:55:04 +10:00
eeh.c [POWERPC] EEH failure to mark pci slot as frozen. 2006-09-26 15:41:03 +10:00
firmware.c [POWERPC] pseries: Constify & voidify get_property() 2006-07-31 15:55:04 +10:00
firmware.h [PATCH] powerpc: Move pSeries firmware feature setup into platforms/pseries 2006-02-10 16:52:03 +11:00
hvCall_inst.c [PATCH] inode_diet: Replace inode.u.generic_ip with inode.i_private 2006-09-27 08:26:17 -07:00
hvCall.S [POWERPC] powerpc: Instrument Hypervisor Calls 2006-09-13 18:39:53 +10:00
hvconsole.c [POWERPC] clean up pseries hcall interfaces 2006-08-01 16:19:15 +10:00
hvcserver.c [PATCH] powerpc/pseries: Change H_StudlyCaps to H_SHOUTING_CAPS 2006-04-01 22:36:57 +11:00
iommu.c [POWERPC] Use 4kB iommu pages even on 64kB-page systems 2006-11-01 14:52:48 +11:00
Kconfig powerpc: Disallow lparcfg being a module 2006-03-14 11:35:37 +11:00
lpar.c [POWERPC] Implement SLB shadow buffer 2006-08-08 17:08:56 +10:00
Makefile [POWERPC] powerpc: Instrument Hypervisor Calls 2006-09-13 18:39:53 +10:00
nvram.c [POWERPC] pseries: Constify & voidify get_property() 2006-07-31 15:55:04 +10:00
pci_dlpar.c [PATCH] powerpc: Kill _machine and hard-coded platform numbers 2006-03-28 23:15:54 +11:00
pci.c [POWERPC] pseries: Constify & voidify get_property() 2006-07-31 15:55:04 +10:00
plpar_wrappers.h [POWERPC] Implement SLB shadow buffer 2006-08-08 17:08:56 +10:00
ras.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
ras.h [PATCH] cell: enable pause(0) in cpu_idle 2006-01-09 15:44:32 +11:00
reconfig.c Merge ../linux-2.6 2006-03-29 13:24:50 +11:00
rtasd.c [POWERPC] pseries: Constify & voidify get_property() 2006-07-31 15:55:04 +10:00
scanlog.c [POWERPC] RTAS delay, fix module build breaks 2006-06-21 15:01:27 +10:00
setup.c [POWERPC] Fix up after irq changes 2006-10-07 22:08:26 +10:00
smp.c [POWERPC] Cleanup CPU inits 2006-08-25 13:27:35 +10:00
xics.c [POWERPC] Fix up after irq changes 2006-10-07 22:08:26 +10:00
xics.h IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00