summaryrefslogtreecommitdiff
path: root/drivers/video/controlfb.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-12-18 19:13:51 +0000
committerPaul Mackerras <paulus@samba.org>2008-12-21 14:21:16 +1100
commit64b3d0e8122b422e879b23d42f9e0e8efbbf9744 (patch)
treeb1fab3fc39fd3117d0c050b0a54d6fe09f3a2948 /drivers/video/controlfb.c
parent77520351805cc19ba37394ae33f862ef6d3c2a23 (diff)
downloadlinux-3.10-64b3d0e8122b422e879b23d42f9e0e8efbbf9744.tar.gz
linux-3.10-64b3d0e8122b422e879b23d42f9e0e8efbbf9744.tar.bz2
linux-3.10-64b3d0e8122b422e879b23d42f9e0e8efbbf9744.zip
powerpc/mm: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED
Currently, we never set _PAGE_COHERENT in the PTEs, we just OR it in in the hash code based on some CPU feature bit. We also manipulate _PAGE_NO_CACHE and _PAGE_GUARDED by hand in all sorts of places. This changes the logic so that instead, the PTE now contains _PAGE_COHERENT for all normal RAM pages thay have I = 0 on platforms that need it. The hash code clears it if the feature bit is not set. It also adds some clean accessors to setup various valid combinations of access flags and change various bits of code to use them instead. This should help having the PTE actually containing the bit combinations that we really want. I also removed _PAGE_GUARDED from _PAGE_BASE on 44x and instead set it explicitely from the TLB miss. I will ultimately remove it completely as it appears that it might not be needed after all but in the meantime, having it in the TLB miss makes things a lot easier. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/video/controlfb.c')
-rw-r--r--drivers/video/controlfb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/controlfb.c b/drivers/video/controlfb.c
index b0be7eac32d..49fcbe8f18a 100644
--- a/drivers/video/controlfb.c
+++ b/drivers/video/controlfb.c
@@ -298,10 +298,10 @@ static int controlfb_mmap(struct fb_info *info,
return -EINVAL;
start = info->fix.mmio_start;
len = PAGE_ALIGN((start & ~PAGE_MASK)+info->fix.mmio_len);
- pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE|_PAGE_GUARDED;
+ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
} else {
/* framebuffer */
- pgprot_val(vma->vm_page_prot) |= _PAGE_WRITETHRU;
+ vma->vm_page_prot = pgprot_cached_wthru(vma->vm_page_prot);
}
start &= PAGE_MASK;
if ((vma->vm_end - vma->vm_start + off) > len)