powerpc/numa: Only use active VPHN count fields
authorAnton Blanchard <anton@samba.org>
Sat, 29 Jan 2011 12:24:34 +0000 (12:24 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 7 Feb 2011 02:05:59 +0000 (13:05 +1100)
VPHN supports up to 8 distance fields but the number of entries in
ibm,associativity-reference-points signifies how many are in use.
Don't look at all the VPHN counts, only distance_ref_points_depth
worth.

Since we already cap our distance metrics at MAX_DISTANCE_REF_POINTS,
use that to size the VPHN arrays and add a BUILD_BUG_ON to avoid it growing
larger than the VPHN maximum of 8.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

No differences found