1 --- a/arch/mips/mm/init.c
2 +++ b/arch/mips/mm/init.c
6 vto = kmap_atomic(to, KM_USER1);
7 - if (cpu_has_dc_aliases && !Page_dcache_dirty(from)) {
8 + if (cpu_has_dc_aliases && cpu_use_kmap_coherent && !Page_dcache_dirty(from)) {
9 vfrom = kmap_coherent(from, vaddr);
10 copy_page(vto, vfrom);
13 struct page *page, unsigned long vaddr, void *dst, const void *src,
16 - if (cpu_has_dc_aliases) {
17 + if (cpu_has_dc_aliases && cpu_use_kmap_coherent) {
18 void *vto = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
19 memcpy(vto, src, len);
22 struct page *page, unsigned long vaddr, void *dst, const void *src,
25 - if (cpu_has_dc_aliases) {
26 + if (cpu_has_dc_aliases && cpu_use_kmap_coherent) {
28 kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
29 memcpy(dst, vfrom, len);
31 +++ b/include/asm-mips/mach-bcm947xx/cpu-feature-overrides.h
34 + * This file is subject to the terms and conditions of the GNU General Public
35 + * License. See the file "COPYING" in the main directory of this archive
38 + * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org)
40 +#ifndef __ASM_MACH_BCM947XX_CPU_FEATURE_OVERRIDES_H
41 +#define __ASM_MACH_BCM947XX_CPU_FEATURE_OVERRIDES_H
43 +#define cpu_use_kmap_coherent 0
45 +#endif /* __ASM_MACH_BCM947XX_CPU_FEATURE_OVERRIDES_H */
46 --- a/include/asm-mips/cpu-features.h
47 +++ b/include/asm-mips/cpu-features.h
49 #ifndef cpu_has_pindexed_dcache
50 #define cpu_has_pindexed_dcache (cpu_data[0].dcache.flags & MIPS_CACHE_PINDEX)
52 +#ifndef cpu_use_kmap_coherent
53 +#define cpu_use_kmap_coherent 1
57 * I-Cache snoops remote store. This only matters on SMP. Some multiprocessors