target-ppc: Eliminate redundant and incorrect function booke206_page_size_to_tlb
commita36848ff7ca54d9181ec6c2202ce7563a2c5cfdc
authorAaron Larson <alarson@ddci.com>
Tue, 28 Jun 2016 13:50:05 +0000 (28 06:50 -0700)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 30 Jun 2016 23:57:01 +0000 (1 09:57 +1000)
tree53025f73cfc3eaab1d516f64e64aba25ba6f130b
parentff461b8da9d3444bf1c33a9a94edcf88435c4268
target-ppc: Eliminate redundant and incorrect function booke206_page_size_to_tlb

Eliminate redundant and incorrect booke206_page_size_to_tlb function
from ppce500_spin.c in preference to previously existing but newly
exported definition from e500.c

Defect analysis:

The booke206_page_size_to_tlb function in e500.c was updated in commit
2bd9543 "ppc: booke206: use MAV=2.0 TSIZE definition, fix 4G pages" to
reflect a change in the definition of MAS1_TSIZE_SHIFT from 8
(corresponding to a min TLB page size of 4kb) to a value of 7 (TLB
page size 2k).  The booke206_page_size_to_tlb() function defined in
ppce500_spin.c was never updated to reflect the change in
MAS1_TSIZE_SHIFT.

In http://lists.nongnu.org/archive/html/qemu-ppc/2016-06/msg00533.html,
Scott Wood suggested this "root cause" explanation:

SW> The patch that changed MAS1_TSIZE_SHIFT from 8 to 7 was around the
SW> same time as the patch that added this code, which is probably why
SW> adjusting it got missed.  Commit 2bd9543cd3 did update the
SW> equivalent code in ppce500_mpc8544ds.c, which now resides in
SW> hw/ppc/e500.c and has been changed to not assume a power-of-2
SW> size.  The ppce500_spin version should be eliminated.

Signed-off-by: Aaron Larson <alarson@ddci.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/e500.c
hw/ppc/e500.h
hw/ppc/ppce500_spin.c