Jacob Lifshay found a couple of issues with the PLRU implementation:
- The tree array is one bit too long. This is harmless as this bit is never
accessed and thus should be optimized out
- The PLRU read is using the wrong nodes when going down the tree, which leads
to incorrect results.
This fixes it and improves the test bench a bit. I have verified the expected
output using a hand-written tree states, observed the mismatch with the
current implementation and verified the fix.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>