From 4710ae79546fbaa1aa14b866069f8c461fdebc20 Mon Sep 17 00:00:00 2001 From: Jesse Larrew Date: Fri, 17 Dec 2010 22:07:47 +0000 Subject: [PATCH] --- yaml --- r: 229366 b: refs/heads/master c: 39bf990ead35c7263652ca5dd8262b2b2cd147ac h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/powerpc/include/asm/topology.h | 20 +++++++++++--------- trunk/arch/powerpc/mm/numa.c | 9 ++++++--- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index dc939987c68a..bb1b03fa5624 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: eed0ba0b4ab2d1668588219a8efa81bf8636a12d +refs/heads/master: 39bf990ead35c7263652ca5dd8262b2b2cd147ac diff --git a/trunk/arch/powerpc/include/asm/topology.h b/trunk/arch/powerpc/include/asm/topology.h index aed188bd70db..fbfcfd04d25a 100644 --- a/trunk/arch/powerpc/include/asm/topology.h +++ b/trunk/arch/powerpc/include/asm/topology.h @@ -93,9 +93,20 @@ extern void __init dump_numa_cpu_topology(void); extern int sysfs_add_device_to_node(struct sys_device *dev, int nid); extern void sysfs_remove_device_from_node(struct sys_device *dev, int nid); +#ifdef CONFIG_PPC_SPLPAR extern int start_topology_update(void); extern int stop_topology_update(void); #else +static inline int start_topology_update(void) +{ + return 0; +} +static inline int stop_topology_update(void) +{ + return 0; +} +#endif /* CONFIG_PPC_SPLPAR */ +#else static inline void dump_numa_cpu_topology(void) {} @@ -108,15 +119,6 @@ static inline void sysfs_remove_device_from_node(struct sys_device *dev, int nid) { } - -static inline int start_topology_update(void) -{ - return 0; -} -static inline int stop_topology_update(void) -{ - return 0; -} #endif /* CONFIG_NUMA */ #include diff --git a/trunk/arch/powerpc/mm/numa.c b/trunk/arch/powerpc/mm/numa.c index d644ba7e8aba..3c0d20c9161a 100644 --- a/trunk/arch/powerpc/mm/numa.c +++ b/trunk/arch/powerpc/mm/numa.c @@ -28,6 +28,7 @@ #include #include #include +#include static int numa_enabled = 1; @@ -167,7 +168,7 @@ static void __init get_node_active_region(unsigned long start_pfn, work_with_active_regions(nid, get_active_region_work_fn, node_ar); } -static void __cpuinit map_cpu_to_node(int cpu, int node) +static void map_cpu_to_node(int cpu, int node) { numa_cpu_lookup_table[cpu] = node; @@ -177,7 +178,7 @@ static void __cpuinit map_cpu_to_node(int cpu, int node) cpumask_set_cpu(cpu, node_to_cpumask_map[node]); } -#ifdef CONFIG_HOTPLUG_CPU +#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_PPC_SPLPAR) static void unmap_cpu_from_node(unsigned long cpu) { int node = numa_cpu_lookup_table[cpu]; @@ -191,7 +192,7 @@ static void unmap_cpu_from_node(unsigned long cpu) cpu, node); } } -#endif /* CONFIG_HOTPLUG_CPU */ +#endif /* CONFIG_HOTPLUG_CPU || CONFIG_PPC_SPLPAR */ /* must hold reference to node during call */ static const int *of_get_associativity(struct device_node *dev) @@ -1289,6 +1290,7 @@ u64 memory_hotplug_max(void) #endif /* CONFIG_MEMORY_HOTPLUG */ /* Vrtual Processor Home Node (VPHN) support */ +#ifdef CONFIG_PPC_SPLPAR #define VPHN_NR_CHANGE_CTRS (8) static u8 vphn_cpu_change_counts[NR_CPUS][VPHN_NR_CHANGE_CTRS]; static cpumask_t cpu_associativity_changes_mask; @@ -1531,3 +1533,4 @@ int stop_topology_update(void) vphn_enabled = 0; return del_timer_sync(&topology_timer); } +#endif /* CONFIG_PPC_SPLPAR */