linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] Fix NMI watchdog documentation
@ 2003-05-24 19:07 Carl-Daniel Hailfinger
  2003-05-24 19:08 ` Zwane Mwaikambo
  2003-05-24 19:12 ` Marc-Christian Petersen
  0 siblings, 2 replies; 16+ messages in thread
From: Carl-Daniel Hailfinger @ 2003-05-24 19:07 UTC (permalink / raw)
  To: Linux Kernel Mailing List, linux-smp, Ingo Molnar

Hello,

Documentation/nmi_watchdog.txt does not say which CONFIG_XYZ option has
to be enabled to use the NMI watchdog, but it mentions that IO-APIC is
somewhat related.

Documentation/Configure.help is equally unclear. The NMI watchdog is
mentioned as related to CONFIG_SMP, and the help text for
CONFIG_X86_UP_APIC says: "The local APIC supports [..] the NMI watchdog"
That does not necessarily mean that NMI is compiled in once local APIC
support is selected.

Can someone please shed some light on this issue? I'm willing to create
a patch to fix the docs once I know if the NMI watchdog is compiled in
alsways or on what it depends.


Regards,
Carl-Daniel
-- 
http://www.hailfinger.org/


^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [RFC] Fix NMI watchdog documentation
@ 2003-05-25 10:49 mikpe
  0 siblings, 0 replies; 16+ messages in thread
From: mikpe @ 2003-05-25 10:49 UTC (permalink / raw)
  To: Valdis.Kletnieks; +Cc: linux-kernel

On Sat, 24 May 2003 23:29:15 -0400, Valdis.Kletnieks@vt.edu wrote:
>CONFIG_X86_UP_APIC=y
>CONFIG_X86_UP_IOAPIC=y
>CONFIG_X86_LOCAL_APIC=y
>CONFIG_X86_IO_APIC=y
>
>but 'dmesg' on my Dell Latitude C840 laptop tells me:
>
>Dell Latitude with broken BIOS detected. Refusing to enable the local APIC.
>
>Is this nmi_watchdog="forget about it dave" time, or is there some way to
>get this to work?

The blacklist rule treats all Latitudes the same, since most of
them are broken. Your C840 may or may not actually work. Simply
remove the blacklist entry in dmi_scan.c and run some tests:
- does it hang at boot?
- does the kernel fail to enable the local APIC? (it's HW absent
  in many mobile CPUs)
- does it hang when the power cord is attached or detached?
- does it hang when the BIOS setup hotkey is pressed?
  (Fn-F1 on my ancient Latitude, may be different now)
- does it hang under long periods of heavy load?
- does it hang when idle for a long time?
- does it hang at suspend or resume?

If it survives these tests, with nmi_watchdog=0 and =2, then
please tell us about it so we can white-list this particular model.

/Mikael

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [RFC] Fix NMI watchdog documentation
@ 2003-05-25 10:50 mikpe
  2003-05-26  2:36 ` Valdis.Kletnieks
  0 siblings, 1 reply; 16+ messages in thread
From: mikpe @ 2003-05-25 10:50 UTC (permalink / raw)
  To: lkml; +Cc: linux-kernel

On 25 May 2003 01:52:16 -0400, Disconnect <lkml@sigkill.net> wrote:
>I was reading that code the other day (just out of curiosity, believe it
>or not) and I'm wondering how recently that has been tested - most of
>the blacklist/oddness workarounds listed in dmi_scan.c are
>model-specific, but the APIC entry is any Dell Inspiron or Latitude.  
>
>I'm going to remove the test tomorrow sometime and see what happens -
>lots has changed since the Inspiron 8000, including a migration to
>p4-mobile, so its worth seeing if the newer Dells are fixed.  If so,
>I'll submit a patch to make that more model-specific (probably I'll just
>add a whitelist function - no_local_apic_kills_bios or some such; seems
>better than listing every dell inspiron individually..)
>
>I'm encouraged by the complete lack of APM or any of the 'enter bios
>while running' options present on the older laptops; according to the
>comments, even if the APIC kills the bios on entry/exit, it won't matter
>since you can't trigger it to begin with..

You'll also enter BIOS (System Management Mode actually) when inserting
or removing the power cord, or when thermal events occur, and possibly
also when suspending.

The blacklist rule is a catch-all since we don't have detailed DMI
data on all Inspiron/Latitude models, and at the time, _all_ of them
were broken. Looking through my records, Inspiron 8000 and 8100, and
Latitude C600, C610, C640, C800, and C810 are known to be broken. Note
that this includes at least one P4-based machine (C640), so it's not
restricted to "old" mobile P3s.

The only non-broken Dell laptop that I know of is the Latitude D600
(Centrino), and that was reported only two months ago.

I'm all for adding an explicit white-list to dmi_scan.c. For starters,
the D600 should be included. Partial dmidecode data for it is included
below.

(There is also a generic problem in that apm can enter the BIOS
asynchronously if you configure DISPLAY_BLANK or CPU_IDLE, or build
apm as a module and unload it. Both DISPLAY_BLANK and unloading the
module are known lock-up triggers if the local APIC is enabled.)

/Mikael

Handle 0x0100
	DMI type 1, 25 bytes.
	System Information
		Manufacturer: Dell Computer Corporation
		Product Name: Latitude D600                   
Handle 0x0200
	DMI type 2, 9 bytes.
	Base Board Information
		Manufacturer: Dell Computer Corporation
		Product Name: 03U652

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [RFC] Fix NMI watchdog documentation
@ 2003-05-26  9:21 mikpe
  2003-05-27  3:19 ` Valdis.Kletnieks
  0 siblings, 1 reply; 16+ messages in thread
From: mikpe @ 2003-05-26  9:21 UTC (permalink / raw)
  To: linux-kernel, lkml; +Cc: Valdis.Kletnieks

On 26 May 2003 01:31:41 -0400, Disconnect <lkml@sigkill.net> wrote:
>> OK, I put together a kernel that had the Latitude blacklist commented out,
>> and it comes up with:
>> 
>> No local APIC present or hardware disabled
>> Initializing CPU#0
>> 
>> So add the Latitude C840 to the "known b0rken" list.
>
>Ditto the Inspiron 8500 - no apic at all (which is different from
>known-broken, since nothing bad happened.)  
...
>Perhaps just a comment above those entries:
>/* Latitude C840 and Inspiron 8500 have no APIC support in hardware */

If these machines are P4-based, then I bet they do have local APICs.
However, if the BIOS boots the kernel with the local APIC disabled
on a P4, we (apic.c) don't try to enable it. The logic behind that
is that "modern" BIOSen _should_ boot with it enabled, unless they're
horribly broken.

So apply the patch below and try the "can we get the machine to hang"
checklist again.

/Mikael

--- linux-2.5.69/arch/i386/kernel/apic.c.~1~	2003-04-20 13:08:15.000000000 +0200
+++ linux-2.5.69/arch/i386/kernel/apic.c	2003-05-26 11:11:19.000000000 +0200
@@ -617,7 +617,7 @@
 		goto no_apic;
 	case X86_VENDOR_INTEL:
 		if (boot_cpu_data.x86 == 6 ||
-		    (boot_cpu_data.x86 == 15 && cpu_has_apic) ||
+		    (boot_cpu_data.x86 == 15) ||
 		    (boot_cpu_data.x86 == 5 && cpu_has_apic))
 			break;
 		goto no_apic;

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

end of thread, other threads:[~2003-05-27  3:06 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-24 19:07 [RFC] Fix NMI watchdog documentation Carl-Daniel Hailfinger
2003-05-24 19:08 ` Zwane Mwaikambo
2003-05-24 19:11   ` Zwane Mwaikambo
2003-05-24 19:43     ` Carl-Daniel Hailfinger
2003-05-25  3:29     ` Valdis.Kletnieks
2003-05-25  3:36       ` Zwane Mwaikambo
2003-05-25  4:48         ` Valdis.Kletnieks
2003-05-25  5:03           ` Zwane Mwaikambo
2003-05-25  5:52             ` Disconnect
2003-05-24 19:12 ` Marc-Christian Petersen
2003-05-25 10:49 mikpe
2003-05-25 10:50 mikpe
2003-05-26  2:36 ` Valdis.Kletnieks
2003-05-26  5:31   ` Disconnect
2003-05-26  9:21 mikpe
2003-05-27  3:19 ` Valdis.Kletnieks

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).