2009-07-22 02:56:52

by Hidehiro Kawai

[permalink] [raw]
Subject: [PATCH] x86, mce: Rename incorrect macro name "CONFIG_X86_THRESHOLD"

CONFIG_X86_THRESHOLD used in arch/x86/kernel/irqinit.c is always
undefined. Rename it to the correct name "CONFIG_X86_MCE_THRESHOLD".

Signed-off-by: Hidehiro Kawai <[email protected]>
---
arch/x86/kernel/irqinit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c
index 8a194ad..ccf8ab5 100644
--- a/arch/x86/kernel/irqinit.c
+++ b/arch/x86/kernel/irqinit.c
@@ -187,7 +187,7 @@ static void __init apic_intr_init(void)
#ifdef CONFIG_X86_THERMAL_VECTOR
alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
#endif
-#ifdef CONFIG_X86_THRESHOLD
+#ifdef CONFIG_X86_MCE_THRESHOLD
alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt);
#endif
#if defined(CONFIG_X86_MCE) && defined(CONFIG_X86_LOCAL_APIC)
--
1.6.2.5

--
Hidehiro Kawai
Hitachi, Systems Development Laboratory
Linux Technology Center


2009-07-22 03:37:38

by Hidetoshi Seto

[permalink] [raw]
Subject: Re: [PATCH] x86, mce: Rename incorrect macro name "CONFIG_X86_THRESHOLD"

Hidehiro Kawai wrote:
> CONFIG_X86_THRESHOLD used in arch/x86/kernel/irqinit.c is always
> undefined. Rename it to the correct name "CONFIG_X86_MCE_THRESHOLD".
>
> Signed-off-by: Hidehiro Kawai <[email protected]>
> ---
> arch/x86/kernel/irqinit.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c
> index 8a194ad..ccf8ab5 100644
> --- a/arch/x86/kernel/irqinit.c
> +++ b/arch/x86/kernel/irqinit.c
> @@ -187,7 +187,7 @@ static void __init apic_intr_init(void)
> #ifdef CONFIG_X86_THERMAL_VECTOR
> alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
> #endif
> -#ifdef CONFIG_X86_THRESHOLD
> +#ifdef CONFIG_X86_MCE_THRESHOLD
> alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt);
> #endif
> #if defined(CONFIG_X86_MCE) && defined(CONFIG_X86_LOCAL_APIC)


It seems that this ifdef was introduced by the following merge commit:

> commit 940010c5a314a7bd9b498593bc6ba1718ac5aec5
> Merge: 8dc8e5e... 991ec02...
> Author: Ingo Molnar <[email protected]>
> Date: Thu Jun 11 17:55:42 2009 +0200
>
> Merge branch 'linus' into perfcounters/core
>
> Conflicts:
> arch/x86/kernel/irqinit.c
> arch/x86/kernel/irqinit_64.c
> arch/x86/kernel/traps.c
> arch/x86/mm/fault.c
> include/linux/sched.h
> kernel/exit.c

Thank you for finding it!

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


Thanks,
H.Seto

2009-07-22 05:25:54

by Hidehiro Kawai

[permalink] [raw]
Subject: [tip:x86/urgent] x86, mce: Rename incorrect macro name "CONFIG_X86_THRESHOLD"

Commit-ID: 6effa8f6fc786f00e3a23eae605e0f2e8e748faa
Gitweb: http://git.kernel.org/tip/6effa8f6fc786f00e3a23eae605e0f2e8e748faa
Author: Hidehiro Kawai <[email protected]>
AuthorDate: Wed, 22 Jul 2009 11:56:20 +0900
Committer: H. Peter Anvin <[email protected]>
CommitDate: Tue, 21 Jul 2009 21:43:22 -0700

x86, mce: Rename incorrect macro name "CONFIG_X86_THRESHOLD"

CONFIG_X86_THRESHOLD used in arch/x86/kernel/irqinit.c is always
undefined. Rename it to the correct name "CONFIG_X86_MCE_THRESHOLD".

Signed-off-by: Hidehiro Kawai <[email protected]>
Reviewed-by: Hidetoshi Seto <[email protected]>
Cc: Andi Kleen <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: H. Peter Anvin <[email protected]>


---
arch/x86/kernel/irqinit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c
index 696f0e4..92b7703 100644
--- a/arch/x86/kernel/irqinit.c
+++ b/arch/x86/kernel/irqinit.c
@@ -187,7 +187,7 @@ static void __init apic_intr_init(void)
#ifdef CONFIG_X86_THERMAL_VECTOR
alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
#endif
-#ifdef CONFIG_X86_THRESHOLD
+#ifdef CONFIG_X86_MCE_THRESHOLD
alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt);
#endif
#if defined(CONFIG_X86_NEW_MCE) && defined(CONFIG_X86_LOCAL_APIC)

2009-07-22 13:20:12

by Andi Kleen

[permalink] [raw]
Subject: Re: [PATCH] x86, mce: Rename incorrect macro name "CONFIG_X86_THRESHOLD"


> It seems that this ifdef was introduced by the following merge commit:

I also managed to introduce similar bugs during merges in the past.
It's very easy and hard to find.

Perhaps it would be good if we had some automated tool that checks
all CONFIG_*s referenced exist in Kconfig and that is run regularly.

-Andi

2009-07-22 15:38:35

by H. Peter Anvin

[permalink] [raw]
Subject: Re: [PATCH] x86, mce: Rename incorrect macro name "CONFIG_X86_THRESHOLD"

On 07/22/2009 06:20 AM, Andi Kleen wrote:
>
>> It seems that this ifdef was introduced by the following merge commit:
>
> I also managed to introduce similar bugs during merges in the past.
> It's very easy and hard to find.
>
> Perhaps it would be good if we had some automated tool that checks
> all CONFIG_*s referenced exist in Kconfig and that is run regularly.

There is checkkconfigsymbols.sh...

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.