diff options
author | WeiXiong Liao <liaoweixiong@allwinnertech.com> | 2020-03-25 11:55:04 +0300 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2020-06-01 05:49:00 +0300 |
commit | 1525fb3bb6d69028b3941d34363397c28345ffab (patch) | |
tree | f4ee0dffa6988f2d261d271babf6baa631e9b3b2 /include/linux/pstore_blk.h | |
parent | 335426c6dcdd338d6b7c939c2da15fc9c5dd4959 (diff) | |
download | linux-1525fb3bb6d69028b3941d34363397c28345ffab.tar.xz |
pstore/blk: Provide way to query pstore configuration
In order to configure itself, the MTD backend needs to be able to query
the current pstore configuration. Introduce pstore_blk_get_config() for
this purpose.
Signed-off-by: WeiXiong Liao <liaoweixiong@allwinnertech.com>
Link: https://lore.kernel.org/lkml/20200511233229.27745-9-keescook@chromium.org/
Co-developed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'include/linux/pstore_blk.h')
-rw-r--r-- | include/linux/pstore_blk.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/pstore_blk.h b/include/linux/pstore_blk.h index ccba8c068752..0c40774e71e0 100644 --- a/include/linux/pstore_blk.h +++ b/include/linux/pstore_blk.h @@ -49,4 +49,32 @@ struct pstore_blk_info { int register_pstore_blk(struct pstore_blk_info *info); void unregister_pstore_blk(unsigned int major); +/** + * struct pstore_blk_config - the pstore_blk backend configuration + * + * @device: Name of the desired block device + * @max_reason: Maximum kmsg dump reason to store to block device + * @kmsg_size: Total size of for kmsg dumps + * @pmsg_size: Total size of the pmsg storage area + * @console_size: Total size of the console storage area + * @ftrace_size: Total size for ftrace logging data (for all CPUs) + */ +struct pstore_blk_config { + char device[80]; + enum kmsg_dump_reason max_reason; + unsigned long kmsg_size; + unsigned long pmsg_size; + unsigned long console_size; + unsigned long ftrace_size; +}; + +/** + * pstore_blk_get_config - get a copy of the pstore_blk backend configuration + * + * @info: The sturct pstore_blk_config to be filled in + * + * Failure returns negative error code, and success returns 0. + */ +int pstore_blk_get_config(struct pstore_blk_config *info); + #endif |