summaryrefslogtreecommitdiff
path: root/arch/powerpc/mm/ppc_mmu_32.c
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2015-03-25 20:11:55 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2015-04-07 17:15:13 +1000
commit5dd4e4f6fe9495f02d4594bd460b84008a3e8e93 (patch)
tree5a1d671fc5d6d27ffc340aad7705c5fe848b2355 /arch/powerpc/mm/ppc_mmu_32.c
parent911083350e010e23719a8ecb4dd5f170f22854eb (diff)
powerpc/mm: Change setbat() to take a pgprot_t rather than flags
The callers of setbat() are actually passing a pgprot_t for the flags parameter. This doesn't matter unless STRICT_MM_TYPECHECKS is enabled. So we can turn that on without breaking the build, change setbat() to take a pgprot_t and have it convert it to an unsigned long internally. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm/ppc_mmu_32.c')
-rw-r--r--arch/powerpc/mm/ppc_mmu_32.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
index eb0e489b1bb7..6b2f3e457171 100644
--- a/arch/powerpc/mm/ppc_mmu_32.c
+++ b/arch/powerpc/mm/ppc_mmu_32.c
@@ -113,11 +113,12 @@ unsigned long __init mmu_mapin_ram(unsigned long top)
* of 2 between 128k and 256M.
*/
void __init setbat(int index, unsigned long virt, phys_addr_t phys,
- unsigned int size, int flags)
+ unsigned int size, pgprot_t prot)
{
unsigned int bl;
int wimgxpp;
struct ppc_bat *bat = BATS[index];
+ unsigned long flags = pgprot_val(prot);
if ((flags & _PAGE_NO_CACHE) ||
(cpu_has_feature(CPU_FTR_NEED_COHERENT) == 0))