]>
git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - fs/pstore/internal.h
1 #ifndef __PSTORE_INTERNAL_H__
2 #define __PSTORE_INTERNAL_H__
4 #include <linux/pstore.h>
6 #if NR_CPUS <= 2 && defined(CONFIG_ARM_THUMB)
7 #define PSTORE_CPU_IN_IP 0x1
8 #elif NR_CPUS <= 4 && defined(CONFIG_ARM)
9 #define PSTORE_CPU_IN_IP 0x3
12 struct pstore_ftrace_record
{
14 unsigned long parent_ip
;
15 #ifndef PSTORE_CPU_IN_IP
21 pstore_ftrace_encode_cpu(struct pstore_ftrace_record
*rec
, unsigned int cpu
)
23 #ifndef PSTORE_CPU_IN_IP
30 static inline unsigned int
31 pstore_ftrace_decode_cpu(struct pstore_ftrace_record
*rec
)
33 #ifndef PSTORE_CPU_IN_IP
36 return rec
->ip
& PSTORE_CPU_IN_IP
;
40 extern struct pstore_info
*psinfo
;
42 extern void pstore_set_kmsg_bytes(int);
43 extern void pstore_get_records(int);
44 extern int pstore_mkfile(enum pstore_type_id
, char *psname
, u64 id
,
45 char *data
, size_t size
,
46 struct timespec time
, struct pstore_info
*psi
);
47 extern int pstore_is_mounted(void);