summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-04-09 12:24:39 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-04-09 12:24:39 +0200
commiteed5f701ba73310020dc3ef2530944cb601f256c (patch)
tree1e3247196bff296fb310f198e364d651eb036c9f /include/linux
parent9d39328a81fa9349f54e8ada1b22860ca688d1df (diff)
parent3342ba8855f5b0eb3967423be4742fe534ce72fa (diff)
downloadbarebox-eed5f701ba73310020dc3ef2530944cb601f256c.tar.gz
barebox-eed5f701ba73310020dc3ef2530944cb601f256c.tar.xz
Merge branch 'for-next/pstore'
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pstore.h27
-rw-r--r--include/linux/pstore_ram.h4
2 files changed, 22 insertions, 9 deletions
diff --git a/include/linux/pstore.h b/include/linux/pstore.h
index a925e14397..15e1e3d6fa 100644
--- a/include/linux/pstore.h
+++ b/include/linux/pstore.h
@@ -25,6 +25,8 @@
#include <linux/types.h>
#include <asm-generic/errno.h>
+struct module;
+
/* types */
enum pstore_type_id {
PSTORE_TYPE_DMESG = 0,
@@ -43,7 +45,21 @@ enum kmsg_dump_reason {
KMSG_DUMP_UNDEF,
};
-struct module;
+struct pstore_info;
+
+struct pstore_record {
+ struct pstore_info *psi;
+ enum pstore_type_id type;
+ u64 id;
+ char *buf;
+ ssize_t size;
+ ssize_t ecc_notice_size;
+
+ int count;
+ enum kmsg_dump_reason reason;
+ unsigned int part;
+ bool compressed;
+};
struct pstore_info {
struct module *owner;
@@ -53,13 +69,8 @@ struct pstore_info {
int flags;
int (*open)(struct pstore_info *psi);
int (*close)(struct pstore_info *psi);
- ssize_t (*read)(u64 *id, enum pstore_type_id *type,
- int *count, char **buf, bool *compressed,
- struct pstore_info *psi);
- int (*write)(enum pstore_type_id type,
- enum kmsg_dump_reason reason, u64 *id,
- unsigned int part, int count, bool compressed,
- size_t size, struct pstore_info *psi);
+ ssize_t (*read)(struct pstore_record *record);
+ int (*write)(struct pstore_record *record);
int (*write_buf)(enum pstore_type_id type,
enum kmsg_dump_reason reason, u64 *id,
unsigned int part, const char *buf, bool compressed,
diff --git a/include/linux/pstore_ram.h b/include/linux/pstore_ram.h
index 5ef823a57b..de6eaa93f9 100644
--- a/include/linux/pstore_ram.h
+++ b/include/linux/pstore_ram.h
@@ -29,11 +29,13 @@ struct persistent_ram_ecc_info {
int ecc_size;
int symsize;
int poly;
+ uint16_t *par;
};
struct persistent_ram_zone {
phys_addr_t paddr;
size_t size;
+ char *label;
struct persistent_ram_buffer *buffer;
size_t buffer_size;
struct resource *res;
@@ -52,7 +54,7 @@ struct persistent_ram_zone {
struct persistent_ram_zone *persistent_ram_new(phys_addr_t start, size_t size,
u32 sig, struct persistent_ram_ecc_info *ecc_info,
- unsigned int memtype);
+ unsigned int memtype, char *label);
void persistent_ram_free(struct persistent_ram_zone *prz);
void persistent_ram_zap(struct persistent_ram_zone *prz);