diff options
author | Paul Mackerras <paulus@samba.org> | 2007-09-13 11:24:25 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-09-13 11:24:25 -0400 |
commit | b2315372eac9cd9f622c32a93e323cf6f0f03462 (patch) | |
tree | 9e1faa7cdcddf5d90bec4fb9523742d4cce699a1 /arch/mips/mm | |
parent | 5326152fa182b0a16e4abf913ce403e3c7ab53b7 (diff) | |
parent | c87ce65868bbf9bbea9c3f112ff8315302daf8f2 (diff) |
Merge branch 'linux-2.6' into for-2.6.24
Diffstat (limited to 'arch/mips/mm')
-rw-r--r-- | arch/mips/mm/dma-default.c | 2 | ||||
-rw-r--r-- | arch/mips/mm/init.c | 5 | ||||
-rw-r--r-- | arch/mips/mm/tlbex.c | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index 76903c727647..f60b3dc0fc62 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c | |||
@@ -35,7 +35,7 @@ static inline unsigned long dma_addr_to_virt(dma_addr_t dma_addr) | |||
35 | static inline int cpu_is_noncoherent_r10000(struct device *dev) | 35 | static inline int cpu_is_noncoherent_r10000(struct device *dev) |
36 | { | 36 | { |
37 | return !plat_device_is_coherent(dev) && | 37 | return !plat_device_is_coherent(dev) && |
38 | (current_cpu_data.cputype == CPU_R10000 && | 38 | (current_cpu_data.cputype == CPU_R10000 || |
39 | current_cpu_data.cputype == CPU_R12000); | 39 | current_cpu_data.cputype == CPU_R12000); |
40 | } | 40 | } |
41 | 41 | ||
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 09d91505b90c..5240432e6d1d 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com | 8 | * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com |
9 | * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. | 9 | * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. |
10 | */ | 10 | */ |
11 | #include <linux/bug.h> | ||
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/signal.h> | 14 | #include <linux/signal.h> |
@@ -132,6 +133,8 @@ void *kmap_coherent(struct page *page, unsigned long addr) | |||
132 | pte_t pte; | 133 | pte_t pte; |
133 | int tlbidx; | 134 | int tlbidx; |
134 | 135 | ||
136 | BUG_ON(Page_dcache_dirty(page)); | ||
137 | |||
135 | inc_preempt_count(); | 138 | inc_preempt_count(); |
136 | idx = (addr >> PAGE_SHIFT) & (FIX_N_COLOURS - 1); | 139 | idx = (addr >> PAGE_SHIFT) & (FIX_N_COLOURS - 1); |
137 | #ifdef CONFIG_MIPS_MT_SMTC | 140 | #ifdef CONFIG_MIPS_MT_SMTC |
@@ -208,7 +211,7 @@ void copy_user_highpage(struct page *to, struct page *from, | |||
208 | void *vfrom, *vto; | 211 | void *vfrom, *vto; |
209 | 212 | ||
210 | vto = kmap_atomic(to, KM_USER1); | 213 | vto = kmap_atomic(to, KM_USER1); |
211 | if (cpu_has_dc_aliases) { | 214 | if (cpu_has_dc_aliases && !Page_dcache_dirty(from)) { |
212 | vfrom = kmap_coherent(from, vaddr); | 215 | vfrom = kmap_coherent(from, vaddr); |
213 | copy_page(vto, vfrom); | 216 | copy_page(vto, vfrom); |
214 | kunmap_coherent(); | 217 | kunmap_coherent(); |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 4ec0964b8394..9cb39644b6f1 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -78,7 +78,7 @@ enum fields | |||
78 | SET = 0x200 | 78 | SET = 0x200 |
79 | }; | 79 | }; |
80 | 80 | ||
81 | #define OP_MASK 0x2f | 81 | #define OP_MASK 0x3f |
82 | #define OP_SH 26 | 82 | #define OP_SH 26 |
83 | #define RS_MASK 0x1f | 83 | #define RS_MASK 0x1f |
84 | #define RS_SH 21 | 84 | #define RS_SH 21 |
@@ -92,7 +92,7 @@ enum fields | |||
92 | #define IMM_SH 0 | 92 | #define IMM_SH 0 |
93 | #define JIMM_MASK 0x3ffffff | 93 | #define JIMM_MASK 0x3ffffff |
94 | #define JIMM_SH 0 | 94 | #define JIMM_SH 0 |
95 | #define FUNC_MASK 0x2f | 95 | #define FUNC_MASK 0x3f |
96 | #define FUNC_SH 0 | 96 | #define FUNC_SH 0 |
97 | #define SET_MASK 0x7 | 97 | #define SET_MASK 0x7 |
98 | #define SET_SH 0 | 98 | #define SET_SH 0 |