diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-06-06 17:51:36 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-06-09 09:00:27 -0400 |
commit | eaa958402ea40851097d051f52ba1bb7a885efe9 (patch) | |
tree | 9187f59ff0ee6ac138b5c81a2212bc10f46d04a5 /arch/x86/kernel | |
parent | 0281b5dc0350cbf6dd21ed558a33cccce77abc02 (diff) |
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>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/powernow-k7.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_64.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/tlb_uv.c | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index 54b6de2cd947..752e8c6b2c7e 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -550,7 +550,7 @@ static int __init acpi_cpufreq_early_init(void) | |||
550 | return -ENOMEM; | 550 | return -ENOMEM; |
551 | } | 551 | } |
552 | for_each_possible_cpu(i) { | 552 | for_each_possible_cpu(i) { |
553 | if (!alloc_cpumask_var_node( | 553 | if (!zalloc_cpumask_var_node( |
554 | &per_cpu_ptr(acpi_perf_data, i)->shared_cpu_map, | 554 | &per_cpu_ptr(acpi_perf_data, i)->shared_cpu_map, |
555 | GFP_KERNEL, cpu_to_node(i))) { | 555 | GFP_KERNEL, cpu_to_node(i))) { |
556 | 556 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c b/arch/x86/kernel/cpu/cpufreq/powernow-k7.c index a8363e5be4ef..d47c775eb0ab 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k7.c | |||
@@ -322,7 +322,7 @@ static int powernow_acpi_init(void) | |||
322 | goto err0; | 322 | goto err0; |
323 | } | 323 | } |
324 | 324 | ||
325 | if (!alloc_cpumask_var(&acpi_processor_perf->shared_cpu_map, | 325 | if (!zalloc_cpumask_var(&acpi_processor_perf->shared_cpu_map, |
326 | GFP_KERNEL)) { | 326 | GFP_KERNEL)) { |
327 | retval = -ENOMEM; | 327 | retval = -ENOMEM; |
328 | goto err05; | 328 | goto err05; |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index 35dc8fbe92bd..cf52215d9eb1 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -887,7 +887,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) | |||
887 | /* notify BIOS that we exist */ | 887 | /* notify BIOS that we exist */ |
888 | acpi_processor_notify_smm(THIS_MODULE); | 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 | printk(KERN_ERR PFX | 891 | printk(KERN_ERR PFX |
892 | "unable to alloc powernow_k8_data cpumask\n"); | 892 | "unable to alloc powernow_k8_data cpumask\n"); |
893 | ret_val = -ENOMEM; | 893 | ret_val = -ENOMEM; |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c index c9f1fdc02830..55c831ed71ce 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -471,7 +471,7 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
471 | 471 | ||
472 | if (unlikely(!alloc_cpumask_var(&saved_mask, GFP_KERNEL))) | 472 | if (unlikely(!alloc_cpumask_var(&saved_mask, GFP_KERNEL))) |
473 | return -ENOMEM; | 473 | return -ENOMEM; |
474 | if (unlikely(!alloc_cpumask_var(&covered_cpus, GFP_KERNEL))) { | 474 | if (unlikely(!zalloc_cpumask_var(&covered_cpus, GFP_KERNEL))) { |
475 | free_cpumask_var(saved_mask); | 475 | free_cpumask_var(saved_mask); |
476 | return -ENOMEM; | 476 | return -ENOMEM; |
477 | } | 477 | } |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c index 6fb0b359d2a5..09dd1d414fc3 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_64.c | |||
@@ -1163,7 +1163,7 @@ static __init int mce_init_device(void) | |||
1163 | if (!mce_available(&boot_cpu_data)) | 1163 | if (!mce_available(&boot_cpu_data)) |
1164 | return -EIO; | 1164 | return -EIO; |
1165 | 1165 | ||
1166 | alloc_cpumask_var(&mce_device_initialized, GFP_KERNEL); | 1166 | zalloc_cpumask_var(&mce_device_initialized, GFP_KERNEL); |
1167 | 1167 | ||
1168 | err = mce_init_banks(); | 1168 | err = mce_init_banks(); |
1169 | if (err) | 1169 | if (err) |
diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c index ed0c33761e6d..8c7b03b0cfcb 100644 --- a/arch/x86/kernel/tlb_uv.c +++ b/arch/x86/kernel/tlb_uv.c | |||
@@ -832,7 +832,7 @@ static int __init uv_bau_init(void) | |||
832 | return 0; | 832 | return 0; |
833 | 833 | ||
834 | for_each_possible_cpu(cur_cpu) | 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 | GFP_KERNEL, cpu_to_node(cur_cpu)); | 836 | GFP_KERNEL, cpu_to_node(cur_cpu)); |
837 | 837 | ||
838 | uv_bau_retry_limit = 1; | 838 | uv_bau_retry_limit = 1; |