linux-stable/arch/mips/mm
Alex Smith 8c172467be MIPS: Add implementation of dma_map_ops.mmap()
The generic implementation of dma_map_ops.mmap(), dma_common_mmap(),
is not correct for non-coherent devices. It expects to be passed a
virtual address previously returned by dma_alloc_coherent(), which for
a non-coherent device will return a KSEG1 address. It then attempts to
convert that virtual address to a physical address using virt_to_page()
which will yield an incorrect address.

Also, dma_common_mmap() does not handle the DMA_ATTR_WRITE_COMBINE
attribute, and therefore dma_mmap_writecombine() will not actually set
the appropriate pgprot_t flags for write combining.

This patch adds an implementation of dma_map_ops.mmap() that correctly
handles KSEG1 addresses, and enables write combining when requested.

Signed-off-by: Alex Smith <alex.smith@imgtec.com>
Cc: Sadegh Abbasi <Sadegh.Abbasi@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10808/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2015-09-03 12:08:01 +02:00
..
c-octeon.c MIPS: Call find_vma with the mmap_sem held 2014-06-03 22:19:09 +02:00
c-r3k.c mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
c-r4k.c MIPS: Add cases for CPU_I6400 2015-08-26 15:23:03 +02:00
c-tx39.c MIPS: tlb-r3k: Move CP0.Wired register initialisation to `tlb_init' 2015-06-21 21:52:41 +02:00
cache.c MIPS: Partially disable RIXI support. 2015-08-03 09:25:11 +02:00
cerr-sb1.c
cex-gen.S
cex-oct.S
cex-sb1.S mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
dma-default.c MIPS: Add implementation of dma_map_ops.mmap() 2015-09-03 12:08:01 +02:00
extable.c
fault.c MIPS: Handle page faults of executable but unreadable pages correctly. 2015-08-03 09:25:08 +02:00
gup.c mm: gup: use get_user_pages_unlocked within get_user_pages_fast 2015-02-11 17:06:05 -08:00
highmem.c sched/preempt, mm/kmap: Explicitly disable/enable preemption in kmap_atomic_* 2015-05-19 08:39:14 +02:00
hugetlbpage.c mm/hugetlb: reduce arch dependent code about huge_pmd_unshare 2015-06-24 17:49:41 -07:00
init.c MIPS: mm: default platform_maar_init using bootmem data 2015-09-03 12:07:40 +02:00
ioremap.c MIPS: Replace use of phys_t with phys_addr_t. 2014-11-24 22:47:31 +01:00
Makefile MIPS: mm: Only build one microassembler that is suitable 2014-11-24 07:45:36 +01:00
mmap.c mm: expose arch_mmap_rnd when available 2015-04-14 16:49:05 -07:00
page-funcs.S
page.c MIPS: Add R16000 detection 2015-04-01 17:22:13 +02:00
pgtable-32.c
pgtable-64.c
sc-ip22.c
sc-mips.c MIPS: Add platform callback before initializing the L2 cache 2015-08-26 15:23:11 +02:00
sc-r5k.c MIPS: Remove useless parentheses 2014-11-24 07:44:49 +01:00
sc-rm7k.c mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
tlb-funcs.S MIPS: mm: Fix broken microMIPS kernel regression. 2014-05-14 18:11:06 +02:00
tlb-r3k.c MIPS: Refactor dumping of TLB registers for r3k/r4k 2015-09-03 12:07:45 +02:00
tlb-r4k.c MIPS: BCM77xx: Remove legacy __cpuinit{,data} sections that crept in 2015-06-21 21:53:42 +02:00
tlb-r8k.c mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
tlbex-fault.S
tlbex.c MIPS: tlbex: Avoid unnecessary _PAGE_PRESENT shifts 2015-06-21 21:53:55 +02:00
uasm-micromips.c MIPS: mm: Remove dead macro definitions 2015-02-20 23:42:00 +01:00
uasm-mips.c MIPS: mm: Remove dead macro definitions 2015-02-20 23:42:00 +01:00
uasm.c MIPS: OCTEON: Implement DCache errata workaround for all CN6XXX 2015-02-20 15:31:27 +01:00