Better factor the ppc hash translation path
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 1 Apr 2011 04:15:17 +0000 (15:15 +1100)
committerAlexander Graf <agraf@suse.de>
Fri, 1 Apr 2011 16:34:55 +0000 (18:34 +0200)
commit6c5b81965af1e04a7b8347acdddcb563d1715f21
tree5415177ed97e20c1fd1f2c8e0b42c197fea3bb89
parent172c13bc856e75571070a9119a21ac6f213c0689
Better factor the ppc hash translation path

Currently the path handling hash page table translation in get_segment()
has a mix of common and 32 or 64 bit specific code.  However the
division is not done terribly well which results in a lot of messy code
flipping between common and divided paths.

This patch improves the organization, consolidating several divided paths
into one.  This in turn allows simplification of some code in
get_segment(), removing a number of ugly interim variables.

This new factorization will also make it easier to add support for the 1T
segments added in newer CPUs.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
target-ppc/cpu.h
target-ppc/helper.c