diff options
Diffstat (limited to 'include/linux/pstore_ram.h')
| -rw-r--r-- | include/linux/pstore_ram.h | 14 | 
1 files changed, 13 insertions, 1 deletions
| diff --git a/include/linux/pstore_ram.h b/include/linux/pstore_ram.h index c668c861c96c..9395f06e8372 100644 --- a/include/linux/pstore_ram.h +++ b/include/linux/pstore_ram.h @@ -24,6 +24,13 @@  #include <linux/list.h>  #include <linux/types.h> +/* + * Choose whether access to the RAM zone requires locking or not.  If a zone + * can be written to from different CPUs like with ftrace for example, then + * PRZ_FLAG_NO_LOCK is used. For all other cases, locking is required. + */ +#define PRZ_FLAG_NO_LOCK	BIT(0) +  struct persistent_ram_buffer;  struct rs_control; @@ -40,6 +47,8 @@ struct persistent_ram_zone {  	void *vaddr;  	struct persistent_ram_buffer *buffer;  	size_t buffer_size; +	u32 flags; +	raw_spinlock_t buffer_lock;  	/* ECC correction */  	char *par_buffer; @@ -55,7 +64,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, u32 flags);  void persistent_ram_free(struct persistent_ram_zone *prz);  void persistent_ram_zap(struct persistent_ram_zone *prz); @@ -77,6 +86,8 @@ ssize_t persistent_ram_ecc_string(struct persistent_ram_zone *prz,   * @mem_address	physical memory address to contain ramoops   */ +#define RAMOOPS_FLAG_FTRACE_PER_CPU	BIT(0) +  struct ramoops_platform_data {  	unsigned long	mem_size;  	phys_addr_t	mem_address; @@ -86,6 +97,7 @@ struct ramoops_platform_data {  	unsigned long	ftrace_size;  	unsigned long	pmsg_size;  	int		dump_oops; +	u32		flags;  	struct persistent_ram_ecc_info ecc_info;  }; |