summaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/kmap.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-12-11 01:26:12 -0800
committerDavid S. Miller <davem@davemloft.net>2009-12-11 01:26:12 -0800
commite3f4e1cbc341bc2020241d8119bd078db3ec3b85 (patch)
tree8b23624cc792f60d0bf86d787c3514cf0fb04418 /arch/sh/mm/kmap.c
parentadfe67ddffbea51322b118896178bd71aaa4b4d8 (diff)
parentd71cb81af3817193bc605de061da0499934263a6 (diff)
downloadlinux-e3f4e1cbc341bc2020241d8119bd078db3ec3b85.tar.gz
linux-e3f4e1cbc341bc2020241d8119bd078db3ec3b85.tar.bz2
linux-e3f4e1cbc341bc2020241d8119bd078db3ec3b85.zip
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'arch/sh/mm/kmap.c')
-rw-r--r--arch/sh/mm/kmap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/sh/mm/kmap.c b/arch/sh/mm/kmap.c
index 16e01b5fed04..15d74ea42094 100644
--- a/arch/sh/mm/kmap.c
+++ b/arch/sh/mm/kmap.c
@@ -39,7 +39,9 @@ void *kmap_coherent(struct page *page, unsigned long addr)
pagefault_disable();
idx = FIX_CMAP_END -
- ((addr & current_cpu_data.dcache.alias_mask) >> PAGE_SHIFT);
+ (((addr >> PAGE_SHIFT) & (FIX_N_COLOURS - 1)) +
+ (FIX_N_COLOURS * smp_processor_id()));
+
vaddr = __fix_to_virt(idx);
BUG_ON(!pte_none(*(kmap_coherent_pte - idx)));