linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bluesmoke/MCE support optional
@ 2002-02-28 15:01 Paul Gortmaker
  2002-03-01  0:11 ` Alan Cox
  2002-03-01  2:47 ` Mike Fedyk
  0 siblings, 2 replies; 12+ messages in thread
From: Paul Gortmaker @ 2002-02-28 15:01 UTC (permalink / raw)
  To: marcelo, alan; +Cc: linux-kernel


Meant to do this a while ago.  Could do it via adding "nosmoke.c"  :-)
(similar to fs/noquot.c) instead of #ifdef in bluesmoke.c, if somebody
had a strong preference one way or the other.

Patch is against 2.4.18, complete with Aunt Tillie(tm) help text, etc.

Paul.


--- Documentation/Configure.help~	Sat Feb  2 06:50:31 2002
+++ Documentation/Configure.help	Thu Feb 28 09:01:28 2002
@@ -17450,6 +17450,17 @@
   The module is called shwdt.o. If you want to compile it as a module,
   say M here and read Documentation/modules.txt.
 	      
+Machine Check Exception
+CONFIG_X86_MCE
+  Machine Check Exception support allows the processor to notify the
+  kernel if it detects a problem (e.g. overheating, component failure).
+  The action the kernel takes depends on the severity of the problem, 
+  ranging from a warning message on the console, to halting the machine.
+  Your processor must be a Pentium or newer to support this - check the 
+  flags in /proc/cpuinfo for mce.  Note that some older Pentium systems
+  have a design flaw which leads to false MCE events - for these and
+  old non-MCE processors (386, 486), say N.  Otherwise say Y.
+
 Toshiba Laptop support
 CONFIG_TOSHIBA
   This adds a driver to safely access the System Management Mode of
--- arch/i386/defconfig~	Sat Feb  2 06:43:29 2002
+++ arch/i386/defconfig	Thu Feb 28 08:38:53 2002
@@ -49,6 +49,7 @@
 CONFIG_X86_GOOD_APIC=y
 CONFIG_X86_PGE=y
 CONFIG_X86_USE_PPRO_CHECKSUM=y
+CONFIG_X86_MCE=y
 # CONFIG_TOSHIBA is not set
 # CONFIG_I8K is not set
 # CONFIG_MICROCODE is not set
--- arch/i386/config.in~	Sat Feb  2 06:50:32 2002
+++ arch/i386/config.in	Thu Feb 28 08:37:25 2002
@@ -154,6 +154,9 @@
    define_bool CONFIG_X86_TSC y
    define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
 fi
+
+bool 'Machine Check Exception' CONFIG_X86_MCE
+
 tristate 'Toshiba Laptop support' CONFIG_TOSHIBA
 tristate 'Dell laptop support' CONFIG_I8K
 
--- arch/i386/kernel/bluesmoke.c~	Sat Feb  2 06:43:30 2002
+++ arch/i386/kernel/bluesmoke.c	Thu Feb 28 09:18:35 2002
@@ -3,9 +3,12 @@
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/config.h>
 #include <asm/processor.h> 
 #include <asm/msr.h>
 
+#ifdef CONFIG_X86_MCE
+
 static int mce_disabled __initdata = 0;
 
 /*
@@ -247,3 +250,8 @@
 
 __setup("nomce", mcheck_disable);
 __setup("mce", mcheck_enable);
+
+#else
+asmlinkage void do_machine_check(struct pt_regs * regs, long error_code) {}
+void __init mcheck_init(struct cpuinfo_x86 *c) {}
+#endif



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bluesmoke/MCE support optional
  2002-02-28 15:01 [PATCH] bluesmoke/MCE support optional Paul Gortmaker
@ 2002-03-01  0:11 ` Alan Cox
  2002-03-01  7:18   ` Paul Gortmaker
  2002-03-01  9:56   ` Dave Jones
  2002-03-01  2:47 ` Mike Fedyk
  1 sibling, 2 replies; 12+ messages in thread
From: Alan Cox @ 2002-03-01  0:11 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: marcelo, alan, linux-kernel

> Meant to do this a while ago.  Could do it via adding "nosmoke.c"  :-)
> (similar to fs/noquot.c) instead of #ifdef in bluesmoke.c, if somebody
> had a strong preference one way or the other.
> 
> Patch is against 2.4.18, complete with Aunt Tillie(tm) help text, etc.

Is the MCE code big enough to justify this ? Last time I checked it was
1800 bytes 1000 of which were __init

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bluesmoke/MCE support optional
  2002-02-28 15:01 [PATCH] bluesmoke/MCE support optional Paul Gortmaker
  2002-03-01  0:11 ` Alan Cox
@ 2002-03-01  2:47 ` Mike Fedyk
  2002-03-01 12:31   ` Alan Cox
  1 sibling, 1 reply; 12+ messages in thread
From: Mike Fedyk @ 2002-03-01  2:47 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: marcelo, alan, linux-kernel

On Thu, Feb 28, 2002 at 10:01:46AM -0500, Paul Gortmaker wrote:
> 
> Meant to do this a while ago.  Could do it via adding "nosmoke.c"  :-)
> (similar to fs/noquot.c) instead of #ifdef in bluesmoke.c, if somebody
> had a strong preference one way or the other.
> 
> Patch is against 2.4.18, complete with Aunt Tillie(tm) help text, etc.
> 
> Paul.
> 
> 
> --- Documentation/Configure.help~	Sat Feb  2 06:50:31 2002
> +++ Documentation/Configure.help	Thu Feb 28 09:01:28 2002
> @@ -17450,6 +17450,17 @@
>    The module is called shwdt.o. If you want to compile it as a module,
>    say M here and read Documentation/modules.txt.
>  	      
> +Machine Check Exception
> +CONFIG_X86_MCE
> +  Machine Check Exception support allows the processor to notify the
> +  kernel if it detects a problem (e.g. overheating, component failure).
> +  The action the kernel takes depends on the severity of the problem, 
> +  ranging from a warning message on the console, to halting the machine.
> +  Your processor must be a Pentium or newer to support this - check the 
> +  flags in /proc/cpuinfo for mce.  Note that some older Pentium systems
> +  have a design flaw which leads to false MCE events - for these and
> +  old non-MCE processors (386, 486), say N.  Otherwise say Y.
> +

This should be tied to the processor type options...

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bluesmoke/MCE support optional
  2002-03-01  0:11 ` Alan Cox
@ 2002-03-01  7:18   ` Paul Gortmaker
  2002-03-01 11:51     ` Alan Cox
  2002-03-01  9:56   ` Dave Jones
  1 sibling, 1 reply; 12+ messages in thread
From: Paul Gortmaker @ 2002-03-01  7:18 UTC (permalink / raw)
  To: Alan Cox; +Cc: marcelo, linux-kernel

Alan Cox wrote:

> Is the MCE code big enough to justify this ? Last time I checked it was
> 1800 bytes 1000 of which were __init

Granted it isn't a huge monster (yet; size below) so use your own judgement;
I won't be upset either way.  I should note that a well respected developer
recently stated (on l-k) the following about making things unconditional:

	There are those of us trying to stuff Linux into embedded devices 
	who if anything want more configuration options not people taking 
	stuff out.

:-)

Same person went on to suggest:

	What I'd much rather see if this is an issue is:

	bool    'Do you want to customise for a very small system'

	which auto enables all the random small stuff if you say no, and goes
	much deeper into options if you say yes.

...an idea I like, but probably not appropriate for 2.4 - so perhaps I'll
work on a CONFIG_TINY for 2.5 if it is generally accepted as an ok plan.

Paul.
--
			bluesmoke.o:

Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         000001cb  00000000  00000000  00000040  2**4
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
  1 .data         00000004  00000000  00000000  0000020c  2**2
                  CONTENTS, ALLOC, LOAD, RELOC, DATA
  2 .bss          00000008  00000000  00000000  00000210  2**2
                  ALLOC
  3 .note         00000014  00000000  00000000  00000210  2**0
                  CONTENTS, READONLY
  4 .data.init    0000000e  00000000  00000000  00000224  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  5 .rodata       000002d7  00000000  00000000  00000240  2**5
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  6 .text.init    000001cd  00000000  00000000  00000520  2**4
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
  7 .setup.init   00000010  00000000  00000000  000006f0  2**2
                  CONTENTS, ALLOC, LOAD, RELOC, DATA
  8 .comment      00000026  00000000  00000000  00000700  2**0
                  CONTENTS, READONLY





^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bluesmoke/MCE support optional
  2002-03-01  0:11 ` Alan Cox
  2002-03-01  7:18   ` Paul Gortmaker
@ 2002-03-01  9:56   ` Dave Jones
  1 sibling, 0 replies; 12+ messages in thread
From: Dave Jones @ 2002-03-01  9:56 UTC (permalink / raw)
  To: Alan Cox; +Cc: Paul Gortmaker, marcelo, linux-kernel

On Fri, Mar 01, 2002 at 12:11:57AM +0000, Alan Cox wrote:
 > Is the MCE code big enough to justify this ? Last time I checked it was
 > 1800 bytes 1000 of which were __init

 And boot-time disable-able. Seems a bit unnecessary to me, but
 if theres enough people wanting it....

-- 
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bluesmoke/MCE support optional
  2002-03-01  7:18   ` Paul Gortmaker
@ 2002-03-01 11:51     ` Alan Cox
  0 siblings, 0 replies; 12+ messages in thread
From: Alan Cox @ 2002-03-01 11:51 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: Alan Cox, marcelo, linux-kernel

> ...an idea I like, but probably not appropriate for 2.4 - so perhaps I'll
> work on a CONFIG_TINY for 2.5 if it is generally accepted as an ok plan.

In config-tiny it makes sense I agree


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bluesmoke/MCE support optional
  2002-03-01  2:47 ` Mike Fedyk
@ 2002-03-01 12:31   ` Alan Cox
  2002-03-01 12:55     ` Dave Jones
  2002-03-01 15:10     ` Marcelo Tosatti
  0 siblings, 2 replies; 12+ messages in thread
From: Alan Cox @ 2002-03-01 12:31 UTC (permalink / raw)
  To: Mike Fedyk; +Cc: Paul Gortmaker, marcelo, alan, linux-kernel

> > +  ranging from a warning message on the console, to halting the machine.
> > +  Your processor must be a Pentium or newer to support this - check the 
> > +  flags in /proc/cpuinfo for mce.  Note that some older Pentium systems
> > +  have a design flaw which leads to false MCE events - for these and
> > +  old non-MCE processors (386, 486), say N.  Otherwise say Y.

Its not necessary to say N. On a pentium box with the newer MCE setup code
you must force MCE on. On non MCE capable CPU's we just dont set it up.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bluesmoke/MCE support optional
  2002-03-01 12:31   ` Alan Cox
@ 2002-03-01 12:55     ` Dave Jones
  2002-03-03 10:57       ` Paul Gortmaker
  2002-03-01 15:10     ` Marcelo Tosatti
  1 sibling, 1 reply; 12+ messages in thread
From: Dave Jones @ 2002-03-01 12:55 UTC (permalink / raw)
  To: Alan Cox; +Cc: Mike Fedyk, Paul Gortmaker, marcelo, linux-kernel

On Fri, Mar 01, 2002 at 12:31:18PM +0000, Alan Cox wrote:
 > > > +  ranging from a warning message on the console, to halting the machine.
 > > > +  Your processor must be a Pentium or newer to support this - check the 
 > > > +  flags in /proc/cpuinfo for mce.  Note that some older Pentium systems
 > > > +  have a design flaw which leads to false MCE events - for these and
 > > > +  old non-MCE processors (386, 486), say N.  Otherwise say Y.
 > 
 > Its not necessary to say N. On a pentium box with the newer MCE setup code
 > you must force MCE on. On non MCE capable CPU's we just dont set it up.

 The help text should probably document the nomce boot option too.

 btw, anyone else posting in this thread getting crap like..
 http://www.codemonkey.org.uk/duhhh.txt  ?
 I've got them from two different threads now, which is starting
 to get annoying.

-- 
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bluesmoke/MCE support optional
  2002-03-01 12:31   ` Alan Cox
  2002-03-01 12:55     ` Dave Jones
@ 2002-03-01 15:10     ` Marcelo Tosatti
  2002-03-01 17:29       ` Alan Cox
  1 sibling, 1 reply; 12+ messages in thread
From: Marcelo Tosatti @ 2002-03-01 15:10 UTC (permalink / raw)
  To: Alan Cox; +Cc: Mike Fedyk, Paul Gortmaker, linux-kernel



On Fri, 1 Mar 2002, Alan Cox wrote:

> > > +  ranging from a warning message on the console, to halting the machine.
> > > +  Your processor must be a Pentium or newer to support this - check the 
> > > +  flags in /proc/cpuinfo for mce.  Note that some older Pentium systems
> > > +  have a design flaw which leads to false MCE events - for these and
> > > +  old non-MCE processors (386, 486), say N.  Otherwise say Y.
> 
> Its not necessary to say N. 

> On a pentium box with the newer MCE setup code you must force MCE on.

And if you don't ? 


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bluesmoke/MCE support optional
  2002-03-01 15:10     ` Marcelo Tosatti
@ 2002-03-01 17:29       ` Alan Cox
  0 siblings, 0 replies; 12+ messages in thread
From: Alan Cox @ 2002-03-01 17:29 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Alan Cox, Mike Fedyk, Paul Gortmaker, linux-kernel

> > On a pentium box with the newer MCE setup code you must force MCE on.
> And if you don't ? 

The processor runs with MCE disabled and works as it did before MCE went in
- ie no reporting over l1 cache failure etc, but equally 100% compatibility

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bluesmoke/MCE support optional
  2002-03-01 12:55     ` Dave Jones
@ 2002-03-03 10:57       ` Paul Gortmaker
  2002-03-03 13:53         ` Alan Cox
  0 siblings, 1 reply; 12+ messages in thread
From: Paul Gortmaker @ 2002-03-03 10:57 UTC (permalink / raw)
  To: marcelo; +Cc: alan, davej, linux-kernel

Dave Jones wrote:
> 
> On Fri, Mar 01, 2002 at 12:31:18PM +0000, Alan Cox wrote:
>  >
>  > Its not necessary to say N. On a pentium box with the newer MCE setup code
>  > you must force MCE on. On non MCE capable CPU's we just dont set it up.
> 
>  The help text should probably document the nomce boot option too.

This clarifies the P5 behaviour and documents the related boot arguments, 
as suggested by Alan and Dave J. respectively.

Patch against 2.4.19p2.

Paul.

--- Documentation/Configure.help~	Sun Mar  3 05:04:18 2002
+++ Documentation/Configure.help	Sun Mar  3 05:56:49 2002
@@ -17666,8 +17666,12 @@
   ranging from a warning message on the console, to halting the machine.
   Your processor must be a Pentium or newer to support this - check the 
   flags in /proc/cpuinfo for mce.  Note that some older Pentium systems
-  have a design flaw which leads to false MCE events - for these and
-  old non-MCE processors (386, 486), say N.  Otherwise say Y.
+  have a design flaw which leads to false MCE events - hence MCE is
+  disabled on all P5 processors, unless explicitly enabled with "mce"
+  as a boot argument.  Similarly, if MCE is built in and creates a
+  problem on some new non-standard machine, you can boot with "nomce" 
+  to disable it.  MCE support simply ignores non-MCE processors like
+  the 386 and 486, so nearly everyone can say Y here.
 
 Toshiba Laptop support
 CONFIG_TOSHIBA



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bluesmoke/MCE support optional
  2002-03-03 10:57       ` Paul Gortmaker
@ 2002-03-03 13:53         ` Alan Cox
  0 siblings, 0 replies; 12+ messages in thread
From: Alan Cox @ 2002-03-03 13:53 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: marcelo, alan, davej, linux-kernel

> This clarifies the P5 behaviour and documents the related boot arguments, 
> as suggested by Alan and Dave J. respectively.
> 
> Patch against 2.4.19p2.

We both did that work ;) Its also fixed in 2.4.19pre2-ac2 8)

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2002-03-03 13:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-28 15:01 [PATCH] bluesmoke/MCE support optional Paul Gortmaker
2002-03-01  0:11 ` Alan Cox
2002-03-01  7:18   ` Paul Gortmaker
2002-03-01 11:51     ` Alan Cox
2002-03-01  9:56   ` Dave Jones
2002-03-01  2:47 ` Mike Fedyk
2002-03-01 12:31   ` Alan Cox
2002-03-01 12:55     ` Dave Jones
2002-03-03 10:57       ` Paul Gortmaker
2002-03-03 13:53         ` Alan Cox
2002-03-01 15:10     ` Marcelo Tosatti
2002-03-01 17:29       ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).