diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2009-04-25 05:25:34 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-05-14 08:50:29 -0400 |
commit | bb86bf28aec6d0a207ae09f38a43e94133d4d6db (patch) | |
tree | 34bd8f653eb10dc4eb82aa8ef2576475346070e1 /arch/mips/mm/init.c | |
parent | 0b54352600b820a6d25f151cbd8975ed9b2aeb09 (diff) |
MIPS: Fix highmem.
Commit 351336929ccf222ae38ff0cb7a8dd5fd5c6236a0 (kernel.org) rsp.
b3594a089f1c17ff919f8f78505c3f20e1f6f8ce (linux-mips.org):
> From: Chris Dearman <chris@mips.com>
> Date: Wed, 19 Sep 2007 00:58:24 +0100
> Subject: [PATCH] [MIPS] Allow setting of the cache attribute at run time.
>
> Slightly tacky, but there is a precedent in the sparc archirecture code.
introduces the variable _page_cachable_default, which defaults to zero and.
is used to create the prototype PTE for __kmap_atomic in
arch/mips/mm/init.c:kmap_init before initialization in
arch/mips/mm/c-r4k.c:coherency_setup, so the default value of 0 will be
used as the CCA of kmap atomic pages which on many processors is not a
defined CCA value and may result in writes to kmap_atomic pages getting
corrupted. Debugged by Jon Fraser (jfraser@broadcom.com).
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mm/init.c')
-rw-r--r-- | arch/mips/mm/init.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index d9348946a19e..c5511294a9ee 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -104,14 +104,6 @@ unsigned long setup_zero_pages(void) | |||
104 | return 1UL << order; | 104 | return 1UL << order; |
105 | } | 105 | } |
106 | 106 | ||
107 | /* | ||
108 | * These are almost like kmap_atomic / kunmap_atmic except they take an | ||
109 | * additional address argument as the hint. | ||
110 | */ | ||
111 | |||
112 | #define kmap_get_fixmap_pte(vaddr) \ | ||
113 | pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k(vaddr), (vaddr)), (vaddr)), (vaddr)) | ||
114 | |||
115 | #ifdef CONFIG_MIPS_MT_SMTC | 107 | #ifdef CONFIG_MIPS_MT_SMTC |
116 | static pte_t *kmap_coherent_pte; | 108 | static pte_t *kmap_coherent_pte; |
117 | static void __init kmap_coherent_init(void) | 109 | static void __init kmap_coherent_init(void) |
@@ -264,24 +256,6 @@ void copy_from_user_page(struct vm_area_struct *vma, | |||
264 | } | 256 | } |
265 | } | 257 | } |
266 | 258 | ||
267 | #ifdef CONFIG_HIGHMEM | ||
268 | unsigned long highstart_pfn, highend_pfn; | ||
269 | |||
270 | pte_t *kmap_pte; | ||
271 | pgprot_t kmap_prot; | ||
272 | |||
273 | static void __init kmap_init(void) | ||
274 | { | ||
275 | unsigned long kmap_vstart; | ||
276 | |||
277 | /* cache the first kmap pte */ | ||
278 | kmap_vstart = __fix_to_virt(FIX_KMAP_BEGIN); | ||
279 | kmap_pte = kmap_get_fixmap_pte(kmap_vstart); | ||
280 | |||
281 | kmap_prot = PAGE_KERNEL; | ||
282 | } | ||
283 | #endif /* CONFIG_HIGHMEM */ | ||
284 | |||
285 | void __init fixrange_init(unsigned long start, unsigned long end, | 259 | void __init fixrange_init(unsigned long start, unsigned long end, |
286 | pgd_t *pgd_base) | 260 | pgd_t *pgd_base) |
287 | { | 261 | { |