summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/numa.c
diff options
context:
space:
mode:
authorJesse Larrew <jlarrew@linux.vnet.ibm.com>2012-06-07 16:04:34 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-09-05 16:05:19 +1000
commit79c5fcebfe4021f326a6715009f0b6b622d5df92 (patch)
tree7ebf15489330161ab74aba15d43bee3f17edc3ce /arch/powerpc/mm/numa.c
parent5b716ac728bcc01b1f2a7ed6e437196602237c27 (diff)
downloadop-kernel-dev-79c5fcebfe4021f326a6715009f0b6b622d5df92.zip
op-kernel-dev-79c5fcebfe4021f326a6715009f0b6b622d5df92.tar.gz
powerpc/vphn: Fix arch_update_cpu_topology() return value
arch_update_cpu_topology() should only return 1 when the topology has actually changed, and should return 0 otherwise. This patch fixes a potential bug where rebuild_sched_domains() would reinitialize the sched domains even when the topology hasn't changed. Signed-off-by: Jesse Larrew <jlarrew@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm/numa.c')
-rw-r--r--arch/powerpc/mm/numa.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 39b1597..59213cf 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1436,11 +1436,11 @@ static long vphn_get_associativity(unsigned long cpu,
/*
* Update the node maps and sysfs entries for each cpu whose home node
- * has changed.
+ * has changed. Returns 1 when the topology has changed, and 0 otherwise.
*/
int arch_update_cpu_topology(void)
{
- int cpu, nid, old_nid;
+ int cpu, nid, old_nid, changed = 0;
unsigned int associativity[VPHN_ASSOC_BUFSIZE] = {0};
struct device *dev;
@@ -1466,9 +1466,10 @@ int arch_update_cpu_topology(void)
dev = get_cpu_device(cpu);
if (dev)
kobject_uevent(&dev->kobj, KOBJ_CHANGE);
+ changed = 1;
}
- return 1;
+ return changed;
}
static void topology_work_fn(struct work_struct *work)
OpenPOWER on IntegriCloud