Commit 4c456a67 authored by Gerhard Pircher's avatar Gerhard Pircher Committed by Benjamin Herrenschmidt

powerpc/mm: Fix handling of _PAGE_COHERENT in BAT setup code

_PAGE_COHERENT is now always set in _PAGE_RAM resp. PAGE_KERNEL.
Thus it has to be masked out, if the BAT mapping should be non
cacheable or CPU_FTR_NEED_COHERENT is not set.

This will work on normal SMP setups because we force-set
CPU_FTR_NEED_COHERENT as part of CPU_FTR_COMMON on SMP.
Signed-off-by: default avatarGerhard Pircher <gerhard_pircher@gmx.net>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 69b052e8
...@@ -123,9 +123,9 @@ void __init setbat(int index, unsigned long virt, phys_addr_t phys, ...@@ -123,9 +123,9 @@ void __init setbat(int index, unsigned long virt, phys_addr_t phys,
int wimgxpp; int wimgxpp;
struct ppc_bat *bat = BATS[index]; struct ppc_bat *bat = BATS[index];
if (((flags & _PAGE_NO_CACHE) == 0) && if ((flags & _PAGE_NO_CACHE) ||
cpu_has_feature(CPU_FTR_NEED_COHERENT)) (cpu_has_feature(CPU_FTR_NEED_COHERENT) == 0))
flags |= _PAGE_COHERENT; flags &= ~_PAGE_COHERENT;
bl = (size >> 17) - 1; bl = (size >> 17) - 1;
if (PVR_VER(mfspr(SPRN_PVR)) != 1) { if (PVR_VER(mfspr(SPRN_PVR)) != 1) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment