aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2008-11-19 17:09:52 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-19 17:09:52 +0000
commit6d3fb8064a9336438137d7987bb1e58433528d59 (patch)
tree122c31d6b17d6aec7881bd03cdaec59958b29da1 /include/linux
parent7e7270be85be64eeee2196bbc8cd877395870f40 (diff)
introduce-resume-exception-capture.patch
This patch introduces a new resume debugging concept: if we get an OOPS inbetween starting suspend and finishing resume, it uses a new "emergency spew" device similar to BUT NOT REQUIRING CONFIG_DEBUG_LL to dump the syslog buffer and then the OOPS on the debug device defined by the existing CONFIG_DEBUG_S3C_UART index. But neither CONFIG_DEBUG_LL nor the S3C low level configs are needed to use this feature. Another difference between this feature and CONFIG_DEBUG_LL is that it does not affect resume timing, ordering or UART traffic UNLESS there is an OOPS during resume. The patch adds three global exports, one to say if we are inside suspend / resume, and two callbacks for printk() to use to init and dump the emergency data. The callbacks are set in s3c serial device init, but the whole structure is arch independent. Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/kernel.h2
-rw-r--r--include/linux/suspend.h6
2 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index fba141d3ca0..2e8c7fcab9c 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -225,6 +225,8 @@ extern struct ratelimit_state printk_ratelimit_state;
extern int printk_ratelimit(void);
extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
unsigned int interval_msec);
+extern void (*printk_emergency_debug_spew_init)(void);
+extern void (*printk_emergency_debug_spew_send_string)(const char *);
#else
static inline int vprintk(const char *s, va_list args)
__attribute__ ((format (printf, 1, 0)));
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 2ce8207686e..487699132d7 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -146,6 +146,12 @@ struct pbe {
struct pbe *next;
};
+/**
+ * global indication we are somewhere between start of suspend and end of
+ * resume, nonzero is true
+ */
+extern int global_inside_suspend;
+
/* mm/page_alloc.c */
extern void mark_free_pages(struct zone *zone);