Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+48 -129
-1
arch/cris/arch-v10/kernel/time.c
··· 261 261 static struct irqaction irq2 = { 262 262 .handler = timer_interrupt, 263 263 .flags = IRQF_SHARED | IRQF_DISABLED, 264 - .mask = CPU_MASK_NONE, 265 264 .name = "timer", 266 265 }; 267 266
-1
arch/cris/arch-v32/kernel/smp.c
··· 65 65 static struct irqaction irq_ipi = { 66 66 .handler = crisv32_ipi_interrupt, 67 67 .flags = IRQF_DISABLED, 68 - .mask = CPU_MASK_NONE, 69 68 .name = "ipi", 70 69 }; 71 70
-1
arch/cris/arch-v32/kernel/time.c
··· 267 267 static struct irqaction irq_timer = { 268 268 .handler = timer_interrupt, 269 269 .flags = IRQF_SHARED | IRQF_DISABLED, 270 - .mask = CPU_MASK_NONE, 271 270 .name = "timer" 272 271 }; 273 272
-4
arch/frv/kernel/irq-mb93091.c
··· 109 109 [0] = { 110 110 .handler = fpga_interrupt, 111 111 .flags = IRQF_DISABLED | IRQF_SHARED, 112 - .mask = CPU_MASK_NONE, 113 112 .name = "fpga.0", 114 113 .dev_id = (void *) 0x0028UL, 115 114 }, 116 115 [1] = { 117 116 .handler = fpga_interrupt, 118 117 .flags = IRQF_DISABLED | IRQF_SHARED, 119 - .mask = CPU_MASK_NONE, 120 118 .name = "fpga.1", 121 119 .dev_id = (void *) 0x0050UL, 122 120 }, 123 121 [2] = { 124 122 .handler = fpga_interrupt, 125 123 .flags = IRQF_DISABLED | IRQF_SHARED, 126 - .mask = CPU_MASK_NONE, 127 124 .name = "fpga.2", 128 125 .dev_id = (void *) 0x1c00UL, 129 126 }, 130 127 [3] = { 131 128 .handler = fpga_interrupt, 132 129 .flags = IRQF_DISABLED | IRQF_SHARED, 133 - .mask = CPU_MASK_NONE, 134 130 .name = "fpga.3", 135 131 .dev_id = (void *) 0x6386UL, 136 132 }
-1
arch/frv/kernel/irq-mb93093.c
··· 108 108 [0] = { 109 109 .handler = fpga_interrupt, 110 110 .flags = IRQF_DISABLED, 111 - .mask = CPU_MASK_NONE, 112 111 .name = "fpga.0", 113 112 .dev_id = (void *) 0x0700UL, 114 113 }
-2
arch/frv/kernel/irq-mb93493.c
··· 120 120 [0] = { 121 121 .handler = mb93493_interrupt, 122 122 .flags = IRQF_DISABLED | IRQF_SHARED, 123 - .mask = CPU_MASK_NONE, 124 123 .name = "mb93493.0", 125 124 .dev_id = (void *) __addr_MB93493_IQSR(0), 126 125 }, 127 126 [1] = { 128 127 .handler = mb93493_interrupt, 129 128 .flags = IRQF_DISABLED | IRQF_SHARED, 130 - .mask = CPU_MASK_NONE, 131 129 .name = "mb93493.1", 132 130 .dev_id = (void *) __addr_MB93493_IQSR(1), 133 131 }
-1
arch/frv/kernel/time.c
··· 45 45 static struct irqaction timer_irq = { 46 46 .handler = timer_interrupt, 47 47 .flags = IRQF_DISABLED, 48 - .mask = CPU_MASK_NONE, 49 48 .name = "timer", 50 49 }; 51 50
-1
arch/h8300/kernel/timer/itu.c
··· 60 60 .name = "itu", 61 61 .handler = timer_interrupt, 62 62 .flags = IRQF_DISABLED | IRQF_TIMER, 63 - .mask = CPU_MASK_NONE, 64 63 }; 65 64 66 65 static const int __initdata divide_rate[] = {1, 2, 4, 8};
-1
arch/h8300/kernel/timer/timer16.c
··· 55 55 .name = "timer-16", 56 56 .handler = timer_interrupt, 57 57 .flags = IRQF_DISABLED | IRQF_TIMER, 58 - .mask = CPU_MASK_NONE, 59 58 }; 60 59 61 60 static const int __initdata divide_rate[] = {1, 2, 4, 8};
-1
arch/h8300/kernel/timer/timer8.c
··· 75 75 .name = "timer-8", 76 76 .handler = timer_interrupt, 77 77 .flags = IRQF_DISABLED | IRQF_TIMER, 78 - .mask = CPU_MASK_NONE, 79 78 }; 80 79 81 80 static const int __initdata divide_rate[] = {8, 64, 8192};
-1
arch/h8300/kernel/timer/tpu.c
··· 65 65 .name = "tpu", 66 66 .handler = timer_interrupt, 67 67 .flags = IRQF_DISABLED | IRQF_TIMER, 68 - .mask = CPU_MASK_NONE, 69 68 }; 70 69 71 70 const static int __initdata divide_rate[] = {
-5
arch/ia64/include/asm/topology.h
··· 44 44 #define parent_node(nid) (nid) 45 45 46 46 /* 47 - * Returns the number of the first CPU on Node 'node'. 48 - */ 49 - #define node_to_first_cpu(node) (cpumask_first(cpumask_of_node(node))) 50 - 51 - /* 52 47 * Determines the node for a given pci bus 53 48 */ 54 49 #define pcibus_to_node(bus) PCI_CONTROLLER(bus)->node
-1
arch/m32r/kernel/time.c
··· 230 230 static struct irqaction irq0 = { 231 231 .handler = timer_interrupt, 232 232 .flags = IRQF_DISABLED, 233 - .mask = CPU_MASK_NONE, 234 233 .name = "MFT2", 235 234 }; 236 235
-1
arch/mips/cobalt/irq.c
··· 47 47 48 48 static struct irqaction cascade = { 49 49 .handler = no_action, 50 - .mask = CPU_MASK_NONE, 51 50 .name = "cascade", 52 51 }; 53 52
-1
arch/mips/emma/markeins/irq.c
··· 186 186 static struct irqaction irq_cascade = { 187 187 .handler = no_action, 188 188 .flags = 0, 189 - .mask = CPU_MASK_NONE, 190 189 .name = "cascade", 191 190 .dev_id = NULL, 192 191 .next = NULL,
-1
arch/mips/include/asm/mach-ip27/topology.h
··· 26 26 #define parent_node(node) (node) 27 27 #define node_to_cpumask(node) (hub_data(node)->h_cpus) 28 28 #define cpumask_of_node(node) (&hub_data(node)->h_cpus) 29 - #define node_to_first_cpu(node) (cpumask_first(cpumask_of_node(node))) 30 29 struct pci_bus; 31 30 extern int pcibus_to_node(struct pci_bus *); 32 31
-1
arch/mips/jazz/irq.c
··· 134 134 static struct irqaction r4030_timer_irqaction = { 135 135 .handler = r4030_timer_interrupt, 136 136 .flags = IRQF_DISABLED, 137 - .mask = CPU_MASK_CPU0, 138 137 .name = "R4030 timer", 139 138 }; 140 139
-1
arch/mips/kernel/cevt-bcm1480.c
··· 144 144 145 145 action->handler = sibyte_counter_handler; 146 146 action->flags = IRQF_DISABLED | IRQF_PERCPU; 147 - action->mask = cpumask_of_cpu(cpu); 148 147 action->name = name; 149 148 action->dev_id = cd; 150 149
-1
arch/mips/kernel/cevt-sb1250.c
··· 143 143 144 144 action->handler = sibyte_counter_handler; 145 145 action->flags = IRQF_DISABLED | IRQF_PERCPU; 146 - action->mask = cpumask_of_cpu(cpu); 147 146 action->name = name; 148 147 action->dev_id = cd; 149 148
-2
arch/mips/kernel/i8253.c
··· 98 98 static struct irqaction irq0 = { 99 99 .handler = timer_interrupt, 100 100 .flags = IRQF_DISABLED | IRQF_NOBALANCING, 101 - .mask = CPU_MASK_NONE, 102 101 .name = "timer" 103 102 }; 104 103 ··· 120 121 cd->min_delta_ns = clockevent_delta2ns(0xF, cd); 121 122 clockevents_register_device(cd); 122 123 123 - irq0.mask = cpumask_of_cpu(cpu); 124 124 setup_irq(0, &irq0); 125 125 } 126 126
-1
arch/mips/kernel/i8259.c
··· 306 306 */ 307 307 static struct irqaction irq2 = { 308 308 .handler = no_action, 309 - .mask = CPU_MASK_NONE, 310 309 .name = "cascade", 311 310 }; 312 311
-1
arch/mips/lasat/interrupt.c
··· 104 104 105 105 static struct irqaction cascade = { 106 106 .handler = no_action, 107 - .mask = CPU_MASK_NONE, 108 107 .name = "cascade", 109 108 }; 110 109
-1
arch/mips/lemote/lm2e/irq.c
··· 92 92 93 93 static struct irqaction cascade_irqaction = { 94 94 .handler = no_action, 95 - .mask = CPU_MASK_NONE, 96 95 .name = "cascade", 97 96 }; 98 97
+1 -1
arch/mips/sgi-ip27/ip27-nmi.c
··· 219 219 if (i == 1000) { 220 220 for_each_online_node(node) 221 221 if (NODEPDA(node)->dump_count == 0) { 222 - cpu = node_to_first_cpu(node); 222 + cpu = cpumask_first(cpumask_of_node(node)); 223 223 for (n=0; n < CNODE_NUM_CPUS(node); cpu++, n++) { 224 224 CPUMASK_SETB(nmied_cpus, cpu); 225 225 /*
-2
arch/mips/sgi-ip32/ip32-irq.c
··· 115 115 struct irqaction memerr_irq = { 116 116 .handler = crime_memerr_intr, 117 117 .flags = IRQF_DISABLED, 118 - .mask = CPU_MASK_NONE, 119 118 .name = "CRIME memory error", 120 119 }; 121 120 122 121 struct irqaction cpuerr_irq = { 123 122 .handler = crime_cpuerr_intr, 124 123 .flags = IRQF_DISABLED, 125 - .mask = CPU_MASK_NONE, 126 124 .name = "CRIME CPU error", 127 125 }; 128 126
+2 -1
arch/mips/sni/rm200.c
··· 359 359 * IRQ2 is cascade interrupt to second interrupt controller 360 360 */ 361 361 static struct irqaction sni_rm200_irq2 = { 362 - no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL 362 + .handler = no_action, 363 + .name = "cascade", 363 364 }; 364 365 365 366 static struct resource sni_rm200_pic1_resource = {
-1
arch/mips/vr41xx/common/irq.c
··· 32 32 33 33 static struct irqaction cascade_irqaction = { 34 34 .handler = no_action, 35 - .mask = CPU_MASK_NONE, 36 35 .name = "cascade", 37 36 }; 38 37
-1
arch/mn10300/kernel/time.c
··· 37 37 static struct irqaction timer_irq = { 38 38 .handler = timer_interrupt, 39 39 .flags = IRQF_DISABLED | IRQF_SHARED | IRQF_TIMER, 40 - .mask = CPU_MASK_NONE, 41 40 .name = "timer", 42 41 }; 43 42
-5
arch/powerpc/include/asm/topology.h
··· 24 24 25 25 #define cpumask_of_node(node) (&numa_cpumask_lookup_table[node]) 26 26 27 - static inline int node_to_first_cpu(int node) 28 - { 29 - return cpumask_first(cpumask_of_node(node)); 30 - } 31 - 32 27 int of_node_to_nid(struct device_node *device); 33 28 34 29 struct pci_bus;
-1
arch/powerpc/platforms/85xx/mpc85xx_cds.c
··· 179 179 static struct irqaction mpc85xxcds_8259_irqaction = { 180 180 .handler = mpc85xx_8259_cascade_action, 181 181 .flags = IRQF_SHARED, 182 - .mask = CPU_MASK_NONE, 183 182 .name = "8259 cascade", 184 183 }; 185 184 #endif /* PPC_I8259 */
-1
arch/powerpc/platforms/8xx/m8xx_setup.c
··· 44 44 45 45 static struct irqaction tbint_irqaction = { 46 46 .handler = timebase_interrupt, 47 - .mask = CPU_MASK_NONE, 48 47 .name = "tbint", 49 48 }; 50 49
-1
arch/powerpc/platforms/chrp/setup.c
··· 472 472 #if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_XMON) 473 473 static struct irqaction xmon_irqaction = { 474 474 .handler = xmon_irq, 475 - .mask = CPU_MASK_NONE, 476 475 .name = "XMON break", 477 476 }; 478 477 #endif
-2
arch/powerpc/platforms/powermac/pic.c
··· 266 266 static struct irqaction xmon_action = { 267 267 .handler = xmon_irq, 268 268 .flags = 0, 269 - .mask = CPU_MASK_NONE, 270 269 .name = "NMI - XMON" 271 270 }; 272 271 #endif ··· 273 274 static struct irqaction gatwick_cascade_action = { 274 275 .handler = gatwick_action, 275 276 .flags = IRQF_DISABLED, 276 - .mask = CPU_MASK_NONE, 277 277 .name = "cascade", 278 278 }; 279 279
-1
arch/powerpc/platforms/powermac/smp.c
··· 385 385 static struct irqaction psurge_irqaction = { 386 386 .handler = psurge_primary_intr, 387 387 .flags = IRQF_DISABLED, 388 - .mask = CPU_MASK_NONE, 389 388 .name = "primary IPI", 390 389 }; 391 390
-1
arch/powerpc/sysdev/cpm1.c
··· 119 119 120 120 static struct irqaction cpm_error_irqaction = { 121 121 .handler = cpm_error_interrupt, 122 - .mask = CPU_MASK_NONE, 123 122 .name = "error", 124 123 }; 125 124
-1
arch/sh/include/asm/topology.h
··· 33 33 34 34 #define node_to_cpumask(node) ((void)node, cpu_online_map) 35 35 #define cpumask_of_node(node) ((void)node, cpu_online_mask) 36 - #define node_to_first_cpu(node) ((void)(node),0) 37 36 38 37 #define pcibus_to_node(bus) ((void)(bus), -1) 39 38 #define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \
-1
arch/sh/kernel/time_64.c
··· 284 284 static struct irqaction irq0 = { 285 285 .handler = timer_interrupt, 286 286 .flags = IRQF_DISABLED, 287 - .mask = CPU_MASK_NONE, 288 287 .name = "timer", 289 288 }; 290 289
-1
arch/sh/kernel/timers/timer-cmt.c
··· 109 109 .name = "timer", 110 110 .handler = cmt_timer_interrupt, 111 111 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 112 - .mask = CPU_MASK_NONE, 113 112 }; 114 113 115 114 static void cmt_clk_init(struct clk *clk)
-1
arch/sh/kernel/timers/timer-mtu2.c
··· 115 115 .name = "timer", 116 116 .handler = mtu2_timer_interrupt, 117 117 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 118 - .mask = CPU_MASK_NONE, 119 118 }; 120 119 121 120 static unsigned int divisors[] = { 1, 4, 16, 64, 1, 1, 256 };
-1
arch/sh/kernel/timers/timer-tmu.c
··· 162 162 .name = "periodic/oneshot timer", 163 163 .handler = tmu_timer_interrupt, 164 164 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 165 - .mask = CPU_MASK_NONE, 166 165 }; 167 166 168 167 static void __init tmu_clk_init(struct clk *clk)
-5
arch/sparc/include/asm/topology_64.h
··· 28 28 #define node_to_cpumask_ptr_next(v, node) \ 29 29 v = &(numa_cpumask_lookup_table[node]) 30 30 31 - static inline int node_to_first_cpu(int node) 32 - { 33 - return cpumask_first(cpumask_of_node(node)); 34 - } 35 - 36 31 struct pci_bus; 37 32 #ifdef CONFIG_PCI 38 33 extern int pcibus_to_node(struct pci_bus *pbus);
-2
arch/sparc/kernel/irq_32.c
··· 439 439 flush_cache_all(); 440 440 441 441 action->flags = irqflags; 442 - cpus_clear(action->mask); 443 442 action->name = devname; 444 443 action->dev_id = NULL; 445 444 action->next = NULL; ··· 573 574 574 575 action->handler = handler; 575 576 action->flags = irqflags; 576 - cpus_clear(action->mask); 577 577 action->name = devname; 578 578 action->next = NULL; 579 579 action->dev_id = dev_id;
-1
arch/sparc/kernel/sun4d_irq.c
··· 326 326 327 327 action->handler = handler; 328 328 action->flags = irqflags; 329 - cpus_clear(action->mask); 330 329 action->name = devname; 331 330 action->next = NULL; 332 331 action->dev_id = dev_id;
-12
arch/x86/include/asm/topology.h
··· 217 217 { 218 218 return cpu_online_map; 219 219 } 220 - static inline int node_to_first_cpu(int node) 221 - { 222 - return first_cpu(cpu_online_map); 223 - } 224 220 225 221 static inline void setup_node_to_cpumask_map(void) { } 226 222 ··· 232 236 #endif 233 237 234 238 #include <asm-generic/topology.h> 235 - 236 - #ifdef CONFIG_NUMA 237 - /* Returns the number of the first CPU on Node 'node'. */ 238 - static inline int node_to_first_cpu(int node) 239 - { 240 - return cpumask_first(cpumask_of_node(node)); 241 - } 242 - #endif 243 239 244 240 extern cpumask_t cpu_coregroup_map(int cpu); 245 241 extern const struct cpumask *cpu_coregroup_mask(int cpu);
-2
arch/x86/kernel/irqinit_32.c
··· 50 50 */ 51 51 static struct irqaction fpu_irq = { 52 52 .handler = math_error_irq, 53 - .mask = CPU_MASK_NONE, 54 53 .name = "fpu", 55 54 }; 56 55 ··· 82 83 */ 83 84 static struct irqaction irq2 = { 84 85 .handler = no_action, 85 - .mask = CPU_MASK_NONE, 86 86 .name = "cascade", 87 87 }; 88 88
-1
arch/x86/kernel/irqinit_64.c
··· 45 45 46 46 static struct irqaction irq2 = { 47 47 .handler = no_action, 48 - .mask = CPU_MASK_NONE, 49 48 .name = "cascade", 50 49 }; 51 50 DEFINE_PER_CPU(vector_irq_t, vector_irq) = {
-1
arch/x86/kernel/mfgpt_32.c
··· 348 348 static struct irqaction mfgptirq = { 349 349 .handler = mfgpt_tick, 350 350 .flags = IRQF_DISABLED | IRQF_NOBALANCING, 351 - .mask = CPU_MASK_NONE, 352 351 .name = "mfgpt-timer" 353 352 }; 354 353
-1
arch/x86/kernel/setup.c
··· 1049 1049 static struct irqaction irq0 = { 1050 1050 .handler = timer_interrupt, 1051 1051 .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL | IRQF_TIMER, 1052 - .mask = CPU_MASK_NONE, 1053 1052 .name = "timer" 1054 1053 }; 1055 1054
-2
arch/x86/kernel/time_64.c
··· 116 116 static struct irqaction irq0 = { 117 117 .handler = timer_interrupt, 118 118 .flags = IRQF_DISABLED | IRQF_IRQPOLL | IRQF_NOBALANCING | IRQF_TIMER, 119 - .mask = CPU_MASK_NONE, 120 119 .name = "timer" 121 120 }; 122 121 ··· 124 125 if (!hpet_enable()) 125 126 setup_pit_timer(); 126 127 127 - irq0.mask = cpumask_of_cpu(0); 128 128 setup_irq(0, &irq0); 129 129 } 130 130
-1
arch/x86/kernel/vmiclock_32.c
··· 202 202 .name = "vmi-timer", 203 203 .handler = vmi_timer_interrupt, 204 204 .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER, 205 - .mask = CPU_MASK_ALL, 206 205 }; 207 206 208 207 static void __devinit vmi_time_init_clockevent(void)
+1 -1
drivers/base/cpu.c
··· 119 119 #define print_cpus_func(type) \ 120 120 static ssize_t print_cpus_##type(struct sysdev_class *class, char *buf) \ 121 121 { \ 122 - return print_cpus_map(buf, &cpu_##type##_map); \ 122 + return print_cpus_map(buf, cpu_##type##_mask); \ 123 123 } \ 124 124 static struct sysdev_class_attribute attr_##type##_map = \ 125 125 _SYSDEV_CLASS_ATTR(type, 0444, print_cpus_##type, NULL)
+1 -1
drivers/oprofile/buffer_sync.c
··· 574 574 return 0; 575 575 } 576 576 577 - void __exit buffer_sync_cleanup(void) 577 + void buffer_sync_cleanup(void) 578 578 { 579 579 free_cpumask_var(marked_cpus); 580 580 }
+1 -1
fs/seq_file.c
··· 513 513 } 514 514 EXPORT_SYMBOL(seq_bitmap); 515 515 516 - int seq_bitmap_list(struct seq_file *m, unsigned long *bits, 516 + int seq_bitmap_list(struct seq_file *m, const unsigned long *bits, 517 517 unsigned int nr_bits) 518 518 { 519 519 if (m->count < m->size) {
-10
include/asm-generic/topology.h
··· 43 43 #ifndef cpumask_of_node 44 44 #define cpumask_of_node(node) ((void)node, cpu_online_mask) 45 45 #endif 46 - #ifndef node_to_first_cpu 47 - #define node_to_first_cpu(node) ((void)(node),0) 48 - #endif 49 46 #ifndef pcibus_to_node 50 47 #define pcibus_to_node(bus) ((void)(bus), -1) 51 - #endif 52 - 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 48 #endif 59 49 60 50 #ifndef cpumask_of_pcibus
+2 -2
include/linux/cpuset.h
··· 90 90 static inline void cpuset_cpus_allowed(struct task_struct *p, 91 91 struct cpumask *mask) 92 92 { 93 - *mask = cpu_possible_map; 93 + cpumask_copy(mask, cpu_possible_mask); 94 94 } 95 95 static inline void cpuset_cpus_allowed_locked(struct task_struct *p, 96 96 struct cpumask *mask) 97 97 { 98 - *mask = cpu_possible_map; 98 + cpumask_copy(mask, cpu_possible_mask); 99 99 } 100 100 101 101 static inline nodemask_t cpuset_mems_allowed(struct task_struct *p)
+5 -4
include/linux/seq_file.h
··· 55 55 unsigned int nr_bits); 56 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 61 static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask) ··· 63 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 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 75 static inline int seq_nodemask_list(struct seq_file *m, nodemask_t *mask)
+2 -3
init/main.c
··· 407 407 * Set up the current CPU as possible to migrate to. 408 408 * The other ones will be done by cpu_up/cpu_down() 409 409 */ 410 - cpu = smp_processor_id(); 411 - cpu_set(cpu, cpu_active_map); 410 + set_cpu_active(smp_processor_id(), true); 412 411 413 412 /* FIXME: This should be done in userspace --RR */ 414 413 for_each_present_cpu(cpu) { ··· 841 842 /* 842 843 * init can run on any cpu. 843 844 */ 844 - set_cpus_allowed_ptr(current, CPU_MASK_ALL_PTR); 845 + set_cpus_allowed_ptr(current, cpu_all_mask); 845 846 /* 846 847 * Tell the world that we're going to be the grim 847 848 * reaper of innocent orphaned children.
+3 -3
kernel/cpu.c
··· 281 281 goto out; 282 282 } 283 283 284 - cpu_clear(cpu, cpu_active_map); 284 + set_cpu_active(cpu, false); 285 285 286 286 /* 287 287 * Make sure the all cpus did the reschedule and are not ··· 296 296 err = _cpu_down(cpu, 0); 297 297 298 298 if (cpu_online(cpu)) 299 - cpu_set(cpu, cpu_active_map); 299 + set_cpu_active(cpu, true); 300 300 301 301 out: 302 302 cpu_maps_update_done(); ··· 333 333 goto out_notify; 334 334 BUG_ON(!cpu_online(cpu)); 335 335 336 - cpu_set(cpu, cpu_active_map); 336 + set_cpu_active(cpu, true); 337 337 338 338 /* Now call notifier in preparation. */ 339 339 raw_notifier_call_chain(&cpu_chain, CPU_ONLINE | mod, hcpu);
+1 -1
kernel/fork.c
··· 284 284 mm->free_area_cache = oldmm->mmap_base; 285 285 mm->cached_hole_size = ~0UL; 286 286 mm->map_count = 0; 287 - cpus_clear(mm->cpu_vm_mask); 287 + cpumask_clear(mm_cpumask(mm)); 288 288 mm->mm_rb = RB_ROOT; 289 289 rb_link = &mm->mm_rb.rb_node; 290 290 rb_parent = NULL;
+1 -1
kernel/kmod.c
··· 167 167 } 168 168 169 169 /* We can run anywhere, unlike our parent keventd(). */ 170 - set_cpus_allowed_ptr(current, CPU_MASK_ALL_PTR); 170 + set_cpus_allowed_ptr(current, cpu_all_mask); 171 171 172 172 /* 173 173 * Our parent is keventd, which runs with elevated scheduling priority.
+2 -2
kernel/kthread.c
··· 110 110 */ 111 111 sched_setscheduler(create->result, SCHED_NORMAL, &param); 112 112 set_user_nice(create->result, KTHREAD_NICE_LEVEL); 113 - set_cpus_allowed_ptr(create->result, CPU_MASK_ALL_PTR); 113 + set_cpus_allowed_ptr(create->result, cpu_all_mask); 114 114 } 115 115 complete(&create->done); 116 116 } ··· 240 240 set_task_comm(tsk, "kthreadd"); 241 241 ignore_signals(tsk); 242 242 set_user_nice(tsk, KTHREAD_NICE_LEVEL); 243 - set_cpus_allowed_ptr(tsk, CPU_MASK_ALL_PTR); 243 + set_cpus_allowed_ptr(tsk, cpu_all_mask); 244 244 245 245 current->flags |= PF_NOFREEZE | PF_FREEZER_NOSIG; 246 246
+17 -8
kernel/rcutorture.c
··· 126 126 static atomic_t n_rcu_torture_error; 127 127 static long n_rcu_torture_timers = 0; 128 128 static struct list_head rcu_torture_removed; 129 + static cpumask_var_t shuffle_tmp_mask; 129 130 130 131 static int stutter_pause_test = 0; 131 132 ··· 890 889 */ 891 890 static void rcu_torture_shuffle_tasks(void) 892 891 { 893 - cpumask_t tmp_mask; 894 892 int i; 895 893 896 - cpus_setall(tmp_mask); 894 + cpumask_setall(shuffle_tmp_mask); 897 895 get_online_cpus(); 898 896 899 897 /* No point in shuffling if there is only one online CPU (ex: UP) */ ··· 902 902 } 903 903 904 904 if (rcu_idle_cpu != -1) 905 - cpu_clear(rcu_idle_cpu, tmp_mask); 905 + cpumask_clear_cpu(rcu_idle_cpu, shuffle_tmp_mask); 906 906 907 - set_cpus_allowed_ptr(current, &tmp_mask); 907 + set_cpus_allowed_ptr(current, shuffle_tmp_mask); 908 908 909 909 if (reader_tasks) { 910 910 for (i = 0; i < nrealreaders; i++) 911 911 if (reader_tasks[i]) 912 912 set_cpus_allowed_ptr(reader_tasks[i], 913 - &tmp_mask); 913 + shuffle_tmp_mask); 914 914 } 915 915 916 916 if (fakewriter_tasks) { 917 917 for (i = 0; i < nfakewriters; i++) 918 918 if (fakewriter_tasks[i]) 919 919 set_cpus_allowed_ptr(fakewriter_tasks[i], 920 - &tmp_mask); 920 + shuffle_tmp_mask); 921 921 } 922 922 923 923 if (writer_task) 924 - set_cpus_allowed_ptr(writer_task, &tmp_mask); 924 + set_cpus_allowed_ptr(writer_task, shuffle_tmp_mask); 925 925 926 926 if (stats_task) 927 - set_cpus_allowed_ptr(stats_task, &tmp_mask); 927 + set_cpus_allowed_ptr(stats_task, shuffle_tmp_mask); 928 928 929 929 if (rcu_idle_cpu == -1) 930 930 rcu_idle_cpu = num_online_cpus() - 1; ··· 1012 1012 if (shuffler_task) { 1013 1013 VERBOSE_PRINTK_STRING("Stopping rcu_torture_shuffle task"); 1014 1014 kthread_stop(shuffler_task); 1015 + free_cpumask_var(shuffle_tmp_mask); 1015 1016 } 1016 1017 shuffler_task = NULL; 1017 1018 ··· 1191 1190 } 1192 1191 if (test_no_idle_hz) { 1193 1192 rcu_idle_cpu = num_online_cpus() - 1; 1193 + 1194 + if (!alloc_cpumask_var(&shuffle_tmp_mask, GFP_KERNEL)) { 1195 + firsterr = -ENOMEM; 1196 + VERBOSE_PRINTK_ERRSTRING("Failed to alloc mask"); 1197 + goto unwind; 1198 + } 1199 + 1194 1200 /* Create the shuffler thread */ 1195 1201 shuffler_task = kthread_run(rcu_torture_shuffle, NULL, 1196 1202 "rcu_torture_shuffle"); 1197 1203 if (IS_ERR(shuffler_task)) { 1204 + free_cpumask_var(shuffle_tmp_mask); 1198 1205 firsterr = PTR_ERR(shuffler_task); 1199 1206 VERBOSE_PRINTK_ERRSTRING("Failed to create shuffler"); 1200 1207 shuffler_task = NULL;
+1 -1
kernel/sched_cpupri.h
··· 25 25 26 26 #ifdef CONFIG_SMP 27 27 int cpupri_find(struct cpupri *cp, 28 - struct task_struct *p, cpumask_t *lowest_mask); 28 + struct task_struct *p, struct cpumask *lowest_mask); 29 29 void cpupri_set(struct cpupri *cp, int cpu, int pri); 30 30 int cpupri_init(struct cpupri *cp, bool bootmem); 31 31 void cpupri_cleanup(struct cpupri *cp);
+1 -1
kernel/stop_machine.c
··· 44 44 static int refcount; 45 45 static struct workqueue_struct *stop_machine_wq; 46 46 static struct stop_machine_data active, idle; 47 - static const cpumask_t *active_cpus; 47 + static const struct cpumask *active_cpus; 48 48 static void *stop_machine_work; 49 49 50 50 static void set_state(enum stopmachine_state newstate)
+3 -3
kernel/workqueue.c
··· 416 416 might_sleep(); 417 417 lock_map_acquire(&wq->lockdep_map); 418 418 lock_map_release(&wq->lockdep_map); 419 - for_each_cpu_mask_nr(cpu, *cpu_map) 419 + for_each_cpu(cpu, cpu_map) 420 420 flush_cpu_workqueue(per_cpu_ptr(wq->cpu_wq, cpu)); 421 421 } 422 422 EXPORT_SYMBOL_GPL(flush_workqueue); ··· 547 547 wq = cwq->wq; 548 548 cpu_map = wq_cpu_map(wq); 549 549 550 - for_each_cpu_mask_nr(cpu, *cpu_map) 550 + for_each_cpu(cpu, cpu_map) 551 551 wait_on_cpu_work(per_cpu_ptr(wq->cpu_wq, cpu), work); 552 552 } 553 553 ··· 911 911 list_del(&wq->list); 912 912 spin_unlock(&workqueue_lock); 913 913 914 - for_each_cpu_mask_nr(cpu, *cpu_map) 914 + for_each_cpu(cpu, cpu_map) 915 915 cleanup_workqueue_thread(per_cpu_ptr(wq->cpu_wq, cpu)); 916 916 cpu_maps_update_done(); 917 917
+1 -1
mm/allocpercpu.c
··· 143 143 { 144 144 if (unlikely(!__pdata)) 145 145 return; 146 - __percpu_depopulate_mask(__pdata, &cpu_possible_map); 146 + __percpu_depopulate_mask(__pdata, cpu_possible_mask); 147 147 kfree(__percpu_disguise(__pdata)); 148 148 } 149 149 EXPORT_SYMBOL_GPL(free_percpu);
+1 -1
mm/pdflush.c
··· 191 191 192 192 /* 193 193 * Some configs put our parent kthread in a limited cpuset, 194 - * which kthread() overrides, forcing cpus_allowed == CPU_MASK_ALL. 194 + * which kthread() overrides, forcing cpus_allowed == cpu_all_mask. 195 195 * Our needs are more modest - cut back to our cpusets cpus_allowed. 196 196 * This is needed as pdflush's are dynamically created and destroyed. 197 197 * The boottime pdflush's are easily placed w/o these 2 lines.
+1 -1
mm/vmstat.c
··· 27 27 28 28 memset(ret, 0, NR_VM_EVENT_ITEMS * sizeof(unsigned long)); 29 29 30 - for_each_cpu_mask_nr(cpu, *cpumask) { 30 + for_each_cpu(cpu, cpumask) { 31 31 struct vm_event_state *this = &per_cpu(vm_event_states, cpu); 32 32 33 33 for (i = 0; i < NR_VM_EVENT_ITEMS; i++)
+1 -1
net/sunrpc/svc.c
··· 312 312 switch (m->mode) { 313 313 case SVC_POOL_PERCPU: 314 314 { 315 - set_cpus_allowed_ptr(task, &cpumask_of_cpu(node)); 315 + set_cpus_allowed_ptr(task, cpumask_of(node)); 316 316 break; 317 317 } 318 318 case SVC_POOL_PERNODE: