aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/apic/io_apic.c4
-rw-r--r--include/linux/irq.h18
-rw-r--r--kernel/cpuset.c2
-rw-r--r--kernel/profile.c6
-rw-r--r--lib/cpumask.c11
5 files changed, 12 insertions, 29 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 1946fac42ab..139201a562b 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -185,8 +185,8 @@ int __init arch_early_irq_init(void)
185 for (i = 0; i < count; i++) { 185 for (i = 0; i < count; i++) {
186 desc = irq_to_desc(i); 186 desc = irq_to_desc(i);
187 desc->chip_data = &cfg[i]; 187 desc->chip_data = &cfg[i];
188 alloc_bootmem_cpumask_var(&cfg[i].domain); 188 alloc_cpumask_var(&cfg[i].domain, GFP_NOWAIT);
189 alloc_bootmem_cpumask_var(&cfg[i].old_domain); 189 alloc_cpumask_var(&cfg[i].old_domain, GFP_NOWAIT);
190 if (i < NR_IRQS_LEGACY) 190 if (i < NR_IRQS_LEGACY)
191 cpumask_setall(cfg[i].domain); 191 cpumask_setall(cfg[i].domain);
192 } 192 }
diff --git a/include/linux/irq.h b/include/linux/irq.h
index eedbb8e5e0c..1e50c34f006 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -430,23 +430,19 @@ extern int set_irq_msi(unsigned int irq, struct msi_desc *entry);
430 * Returns true if successful (or not required). 430 * Returns true if successful (or not required).
431 */ 431 */
432static inline bool alloc_desc_masks(struct irq_desc *desc, int node, 432static inline bool alloc_desc_masks(struct irq_desc *desc, int node,
433 bool boot) 433 bool boot)
434{ 434{
435#ifdef CONFIG_CPUMASK_OFFSTACK 435 gfp_t gfp = GFP_ATOMIC;
436 if (boot) {
437 alloc_bootmem_cpumask_var(&desc->affinity);
438 436
439#ifdef CONFIG_GENERIC_PENDING_IRQ 437 if (boot)
440 alloc_bootmem_cpumask_var(&desc->pending_mask); 438 gfp = GFP_NOWAIT;
441#endif
442 return true;
443 }
444 439
445 if (!alloc_cpumask_var_node(&desc->affinity, GFP_ATOMIC, node)) 440#ifdef CONFIG_CPUMASK_OFFSTACK
441 if (!alloc_cpumask_var_node(&desc->affinity, gfp, node))
446 return false; 442 return false;
447 443
448#ifdef CONFIG_GENERIC_PENDING_IRQ 444#ifdef CONFIG_GENERIC_PENDING_IRQ
449 if (!alloc_cpumask_var_node(&desc->pending_mask, GFP_ATOMIC, node)) { 445 if (!alloc_cpumask_var_node(&desc->pending_mask, gfp, node)) {
450 free_cpumask_var(desc->affinity); 446 free_cpumask_var(desc->affinity);
451 return false; 447 return false;
452 } 448 }
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 026faccca86..d5a7e17474e 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1857,7 +1857,7 @@ struct cgroup_subsys cpuset_subsys = {
1857 1857
1858int __init cpuset_init_early(void) 1858int __init cpuset_init_early(void)
1859{ 1859{
1860 alloc_bootmem_cpumask_var(&top_cpuset.cpus_allowed); 1860 alloc_cpumask_var(&top_cpuset.cpus_allowed, GFP_NOWAIT);
1861 1861
1862 top_cpuset.mems_generation = cpuset_mems_generation++; 1862 top_cpuset.mems_generation = cpuset_mems_generation++;
1863 return 0; 1863 return 0;
diff --git a/kernel/profile.c b/kernel/profile.c
index 7724e0409ba..28cf26ad2d2 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -111,12 +111,6 @@ int __ref profile_init(void)
111 /* only text is profiled */ 111 /* only text is profiled */
112 prof_len = (_etext - _stext) >> prof_shift; 112 prof_len = (_etext - _stext) >> prof_shift;
113 buffer_bytes = prof_len*sizeof(atomic_t); 113 buffer_bytes = prof_len*sizeof(atomic_t);
114 if (!slab_is_available()) {
115 prof_buffer = alloc_bootmem(buffer_bytes);
116 alloc_bootmem_cpumask_var(&prof_cpu_mask);
117 cpumask_copy(prof_cpu_mask, cpu_possible_mask);
118 return 0;
119 }
120 114
121 if (!alloc_cpumask_var(&prof_cpu_mask, GFP_KERNEL)) 115 if (!alloc_cpumask_var(&prof_cpu_mask, GFP_KERNEL))
122 return -ENOMEM; 116 return -ENOMEM;
diff --git a/lib/cpumask.c b/lib/cpumask.c
index eb23aaa0c7b..7bb4142a502 100644
--- a/lib/cpumask.c
+++ b/lib/cpumask.c
@@ -92,15 +92,8 @@ int cpumask_any_but(const struct cpumask *mask, unsigned int cpu)
92 */ 92 */
93bool alloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags, int node) 93bool alloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags, int node)
94{ 94{
95 if (likely(slab_is_available())) 95 *mask = kmalloc_node(cpumask_size(), flags, node);
96 *mask = kmalloc_node(cpumask_size(), flags, node); 96
97 else {
98#ifdef CONFIG_DEBUG_PER_CPU_MAPS
99 printk(KERN_ERR
100 "=> alloc_cpumask_var: kmalloc not available!\n");
101#endif
102 *mask = NULL;
103 }
104#ifdef CONFIG_DEBUG_PER_CPU_MAPS 97#ifdef CONFIG_DEBUG_PER_CPU_MAPS
105 if (!*mask) { 98 if (!*mask) {
106 printk(KERN_ERR "=> alloc_cpumask_var: failed!\n"); 99 printk(KERN_ERR "=> alloc_cpumask_var: failed!\n");