Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91067
b: refs/heads/master
c: aa6b544
h: refs/heads/master
i:
  91065: 5125f94
  91063: 9bf353c
v: v3
  • Loading branch information
Mike Travis authored and Ingo Molnar committed Apr 19, 2008
1 parent d45736d commit d188601
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d18d00f5dbcd1a95811617e9812cf0560bd465ee
refs/heads/master: aa6b54461cc5c0019b9d792adf3176b444c10763
3 changes: 1 addition & 2 deletions trunk/include/asm-alpha/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ static inline cpumask_t node_to_cpumask(int node)

#define pcibus_to_cpumask(bus) (cpu_online_map)

#else /* CONFIG_NUMA */
# include <asm-generic/topology.h>
#endif /* !CONFIG_NUMA */
# include <asm-generic/topology.h>

#endif /* _ASM_ALPHA_TOPOLOGY_H */
4 changes: 1 addition & 3 deletions trunk/include/asm-frv/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@

#error NUMA not supported yet

#else /* !CONFIG_NUMA */
#endif /* CONFIG_NUMA */

#include <asm-generic/topology.h>

#endif /* CONFIG_NUMA */

#endif /* _ASM_TOPOLOGY_H */
14 changes: 14 additions & 0 deletions trunk/include/asm-generic/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#ifndef _ASM_GENERIC_TOPOLOGY_H
#define _ASM_GENERIC_TOPOLOGY_H

#ifndef CONFIG_NUMA

/* Other architectures wishing to use this simple topology API should fill
in the below functions as appropriate in their own <asm/topology.h> file. */
#ifndef cpu_to_node
Expand All @@ -52,4 +54,16 @@
)
#endif

#endif /* CONFIG_NUMA */

/* returns pointer to cpumask for specified node */
#ifndef node_to_cpumask_ptr

#define node_to_cpumask_ptr(v, node) \
cpumask_t _##v = node_to_cpumask(node), *v = &_##v

#define node_to_cpumask_ptr_next(v, node) \
_##v = node_to_cpumask(node)
#endif

#endif /* _ASM_GENERIC_TOPOLOGY_H */
5 changes: 5 additions & 0 deletions trunk/include/asm-ia64/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ void build_cpu_to_node_map(void);
#define smt_capable() (smp_num_siblings > 1)
#endif

#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \
CPU_MASK_ALL : \
node_to_cpumask(pcibus_to_node(bus)) \
)

#include <asm-generic/topology.h>

#endif /* _ASM_IA64_TOPOLOGY_H */
3 changes: 1 addition & 2 deletions trunk/include/asm-powerpc/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,10 @@ static inline void sysfs_remove_device_from_node(struct sys_device *dev,
{
}

#endif /* CONFIG_NUMA */

#include <asm-generic/topology.h>

#endif /* CONFIG_NUMA */

#ifdef CONFIG_SMP
#include <asm/cputable.h>
#define smt_capable() (cpu_has_feature(CPU_FTR_SMT))
Expand Down
15 changes: 13 additions & 2 deletions trunk/include/asm-x86/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,17 @@ static inline int cpu_to_node(int cpu)
#endif
return per_cpu(x86_cpu_to_node_map, cpu);
}

#ifdef CONFIG_NUMA

/* Returns a pointer to the cpumask of CPUs on Node 'node'. */
#define node_to_cpumask_ptr(v, node) \
cpumask_t *v = &(node_to_cpumask_map[node])

#define node_to_cpumask_ptr_next(v, node) \
v = &(node_to_cpumask_map[node])
#endif

#endif /* CONFIG_X86_64 */

/*
Expand Down Expand Up @@ -174,10 +185,10 @@ extern int __node_distance(int, int);

#else /* CONFIG_NUMA */

#include <asm-generic/topology.h>

#endif

#include <asm-generic/topology.h>

extern cpumask_t cpu_coregroup_map(int cpu);

#ifdef ENABLE_TOPO_DEFINES
Expand Down

0 comments on commit d188601

Please sign in to comment.