pseries: Minor cleanups to HPT management hypercalls
commitc6404adebf923fdd9ee5edf92594dcf5df3b5b10
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 21 Feb 2017 03:00:16 +0000 (21 14:00 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 1 Mar 2017 00:23:39 +0000 (1 11:23 +1100)
treeb4c84b47f5c85ad25aa1e25e02fe33829c2f3c45
parent1ad9f0a464fe78d30ee60b3629f7a825cf2fab13
pseries: Minor cleanups to HPT management hypercalls

 * Standardize on 'ptex' instead of 'pte_index' for HPTE index variables
   for consistency and brevity
 * Avoid variables named 'index'; shadowing index(3) from libc can lead to
   surprising bugs if the variable is removed, because compiler errors
   might not appear for remaining references
 * Clarify index calculations in h_enter() - we have two cases, H_EXACT
   where the exact HPTE slot is given, and !H_EXACT where we search for
   an empty slot within the hash bucket.  Make the calculation more
   consistent between the cases.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
hw/ppc/spapr_hcall.c