linux-stable/arch/mips/mm
Christoph Hellwig 6894258eda dma-mapping: consolidate dma_{alloc,free}_{attrs,coherent}
Since 2009 we have a nice asm-generic header implementing lots of DMA API
functions for architectures using struct dma_map_ops, but unfortunately
it's still missing a lot of APIs that all architectures still have to
duplicate.

This series consolidates the remaining functions, although we still need
arch opt outs for two of them as a few architectures have very
non-standard implementations.

This patch (of 5):

The coherent DMA allocator works the same over all architectures supporting
dma_map operations.

This patch consolidates them and converges the minor differences:

 - the debug_dma helpers are now called from all architectures, including
   those that were previously missing them
 - dma_alloc_from_coherent and dma_release_from_coherent are now always
   called from the generic alloc/free routines instead of the ops
   dma-mapping-common.h always includes dma-coherent.h to get the defintions
   for them, or the stubs if the architecture doesn't support this feature
 - checks for ->alloc / ->free presence are removed.  There is only one
   magic instead of dma_map_ops without them (mic_dma_ops) and that one
   is x86 only anyway.

Besides that only x86 needs special treatment to replace a default devices
if none is passed and tweak the gfp_flags.  An optional arch hook is provided
for that.

[linux@roeck-us.net: fix build]
[jcmvbkbc@gmail.com: fix xtensa]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Chris Metcalf <cmetcalf@ezchip.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-09-10 13:29:01 -07: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 MIPS: Sibyte: Fix build for SIBYTE_BW_TRACE on BCM1x55 and BCM1x80. 2013-06-21 18:07:02 +02:00
cex-gen.S MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
cex-oct.S MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
cex-sb1.S mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
dma-default.c dma-mapping: consolidate dma_{alloc,free}_{attrs,coherent} 2015-09-10 13:29:01 -07:00
extable.c
fault.c MIPS: Set trap_no field in thread_struct on exception. 2015-09-03 12:08:04 +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 MIPS: Refactor 'clear_page' and 'copy_page' functions. 2012-07-19 11:23:43 +02:00
page.c MIPS: Add R16000 detection 2015-04-01 17:22:13 +02:00
pgtable-32.c MIPS: Limit fixrange_init() to the FIXMAP region 2011-07-25 17:26:54 +01:00
pgtable-64.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
sc-ip22.c MIPS: Delete __cpuinit/__CPUINIT usage from MIPS code 2013-07-14 19:36:51 -04:00
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 MIPS: Don't include <asm/page.h> unnecessarily. 2012-12-28 17:04:04 +01:00
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