bluesmoke/MCE support optional
PATCH 1/1 bluesmoke/MCE support optional
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.
Configure.help renamed from Configure.help~ +11 -0
@@ -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
i386/defconfig renamed from i386/defconfig~ +1 -0
@@ -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
i386/config.in renamed from i386/config.in~ +3 -0
@@ -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
i386/kernel/bluesmoke.c renamed from i386/kernel/bluesmoke.c~ +8 -0
@@ -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
Quoted 5 lines
Meant to do this a while ago. Could do it via adding "
nosmoke.c" :-) (similar tofs/noquot.c) instead of #ifdef inbluesmoke.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
Quoted 2 lines · Alan Cox
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
Quoted 2 lines
...an idea I like, but probably not appropriate for 2.4 - so perhaps I'll work on a
CONFIG_TINYfor 2.5 if it is generally accepted as an ok plan.
In config-tiny it makes sense I agree
Quoted 17 lines · Paul Gortmaker
Meant to do this a while ago. Could do it via adding "
nosmoke.c" :-) (similar tofs/noquot.c) instead of #ifdef inbluesmoke.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.
Configure.help renamed from Configure.help~ +1
-0@@ -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
Configure.help line 17463
Quoted 10 lines
Configure.help renamed from Configure.help~ +10
-0+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...
Quoted 5 lines
Configure.help line 17462
Quoted 5 lines
Configure.help renamed from Configure.help~ +5
-0+ 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.
Quoted 9 lines · Alan Cox
Quoted 5 lines
Configure.help line 17462
Quoted 5 lines
Configure.help renamed from Configure.help~ +5
-0+ 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 ?
Quoted 2 lines
Quoted 1 line
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
Quoted 8 lines · Alan Cox
Quoted 5 lines
Configure.help line 17462
Quoted 5 lines
Configure.help renamed from Configure.help~ +5
-0+ 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.
Signature · 2 lines
| Dave Jones. http://www.codemonkey.org.uk | SuSE Labs
Quoted 7 lines · Dave Jones
Quoted 3 lines · Alan Cox
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.
Configure.help renamed from Configure.help~ +6 -2
@@ -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
Quoted 4 lines
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)
Quoted 2 lines · Alan Cox
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....
Signature · 2 lines
| Dave Jones. http://www.codemonkey.org.uk | SuSE Labs