mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
b2ad368beb
commit
897dba0274
2 changed files with 14 additions and 0 deletions
|
@ -48,6 +48,10 @@ struct pstore_info {
|
|||
int (*write)(enum pstore_type_id type,
|
||||
enum kmsg_dump_reason reason, u64 *id,
|
||||
unsigned int part, size_t size, struct pstore_info *psi);
|
||||
int (*write_buf)(enum pstore_type_id type,
|
||||
enum kmsg_dump_reason reason, u64 *id,
|
||||
unsigned int part, const char *buf, size_t size,
|
||||
struct pstore_info *psi);
|
||||
int (*erase)(enum pstore_type_id type, u64 id,
|
||||
struct pstore_info *psi);
|
||||
void *data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue