Skip to content

Commit

Permalink
[PATCH] Revert nmi_known_cpu() check during boot option parsing
Browse files Browse the repository at this point in the history
Commit f2802e7 and its x86 version
(b7471c6) adds nmi_known_cpu() check
while parsing boot options in x86_64 and i386.

With that, "nmi_watchdog=2" stops working for me on Intel Core 2 CPU
based system.

The problem is, setup_nmi_watchdog is called while parsing the boot
option and identify_cpu is not done yet.  So, the return value of
nmi_known_cpu() is not valid at this point.

So revert that check.  This should not have any adverse effect as the
nmi_known_cpu() check is done again later in enable_lapic_nmi_watchdog().

Signed-off-by: Venkatesh Pallipadi <[email protected]>
Cc: Don Zickus <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Venkatesh Pallipadi authored and Linus Torvalds committed Jan 23, 2007
1 parent bbe1a59 commit 58d9ce7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 1 addition & 7 deletions arch/i386/kernel/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,7 @@ static int __init setup_nmi_watchdog(char *str)

if ((nmi >= NMI_INVALID) || (nmi < NMI_NONE))
return 0;
/*
* If any other x86 CPU has a local APIC, then
* please test the NMI stuff there and send me the
* missing bits. Right now Intel P6/P4 and AMD K7 only.
*/
if ((nmi == NMI_LOCAL_APIC) && (nmi_known_cpu() == 0))
return 0; /* no lapic support */

nmi_watchdog = nmi;
return 1;
}
Expand Down
2 changes: 0 additions & 2 deletions arch/x86_64/kernel/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,6 @@ int __init setup_nmi_watchdog(char *str)
if ((nmi >= NMI_INVALID) || (nmi < NMI_NONE))
return 0;

if ((nmi == NMI_LOCAL_APIC) && (nmi_known_cpu() == 0))
return 0; /* no lapic support */
nmi_watchdog = nmi;
return 1;
}
Expand Down

0 comments on commit 58d9ce7

Please sign in to comment.