From 4dfd044571c0e9927c3feb266337199c65ac6c21 Mon Sep 17 00:00:00 2001 From: Becky Bruce Date: Wed, 12 Oct 2011 16:17:02 -0500 Subject: [PATCH] --- yaml --- r: 274231 b: refs/heads/master c: 4559424a0c34f0cb22fa31bc24015a06dc064b32 h: refs/heads/master i: 274229: 4482514fb2bcf7f3781242f6e663250ea38c9ecc 274227: c576e6e608931cbff56a24b5184af59bcff2d173 274223: 18229edffd1417d00401d086acd1032197de7250 v: v3 --- [refs] | 2 +- trunk/arch/powerpc/mm/fsl_booke_mmu.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 5527bbb680df..282afde8b8e2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b9df02231930c01eaaf3c37b192bd75ea0d1c0bb +refs/heads/master: 4559424a0c34f0cb22fa31bc24015a06dc064b32 diff --git a/trunk/arch/powerpc/mm/fsl_booke_mmu.c b/trunk/arch/powerpc/mm/fsl_booke_mmu.c index 6f593bd27174..66a6fd38e9cd 100644 --- a/trunk/arch/powerpc/mm/fsl_booke_mmu.c +++ b/trunk/arch/powerpc/mm/fsl_booke_mmu.c @@ -101,17 +101,17 @@ unsigned long p_mapped_by_tlbcam(phys_addr_t pa) /* * Set up a variable-size TLB entry (tlbcam). The parameters are not checked; - * in particular size must be a power of 4 between 4k and 256M (or 1G, for cpus - * that support extended page sizes). Note that while some cpus support a - * page size of 4G, we don't allow its use here. + * in particular size must be a power of 4 between 4k and the max supported by + * an implementation; max may further be limited by what can be represented in + * an unsigned long (for example, 32-bit implementations cannot support a 4GB + * size). */ static void settlbcam(int index, unsigned long virt, phys_addr_t phys, unsigned long size, unsigned long flags, unsigned int pid) { - unsigned int tsize, lz; + unsigned int tsize; - asm (PPC_CNTLZL "%0,%1" : "=r" (lz) : "r" (size)); - tsize = 21 - lz; + tsize = __ilog2(size) - 10; #ifdef CONFIG_SMP if ((flags & _PAGE_NO_CACHE) == 0)