Messages in this thread Patch in this message | | | Date | Thu, 30 Oct 2008 19:16:46 +0300 | From | Cyrill Gorcunov <> | Subject | [RFC -tip] x86: nmi - add sensible names to nmi_watchdog boot param |
| |
Add sensible names as "lapic" and "ioapic" to nmi_watchdog boot parameter. Sometimes it is not that easy to recall what exactly nmi_watchdog=1 does mean so we allow the using of symbolic names here.
Old numeric values remain valid.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> ---
arch/x86/kernel/nmi.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
Index: linux-2.6.git/arch/x86/kernel/nmi.c =================================================================== --- linux-2.6.git.orig/arch/x86/kernel/nmi.c 2008-10-27 21:35:21.000000000 +0300 +++ linux-2.6.git/arch/x86/kernel/nmi.c 2008-10-30 19:01:52.000000000 +0300 @@ -208,12 +208,17 @@ static int __init setup_nmi_watchdog(cha ++str; } - get_option(&str, &nmi); - - if (nmi >= NMI_INVALID) - return 0; + if (!strncmp(str, "lapic", 5)) + nmi_watchdog = NMI_LOCAL_APIC; + else if (!strncmp(str, "ioapic", 6)) + nmi_watchdog = NMI_IO_APIC; + else { + get_option(&str, &nmi); + if (nmi >= NMI_INVALID) + return 0; + nmi_watchdog = nmi; + } - nmi_watchdog = nmi; return 1; } __setup("nmi_watchdog=", setup_nmi_watchdog);
| |