aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pstore.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/pstore.h')
-rw-r--r--include/linux/pstore.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/pstore.h b/include/linux/pstore.h
index e1461e143be2..c892587d9b81 100644
--- a/include/linux/pstore.h
+++ b/include/linux/pstore.h
@@ -24,14 +24,22 @@
24 24
25#include <linux/time.h> 25#include <linux/time.h>
26#include <linux/kmsg_dump.h> 26#include <linux/kmsg_dump.h>
27#include <linux/mutex.h>
28#include <linux/types.h>
29#include <linux/spinlock.h>
30#include <linux/errno.h>
27 31
28/* types */ 32/* types */
29enum pstore_type_id { 33enum pstore_type_id {
30 PSTORE_TYPE_DMESG = 0, 34 PSTORE_TYPE_DMESG = 0,
31 PSTORE_TYPE_MCE = 1, 35 PSTORE_TYPE_MCE = 1,
36 PSTORE_TYPE_CONSOLE = 2,
37 PSTORE_TYPE_FTRACE = 3,
32 PSTORE_TYPE_UNKNOWN = 255 38 PSTORE_TYPE_UNKNOWN = 255
33}; 39};
34 40
41struct module;
42
35struct pstore_info { 43struct pstore_info {
36 struct module *owner; 44 struct module *owner;
37 char *name; 45 char *name;
@@ -47,11 +55,23 @@ struct pstore_info {
47 int (*write)(enum pstore_type_id type, 55 int (*write)(enum pstore_type_id type,
48 enum kmsg_dump_reason reason, u64 *id, 56 enum kmsg_dump_reason reason, u64 *id,
49 unsigned int part, size_t size, struct pstore_info *psi); 57 unsigned int part, size_t size, struct pstore_info *psi);
58 int (*write_buf)(enum pstore_type_id type,
59 enum kmsg_dump_reason reason, u64 *id,
60 unsigned int part, const char *buf, size_t size,
61 struct pstore_info *psi);
50 int (*erase)(enum pstore_type_id type, u64 id, 62 int (*erase)(enum pstore_type_id type, u64 id,
51 struct pstore_info *psi); 63 struct pstore_info *psi);
52 void *data; 64 void *data;
53}; 65};
54 66
67
68#ifdef CONFIG_PSTORE_FTRACE
69extern void pstore_ftrace_call(unsigned long ip, unsigned long parent_ip);
70#else
71static inline void pstore_ftrace_call(unsigned long ip, unsigned long parent_ip)
72{ }
73#endif
74
55#ifdef CONFIG_PSTORE 75#ifdef CONFIG_PSTORE
56extern int pstore_register(struct pstore_info *); 76extern int pstore_register(struct pstore_info *);
57#else 77#else