linux/drivers/watchdog
Don Zickus 4a7863cc2e x86, nmi_watchdog: Remove ARCH_HAS_NMI_WATCHDOG and rely on CONFIG_HARDLOCKUP_DETECTOR
The x86 arch has shifted its use of the nmi_watchdog from a
local implementation to the global one provide by
kernel/watchdog.c.  This shift has caused a whole bunch of
compile problems under different config options.  I attempt to
simplify things with the patch below.

In order to simplify things, I had to come to terms with the
meaning of two terms ARCH_HAS_NMI_WATCHDOG and
CONFIG_HARDLOCKUP_DETECTOR.  Basically they mean the same thing,
the former on a local level and the latter on a global level.

With the old x86 nmi watchdog gone, there is no need to rely on
defining the ARCH_HAS_NMI_WATCHDOG variable because it doesn't
make sense any more.  x86 will now use the global
implementation.

The changes below do a few things.  First it changes the few
places that relied on ARCH_HAS_NMI_WATCHDOG to use
CONFIG_X86_LOCAL_APIC (the former was an alias for the latter
anyway, so nothing unusual here).  Those pieces of code were
relying more on local apic functionality the nmi watchdog
functionality, so the change should make sense.

Second, I removed the x86 implementation of
touch_nmi_watchdog().  It isn't need now, instead x86 will rely
on kernel/watchdog.c's implementation.

Third, I removed the #define ARCH_HAS_NMI_WATCHDOG itself from
x86.  And tweaked the include/linux/nmi.h file to tell users to
look for an externally defined touch_nmi_watchdog in the case of
ARCH_HAS_NMI_WATCHDOG _or_ CONFIG_HARDLOCKUP_DETECTOR. This
changes removes some of the ugliness in that file.

Finally, I added a Kconfig dependency for
CONFIG_HARDLOCKUP_DETECTOR that said you can't have
ARCH_HAS_NMI_WATCHDOG _and_ CONFIG_HARDLOCKUP_DETECTOR.  You can
only have one nmi_watchdog.

Tested with
ARCH=i386: allnoconfig, defconfig, allyesconfig, (various broken
configs) ARCH=x86_64: allnoconfig, defconfig, allyesconfig,
(various broken configs)

Hopefully, after this patch I won't get any more compile broken
emails. :-)

v3:
  changed a couple of 'linux/nmi.h' -> 'asm/nmi.h' to pick-up correct function
  prototypes when CONFIG_HARDLOCKUP_DETECTOR is not set.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: fweisbec@gmail.com
LKML-Reference: <1293044403-14117-1-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-12-22 22:15:32 +01:00
..
acquirewdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
advantechwdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
adx_wdt.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
alim1535_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
alim7101_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
ar7_wdt.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
at32ap700x_wdt.c watchdog: at32ap700x_wdt: register misc device last in probe() function 2010-06-17 09:56:57 +00:00
at91rm9200_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
at91sam9_wdt.c [WATCHDOG] Correct WDIOF_MAGICCLOSE flag 2009-06-18 07:30:57 +00:00
bcm47xx_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
bcm63xx_wdt.c watchdog: bcm63xx_wdt: improve platform part. 2010-12-02 14:10:16 +00:00
bfin_wdt.c watchdog: bfin: use new common Blackfin watchdog header 2010-05-25 09:03:07 +00:00
booke_wdt.c powerpc/watchdog: Make default timeout for Book-E watchdog a Kconfig option 2010-10-14 01:05:32 -05:00
coh901327_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
cpu5wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
cpwd.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
davinci_wdt.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ep93xx_wdt.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
eurotechwdt.c watchdog: update/improve/consolidate watchdog driver 2010-05-25 09:05:34 +00:00
f71808e_wdt.c watchdog: f71808e_wdt: add support for the F71889FG 2010-10-28 21:43:35 +00:00
gef_wdt.c watchdog: gef_wdt: include fs.h 2010-12-02 14:10:21 +00:00
geodewdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
hpwdt.c x86, nmi_watchdog: Remove ARCH_HAS_NMI_WATCHDOG and rely on CONFIG_HARDLOCKUP_DETECTOR 2010-12-22 22:15:32 +01:00
i6300esb.c [WATCHDOG] i6300esb.c: change platform_driver to pci_driver 2010-03-08 13:48:01 +00:00
ib700wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
ibmasr.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
imx2_wdt.c watchdog: [PATCH 3/3] imx2_wdt: fix section mismatch 2010-06-13 08:20:06 +00:00
indydog.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
iop_wdt.c [WATCHDOG] sizeof cleanup 2009-09-18 08:39:37 +00:00
it87_wdt.c watchdog: it87_wdt: Add support for watchdogs with 8b timers 2010-10-28 21:41:08 +00:00
it8712f_wdt.c watchdog: it8712f_wdt: Add module parameter for alternative reset sources 2010-10-28 21:42:32 +00:00
iTCO_vendor_support.c iTCO_wdt: fix TCO V1 timeout values and limits 2010-05-25 09:05:56 +00:00
iTCO_vendor.h [WATCHDOG 18/57] iTCO: unlocked_ioctl, coding style and cleanup 2008-05-28 11:51:32 +00:00
iTCO_wdt.c watchdog: iTCO_wdt: TCO Watchdog patch for Intel Patsburg PCH 2010-12-02 14:10:05 +00:00
ixp4xx_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
ixp2000_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
Kconfig watchdog: it8712f_wdt: add note to Kconfig 2010-12-02 14:10:32 +00:00
ks8695_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
machzwd.c watchdog: MachZ: fix debug macro 2010-10-28 21:42:59 +00:00
Makefile watchdog: add support for Broadcom BCM63xx built-in watchdog 2010-10-28 21:43:55 +00:00
max63xx_wdt.c [WATCHDOG] max63xx: be careful when disabling the watchdog 2010-04-16 12:26:27 +00:00
mixcomwd.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
mpc8xxx_wdt.c of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
mpcore_wdt.c ARM: 6126/1: ARM mpcore_wdt: fix build failure and other fixes 2010-05-12 11:18:14 +01:00
mtx-1_wdt.c [WATCHDOG] move platform probe and remove function to devinit and devexit 2009-06-18 07:30:44 +00:00
mv64x60_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
nuc900_wdt.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
octeon-wdt-main.c WATCHDOG: octeon-wdt: Use I/O clock rate for timing calculations. 2010-10-29 19:08:42 +01:00
octeon-wdt-nmi.S WATCHDOG: Add watchdog driver for OCTEON SOCs 2010-08-05 13:26:22 +01:00
omap_wdt.c Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-10-25 13:46:56 -07:00
omap_wdt.h [WATCHDOG] omap_wdt.c: sync linux-omap changes 2008-10-10 13:11:10 +00:00
orion_wdt.c [ARM] Orion/Kirkwood: rename orion5x_wdt to orion_wdt 2009-06-08 13:05:00 -04:00
pc87413_wdt.c watchdog: fix several MODULE_PARM_DESC strings 2010-05-25 09:03:52 +00:00
pcwd_pci.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
pcwd_usb.c USB: rename usb_buffer_alloc() and usb_buffer_free() users 2010-05-20 13:21:38 -07:00
pcwd.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
pika_wdt.c [WATCHDOG] powerpc: pika_wdt ident cannot be const 2010-04-03 22:22:20 +00:00
pnx833x_wdt.c watchdog: fix several MODULE_PARM_DESC strings 2010-05-25 09:03:52 +00:00
pnx4008_wdt.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
rc32434_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
rdc321x_wdt.c mfd: Change rdc321x resources flags to IORESOURCE_IO 2010-05-28 01:37:52 +02:00
riowd.c of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
s3c2410_wdt.c watchdog: s3c2410_wdt - Fix removing of platform device 2010-08-08 18:20:09 +00:00
sa1100_wdt.c [WATCHDOG] SA1100 watchdog maximum timeout 2009-07-09 18:29:38 +00:00
sb_wdog.c watchdog: sb_wdog: release irq and reboot notifier in error path and module_exit() 2010-09-15 18:43:47 +00:00
sbc60xxwdt.c [WATCHDOG] Some more general cleanup 2009-06-18 07:30:30 +00:00
sbc7240_wdt.c [WATCHDOG] Coding style - Indentation - part 2 2008-08-06 13:21:09 +00:00
sbc8360.c [WATCHDOG] Some more general cleanup 2009-06-18 07:30:30 +00:00
sbc_epx_c3.c [WATCHDOG] Correct WDIOF_MAGICCLOSE flag 2009-06-18 07:30:57 +00:00
sbc_fitpc2_wdt.c watchdog: sbc_fitpc2_wdt: fixed "scheduling while atomic" bug. 2010-04-26 18:22:30 +00:00
sc520_wdt.c [WATCHDOG] More coding-style and trivial clean-up 2009-03-25 09:07:04 +00:00
sc1200wdt.c [WATCHDOG] sizeof cleanup 2009-09-18 08:39:37 +00:00
sch311x_wdt.c watchdog: sch311x_wdt.c: set parent before registeriing the misc device in probe() function 2010-08-08 18:21:15 +00:00
scx200_wdt.c [WATCHDOG] Correct WDIOF_MAGICCLOSE flag 2009-06-18 07:30:57 +00:00
shwdt.c watchdog: fix several MODULE_PARM_DESC strings 2010-05-25 09:03:52 +00:00
smsc37b787_wdt.c [WATCHDOG] More coding-style and trivial clean-up 2009-03-25 09:07:04 +00:00
softdog.c [WATCHDOG] Some more general cleanup 2009-06-18 07:30:30 +00:00
sp805_wdt.c watchdog: Adding support for ARM Primecell SP805 Watchdog 2010-08-08 18:22:25 +00:00
stmp3xxx_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
ts72xx_wdt.c watchdog: ts72xx_wdt: disable watchdog at probe 2010-09-15 18:43:52 +00:00
twl4030_wdt.c watchdog: twl4030_wdt: Disable watchdog during probing 2010-05-25 09:05:46 +00:00
txx9wdt.c [WATCHDOG] change reboot_notifier to platform-shutdown method. 2010-03-07 10:30:59 +00:00
w83627hf_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
w83697hf_wdt.c [WATCHDOG] Some more general cleanup 2009-06-18 07:30:30 +00:00
w83697ug_wdt.c [WATCHDOG] w83697ug, fix lock imbalance 2009-07-09 18:29:16 +00:00
w83877f_wdt.c [WATCHDOG] Coding style - Indentation - part 2 2008-08-06 13:21:09 +00:00
w83977f_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
wafer5823wdt.c [PATCH] Switch all my contributions stuff to a single common address 2008-10-28 19:16:11 +00:00
wd501p.h [WATCHDOG] More coding-style and trivial clean-up 2009-03-25 09:07:04 +00:00
wdrtas.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
wdt285.c [PATCH] Switch all my contributions stuff to a single common address 2008-10-28 19:16:11 +00:00
wdt977.c watchdog: fix several MODULE_PARM_DESC strings 2010-05-25 09:03:52 +00:00
wdt_pci.c watchdog: wdt_pci.c: move ids to pci_ids.h 2010-08-08 18:20:38 +00:00
wdt.c watchdog: update/improve/consolidate watchdog driver 2010-05-25 09:05:34 +00:00
wm831x_wdt.c [WATCHDOG] watchdog_info constify 2010-03-07 10:30:57 +00:00
wm8350_wdt.c [PATCH 2/11] drivers/watchdog: Eliminate a NULL pointer dereference 2010-06-07 15:55:03 +00:00