aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/ppce500_spin.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ppc/ppce500_spin.c')
-rw-r--r--hw/ppc/ppce500_spin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ppc/ppce500_spin.c b/hw/ppc/ppce500_spin.c
index d49f2b8..a99f7b0 100644
--- a/hw/ppc/ppce500_spin.c
+++ b/hw/ppc/ppce500_spin.c
@@ -74,7 +74,7 @@ static void spin_reset(void *opaque)
/* Create -kernel TLB entries for BookE, linearly spanning 256MB. */
static inline hwaddr booke206_page_size_to_tlb(uint64_t size)
{
- return (ffs(size >> 10) - 1) >> 1;
+ return ctz32(size >> 10) >> 1;
}
static void mmubooke_create_initial_mapping(CPUPPCState *env,