public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC -tip] x86: nmi - add sensible names to nmi_watchdog boot param
@ 2008-10-30 16:16 Cyrill Gorcunov
  2008-10-30 17:10 ` Aristeu Rozanski
  2008-10-30 17:52 ` Ingo Molnar
  0 siblings, 2 replies; 5+ messages in thread
From: Cyrill Gorcunov @ 2008-10-30 16:16 UTC (permalink / raw)
  To: LKML, Maciej W. Rozycki
  Cc: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, Aristeu Rozanski

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

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

* Re: [RFC -tip] x86: nmi - add sensible names to nmi_watchdog boot param
  2008-10-30 16:16 [RFC -tip] x86: nmi - add sensible names to nmi_watchdog boot param Cyrill Gorcunov
@ 2008-10-30 17:10 ` Aristeu Rozanski
  2008-10-30 17:14   ` Cyrill Gorcunov
  2008-10-30 17:52 ` Ingo Molnar
  1 sibling, 1 reply; 5+ messages in thread
From: Aristeu Rozanski @ 2008-10-30 17:10 UTC (permalink / raw)
  To: Cyrill Gorcunov
  Cc: LKML, Maciej W. Rozycki, Ingo Molnar, H. Peter Anvin,
	Thomas Gleixner

> 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.
looks good to me, but you need to update the documentation as well.

-- 
Aristeu


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

* Re: [RFC -tip] x86: nmi - add sensible names to nmi_watchdog boot param
  2008-10-30 17:10 ` Aristeu Rozanski
@ 2008-10-30 17:14   ` Cyrill Gorcunov
  2008-10-30 17:43     ` Cyrill Gorcunov
  0 siblings, 1 reply; 5+ messages in thread
From: Cyrill Gorcunov @ 2008-10-30 17:14 UTC (permalink / raw)
  To: Aristeu Rozanski
  Cc: LKML, Maciej W. Rozycki, Ingo Molnar, H. Peter Anvin,
	Thomas Gleixner

[Aristeu Rozanski - Thu, Oct 30, 2008 at 01:10:53PM -0400]
| > 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.
| looks good to me, but you need to update the documentation as well.
| 
| -- 
| Aristeu
| 

Aristeu, maybe you could do it for me -- English is quite weak
side of me :)

		- Cyrill -

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

* Re: [RFC -tip] x86: nmi - add sensible names to nmi_watchdog boot param
  2008-10-30 17:14   ` Cyrill Gorcunov
@ 2008-10-30 17:43     ` Cyrill Gorcunov
  0 siblings, 0 replies; 5+ messages in thread
From: Cyrill Gorcunov @ 2008-10-30 17:43 UTC (permalink / raw)
  To: Aristeu Rozanski, LKML, Maciej W. Rozycki, Ingo Molnar,
	H. Peter Anvin, Thomas Gleixner

[Cyrill Gorcunov - Thu, Oct 30, 2008 at 08:14:26PM +0300]
| [Aristeu Rozanski - Thu, Oct 30, 2008 at 01:10:53PM -0400]
| | > 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.
| | looks good to me, but you need to update the documentation as well.
| | 
| | -- 
| | Aristeu
| | 
| 
| Aristeu, maybe you could do it for me -- English is quite weak
| side of me :)
| 
| 		- Cyrill -

I think I'd better wait 'till your patch (for nmi_watchdog.txt)
applied. It allows me to just write a few words so it would be pushed
on top of _all_ nmi related changes these days (without interdiff).

		- Cyrill -

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

* Re: [RFC -tip] x86: nmi - add sensible names to nmi_watchdog boot param
  2008-10-30 16:16 [RFC -tip] x86: nmi - add sensible names to nmi_watchdog boot param Cyrill Gorcunov
  2008-10-30 17:10 ` Aristeu Rozanski
@ 2008-10-30 17:52 ` Ingo Molnar
  1 sibling, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2008-10-30 17:52 UTC (permalink / raw)
  To: Cyrill Gorcunov
  Cc: LKML, Maciej W. Rozycki, H. Peter Anvin, Thomas Gleixner,
	Aristeu Rozanski


* Cyrill Gorcunov <gorcunov@gmail.com> wrote:

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

ok, that makes quite a bit of sense. Peter, any objections?

	Ingo

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

end of thread, other threads:[~2008-10-30 17:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-30 16:16 [RFC -tip] x86: nmi - add sensible names to nmi_watchdog boot param Cyrill Gorcunov
2008-10-30 17:10 ` Aristeu Rozanski
2008-10-30 17:14   ` Cyrill Gorcunov
2008-10-30 17:43     ` Cyrill Gorcunov
2008-10-30 17:52 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox