mmu-hash32: Clean up BAT matching logic
commit6fc76aa9adc1c8896a97059f12a1e5e6c1820c64
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 12 Mar 2013 00:31:35 +0000 (12 00:31 +0000)
committerAlexander Graf <agraf@suse.de>
Fri, 22 Mar 2013 14:28:51 +0000 (22 15:28 +0100)
tree2f46f602a1af26ca79f409528c8e0fb513542d02
parente1d4951593426c886c1856211bc6ca81ed7c435d
mmu-hash32: Clean up BAT matching logic

The code to search for a matching BAT for a virtual address is somewhat
longwinded and awkward.  In particular, it relies on seperate size and
validity information being returned from the hash32_bat_size() function
(and 601 specific variant).

We simplify this by having hash32_bat_size() return instead a mask of the
virtual address bits to match, and 0 for invalid (since a BAT can never
match the entire address space).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
target-ppc/mmu-hash32.c
target-ppc/mmu-hash32.h