diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-30 21:00:26 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-30 21:00:26 -0400 |
| commit | d17abcd5417d84cfa8a225160481203a37dc81d4 (patch) | |
| tree | 74ce2c425c5c6550acec90bc92c8a3f735f0d257 /include | |
| parent | db6f204019380c788f1de06ee937bdbccd60e5c0 (diff) | |
| parent | bb75efddeaca89f8a67fd82cdcbaaf436cf17ca9 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask:
oprofile: Thou shalt not call __exit functions from __init functions
cpumask: remove the now-obsoleted pcibus_to_cpumask(): generic
cpumask: remove cpumask_t from core
cpumask: convert rcutorture.c
cpumask: use new cpumask_ functions in core code.
cpumask: remove references to struct irqaction's mask field.
cpumask: use mm_cpumask() wrapper: kernel/fork.c
cpumask: use set_cpu_active in init/main.c
cpumask: remove node_to_first_cpu
cpumask: fix seq_bitmap_*() functions.
cpumask: remove dangerous CPU_MASK_ALL_PTR, &CPU_MASK_ALL
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-generic/topology.h | 10 | ||||
| -rw-r--r-- | include/linux/cpuset.h | 4 | ||||
| -rw-r--r-- | include/linux/seq_file.h | 9 |
3 files changed, 7 insertions, 16 deletions
diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h index 0e9e2bc0ee96..88bada2ebc4b 100644 --- a/include/asm-generic/topology.h +++ b/include/asm-generic/topology.h | |||
| @@ -43,20 +43,10 @@ | |||
| 43 | #ifndef cpumask_of_node | 43 | #ifndef cpumask_of_node |
| 44 | #define cpumask_of_node(node) ((void)node, cpu_online_mask) | 44 | #define cpumask_of_node(node) ((void)node, cpu_online_mask) |
| 45 | #endif | 45 | #endif |
| 46 | #ifndef node_to_first_cpu | ||
| 47 | #define node_to_first_cpu(node) ((void)(node),0) | ||
| 48 | #endif | ||
| 49 | #ifndef pcibus_to_node | 46 | #ifndef pcibus_to_node |
| 50 | #define pcibus_to_node(bus) ((void)(bus), -1) | 47 | #define pcibus_to_node(bus) ((void)(bus), -1) |
| 51 | #endif | 48 | #endif |
| 52 | 49 | ||
| 53 | #ifndef pcibus_to_cpumask | ||
| 54 | #define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \ | ||
| 55 | CPU_MASK_ALL : \ | ||
| 56 | node_to_cpumask(pcibus_to_node(bus)) \ | ||
| 57 | ) | ||
| 58 | #endif | ||
| 59 | |||
| 60 | #ifndef cpumask_of_pcibus | 50 | #ifndef cpumask_of_pcibus |
| 61 | #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ | 51 | #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ |
| 62 | cpu_all_mask : \ | 52 | cpu_all_mask : \ |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 90c6074a36ca..2e0d79678deb 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
| @@ -90,12 +90,12 @@ static inline void cpuset_init_smp(void) {} | |||
| 90 | static inline void cpuset_cpus_allowed(struct task_struct *p, | 90 | static inline void cpuset_cpus_allowed(struct task_struct *p, |
| 91 | struct cpumask *mask) | 91 | struct cpumask *mask) |
| 92 | { | 92 | { |
| 93 | *mask = cpu_possible_map; | 93 | cpumask_copy(mask, cpu_possible_mask); |
| 94 | } | 94 | } |
| 95 | static inline void cpuset_cpus_allowed_locked(struct task_struct *p, | 95 | static inline void cpuset_cpus_allowed_locked(struct task_struct *p, |
| 96 | struct cpumask *mask) | 96 | struct cpumask *mask) |
| 97 | { | 97 | { |
| 98 | *mask = cpu_possible_map; | 98 | cpumask_copy(mask, cpu_possible_mask); |
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) | 101 | static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) |
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index f616f31576d7..004f3b3342c5 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
| @@ -55,7 +55,7 @@ int seq_bitmap(struct seq_file *m, const unsigned long *bits, | |||
| 55 | unsigned int nr_bits); | 55 | unsigned int nr_bits); |
| 56 | static inline int seq_cpumask(struct seq_file *m, const struct cpumask *mask) | 56 | static inline int seq_cpumask(struct seq_file *m, const struct cpumask *mask) |
| 57 | { | 57 | { |
| 58 | return seq_bitmap(m, mask->bits, nr_cpu_ids); | 58 | return seq_bitmap(m, cpumask_bits(mask), nr_cpu_ids); |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask) | 61 | static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask) |
| @@ -63,12 +63,13 @@ static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask) | |||
| 63 | return seq_bitmap(m, mask->bits, MAX_NUMNODES); | 63 | return seq_bitmap(m, mask->bits, MAX_NUMNODES); |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | int seq_bitmap_list(struct seq_file *m, unsigned long *bits, | 66 | int seq_bitmap_list(struct seq_file *m, const unsigned long *bits, |
| 67 | unsigned int nr_bits); | 67 | unsigned int nr_bits); |
| 68 | 68 | ||
| 69 | static inline int seq_cpumask_list(struct seq_file *m, cpumask_t *mask) | 69 | static inline int seq_cpumask_list(struct seq_file *m, |
| 70 | const struct cpumask *mask) | ||
| 70 | { | 71 | { |
| 71 | return seq_bitmap_list(m, mask->bits, NR_CPUS); | 72 | return seq_bitmap_list(m, cpumask_bits(mask), nr_cpu_ids); |
| 72 | } | 73 | } |
| 73 | 74 | ||
| 74 | static inline int seq_nodemask_list(struct seq_file *m, nodemask_t *mask) | 75 | static inline int seq_nodemask_list(struct seq_file *m, nodemask_t *mask) |
