* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: (28 commits)
[WATCHDOG] Fix pcwd_init_module crash
[WATCHDOG] ICH9 support for iTCO_wdt
[WATCHDOG] 631xESB/632xESB support for iTCO_wdt - add all LPC bridges
[WATCHDOG] 631xESB/632xESB support for iTCO_wdt
[WATCHDOG] omap_wdt.c - default error for IOCTL is -ENOTTY
[WATCHDOG] Return value of nonseekable_open
[WATCHDOG] mv64x60_wdt: Rework the timeout register manipulation
[WATCHDOG] mv64x60_wdt: disable watchdog timer when driver is probed
[WATCHDOG] mv64x60_wdt: Support the WDIOF_MAGICCLOSE feature
[WATCHDOG] mv64x60_wdt: Add a module parameter to change nowayout setting
[WATCHDOG] mv64x60_wdt: Add WDIOC_SETOPTIONS ioctl support
[WATCHDOG] mv64x60_wdt: Support for WDIOC_SETTIMEOUT ioctl
[WATCHDOG] mv64x60_wdt: Fix WDIOC_GETTIMEOUT return value
[WATCHDOG] mv64x60_wdt: Check return value of nonseekable_open
[WATCHDOG] mv64x60_wdt: Add arch/powerpc platform support
[WATCHDOG] mv64x60_wdt: Get register address from platform data
[WATCHDOG] mv64x60_wdt: set up platform_device in platform code
[WATCHDOG] ensure mouse and keyboard ignored in w83627hf_wdt
[WATCHDOG] s3c2410_wdt: fixup after arch include moves
[WATCHDOG] git-watchdog-typo
...
This is only called at init time and only happens if the BIOS screws
something up, so the leak is slight and it is probably not worth sending to
2.6.22.x. The driver would not initialize the interface in the case, and I
have no reports of this happening. I have booted and run tests on a system
with this patch. Note that the original patch was munged by the mailer,
here's a new one.
If we ever hit the "default:" case in the switch in try_init_dmi(),
then we'll leak the storage allocated with kzalloc() and assigned
to 'info'.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Fix transmit DMA stall when write() called in window after previous
transmit DMA completes but before previous serial transmission completes.
Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Fix for the problem detected by Ingo Molnar:
enabling CONFIG_PCWATCHDOG=y crashes bzImage bootup.
The reason for this can be found in drivers/makefile
We first do:
obj-y += char/
and later we do:
obj-y += base/ block/ misc/ mfd/ net/ media/
So if we put a platform or isa or usb bus driver in char/watchdog
(which is called from the Makefile in drivers/char/Makefile)
then we didn't have the different device drivers initialized yet
(they are in drivers/base and drivers/usb and ...)
This fix makes sure that we compile the watchdog drivers after
drivers/base, drivers/misc, drivers/pci and drivers/usb.
We also do the compile after hwmon because in the future the
watchdog temperature support will use the hwmon system.
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Fix some missing places to check with device id info, which
should probe the device gart correctly.
Signed-off-by: Wang Zhenyu <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
AGP should not need to lock pages. They are not protecting any race
because there is no lock_page calls, only SetPageLocked.
This is causing hangs with d00806b183.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Hi,
Coverity spotted a "use after free" bug in
drivers/char/agp/ati-agp.c::ati_create_gatt_pages().
The same one that was in
drivers/char/agp/amd-k7-agp.c::amd_create_gatt_pages()
The problem is this:
If "entry = kzalloc(sizeof(struct ati_page_map), GFP_KERNEL);"
fails, then there's a loop in the function to free all entries
allocated so far and break out of the allocation loop. That in itself
is pretty sane, but then the (now freed) 'tables' is assigned to
ati_generic_private.gatt_pages and 'retval' is set to -ENOMEM which
causes ati_free_gatt_pages(); to be called at the end of the function.
The problem with this is that ati_free_gatt_pages() will then loop
'ati_generic_private.num_tables' times and try to free each entry in
tables[] - this is bad since tables has already been freed and
furthermore it will call kfree(tables) at the end - a double free.
This patch removes the freeing loop in ati_create_gatt_pages() and
instead relies entirely on the call to ati_free_gatt_pages() to free
everything we allocated in case of an error. It also sets
ati_generic_private.num_tables to the actual number of entries
allocated instead of just using the value passed in from the caller -
this ensures that ati_free_gatt_pages() will only attempt to free
stuff that was actually allocated.
Note: I'm in no way intimate with this code and I have no way to
actually test this patch (besides compile test it), so while I've
tried to be careful in reading the code and make sure the patch
does the right thing an ACK from someone who actually knows the
code in-depth would be very much appreciated.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Add all LPC bridges for the 631xESB/632xESB I/O chipset.
The datasheet says:
* Device Function = B0:D31:FO
* Function Description = LPC interface
* DEV ID = 267xh
* Comment = 2670h-267Fh
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Add 631xESB/632xESB support to the iTCO_wdt driver.
Signed-off-by: Sergey Kononenko <sergk@sergk.org.ua>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Documentation: The FIXMEs
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation: The Drivers
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
ACPI: Kconfig: remove CONFIG_ACPI_SLEEP from source
ACPI: quiet ACPI Exceptions due to no _PTC or _TSS
ACPI: Remove references to ACPI_STATE_S2 from acpi_pm_enter
ACPI: Kconfig: always enable CONFIG_ACPI_SLEEP on X86
ACPI: Kconfig: fold /proc/acpi/sleep under CONFIG_ACPI_PROCFS
ACPI: Kconfig: CONFIG_ACPI_PROCFS now defaults to N
ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI drivers
ACPI: autoload modules - Create ACPI alias interface
ACPI: autoload modules - ACPICA modifications
ACPI: asus-laptop: Fix failure exits
ACPI: fix oops due to typo in new throttling code
ACPI: ignore _PSx method for hotplugable PCI devices
ACPI: Use ACPI methods to select PCI device suspend state
ACPI, PNP: hook ACPI D-state to PNP suspend/resume
ACPI: Add acpi_pm_device_sleep_state helper routine
ACPI: Implement the set_target() callback from pm_ops
Consolidate the timeout config register modification into a single
function. Also, use the enabled flag in the config register to
determine whether the timer is enabled instead of a separately
maintained flag, MV64x60_WDOG_FLAG_ENABLED.
Add spinlock protection around enabling/disabling the watchdog timer.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Make sure that we disable the watchdog at start-up.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Disallow disabling of the watchdog timer unless a particular
character ('V') was recently written to the watchdog device.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Also, use the WATCHDOG_NOWAYOUT macro, rather than #ifdefs,
and use __module_get to prevent module unloading if WATCHDOG_NOWAYOUT
is set.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Allow the watchdog timer to be enabled or disabled via the
WDIOC_SETOPTIONS ioctl.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Add the ability to modify the watchdog timer timeout interval.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Return the value of the nonseekable_open function and not 0.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Add support for arch/powerpc, specifically for the prpmc2800 platform.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Previously, the address of the watchdog timer registers was
retrieved by calling a global function, mv64x60_get_bridge_vbase().
That function doesn't exist in arch/powerpc. Instead, we now get
the register address from a platform data resource and ioremap
the registers within the driver.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
The driver previously registered its platform device data in its own
init function--that's bogus. Move that code to platform-specific
code in arch/ppc. This is being done so that the platform code can
decide at runtime whether to initialize this driver or not.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
1. Ensure that the mouse and keyboard do not ping the watchdog.
This is the default operation of the w83627, but some BIOSes change this.
2. Increase the max timeout from 63 seconds to 255 seconds
as supported by the w83627 chip
3. Comment that the watchdog supports the w83627hg version of the chip
Signed-Off-By: Pdraig Brady <P@draigBrady.com>
Tested-by: Tomas Hodek <tomas.hodek@volny.cz>
Signed-Off-By: Wim Van Sebroeck <wim@iguana.be>
Fixup the s3c2410 watchdog driver after moving some
of the arch specific includes it has been relying on.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
From: Andrew Morton <akpm@linux-foundation.org>
This driver isn't very coding-style friendly.
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
modpost is going to use these to create e.g. acpi:ACPI0001
in modules.alias.
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
All watchdog device drivers are VFSs (Virtual File Systems).
We thus return a nonseekable_open(inode, file) when we open the VFS.
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* Remove the redundant check for pwrite(), given that the open() routine
already invokes nonseekable_open().
* The WDIOF_CARDRESET flag can only be used when you can read this status
via the WDIOC_GETSTATUS ioctl call.
* Add the mandatory WDIOC_GETBOOTSTATUS ioctl call.
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* Add MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
* Add mandatory WDIOC_GETSTATUS and WDIOC_GETBOOTSTATUS ioctl's.
* If unknown ioctl is used we should return -ENOTTY.
* All watchdog device drivers are VFSs (Virtual File Systems).
We thus return a nonseekable_open(inode, file) when we open the VFS.
* Make sure that /dev/watchdog can be opened by 1 parent
* Add spin-locking to prevent that forked children can disturb
each other's operations.
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Add watchdog support for TI Davinci DM644x/DM646x processors.
Signed-off-by: Vladimir Barinov <vbarinov@ru.mvista.com>
Signed-off-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
This patch implements the driver necessary use the Analog Devices
Blackfin processor's on-chip watchdog controller, supports
BF53[123]/BF53[467]/BF54[2489]/BF561.
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Driver for internal mpc5200 watchdog on general purpose timer 0.
For IPB clock of 132 MHz the maximum timeout is about 32 seconds.
Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
[POWERPC] Clean up duplicate includes in drivers/macintosh/
[POWERPC] Quiet section mismatch warning on pcibios_setup
[POWERPC] init and exit markings for hvc_iseries
[POWERPC] Quiet section mismatch in hvc_rtas.c
[POWERPC] Constify of_platform_driver match_table
[POWERPC] hvcs: Make some things static and const
[POWERPC] Constify of_platform_driver name
[POWERPC] MPIC protected sources
[POWERPC] of_detach_node()'s device node argument cannot be const
[POWERPC] Fix ARCH=ppc builds
[POWERPC] mv64x60: Use mutex instead of semaphore
[POWERPC] Allow smp_call_function_single() to current cpu
[POWERPC] Allow exec faults on readable areas on classic 32-bit PowerPC
[POWERPC] Fix future firmware feature fixups function failure
[POWERPC] fix showing xmon help
[POWERPC] Make xmon_write accept a const buffer
[POWERPC] Fix misspelled "CONFIG_CHECK_CACHE_COHERENCY" Kconfig option.
[POWERPC] cell: CONFIG_SPE_BASE is a typo
WARNING: vmlinux.o(.text+0x2066f0): Section mismatch: reference to .init.text:.add_preferred_console (between '.hvc_rtas_console_init' and '.hvc_beat_put_chars')
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>