Commit eaa958402ea40851097d051f52ba1bb7a885efe9
Committed by
Rusty Russell
1 parent
0281b5dc03
cpumask: alloc zeroed cpumask for static cpumask_var_ts
These are defined as static cpumask_var_t so if MAXSMP is not used, they are cleared already. Avoid surprises when MAXSMP is enabled. Signed-off-by: Yinghai Lu <yinghai.lu@kernel.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Showing 11 changed files with 11 additions and 11 deletions Side-by-side Diff
- arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
- arch/x86/kernel/cpu/cpufreq/powernow-k7.c
- arch/x86/kernel/cpu/cpufreq/powernow-k8.c
- arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
- arch/x86/kernel/cpu/mcheck/mce_64.c
- arch/x86/kernel/tlb_uv.c
- drivers/acpi/processor_core.c
- drivers/cpufreq/cpufreq.c
- kernel/sched_cpupri.c
- kernel/sched_rt.c
- kernel/smp.c
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
arch/x86/kernel/cpu/cpufreq/powernow-k7.c
arch/x86/kernel/cpu/cpufreq/powernow-k8.c
... | ... | @@ -887,7 +887,7 @@ |
887 | 887 | /* notify BIOS that we exist */ |
888 | 888 | acpi_processor_notify_smm(THIS_MODULE); |
889 | 889 | |
890 | - if (!alloc_cpumask_var(&data->acpi_data.shared_cpu_map, GFP_KERNEL)) { | |
890 | + if (!zalloc_cpumask_var(&data->acpi_data.shared_cpu_map, GFP_KERNEL)) { | |
891 | 891 | printk(KERN_ERR PFX |
892 | 892 | "unable to alloc powernow_k8_data cpumask\n"); |
893 | 893 | ret_val = -ENOMEM; |
arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
... | ... | @@ -471,7 +471,7 @@ |
471 | 471 | |
472 | 472 | if (unlikely(!alloc_cpumask_var(&saved_mask, GFP_KERNEL))) |
473 | 473 | return -ENOMEM; |
474 | - if (unlikely(!alloc_cpumask_var(&covered_cpus, GFP_KERNEL))) { | |
474 | + if (unlikely(!zalloc_cpumask_var(&covered_cpus, GFP_KERNEL))) { | |
475 | 475 | free_cpumask_var(saved_mask); |
476 | 476 | return -ENOMEM; |
477 | 477 | } |
arch/x86/kernel/cpu/mcheck/mce_64.c
arch/x86/kernel/tlb_uv.c
... | ... | @@ -832,7 +832,7 @@ |
832 | 832 | return 0; |
833 | 833 | |
834 | 834 | for_each_possible_cpu(cur_cpu) |
835 | - alloc_cpumask_var_node(&per_cpu(uv_flush_tlb_mask, cur_cpu), | |
835 | + zalloc_cpumask_var_node(&per_cpu(uv_flush_tlb_mask, cur_cpu), | |
836 | 836 | GFP_KERNEL, cpu_to_node(cur_cpu)); |
837 | 837 | |
838 | 838 | uv_bau_retry_limit = 1; |
drivers/acpi/processor_core.c
drivers/cpufreq/cpufreq.c
... | ... | @@ -808,7 +808,7 @@ |
808 | 808 | ret = -ENOMEM; |
809 | 809 | goto nomem_out; |
810 | 810 | } |
811 | - if (!alloc_cpumask_var(&policy->related_cpus, GFP_KERNEL)) { | |
811 | + if (!zalloc_cpumask_var(&policy->related_cpus, GFP_KERNEL)) { | |
812 | 812 | free_cpumask_var(policy->cpus); |
813 | 813 | kfree(policy); |
814 | 814 | ret = -ENOMEM; |
kernel/sched_cpupri.c
kernel/sched_rt.c
... | ... | @@ -1591,7 +1591,7 @@ |
1591 | 1591 | unsigned int i; |
1592 | 1592 | |
1593 | 1593 | for_each_possible_cpu(i) |
1594 | - alloc_cpumask_var_node(&per_cpu(local_cpu_mask, i), | |
1594 | + zalloc_cpumask_var_node(&per_cpu(local_cpu_mask, i), | |
1595 | 1595 | GFP_KERNEL, cpu_to_node(i)); |
1596 | 1596 | } |
1597 | 1597 | #endif /* CONFIG_SMP */ |
kernel/smp.c