* [patch] IDE: Touch NMI watchdog during resume from STR
@ 2006-07-13 10:14 Michal Schmidt
2006-07-13 13:28 ` Andi Kleen
2006-07-14 19:06 ` [patch] IDE: Touch NMI watchdog during resume from STR Pavel Machek
0 siblings, 2 replies; 7+ messages in thread
From: Michal Schmidt @ 2006-07-13 10:14 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel
When resuming from suspend-to-RAM, the NMI watchdog detects a lockup in
ide_wait_not_busy.
Here's a screenshot of the trace taken by a digital camera:
http://www.uamt.feec.vutbr.cz/rizeni/pom/DSC03510-2.JPG
Let's touch the NMI watchdog in ide_wait_not_busy. The system then
resumes correctly from STR.
Signed-off-by: Michal Schmidt <xschmi00@stud.feec.vutbr.cz>
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 6571652..77703ac 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -23,6 +23,7 @@ #include <linux/delay.h>
#include <linux/hdreg.h>
#include <linux/ide.h>
#include <linux/bitops.h>
+#include <linux/nmi.h>
#include <asm/byteorder.h>
#include <asm/irq.h>
@@ -1243,6 +1244,7 @@ int ide_wait_not_busy(ide_hwif_t *hwif,
if (stat == 0xff)
return -ENODEV;
touch_softlockup_watchdog();
+ touch_nmi_watchdog();
}
return -EBUSY;
}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [patch] IDE: Touch NMI watchdog during resume from STR
2006-07-13 10:14 [patch] IDE: Touch NMI watchdog during resume from STR Michal Schmidt
@ 2006-07-13 13:28 ` Andi Kleen
2006-07-13 17:33 ` Michal Schmidt
2006-07-14 19:06 ` [patch] IDE: Touch NMI watchdog during resume from STR Pavel Machek
1 sibling, 1 reply; 7+ messages in thread
From: Andi Kleen @ 2006-07-13 13:28 UTC (permalink / raw)
To: Michal Schmidt; +Cc: linux-kernel
Michal Schmidt <xschmi00@stud.feec.vutbr.cz> writes:
> if (stat == 0xff)
> return -ENODEV;
> touch_softlockup_watchdog();
> + touch_nmi_watchdog();
You can remove the touch_softlock_watchdog then. It's implied in
touch_nmi_watchdog
-Andi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] IDE: Touch NMI watchdog during resume from STR
2006-07-13 13:28 ` Andi Kleen
@ 2006-07-13 17:33 ` Michal Schmidt
2006-07-13 17:36 ` Andi Kleen
0 siblings, 1 reply; 7+ messages in thread
From: Michal Schmidt @ 2006-07-13 17:33 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
Andi Kleen wrote:
> Michal Schmidt <xschmi00@stud.feec.vutbr.cz> writes:
>> if (stat == 0xff)
>> return -ENODEV;
>> touch_softlockup_watchdog();
>> + touch_nmi_watchdog();
> You can remove the touch_softlock_watchdog then. It's implied in
> touch_nmi_watchdog
I don't think that's always true. There are architectures where
touch_nmi_watchdog is a NOP. This is in include/linux/nmi.h:
#ifdef ARCH_HAS_NMI_WATCHDOG
extern void touch_nmi_watchdog(void);
#else
# define touch_nmi_watchdog() do { } while(0)
#endif
Michal
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [patch] IDE: Touch NMI watchdog during resume from STR
2006-07-13 17:33 ` Michal Schmidt
@ 2006-07-13 17:36 ` Andi Kleen
2006-07-23 22:06 ` [PATCH] Make touch_nmi_watchdog imply touch_softlockup_watchdog on all archs Michal Schmidt
0 siblings, 1 reply; 7+ messages in thread
From: Andi Kleen @ 2006-07-13 17:36 UTC (permalink / raw)
To: Michal Schmidt; +Cc: linux-kernel, Ingo Molnar
On Thursday 13 July 2006 19:33, Michal Schmidt wrote:
> Andi Kleen wrote:
> > Michal Schmidt <xschmi00@stud.feec.vutbr.cz> writes:
> >> if (stat == 0xff)
> >> return -ENODEV;
> >> touch_softlockup_watchdog();
> >> + touch_nmi_watchdog();
> > You can remove the touch_softlock_watchdog then. It's implied in
> > touch_nmi_watchdog
>
> I don't think that's always true. There are architectures where
> touch_nmi_watchdog is a NOP. This is in include/linux/nmi.h:
>
> #ifdef ARCH_HAS_NMI_WATCHDOG
> extern void touch_nmi_watchdog(void);
> #else
> # define touch_nmi_watchdog() do { } while(0)
> #endif
That's broken code then. It should be defined to touch_softlock_watchdog
for the !ARCH_HAS_NMI_WATCHDOG then.
-Andi
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH] Make touch_nmi_watchdog imply touch_softlockup_watchdog on all archs
2006-07-13 17:36 ` Andi Kleen
@ 2006-07-23 22:06 ` Michal Schmidt
2006-07-24 7:15 ` Ingo Molnar
0 siblings, 1 reply; 7+ messages in thread
From: Michal Schmidt @ 2006-07-23 22:06 UTC (permalink / raw)
To: linux-kernel; +Cc: Andi Kleen, Ingo Molnar
touch_nmi_watchdog() calls touch_softlockup_watchdog() on both
architectures that implement it (i386 and x86_64). On other architectures
it does nothing at all. touch_nmi_watchdog() should imply
touch_softlockup_watchdog() on all architectures.
Suggested by Andi Kleen.
Signed-off-by: Michal Schmidt <xschmi00@stud.feec.vutbr.cz>
diff --git a/include/linux/nmi.h b/include/linux/nmi.h
index c8f4d2f..e16904e 100644
--- a/include/linux/nmi.h
+++ b/include/linux/nmi.h
@@ -4,6 +4,7 @@
#ifndef LINUX_NMI_H
#define LINUX_NMI_H
+#include <linux/sched.h>
#include <asm/irq.h>
/**
@@ -16,7 +17,7 @@ #include <asm/irq.h>
#ifdef ARCH_HAS_NMI_WATCHDOG
extern void touch_nmi_watchdog(void);
#else
-# define touch_nmi_watchdog() do { } while(0)
+# define touch_nmi_watchdog() touch_softlockup_watchdog()
#endif
#endif
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] Make touch_nmi_watchdog imply touch_softlockup_watchdog on all archs
2006-07-23 22:06 ` [PATCH] Make touch_nmi_watchdog imply touch_softlockup_watchdog on all archs Michal Schmidt
@ 2006-07-24 7:15 ` Ingo Molnar
0 siblings, 0 replies; 7+ messages in thread
From: Ingo Molnar @ 2006-07-24 7:15 UTC (permalink / raw)
To: Michal Schmidt; +Cc: linux-kernel, Andi Kleen
* Michal Schmidt <xschmi00@stud.feec.vutbr.cz> wrote:
> touch_nmi_watchdog() calls touch_softlockup_watchdog() on both
> architectures that implement it (i386 and x86_64). On other
> architectures it does nothing at all. touch_nmi_watchdog() should
> imply touch_softlockup_watchdog() on all architectures. Suggested by
> Andi Kleen.
>
> Signed-off-by: Michal Schmidt <xschmi00@stud.feec.vutbr.cz>
Acked-by: Ingo Molnar <mingo@elte.hu>
although i suspect this could be cleaned up by consolidating both under
touch_watchdog(), right?
Ingo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] IDE: Touch NMI watchdog during resume from STR
2006-07-13 10:14 [patch] IDE: Touch NMI watchdog during resume from STR Michal Schmidt
2006-07-13 13:28 ` Andi Kleen
@ 2006-07-14 19:06 ` Pavel Machek
1 sibling, 0 replies; 7+ messages in thread
From: Pavel Machek @ 2006-07-14 19:06 UTC (permalink / raw)
To: Michal Schmidt; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
Hi!
> When resuming from suspend-to-RAM, the NMI watchdog
> detects a lockup in ide_wait_not_busy.
> Here's a screenshot of the trace taken by a digital
> camera:
> http://www.uamt.feec.vutbr.cz/rizeni/pom/DSC03510-2.JPG
>
> Let's touch the NMI watchdog in ide_wait_not_busy. The
> system then resumes correctly from STR.
>
> Signed-off-by: Michal Schmidt
> <xschmi00@stud.feec.vutbr.cz>
ACK.
> diff --git a/drivers/ide/ide-iops.c
> b/drivers/ide/ide-iops.c
> index 6571652..77703ac 100644
> --- a/drivers/ide/ide-iops.c
> +++ b/drivers/ide/ide-iops.c
> @@ -23,6 +23,7 @@ #include <linux/delay.h>
> #include <linux/hdreg.h>
> #include <linux/ide.h>
> #include <linux/bitops.h>
> +#include <linux/nmi.h>
>
> #include <asm/byteorder.h>
> #include <asm/irq.h>
> @@ -1243,6 +1244,7 @@ int ide_wait_not_busy(ide_hwif_t
> *hwif, if (stat == 0xff)
> return -ENODEV;
> touch_softlockup_watchdog();
> + touch_nmi_watchdog();
Perhaps we need touch_all_watchdogs()?
Pavel
--
Thanks for all the (sleeping) penguins.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-07-24 7:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-13 10:14 [patch] IDE: Touch NMI watchdog during resume from STR Michal Schmidt
2006-07-13 13:28 ` Andi Kleen
2006-07-13 17:33 ` Michal Schmidt
2006-07-13 17:36 ` Andi Kleen
2006-07-23 22:06 ` [PATCH] Make touch_nmi_watchdog imply touch_softlockup_watchdog on all archs Michal Schmidt
2006-07-24 7:15 ` Ingo Molnar
2006-07-14 19:06 ` [patch] IDE: Touch NMI watchdog during resume from STR Pavel Machek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.