LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: mingo@elte.hu
Cc: linux-kernel@vger.kernel.org, Jason Wessel <jason.wessel@windriver.com>
Subject: [PATCH 3/7] kgdb-light-v10: clocksource watchdog
Date: Fri, 15 Feb 2008 14:55:54 -0600 [thread overview]
Message-ID: <1203108958-1818-4-git-send-email-jason.wessel@windriver.com> (raw)
In-Reply-To: <1203108958-1818-3-git-send-email-jason.wessel@windriver.com>
In order to not trip the clocksource watchdog, kgdb must touch the
clocksource watchdog on the return to normal system run state.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
include/linux/clocksource.h | 1 +
kernel/kgdb.c | 4 ++++
kernel/time/clocksource.c | 12 ++++++++++++
3 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 85778a4..3509447 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -216,6 +216,7 @@ static inline void clocksource_calculate_interval(struct clocksource *c,
/* used to install a new clocksource */
extern int clocksource_register(struct clocksource*);
extern void clocksource_unregister(struct clocksource*);
+extern void clocksource_touch_watchdog(void);
extern struct clocksource* clocksource_get_next(void);
extern void clocksource_change_rating(struct clocksource *cs, int rating);
extern void clocksource_resume(void);
diff --git a/kernel/kgdb.c b/kernel/kgdb.c
index 21d30cf..9d42e0a 100644
--- a/kernel/kgdb.c
+++ b/kernel/kgdb.c
@@ -28,6 +28,7 @@
* kind, whether express or implied.
*/
#include <linux/pid_namespace.h>
+#include <linux/clocksource.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/console.h>
@@ -556,6 +557,7 @@ static void kgdb_wait(struct pt_regs *regs)
/* Signal the primary CPU that we are done: */
atomic_set(&cpu_in_kgdb[cpu], 0);
+ clocksource_touch_watchdog();
local_irq_restore(flags);
}
#endif
@@ -1378,6 +1380,7 @@ acquirelock:
atomic_read(&kgdb_cpu_doing_single_step) != cpu) {
atomic_set(&kgdb_active, -1);
+ clocksource_touch_watchdog();
local_irq_restore(flags);
goto acquirelock;
@@ -1469,6 +1472,7 @@ acquirelock:
kgdb_restore:
/* Free kgdb_active */
atomic_set(&kgdb_active, -1);
+ clocksource_touch_watchdog();
local_irq_restore(flags);
return error;
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 548c436..ace23d3 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -228,6 +228,18 @@ void clocksource_resume(void)
}
/**
+ * clocksource_touch_watchdog - Update watchdog
+ *
+ * Update the watchdog after exception contexts such as kgdb so as not
+ * to incorrectly trip the watchdog.
+ *
+ */
+void clocksource_touch_watchdog(void)
+{
+ clocksource_resume_watchdog();
+}
+
+/**
* clocksource_get_next - Returns the selected clocksource
*
*/
--
1.5.4
next prev parent reply other threads:[~2008-02-15 20:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-15 20:55 [PATCH 0/7] kgdb-light-v10: proposed fixes Jason Wessel
2008-02-15 20:55 ` [PATCH 1/7] kgdb-light-v10: fix kgdboc dynamic module configuration Jason Wessel
2008-02-15 20:55 ` [PATCH 2/7] kgdb-light-v10: fix NMI hangs Jason Wessel
2008-02-15 20:55 ` Jason Wessel [this message]
2008-02-15 20:55 ` [PATCH 4/7] kgdb-light-v10: print breakpoint removed on exception Jason Wessel
2008-02-15 20:55 ` [PATCH 5/7] kgdb-light-v10: x86 HW breakpoints Jason Wessel
2008-02-15 20:55 ` [PATCH 6/7] kgdb-light-v10: move the kgdb core and arch implementation Jason Wessel
2008-02-15 20:55 ` [PATCH 7/7] kgdb-light-v10: build core and arch pieces as a kernel module Jason Wessel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1203108958-1818-4-git-send-email-jason.wessel@windriver.com \
--to=jason.wessel@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--subject='Re: [PATCH 3/7] kgdb-light-v10: clocksource watchdog' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).