Commit 601abdc3 authored by Nathan Fontenot's avatar Nathan Fontenot Committed by Benjamin Herrenschmidt

powerpc/pseries: Correct builds break when CONFIG_SMP not defined

Correct build failure for powerpc/pseries builds with CONFIG_SMP not defined.

The function cpu_sibling_mask has no meaning (or definition) when CONFIG_SMP
is not defined. Additionally, the updating of NUMA affinity for a CPU in a UP
system doesn't really make sense.

This patch ifdef's out the code making the affinity updates for PRRN events to
fix the following build break.

arch/powerpc/mm/numa.c: In function ‘stage_topology_update’:
arch/powerpc/mm/numa.c:1535: error: implicit declaration of function ‘cpu_sibling_mask’
arch/powerpc/mm/numa.c:1535: warning: passing argument 3 of ‘cpumask_or’ makes pointer from integer without a cast
make[1]: *** [arch/powerpc/mm/numa.o] Error 1
Signed-off-by: default avatarNathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 177c1923
...@@ -1530,6 +1530,8 @@ static void reset_topology_timer(void) ...@@ -1530,6 +1530,8 @@ static void reset_topology_timer(void)
mod_timer(&topology_timer, topology_timer.expires); mod_timer(&topology_timer, topology_timer.expires);
} }
#ifdef CONFIG_SMP
static void stage_topology_update(int core_id) static void stage_topology_update(int core_id)
{ {
cpumask_or(&cpu_associativity_changes_mask, cpumask_or(&cpu_associativity_changes_mask,
...@@ -1563,6 +1565,8 @@ static struct notifier_block dt_update_nb = { ...@@ -1563,6 +1565,8 @@ static struct notifier_block dt_update_nb = {
.notifier_call = dt_update_callback, .notifier_call = dt_update_callback,
}; };
#endif
/* /*
* Start polling for associativity changes. * Start polling for associativity changes.
*/ */
...@@ -1574,7 +1578,9 @@ int start_topology_update(void) ...@@ -1574,7 +1578,9 @@ int start_topology_update(void)
if (!prrn_enabled) { if (!prrn_enabled) {
prrn_enabled = 1; prrn_enabled = 1;
vphn_enabled = 0; vphn_enabled = 0;
#ifdef CONFIG_SMP
rc = of_reconfig_notifier_register(&dt_update_nb); rc = of_reconfig_notifier_register(&dt_update_nb);
#endif
} }
} else if (firmware_has_feature(FW_FEATURE_VPHN) && } else if (firmware_has_feature(FW_FEATURE_VPHN) &&
get_lppaca()->shared_proc) { get_lppaca()->shared_proc) {
...@@ -1599,7 +1605,9 @@ int stop_topology_update(void) ...@@ -1599,7 +1605,9 @@ int stop_topology_update(void)
if (prrn_enabled) { if (prrn_enabled) {
prrn_enabled = 0; prrn_enabled = 0;
#ifdef CONFIG_SMP
rc = of_reconfig_notifier_unregister(&dt_update_nb); rc = of_reconfig_notifier_unregister(&dt_update_nb);
#endif
} else if (vphn_enabled) { } else if (vphn_enabled) {
vphn_enabled = 0; vphn_enabled = 0;
rc = del_timer_sync(&topology_timer); rc = del_timer_sync(&topology_timer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment