2009-06-17 21:43:59

by Yinghai Lu

[permalink] [raw]
Subject: [PATCH] x86: use zalloc_cpumask_var for mce_devinitialized


to make MAXSMP happy

Signed-off-by: Yinghai Lu <[email protected]>

---
arch/x86/kernel/cpu/mcheck/mce.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/arch/x86/kernel/cpu/mcheck/mce.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/mcheck/mce.c
+++ linux-2.6/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1969,7 +1969,7 @@ static __init int mce_init_device(void)
if (!mce_available(&boot_cpu_data))
return -EIO;

- alloc_cpumask_var(&mce_dev_initialized, GFP_KERNEL);
+ zalloc_cpumask_var(&mce_dev_initialized, GFP_KERNEL);

err = mce_init_banks();
if (err)


2009-06-17 21:44:31

by Yinghai Lu

[permalink] [raw]
Subject: [PATCH] x86: mce fix type


can not have two ignore_ce

Signed-off-by: Yinghai Lu <[email protected]>

---
arch/x86/kernel/cpu/mcheck/mce.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/arch/x86/kernel/cpu/mcheck/mce.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/mcheck/mce.c
+++ linux-2.6/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1777,7 +1777,7 @@ static struct sysdev_ext_attribute attr_
};

static struct sysdev_ext_attribute attr_cmci_disabled = {
- _SYSDEV_ATTR(ignore_ce, 0644, sysdev_show_int, set_cmci_disabled),
+ _SYSDEV_ATTR(cmci_disabled, 0644, sysdev_show_int, set_cmci_disabled),
&mce_cmci_disabled
};

2009-06-17 23:22:18

by Yinghai Lu

[permalink] [raw]
Subject: [PATCH] x86: use zalloc_cpumask_var for mce_dev_initialized -v2


need to get cleared cpu_mask about if mce device is initialized.
esp when MAXSMP is used.

used zalloc_... instead

Signed-off-by: Yinghai Lu <[email protected]>
Cc: [email protected]
---
arch/x86/kernel/cpu/mcheck/mce.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/arch/x86/kernel/cpu/mcheck/mce.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/mcheck/mce.c
+++ linux-2.6/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1969,7 +1969,7 @@ static __init int mce_init_device(void)
if (!mce_available(&boot_cpu_data))
return -EIO;

- alloc_cpumask_var(&mce_dev_initialized, GFP_KERNEL);
+ zalloc_cpumask_var(&mce_dev_initialized, GFP_KERNEL);

err = mce_init_banks();
if (err)

2009-06-18 01:56:33

by Hidetoshi Seto

[permalink] [raw]
Subject: Re: [PATCH] x86: mce fix type

Yinghai Lu wrote:
> can not have two ignore_ce
>
> Signed-off-by: Yinghai Lu <[email protected]>

Thank you for finding it!

Acked-by: Hidetoshi Seto <[email protected]>

2009-06-18 01:59:26

by Hidetoshi Seto

[permalink] [raw]
Subject: Re: [PATCH] x86: use zalloc_cpumask_var for mce_dev_initialized -v2

Yinghai Lu wrote:
> need to get cleared cpu_mask about if mce device is initialized.
> esp when MAXSMP is used.
>
> used zalloc_... instead
>
> Signed-off-by: Yinghai Lu <[email protected]>
> Cc: [email protected]

Good catch!

Reviewed-by: Hidetoshi Seto <[email protected]>