login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
June
»
8
Re: [PATCH] x86: cleanups to nmi_watchdog variable
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Németh Márton <nm127@...>
To: Cyrill Gorcunov <gorcunov@...>
Cc: Thomas Gleixner <tglx@...>, Ingo Molnar <mingo@...>, LKML <linux-kernel@...>
Subject:
Re: [PATCH] x86: cleanups to nmi_watchdog variable
Date: Sunday, June 8, 2008 - 12:23 pm
Cyrill Gorcunov wrote:
quoted text
> | From: Márton Németh <nm127@freemail.hu> > | > | Use NMI_NONE instead of 0. As the symbol NMI_DISABLED equals to -1, > | the nmi_watchdog variable should also be signed. > | > | Signed-off-by: Márton Németh <nm127@freemail.hu> > | --- > | diff -upr linux-2.6.26-rc5.orig/arch/x86/kernel/io_apic_32.c linux-2.6.26-rc5/arch/x86/kernel/io_apic_32.c > | --- linux-2.6.26-rc5.orig/arch/x86/kernel/io_apic_32.c 2008-06-07 12:35:24.000000000 +0200 > | +++ linux-2.6.26-rc5/arch/x86/kernel/io_apic_32.c 2008-06-07 12:40:20.000000000 +0200 > | @@ -2217,7 +2217,7 @@ static inline void __init check_timer(vo > | > | if (nmi_watchdog == NMI_IO_APIC) { > | printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n"); > | - nmi_watchdog = 0; > | + nmi_watchdog = NMI_NONE; > | } > | > | printk(KERN_INFO "...trying to set up timer as Virtual Wire IRQ..."); > | diff -upr linux-2.6.26-rc5.orig/arch/x86/kernel/io_apic_64.c linux-2.6.26-rc5/arch/x86/kernel/io_apic_64.c > | --- linux-2.6.26-rc5.orig/arch/x86/kernel/io_apic_64.c 2008-06-05 18:39:49.000000000 +0200 > | +++ linux-2.6.26-rc5/arch/x86/kernel/io_apic_64.c 2008-06-07 12:37:01.000000000 +0200 > | @@ -1735,7 +1735,7 @@ static inline void __init check_timer(vo > | > | if (nmi_watchdog == NMI_IO_APIC) { > | printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n"); > | - nmi_watchdog = 0; > | + nmi_watchdog = NMI_NONE; > | } > | > | apic_printk(APIC_VERBOSE, KERN_INFO "...trying to set up timer as Virtual Wire IRQ..."); > | diff -upr linux-2.6.26-rc5.orig/arch/x86/kernel/nmi_32.c linux-2.6.26-rc5/arch/x86/kernel/nmi_32.c > | --- linux-2.6.26-rc5.orig/arch/x86/kernel/nmi_32.c 2008-06-05 18:39:49.000000000 +0200 > | +++ linux-2.6.26-rc5/arch/x86/kernel/nmi_32.c 2008-06-07 11:19:55.000000000 +0200 > | @@ -43,7 +43,7 @@ static cpumask_t backtrace_mask = CPU_MA > | */ > | atomic_t nmi_active = ATOMIC_INIT(0); /* oprofile uses this */ > | > | -unsigned int nmi_watchdog = NMI_DEFAULT; > | +int nmi_watchdog = NMI_DEFAULT; > | static unsigned int nmi_hz = HZ; > | > | static DEFINE_PER_CPU(short, wd_enabled); > | diff -upr linux-2.6.26-rc5.orig/arch/x86/kernel/nmi_64.c linux-2.6.26-rc5/arch/x86/kernel/nmi_64.c > | --- linux-2.6.26-rc5.orig/arch/x86/kernel/nmi_64.c 2008-06-05 18:39:49.000000000 +0200 > | +++ linux-2.6.26-rc5/arch/x86/kernel/nmi_64.c 2008-06-07 11:20:00.000000000 +0200 > | @@ -43,7 +43,7 @@ static cpumask_t backtrace_mask = CPU_MA > | atomic_t nmi_active = ATOMIC_INIT(0); /* oprofile uses this */ > | static int panic_on_timeout; > | > | -unsigned int nmi_watchdog = NMI_DEFAULT; > | +int nmi_watchdog = NMI_DEFAULT; > | static unsigned int nmi_hz = HZ; > | > | static DEFINE_PER_CPU(short, wd_enabled); > | diff -upr linux-2.6.26-rc5.orig/include/asm-x86/nmi.h linux-2.6.26-rc5/include/asm-x86/nmi.h > | --- linux-2.6.26-rc5.orig/include/asm-x86/nmi.h 2008-06-05 18:40:12.000000000 +0200 > | +++ linux-2.6.26-rc5/include/asm-x86/nmi.h 2008-06-07 11:21:20.000000000 +0200 > | @@ -61,7 +61,7 @@ extern void enable_timer_nmi_watchdog(vo > | extern int nmi_watchdog_tick(struct pt_regs *regs, unsigned reason); > | > | extern atomic_t nmi_active; > | -extern unsigned int nmi_watchdog; > | +extern int nmi_watchdog; > | #define NMI_DISABLED -1 > | #define NMI_NONE 0 > | #define NMI_IO_APIC 1 > | > > We should leave nmi_watchdog as unsigned. The only snippet which > could be reviewed as controversy point - is touch_nmi_watchdog() > where we just test nmi_watchdog for being greater than 0. Actually > there NMI_NONE should be used instead. But frankly some additional > simplification is needed.
Don't forget that the NMI_DEFAULT symbol in include/asm-x86/nmi.h also equals to NMI_DISABLED, which is -1. Márton Németh --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] x86: cleanups to nmi_watchdog variable
, Németh Márton
, (Sat Jun 7, 11:45 am)
Re: [PATCH] x86: cleanups to nmi_watchdog variable
, Cyrill Gorcunov
, (Sun Jun 8, 11:56 am)
Re: [PATCH] x86: cleanups to nmi_watchdog variable
, Németh Márton
, (Sun Jun 8, 12:23 pm)
Re: [PATCH] x86: cleanups to nmi_watchdog variable
, Cyrill Gorcunov
, (Sun Jun 8, 4:28 pm)
Re: [PATCH] x86: cleanups to nmi_watchdog variable
, Cyrill Gorcunov
, (Sun Jun 8, 12:31 pm)
Re: [PATCH] x86: cleanups to nmi_watchdog variable
, Cyrill Gorcunov
, (Sat Jun 7, 12:32 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ingo Molnar
Re: [Announce] [patch] Modular Scheduler Core and Completely Fair Scheduler [CFS]
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Yinghai Lu
[PATCH] x86: make e820.c to have common functions
Tarkan Erimer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
git
:
linux-netdev
:
David Miller
[GIT]: Networking
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 15/37] dccp: Set per-connection CCIDs via socket options
Eric W. Biederman
Re: [PATCH 0/4][RFC] netns: sysfs: add a netns suffix to net device sysfs entries
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
2 users
and
883 guests
online.
Online users
maplemanfloor96
apnote50
Syndicate