From: Anton Blanchard <anton@samba.org>
Date: Sat, 29 Jan 2011 12:26:19 +0000 (+0000)
Subject: powerpc/numa: Check for all VPHN changes
X-Git-Tag: v2.6.38-rc4~3^2~4
X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d69043e8069f493ebee9472bcc78b3f54c5c27d9;p=users%2Fjedix%2Flinux-maple.git

powerpc/numa: Check for all VPHN changes

The hypervisor uses unsigned 1 byte counters to signal topology changes to
the OS. Since they can wrap we need to check for any difference, not just if
the hypervisor count is greater than the previous count.

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

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index f25633d3d0086..b2937efdfd7ab 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1341,7 +1341,7 @@ static int update_cpu_associativity_changes_mask(void)
 		volatile u8 *hypervisor_counts = lppaca[cpu].vphn_assoc_counts;
 
 		for (i = 0; i < distance_ref_points_depth; i++) {
-			if (hypervisor_counts[i] > counts[i]) {
+			if (hypervisor_counts[i] != counts[i]) {
 				counts[i] = hypervisor_counts[i];
 				changed = 1;
 			}