diff options
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/fixmap.h | 4 | ||||
-rw-r--r-- | arch/mips/mm/init.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/arch/mips/include/asm/fixmap.h b/arch/mips/include/asm/fixmap.h index efeddc8db8b1..0b89b83e2055 100644 --- a/arch/mips/include/asm/fixmap.h +++ b/arch/mips/include/asm/fixmap.h | |||
@@ -48,9 +48,9 @@ enum fixed_addresses { | |||
48 | #define FIX_N_COLOURS 8 | 48 | #define FIX_N_COLOURS 8 |
49 | FIX_CMAP_BEGIN, | 49 | FIX_CMAP_BEGIN, |
50 | #ifdef CONFIG_MIPS_MT_SMTC | 50 | #ifdef CONFIG_MIPS_MT_SMTC |
51 | FIX_CMAP_END = FIX_CMAP_BEGIN + (FIX_N_COLOURS * NR_CPUS), | 51 | FIX_CMAP_END = FIX_CMAP_BEGIN + (FIX_N_COLOURS * NR_CPUS * 2), |
52 | #else | 52 | #else |
53 | FIX_CMAP_END = FIX_CMAP_BEGIN + FIX_N_COLOURS, | 53 | FIX_CMAP_END = FIX_CMAP_BEGIN + (FIX_N_COLOURS * 2), |
54 | #endif | 54 | #endif |
55 | #ifdef CONFIG_HIGHMEM | 55 | #ifdef CONFIG_HIGHMEM |
56 | /* reserved pte's for temporary kernel mappings */ | 56 | /* reserved pte's for temporary kernel mappings */ |
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 15aa1902a788..8d1f4f363049 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/swap.h> | 27 | #include <linux/swap.h> |
28 | #include <linux/proc_fs.h> | 28 | #include <linux/proc_fs.h> |
29 | #include <linux/pfn.h> | 29 | #include <linux/pfn.h> |
30 | #include <linux/hardirq.h> | ||
30 | 31 | ||
31 | #include <asm/asm-offsets.h> | 32 | #include <asm/asm-offsets.h> |
32 | #include <asm/bootinfo.h> | 33 | #include <asm/bootinfo.h> |
@@ -132,7 +133,10 @@ void *kmap_coherent(struct page *page, unsigned long addr) | |||
132 | inc_preempt_count(); | 133 | inc_preempt_count(); |
133 | idx = (addr >> PAGE_SHIFT) & (FIX_N_COLOURS - 1); | 134 | idx = (addr >> PAGE_SHIFT) & (FIX_N_COLOURS - 1); |
134 | #ifdef CONFIG_MIPS_MT_SMTC | 135 | #ifdef CONFIG_MIPS_MT_SMTC |
135 | idx += FIX_N_COLOURS * smp_processor_id(); | 136 | idx += FIX_N_COLOURS * smp_processor_id() + |
137 | (in_interrupt() ? (FIX_N_COLOURS * NR_CPUS) : 0); | ||
138 | #else | ||
139 | idx += in_interrupt() ? FIX_N_COLOURS : 0; | ||
136 | #endif | 140 | #endif |
137 | vaddr = __fix_to_virt(FIX_CMAP_END - idx); | 141 | vaddr = __fix_to_virt(FIX_CMAP_END - idx); |
138 | pte = mk_pte(page, PAGE_KERNEL); | 142 | pte = mk_pte(page, PAGE_KERNEL); |