blob: c029314478fad020a46e27562ee5936d0e3b407b [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Anton Vorontsov060287b2012-07-09 17:10:41 -07002#ifndef __PSTORE_INTERNAL_H__
3#define __PSTORE_INTERNAL_H__
4
Anton Vorontsov67a101f2012-07-17 11:37:07 -07005#include <linux/types.h>
6#include <linux/time.h>
Anton Vorontsov060287b2012-07-09 17:10:41 -07007#include <linux/pstore.h>
8
David Howells349d7432017-07-05 16:24:34 +01009#define PSTORE_DEFAULT_KMSG_BYTES 10240
10extern unsigned long kmsg_bytes;
11
Anton Vorontsov65f8c952012-07-17 14:26:15 -070012#ifdef CONFIG_PSTORE_FTRACE
13extern void pstore_register_ftrace(void);
Geliang Tangee1d2672015-10-20 00:39:03 -070014extern void pstore_unregister_ftrace(void);
Anton Vorontsov65f8c952012-07-17 14:26:15 -070015#else
16static inline void pstore_register_ftrace(void) {}
Geliang Tangee1d2672015-10-20 00:39:03 -070017static inline void pstore_unregister_ftrace(void) {}
Anton Vorontsov65f8c952012-07-17 14:26:15 -070018#endif
19
Mark Salyzyn9d5438f2015-01-16 16:01:10 -080020#ifdef CONFIG_PSTORE_PMSG
21extern void pstore_register_pmsg(void);
Geliang Tangee1d2672015-10-20 00:39:03 -070022extern void pstore_unregister_pmsg(void);
Mark Salyzyn9d5438f2015-01-16 16:01:10 -080023#else
24static inline void pstore_register_pmsg(void) {}
Geliang Tangee1d2672015-10-20 00:39:03 -070025static inline void pstore_unregister_pmsg(void) {}
Mark Salyzyn9d5438f2015-01-16 16:01:10 -080026#endif
27
Anton Vorontsov060287b2012-07-09 17:10:41 -070028extern struct pstore_info *psinfo;
29
Luck, Tony366f7e72011-03-18 15:33:43 -070030extern void pstore_set_kmsg_bytes(int);
Luck, Tony6dda9262011-08-11 15:14:39 -070031extern void pstore_get_records(int);
Kees Cook3a7d2fd2017-04-27 15:53:21 -070032extern void pstore_get_backend_records(struct pstore_info *psi,
33 struct dentry *root, int quiet);
34extern int pstore_mkfile(struct dentry *root,
35 struct pstore_record *record);
Geliang Tang7e26e9f2015-10-22 01:02:33 -070036extern bool pstore_is_mounted(void);
Kees Cooke581ca82017-05-19 15:10:31 -070037extern void pstore_record_init(struct pstore_record *record,
38 struct pstore_info *psi);
Anton Vorontsov060287b2012-07-09 17:10:41 -070039
40#endif