* [PATCH 0/2] i386: MCE updates @ 2007-10-09 12:49 Joerg Roedel 2007-10-09 12:49 ` [PATCH 1/2] i386: mce cleanup part1: functional change Joerg Roedel 2007-10-09 12:49 ` [PATCH 2/2] i386: mce cleanup part2: conding style cleanups Joerg Roedel 0 siblings, 2 replies; 15+ messages in thread From: Joerg Roedel @ 2007-10-09 12:49 UTC (permalink / raw) To: linux-kernel This patchset includes two patches. 1. Checks for the MCA fetures as early as possible. 2. Coding style cleanup. ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/2] i386: mce cleanup part1: functional change 2007-10-09 12:49 [PATCH 0/2] i386: MCE updates Joerg Roedel @ 2007-10-09 12:49 ` Joerg Roedel 2007-10-09 16:04 ` Oleg Verych 2007-10-09 12:49 ` [PATCH 2/2] i386: mce cleanup part2: conding style cleanups Joerg Roedel 1 sibling, 1 reply; 15+ messages in thread From: Joerg Roedel @ 2007-10-09 12:49 UTC (permalink / raw) To: linux-kernel; +Cc: Joerg Roedel, Christoph Egger MCG_CAP never reports a negative count of available error-reporting banks. Therefore, make it unsigned. Check for MCA/MCE feature bits as early as possible. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> --- arch/i386/kernel/cpu/mcheck/mce.c | 13 ++++++++++++- arch/i386/kernel/cpu/mcheck/mce.h | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/i386/kernel/cpu/mcheck/mce.c b/arch/i386/kernel/cpu/mcheck/mce.c index 34c781e..bad2c64 100644 --- a/arch/i386/kernel/cpu/mcheck/mce.c +++ b/arch/i386/kernel/cpu/mcheck/mce.c @@ -17,7 +17,7 @@ #include "mce.h" int mce_disabled = 0; -int nr_mce_banks; +unsigned int nr_mce_banks; EXPORT_SYMBOL_GPL(nr_mce_banks); /* non-fatal.o */ @@ -33,9 +33,20 @@ void fastcall (*machine_check_vector)(struct pt_regs *, long error_code) = unexp /* This has to be run for each processor */ void mcheck_init(struct cpuinfo_x86 *c) { + uint32_t mca, mce; + if (mce_disabled==1) return; + mca = cpu_has(c, X86_FEATURE_MCA); + mce = cpu_has(c, X86_FEATURE_MCE); + + if (!mca || !mce) { + printk(KERN_INFO "CPU%i: No machine check support available\n", + smp_processor_id()); + return; + } + switch (c->x86_vendor) { case X86_VENDOR_AMD: amd_mcheck_init(c); diff --git a/arch/i386/kernel/cpu/mcheck/mce.h b/arch/i386/kernel/cpu/mcheck/mce.h index 81fb6e2..9cbe812 100644 --- a/arch/i386/kernel/cpu/mcheck/mce.h +++ b/arch/i386/kernel/cpu/mcheck/mce.h @@ -10,5 +10,5 @@ void winchip_mcheck_init(struct cpuinfo_x86 *c); /* Call the installed machine check handler for this CPU setup. */ extern fastcall void (*machine_check_vector)(struct pt_regs *, long error_code); -extern int nr_mce_banks; +extern unsigned int nr_mce_banks; -- 1.5.2.5 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] i386: mce cleanup part1: functional change 2007-10-09 12:49 ` [PATCH 1/2] i386: mce cleanup part1: functional change Joerg Roedel @ 2007-10-09 16:04 ` Oleg Verych 2007-10-09 16:06 ` Joerg Roedel 0 siblings, 1 reply; 15+ messages in thread From: Oleg Verych @ 2007-10-09 16:04 UTC (permalink / raw) To: Joerg Roedel; +Cc: Andi Kleen, Christoph Egger, linux-kernel * Tue, 9 Oct 2007 14:49:55 +0200 [] > @@ -33,9 +33,20 @@ void fastcall (*machine_check_vector)(struct pt_regs *, long error_code) = unexp > /* This has to be run for each processor */ > void mcheck_init(struct cpuinfo_x86 *c) > { > + uint32_t mca, mce; > + > if (mce_disabled==1) > return; > > + mca = cpu_has(c, X86_FEATURE_MCA); > + mce = cpu_has(c, X86_FEATURE_MCE); > + > + if (!mca || !mce) { > + printk(KERN_INFO "CPU%i: No machine check support available\n", > + smp_processor_id()); > + return; > + } > + cpu_has() returns int, but would it be better to have something like if (!mce_disabled && !(c->x86_capability & (X86_FEATURE_MCA | X86_FEATURE_MCE)) { printk(KERN_INFO "CPU%i: No machine check support available\n", smp_processor_id()); return; } else return; ? ____ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] i386: mce cleanup part1: functional change 2007-10-09 16:04 ` Oleg Verych @ 2007-10-09 16:06 ` Joerg Roedel 2007-10-09 16:32 ` Oleg Verych 2007-10-09 17:33 ` coding for optimizations (Re: [PATCH 1/2] i386: mce cleanup part1: functional change) Oleg Verych 0 siblings, 2 replies; 15+ messages in thread From: Joerg Roedel @ 2007-10-09 16:06 UTC (permalink / raw) To: Oleg Verych; +Cc: Andi Kleen, Christoph Egger, linux-kernel On Tue, Oct 09, 2007 at 06:04:48PM +0200, Oleg Verych wrote: > * Tue, 9 Oct 2007 14:49:55 +0200 > > [] > > @@ -33,9 +33,20 @@ void fastcall (*machine_check_vector)(struct pt_regs *, long error_code) = unexp > > /* This has to be run for each processor */ > > void mcheck_init(struct cpuinfo_x86 *c) > > { > > + uint32_t mca, mce; > > + > > if (mce_disabled==1) > > return; > > > > + mca = cpu_has(c, X86_FEATURE_MCA); > > + mce = cpu_has(c, X86_FEATURE_MCE); > > + > > + if (!mca || !mce) { > > + printk(KERN_INFO "CPU%i: No machine check support available\n", > > + smp_processor_id()); > > + return; > > + } > > + > > cpu_has() returns int, > but would it be better to have something like > > if (!mce_disabled && > !(c->x86_capability & (X86_FEATURE_MCA | X86_FEATURE_MCE)) { > printk(KERN_INFO "CPU%i: No machine check support available\n", > smp_processor_id()); This looks complicated and is harder to read. Its exactly the purpose of the cpu_has() macro to avoid such constructs. > return; > } else > return; Return unconditionaly here? -- | AMD Saxony Limited Liability Company & Co. KG Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany System | Register Court Dresden: HRA 4896 Research | General Partner authorized to represent: Center | AMD Saxony LLC (Wilmington, Delaware, US) | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] i386: mce cleanup part1: functional change 2007-10-09 16:06 ` Joerg Roedel @ 2007-10-09 16:32 ` Oleg Verych 2007-10-09 16:54 ` Joerg Roedel 2007-10-09 20:46 ` Valdis.Kletnieks 2007-10-09 17:33 ` coding for optimizations (Re: [PATCH 1/2] i386: mce cleanup part1: functional change) Oleg Verych 1 sibling, 2 replies; 15+ messages in thread From: Oleg Verych @ 2007-10-09 16:32 UTC (permalink / raw) To: Joerg Roedel; +Cc: Andi Kleen, Christoph Egger, linux-kernel On Tue, Oct 09, 2007 at 06:06:05PM +0200, Joerg Roedel wrote: > > cpu_has() returns int, > > but would it be better to have something like > > > > if (!mce_disabled && > > !(c->x86_capability & (X86_FEATURE_MCA | X86_FEATURE_MCE)) { > > printk(KERN_INFO "CPU%i: No machine check support available\n", > > smp_processor_id()); > > This looks complicated and is harder to read. Its exactly the purpose of the > cpu_has() macro to avoid such constructs. It is done via test_bit(), which is designed for IO access with all that `const volatile' stuff, 2 x unnecessary, can't be optimized here (IMHO). ____ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] i386: mce cleanup part1: functional change 2007-10-09 16:32 ` Oleg Verych @ 2007-10-09 16:54 ` Joerg Roedel 2007-10-09 20:46 ` Valdis.Kletnieks 1 sibling, 0 replies; 15+ messages in thread From: Joerg Roedel @ 2007-10-09 16:54 UTC (permalink / raw) To: Oleg Verych; +Cc: Andi Kleen, Christoph Egger, linux-kernel On Tue, Oct 09, 2007 at 06:32:30PM +0200, Oleg Verych wrote: > On Tue, Oct 09, 2007 at 06:06:05PM +0200, Joerg Roedel wrote: > > > cpu_has() returns int, > > > but would it be better to have something like > > > > > > if (!mce_disabled && > > > !(c->x86_capability & (X86_FEATURE_MCA | X86_FEATURE_MCE)) { > > > printk(KERN_INFO "CPU%i: No machine check support available\n", > > > smp_processor_id()); > > > > This looks complicated and is harder to read. Its exactly the purpose of the > > cpu_has() macro to avoid such constructs. > > It is done via test_bit(), which is designed for IO access with all that > `const volatile' stuff, 2 x unnecessary, can't be optimized here (IMHO). This code runs only on bootup and once per cpu. I think readable code is more important here than make it a few cycles faster. -- | AMD Saxony Limited Liability Company & Co. KG Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany System | Register Court Dresden: HRA 4896 Research | General Partner authorized to represent: Center | AMD Saxony LLC (Wilmington, Delaware, US) | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] i386: mce cleanup part1: functional change 2007-10-09 16:32 ` Oleg Verych 2007-10-09 16:54 ` Joerg Roedel @ 2007-10-09 20:46 ` Valdis.Kletnieks 2007-10-10 1:58 ` Oleg Verych 1 sibling, 1 reply; 15+ messages in thread From: Valdis.Kletnieks @ 2007-10-09 20:46 UTC (permalink / raw) To: Oleg Verych; +Cc: Joerg Roedel, Andi Kleen, Christoph Egger, linux-kernel [-- Attachment #1: Type: text/plain, Size: 878 bytes --] On Tue, 09 Oct 2007 18:32:30 +0200, Oleg Verych said: > On Tue, Oct 09, 2007 at 06:06:05PM +0200, Joerg Roedel wrote: > > > cpu_has() returns int, > > > but would it be better to have something like > > > > > > if (!mce_disabled && > > > !(c->x86_capability & (X86_FEATURE_MCA | X86_FEATURE_MCE)) { > > > printk(KERN_INFO "CPU%i: No machine check support available\n", > > > smp_processor_id()); > > > > This looks complicated and is harder to read. Its exactly the purpose of the > > cpu_has() macro to avoid such constructs. > > It is done via test_bit(), which is designed for IO access with all that > `const volatile' stuff, 2 x unnecessary, can't be optimized here (IMHO). If this code is getting called often enough that optimization matters, you got *bigger* issues to worry about than optimization. Looks like it should only happen once at boot time. [-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] i386: mce cleanup part1: functional change 2007-10-09 20:46 ` Valdis.Kletnieks @ 2007-10-10 1:58 ` Oleg Verych 0 siblings, 0 replies; 15+ messages in thread From: Oleg Verych @ 2007-10-10 1:58 UTC (permalink / raw) To: Valdis.Kletnieks; +Cc: Joerg Roedel, Andi Kleen, Christoph Egger, linux-kernel On Tue, Oct 09, 2007 at 04:46:46PM -0400, Valdis.Kletnieks@vt.edu wrote: > On Tue, 09 Oct 2007 18:32:30 +0200, Oleg Verych said: > > On Tue, Oct 09, 2007 at 06:06:05PM +0200, Joerg Roedel wrote: > > > > cpu_has() returns int, > > > > but would it be better to have something like > > > > > > > > if (!mce_disabled && > > > > !(c->x86_capability & (X86_FEATURE_MCA | X86_FEATURE_MCE)) { > > > > printk(KERN_INFO "CPU%i: No machine check support available\n", > > > > smp_processor_id()); > > > > > > This looks complicated and is harder to read. Its exactly the purpose of the > > > cpu_has() macro to avoid such constructs. > > > > It is done via test_bit(), which is designed for IO access with all that > > `const volatile' stuff, 2 x unnecessary, can't be optimized here (IMHO). > > If this code is getting called often enough that optimization matters, you > got *bigger* issues to worry about than optimization. Looks like it should > only happen once at boot time. Text size matters even on static storages. A Linuxbios image not fitting to the 2M flash, etc. Thanks. ____ ^ permalink raw reply [flat|nested] 15+ messages in thread
* coding for optimizations (Re: [PATCH 1/2] i386: mce cleanup part1: functional change) 2007-10-09 16:06 ` Joerg Roedel 2007-10-09 16:32 ` Oleg Verych @ 2007-10-09 17:33 ` Oleg Verych 2007-10-09 18:30 ` Joerg Roedel 1 sibling, 1 reply; 15+ messages in thread From: Oleg Verych @ 2007-10-09 17:33 UTC (permalink / raw) To: LKML (Cc removed) On Tue, Oct 09, 2007 at 06:06:05PM +0200, Joerg Roedel wrote: > > > void mcheck_init(struct cpuinfo_x86 *c) > > > { > > > + uint32_t mca, mce; > > > + > > > if (mce_disabled==1) > > > return; > > > > > > + mca = cpu_has(c, X86_FEATURE_MCA); > > > + mce = cpu_has(c, X86_FEATURE_MCE); > > > + > > > + if (!mca || !mce) { > > > + printk(KERN_INFO "CPU%i: No machine check support available\n", > > > + smp_processor_id()); > > > + return; > > > + } > > > + > > > > cpu_has() returns int, > > but would it be better to have something like > > > > if (!mce_disabled && > > !(c->x86_capability & (X86_FEATURE_MCA | X86_FEATURE_MCE)) { > > printk(KERN_INFO "CPU%i: No machine check support available\n", > > smp_processor_id()); > > This looks complicated and is harder to read. Its exactly the purpose of the > cpu_has() macro to avoid such constructs. > > > return; > > } else > > return; > > Return unconditionaly here? Kind of typo. Due to arch code, i think, it must be coded in non-gcc optimistic way. As practice and Linus shows, gcc's optimizations sometimes produce very unexpected results. People do spaghetti-like coding, without thinking about text size / run time. Compile time payment was noted by Andrew many years ago: "As you know, I'd be more concerned about moves to drop support for the older and much faster gcc versions. If you're not using egcs-1.1.2, you're already a very patient person." <http://lkml.org/lkml/2001/12/29/163> So, i actually wanted to write this: if (!mce_disabled) { if (!(c->x86_capability & (X86_FEATURE_MCA | X86_FEATURE_MCE)) { printk(KERN_INFO "CPU%i: No machine check support available\n", smp_processor_id()); return; } /* function code */ } (ugly, because `mce_disabled == 1' check is even in gcc is likely by default). But changed my mind, due to violation of the coding style. Of course this my be no appropriate at all, but i'd like to bring this, if anyone would be like to discuss this. ____ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: coding for optimizations (Re: [PATCH 1/2] i386: mce cleanup part1: functional change) 2007-10-09 17:33 ` coding for optimizations (Re: [PATCH 1/2] i386: mce cleanup part1: functional change) Oleg Verych @ 2007-10-09 18:30 ` Joerg Roedel 2007-10-10 23:14 ` Adrian Bunk 0 siblings, 1 reply; 15+ messages in thread From: Joerg Roedel @ 2007-10-09 18:30 UTC (permalink / raw) To: olecom; +Cc: LKML (Cc removed) On Tue, Oct 09, 2007 at 07:33:17PM +0200, olecom@flower.upol.cz wrote: > if (!mce_disabled) { > if (!(c->x86_capability & (X86_FEATURE_MCA | X86_FEATURE_MCE)) { > printk(KERN_INFO "CPU%i: No machine check support available\n", > smp_processor_id()); > return; > } > /* function code */ > } I have 2 problems with this way: 1) It is totally broken because c->x86_capability is not an integer but an *array* of integers. This is also the reason why test_bit() is used in cpu_has() and not plain logical operators. 2) It is still hard to read and breaks the kernel coding style. But you are right with the redundant mca and mce variables. They are not needed and I will inline the cpu_has() checks into the condition check. I'll resubmit tomorrow. -- | AMD Saxony Limited Liability Company & Co. KG Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany System | Register Court Dresden: HRA 4896 Research | General Partner authorized to represent: Center | AMD Saxony LLC (Wilmington, Delaware, US) | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: coding for optimizations (Re: [PATCH 1/2] i386: mce cleanup part1: functional change) 2007-10-09 18:30 ` Joerg Roedel @ 2007-10-10 23:14 ` Adrian Bunk 2007-10-11 15:26 ` Oleg Verych 0 siblings, 1 reply; 15+ messages in thread From: Adrian Bunk @ 2007-10-10 23:14 UTC (permalink / raw) To: Joerg Roedel; +Cc: olecom, LKML (Cc removed) On Tue, Oct 09, 2007 at 08:30:11PM +0200, Joerg Roedel wrote: >... > But you are right with the redundant mca and mce variables. They are not > needed and I will inline the cpu_has() checks into the condition check. > I'll resubmit tomorrow. Please don't let Oley bring you away from the right path. It is your job to write readable C code, and it's the compiler's job to transform this C code into efficient machine code. And non-ancient gcc versions are usually quite good in optimizing code. And saving code in a variable before using it might even result in the same assembler code. It is personal preference whether you use variables or not in this case (both seem to be equally readable) so you can do it any way you like, but don't try to guess what gcc might make out of it. We have problems with the size of the kernel image, but we need to solve them with the bigger knobs that have measurable effects, not by wasting our time on guessing how gcc might handle a single if. It's also a quite ill idea to think about whether gcc might produce a few bytes more or less code at the if when there's such a long printk() in the middle... cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: coding for optimizations (Re: [PATCH 1/2] i386: mce cleanup part1: functional change) 2007-10-10 23:14 ` Adrian Bunk @ 2007-10-11 15:26 ` Oleg Verych 2007-10-11 15:21 ` Adrian Bunk 0 siblings, 1 reply; 15+ messages in thread From: Oleg Verych @ 2007-10-11 15:26 UTC (permalink / raw) To: Adrian Bunk; +Cc: Joerg Roedel, LKML (Cc removed) On Thu, Oct 11, 2007 at 01:14:29AM +0200, Adrian Bunk wrote: [] > It's also a quite ill idea to think about whether gcc might produce a > few bytes more or less code at the if when there's such a long printk() > in the middle... printk() problem was discussed with proper banana userspace replacement proposition by me, so i don't care much. Though, why MCE can't be enabled/disabled by config option? Native engineers from proper company should know what processors have this feature... If kconfig isn't flexible for this, i'm glad to hear opinions. If it's needed anyway, then sorry. ____ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: coding for optimizations (Re: [PATCH 1/2] i386: mce cleanup part1: functional change) 2007-10-11 15:26 ` Oleg Verych @ 2007-10-11 15:21 ` Adrian Bunk 2007-10-11 16:13 ` Oleg Verych 0 siblings, 1 reply; 15+ messages in thread From: Adrian Bunk @ 2007-10-11 15:21 UTC (permalink / raw) To: Oleg Verych; +Cc: Joerg Roedel, LKML (Cc removed) On Thu, Oct 11, 2007 at 05:26:09PM +0200, Oleg Verych wrote: > On Thu, Oct 11, 2007 at 01:14:29AM +0200, Adrian Bunk wrote: > [] > > It's also a quite ill idea to think about whether gcc might produce a > > few bytes more or less code at the if when there's such a long printk() > > in the middle... > > printk() problem was discussed with proper banana userspace replacement > proposition by me, so i don't care much. > > Though, why MCE can't be enabled/disabled by config option? Native > engineers from proper company should know what processors have this > feature... If kconfig isn't flexible for this, i'm glad to hear > opinions. If it's needed anyway, then sorry. You should better say sorry for not having checked that it can already be disabled with a kconfig option... cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: coding for optimizations (Re: [PATCH 1/2] i386: mce cleanup part1: functional change) 2007-10-11 15:21 ` Adrian Bunk @ 2007-10-11 16:13 ` Oleg Verych 0 siblings, 0 replies; 15+ messages in thread From: Oleg Verych @ 2007-10-11 16:13 UTC (permalink / raw) To: Adrian Bunk; +Cc: Joerg Roedel, LKML (Cc removed) On Thu, Oct 11, 2007 at 05:21:30PM +0200, Adrian Bunk wrote: > On Thu, Oct 11, 2007 at 05:26:09PM +0200, Oleg Verych wrote: > > On Thu, Oct 11, 2007 at 01:14:29AM +0200, Adrian Bunk wrote: > > [] > > > It's also a quite ill idea to think about whether gcc might produce a > > > few bytes more or less code at the if when there's such a long printk() > > > in the middle... > > > > printk() problem was discussed with proper banana userspace replacement > > proposition by me, so i don't care much. > > > > Though, why MCE can't be enabled/disabled by config option? Native > > engineers from proper company should know what processors have this > > feature... If kconfig isn't flexible for this, i'm glad to hear > > opinions. If it's needed anyway, then sorry. > > You should better say sorry for not having checked that it can already > be disabled with a kconfig option... Talk is not about wana-build-MCE-in, given to the user's sake. But about flexible selection of this code, if it is really supported by CPU, when user have it enabled (see winchip/preventium sub-thread). More work, it is not such quick patch, certainly, but this is needed for famous i386. I wonder, why such patch wasn't introduced long time ago. Modern (cheap) chips have no MCE? ____ ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/2] i386: mce cleanup part2: conding style cleanups 2007-10-09 12:49 [PATCH 0/2] i386: MCE updates Joerg Roedel 2007-10-09 12:49 ` [PATCH 1/2] i386: mce cleanup part1: functional change Joerg Roedel @ 2007-10-09 12:49 ` Joerg Roedel 1 sibling, 0 replies; 15+ messages in thread From: Joerg Roedel @ 2007-10-09 12:49 UTC (permalink / raw) To: linux-kernel; +Cc: Joerg Roedel, Christoph Egger Remove one indent level Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> --- arch/i386/kernel/cpu/mcheck/mce.c | 40 ++++++++++++++++++------------------ 1 files changed, 20 insertions(+), 20 deletions(-) diff --git a/arch/i386/kernel/cpu/mcheck/mce.c b/arch/i386/kernel/cpu/mcheck/mce.c index bad2c64..fd743c3 100644 --- a/arch/i386/kernel/cpu/mcheck/mce.c +++ b/arch/i386/kernel/cpu/mcheck/mce.c @@ -48,26 +48,26 @@ void mcheck_init(struct cpuinfo_x86 *c) } switch (c->x86_vendor) { - case X86_VENDOR_AMD: - amd_mcheck_init(c); - break; - - case X86_VENDOR_INTEL: - if (c->x86==5) - intel_p5_mcheck_init(c); - if (c->x86==6) - intel_p6_mcheck_init(c); - if (c->x86==15) - intel_p4_mcheck_init(c); - break; - - case X86_VENDOR_CENTAUR: - if (c->x86==5) - winchip_mcheck_init(c); - break; - - default: - break; + case X86_VENDOR_AMD: + amd_mcheck_init(c); + break; + + case X86_VENDOR_INTEL: + if (c->x86==5) + intel_p5_mcheck_init(c); + if (c->x86==6) + intel_p6_mcheck_init(c); + if (c->x86==15) + intel_p4_mcheck_init(c); + break; + + case X86_VENDOR_CENTAUR: + if (c->x86==5) + winchip_mcheck_init(c); + break; + + default: + break; } } -- 1.5.2.5 ^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2007-10-11 15:59 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-10-09 12:49 [PATCH 0/2] i386: MCE updates Joerg Roedel 2007-10-09 12:49 ` [PATCH 1/2] i386: mce cleanup part1: functional change Joerg Roedel 2007-10-09 16:04 ` Oleg Verych 2007-10-09 16:06 ` Joerg Roedel 2007-10-09 16:32 ` Oleg Verych 2007-10-09 16:54 ` Joerg Roedel 2007-10-09 20:46 ` Valdis.Kletnieks 2007-10-10 1:58 ` Oleg Verych 2007-10-09 17:33 ` coding for optimizations (Re: [PATCH 1/2] i386: mce cleanup part1: functional change) Oleg Verych 2007-10-09 18:30 ` Joerg Roedel 2007-10-10 23:14 ` Adrian Bunk 2007-10-11 15:26 ` Oleg Verych 2007-10-11 15:21 ` Adrian Bunk 2007-10-11 16:13 ` Oleg Verych 2007-10-09 12:49 ` [PATCH 2/2] i386: mce cleanup part2: conding style cleanups Joerg Roedel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox