kernel-fxtec-pro1x/arch/mips/powertv
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
..
asic MIPS: PowerTV: Use O(1) algorthm for phys_to_dma/dma_to_phys 2010-08-05 13:25:40 +01:00
pci
init.c MIPS: Malta, PowerTV: Remove unnecessary "Linux started" 2010-01-12 18:19:36 +01:00
init.h MIPS: PowerTV: simplify prom_init_cmdline() and merge into prom_init() 2010-01-12 18:19:33 +01:00
ioremap.c MIPS: PowerTV: Use O(1) algorthm for phys_to_dma/dma_to_phys 2010-08-05 13:25:40 +01:00
Kconfig
Makefile MIPS: PowerTV: Use O(1) algorthm for phys_to_dma/dma_to_phys 2010-08-05 13:25:40 +01:00
memory.c MIPS: PowerTV: Use O(1) algorthm for phys_to_dma/dma_to_phys 2010-08-05 13:25:40 +01:00
powertv-clock.h
powertv_setup.c MIPS: PowerTV: Eliminate duplicate opcode definition macros 2010-02-27 12:53:41 +01:00
reset.c MIPS: PowerTV: Remove mips_machine_halt() 2010-01-12 18:19:32 +01:00
reset.h
time.c MIPS: PowerTV: Remove extra r4k_clockevent_init() call 2010-01-12 18:19:35 +01:00