1 Index: linux-2.6.23/arch/mips/mm/init.c
2 ===================================================================
3 --- linux-2.6.23.orig/arch/mips/mm/init.c 2007-10-09 22:31:38.000000000 +0200
4 +++ linux-2.6.23/arch/mips/mm/init.c 2007-10-13 02:57:18.483434538 +0200
8 vto = kmap_atomic(to, KM_USER1);
9 - if (cpu_has_dc_aliases && !Page_dcache_dirty(from)) {
10 + if (cpu_has_dc_aliases && cpu_use_kmap_coherent && !Page_dcache_dirty(from)) {
11 vfrom = kmap_coherent(from, vaddr);
12 copy_page(vto, vfrom);
15 struct page *page, unsigned long vaddr, void *dst, const void *src,
18 - if (cpu_has_dc_aliases) {
19 + if (cpu_has_dc_aliases && cpu_use_kmap_coherent) {
20 void *vto = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
21 memcpy(vto, src, len);
24 struct page *page, unsigned long vaddr, void *dst, const void *src,
27 - if (cpu_has_dc_aliases) {
28 + if (cpu_has_dc_aliases && cpu_use_kmap_coherent) {
30 kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
31 memcpy(dst, vfrom, len);
32 Index: linux-2.6.23/include/asm-mips/mach-bcm947xx/cpu-feature-overrides.h
33 ===================================================================
34 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
35 +++ linux-2.6.23/include/asm-mips/mach-bcm947xx/cpu-feature-overrides.h 2007-10-13 02:56:22.020216880 +0200
38 + * This file is subject to the terms and conditions of the GNU General Public
39 + * License. See the file "COPYING" in the main directory of this archive
42 + * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org)
44 +#ifndef __ASM_MACH_BCM947XX_CPU_FEATURE_OVERRIDES_H
45 +#define __ASM_MACH_BCM947XX_CPU_FEATURE_OVERRIDES_H
47 +#define cpu_use_kmap_coherent 0
49 +#endif /* __ASM_MACH_BCM947XX_CPU_FEATURE_OVERRIDES_H */
50 Index: linux-2.6.23/include/asm-mips/cpu-features.h
51 ===================================================================
52 --- linux-2.6.23.orig/include/asm-mips/cpu-features.h 2007-10-09 22:31:38.000000000 +0200
53 +++ linux-2.6.23/include/asm-mips/cpu-features.h 2007-10-13 02:56:22.028217337 +0200
55 #ifndef cpu_has_pindexed_dcache
56 #define cpu_has_pindexed_dcache (cpu_data[0].dcache.flags & MIPS_CACHE_PINDEX)
58 +#ifndef cpu_use_kmap_coherent
59 +#define cpu_use_kmap_coherent 1
63 * I-Cache snoops remote store. This only matters on SMP. Some multiprocessors