target-ppc: Simplify HPTE matching
commit073de86aa934d46d596a2367e7501da5500e5b86
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 5 Jul 2016 02:31:48 +0000 (5 12:31 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 5 Jul 2016 04:31:08 +0000 (5 14:31 +1000)
treefce91960c6e41a66eb0c5198124201b76fb409bb
parent651060aba79dc9d0cc77ac3921948ea78dba7409
target-ppc: Simplify HPTE matching

ppc_hash64_pteg_search() explicitly checks each HPTE's VALID and
SECONDARY bits, then uses the HPTE64_V_COMPARE() macro to check the B field
and AVPN.  However, a small tweak to HPTE64_V_COMPARE() means we can check
all of these bits at once with a suitable ptem value.  So, consolidate all
the comparisons for simplicity.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
target-ppc/mmu-hash64.c
target-ppc/mmu-hash64.h