]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
powerpc/mm: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 18 Dec 2008 19:13:51 +0000 (19:13 +0000)
committerPaul Mackerras <paulus@samba.org>
Sun, 21 Dec 2008 03:21:16 +0000 (14:21 +1100)
commit64b3d0e8122b422e879b23d42f9e0e8efbbf9744
treeb1fab3fc39fd3117d0c050b0a54d6fe09f3a2948
parent77520351805cc19ba37394ae33f862ef6d3c2a23
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>
arch/powerpc/include/asm/pgtable-ppc32.h
arch/powerpc/include/asm/pgtable-ppc64.h
arch/powerpc/include/asm/pgtable.h
arch/powerpc/kernel/head_44x.S
arch/powerpc/kernel/pci-common.c
arch/powerpc/mm/hash_low_32.S
arch/powerpc/mm/mem.c
arch/powerpc/platforms/cell/spufs/file.c
drivers/video/controlfb.c