Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100171
b: refs/heads/master
c: 11369f3
h: refs/heads/master
i:
  100169: 2d1dc4b
  100167: 0a760fc
v: v3
  • Loading branch information
Mike Travis authored and Ingo Molnar committed Jul 13, 2008
1 parent 2bbccb6 commit 96b4146
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 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: ce8b06b985ae48f9425de6e4641e77cb3613ef00
refs/heads/master: 11369f356b66d363a615fde2c5526962f7683674
8 changes: 4 additions & 4 deletions trunk/arch/x86/kernel/setup_percpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,23 +343,23 @@ static const cpumask_t cpu_mask_none;
/*
* Returns a pointer to the bitmask of CPUs on Node 'node'.
*/
cpumask_t *_node_to_cpumask_ptr(int node)
const cpumask_t *_node_to_cpumask_ptr(int node)
{
if (node_to_cpumask_map == NULL) {
printk(KERN_WARNING
"_node_to_cpumask_ptr(%d): no node_to_cpumask_map!\n",
node);
dump_stack();
return &cpu_online_map;
return (const cpumask_t *)&cpu_online_map;
}
if (node >= nr_node_ids) {
printk(KERN_WARNING
"_node_to_cpumask_ptr(%d): node > nr_node_ids(%d)\n",
node, nr_node_ids);
dump_stack();
return (cpumask_t *)&cpu_mask_none;
return &cpu_mask_none;
}
return (cpumask_t *)&node_to_cpumask_map[node];
return &node_to_cpumask_map[node];
}
EXPORT_SYMBOL(_node_to_cpumask_ptr);

Expand Down
3 changes: 2 additions & 1 deletion trunk/include/asm-generic/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
#ifndef node_to_cpumask_ptr

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

#define node_to_cpumask_ptr_next(v, node) \
_##v = node_to_cpumask(node)
Expand Down
10 changes: 5 additions & 5 deletions trunk/include/asm-x86/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ DECLARE_EARLY_PER_CPU(int, x86_cpu_to_node_map);
#ifdef CONFIG_DEBUG_PER_CPU_MAPS
extern int cpu_to_node(int cpu);
extern int early_cpu_to_node(int cpu);
extern cpumask_t *_node_to_cpumask_ptr(int node);
extern const cpumask_t *_node_to_cpumask_ptr(int node);
extern cpumask_t node_to_cpumask(int node);

#else /* !CONFIG_DEBUG_PER_CPU_MAPS */
Expand All @@ -103,7 +103,7 @@ static inline int early_cpu_to_node(int cpu)
}

/* Returns a pointer to the cpumask of CPUs on Node 'node'. */
static inline cpumask_t *_node_to_cpumask_ptr(int node)
static inline const cpumask_t *_node_to_cpumask_ptr(int node)
{
return &node_to_cpumask_map[node];
}
Expand All @@ -118,7 +118,7 @@ static inline cpumask_t node_to_cpumask(int node)

/* Replace default node_to_cpumask_ptr with optimized version */
#define node_to_cpumask_ptr(v, node) \
cpumask_t *v = _node_to_cpumask_ptr(node)
const cpumask_t *v = _node_to_cpumask_ptr(node)

#define node_to_cpumask_ptr_next(v, node) \
v = _node_to_cpumask_ptr(node)
Expand Down Expand Up @@ -186,7 +186,7 @@ extern int __node_distance(int, int);
#define cpu_to_node(cpu) 0
#define early_cpu_to_node(cpu) 0

static inline cpumask_t *_node_to_cpumask_ptr(int node)
static inline const cpumask_t *_node_to_cpumask_ptr(int node)
{
return &cpu_online_map;
}
Expand All @@ -201,7 +201,7 @@ static inline int node_to_first_cpu(int node)

/* Replace default node_to_cpumask_ptr with optimized version */
#define node_to_cpumask_ptr(v, node) \
cpumask_t *v = _node_to_cpumask_ptr(node)
const cpumask_t *v = _node_to_cpumask_ptr(node)

#define node_to_cpumask_ptr_next(v, node) \
v = _node_to_cpumask_ptr(node)
Expand Down

0 comments on commit 96b4146

Please sign in to comment.