linux/arch/mips
David VomLehn ca36c36b78 MIPS: PowerTV: Use O(1) algorthm for phys_to_dma/dma_to_phys
Replace phys_to_dma()/dma_to_phys() looping algorithm with an O(1) algorithm
The approach taken is inspired by the sparse memory implementation: take a
certain number of high-order bits off the address them, use this as an
index into a table containing an offset to the desired address and add
it to the original value. There is a table for mapping physical addresses
to DMA addresses and another one for the reverse mapping. The table sizes
depend on how fine-grained the mappings need to be; Coarser granularity
less to smaller tables.  On a processor with 32-bit physical and DMA
addresses, with 4 MIB granularity, memory usage is two 2048-byte arrays.
Each 32-byte cache line thus covers 64 MiB of address space.

Also, renames phys_to_bus() to phys_to_dma() and bus_to_phys() to
dma_to_phys() to align with kernel usage.

[Ralf: Fixed silly build breakage due to stackoverflow warning caused by
huge array on stack.]

Signed-off-by: David VomLehn <dvomlehn@cisco.com>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1257/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-08-05 13:25:40 +01:00
..
alchemy MIPS: MTX1: Fix build. 2010-08-05 13:25:40 +01:00
ar7 MIPS: AR7: Use correct UART port type 2010-07-05 17:17:17 +01:00
bcm47xx MIPS: BCM47xx: Really fix 128MB RAM problem 2010-08-05 13:25:39 +01:00
bcm63xx MIPS: BCM63xx: Prevent second enet registration on BCM6338 2010-07-26 19:08:18 +01:00
boot
cavium-octeon MIPS: Octeon: Workaround link failures with gcc-4.4.x 32-bits toolchains 2010-08-05 13:25:39 +01:00
cobalt
configs MIPS: MTX-1: Update defconfig 2010-05-21 21:31:21 +01:00
dec
emma
fw
gt64120/wrppmc
include/asm MIPS: PowerTV: Use O(1) algorthm for phys_to_dma/dma_to_phys 2010-08-05 13:25:40 +01:00
jazz MIPS: Fixup screen_info struct initializations 2010-04-30 20:52:42 +01:00
kernel MIPS: N32: Fix syscall number comments. 2010-08-05 13:25:39 +01:00
lasat Merge branch 'for-35' of git://repo.or.cz/linux-kbuild 2010-06-01 08:55:52 -07:00
lib MIPS: libgcc.h: Checkpatch cleanup 2010-04-12 17:26:15 +01:00
loongson MIPS: Loongson: Define rtc device on MC146818-equipped systems 2010-07-05 17:17:32 +01:00
math-emu MIPS: Restore signalling NaN behaviour for abs.[sd] 2010-07-05 17:17:24 +01:00
mipssim include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
mm MIPS: Check for accesses beyond the end of the PGD. 2010-04-30 20:52:48 +01:00
mti-malta MIPS: Set io_map_base for several PCI bridges lacking it 2010-07-26 19:08:19 +01:00
nxp MIPS: Set io_map_base for several PCI bridges lacking it 2010-07-26 19:08:19 +01:00
oprofile MIPS: Oprofile: Fixup of loongson2_exit() 2010-07-05 17:17:31 +01:00
pci MIPS: Set io_map_base for several PCI bridges lacking it 2010-07-26 19:08:19 +01:00
pmc-sierra include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
power
powertv MIPS: PowerTV: Use O(1) algorthm for phys_to_dma/dma_to_phys 2010-08-05 13:25:40 +01:00
rb532 include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sgi-ip22 MIPS: die() does not call die notifier chain 2010-04-30 20:52:45 +01:00
sgi-ip27 include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sgi-ip32 include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sibyte Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2010-05-20 21:04:44 -07:00
sni
txx9 sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
vr41xx
Kconfig MIPS: BCM47xx: Activate SSB_B43_PCI_BRIDGE by default 2010-08-05 13:25:40 +01:00
Kconfig.debug
Makefile MIPS: Loongson 2F: Enable fixups of the latest binutils 2010-04-30 20:52:56 +01:00