diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-11-10 06:00:45 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-11-10 06:00:45 -0500 |
commit | acca4f4d9bd657e8bc7e1665ba5077465138f133 (patch) | |
tree | 39b107c67d9dc59e6064e528457ca97ba4396ba2 /arch/sh/include/asm | |
parent | f7160c7573615ec82c691e294cf80d920b5d588d (diff) |
sh: Handle fixmap TLB eviction more coherently.
There was a race in the kmap_coherent() implementation. While we
guarded against preemption, there was nothing preventing eviction of
the pre-faulted fixmap entry from the UTLB. Under certain workloads
this would result in the fixmap entries used for cache colouring being
evicted from the UTLB in the midst of a copy_page().
In addition to pre-faulting, we also make sure to preserve the PTEs
in the kernel page table and introduce a cached PTE for kmap_coherent()
usage. This follows a similar change on MIPS ("[MIPS] Fix aliasing bug
in copy_to_user_page / copy_from_user_page").
Reported-by: Hideo Saito <saito@densan.co.jp>
Reported-by: CHIKAMA Masaki <masaki.chikama@gmail.com>
Tested-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm')
-rw-r--r-- | arch/sh/include/asm/pgtable.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/sh/include/asm/pgtable.h b/arch/sh/include/asm/pgtable.h index 52220d70a096..b517ae08b9c0 100644 --- a/arch/sh/include/asm/pgtable.h +++ b/arch/sh/include/asm/pgtable.h | |||
@@ -148,6 +148,12 @@ extern void paging_init(void); | |||
148 | extern void page_table_range_init(unsigned long start, unsigned long end, | 148 | extern void page_table_range_init(unsigned long start, unsigned long end, |
149 | pgd_t *pgd); | 149 | pgd_t *pgd); |
150 | 150 | ||
151 | #if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_CPU_SH4) && defined(CONFIG_MMU) | ||
152 | extern void kmap_coherent_init(void); | ||
153 | #else | ||
154 | #define kmap_coherent_init() do { } while (0) | ||
155 | #endif | ||
156 | |||
151 | #include <asm-generic/pgtable.h> | 157 | #include <asm-generic/pgtable.h> |
152 | 158 | ||
153 | #endif /* __ASM_SH_PGTABLE_H */ | 159 | #endif /* __ASM_SH_PGTABLE_H */ |