aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pstore.h
diff options
context:
space:
mode:
authorAnton Vorontsov <anton.vorontsov@linaro.org>2012-07-09 20:10:40 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-17 12:51:38 -0400
commit897dba027445be93f40e5caf550556ca38c48c51 (patch)
tree22b28b1681dd32d9ff9686009c16a5540ce5bc90 /include/linux/pstore.h
parentb2ad368bebc0f772613668e893fa176396e9094c (diff)
pstore: Introduce write_buf backend callback
For function tracing we need to stop using pstore.buf directly, since in a tracing callback we can't use spinlocks, and thus we can't safely use the global buffer. With write_buf callback, backends no longer need to access pstore.buf directly, and thus we can pass any buffers (e.g. allocated on stack). Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/pstore.h')
-rw-r--r--include/linux/pstore.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/pstore.h b/include/linux/pstore.h
index 1bd014b8e432..b107484192fc 100644
--- a/include/linux/pstore.h
+++ b/include/linux/pstore.h
@@ -48,6 +48,10 @@ struct pstore_info {
48 int (*write)(enum pstore_type_id type, 48 int (*write)(enum pstore_type_id type,
49 enum kmsg_dump_reason reason, u64 *id, 49 enum kmsg_dump_reason reason, u64 *id,
50 unsigned int part, size_t size, struct pstore_info *psi); 50 unsigned int part, size_t size, struct pstore_info *psi);
51 int (*write_buf)(enum pstore_type_id type,
52 enum kmsg_dump_reason reason, u64 *id,
53 unsigned int part, const char *buf, size_t size,
54 struct pstore_info *psi);
51 int (*erase)(enum pstore_type_id type, u64 id, 55 int (*erase)(enum pstore_type_id type, u64 id,
52 struct pstore_info *psi); 56 struct pstore_info *psi);
53 void *data; 57 void *data;