Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
erst.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/acpi.h>
#include <linux/uaccess.h>
#include <linux/cper.h>
#include <linux/nmi.h>
#include <linux/hardirq.h>
#include <linux/pstore.h>
#include <acpi/apei.h>
#include "apei-internal.h"

Go to the source code of this file.

Data Structures

struct  erst_erange
 
struct  erst_record_id_cache
 
struct  cper_pstore_record
 

Macros

#define ERST_PFX   "ERST: "
 
#define ERST_STATUS_SUCCESS   0x0
 
#define ERST_STATUS_NOT_ENOUGH_SPACE   0x1
 
#define ERST_STATUS_HARDWARE_NOT_AVAILABLE   0x2
 
#define ERST_STATUS_FAILED   0x3
 
#define ERST_STATUS_RECORD_STORE_EMPTY   0x4
 
#define ERST_STATUS_RECORD_NOT_FOUND   0x5
 
#define ERST_TAB_ENTRY(tab)
 
#define SPIN_UNIT   100 /* 100ns */
 
#define FIRMWARE_TIMEOUT   (1 * NSEC_PER_MSEC)
 
#define FIRMWARE_MAX_STALL   50 /* 50us */
 
#define ERST_RANGE_RESERVED   0x0001
 
#define ERST_RANGE_NVRAM   0x0002
 
#define ERST_RANGE_SLOW   0x0004
 
#define ERST_RECORD_ID_CACHE_SIZE_MIN   16
 
#define ERST_RECORD_ID_CACHE_SIZE_MAX   1024
 
#define CPER_CREATOR_PSTORE
 
#define CPER_SECTION_TYPE_DMESG
 
#define CPER_SECTION_TYPE_MCE
 

Functions

 EXPORT_SYMBOL_GPL (erst_disable)
 
ssize_t erst_get_record_count (void)
 
 EXPORT_SYMBOL_GPL (erst_get_record_count)
 
int erst_get_record_id_begin (int *pos)
 
 EXPORT_SYMBOL_GPL (erst_get_record_id_begin)
 
int erst_get_record_id_next (int *pos, u64 *record_id)
 
 EXPORT_SYMBOL_GPL (erst_get_record_id_next)
 
void erst_get_record_id_end (void)
 
 EXPORT_SYMBOL_GPL (erst_get_record_id_end)
 
int erst_write (const struct cper_record_header *record)
 
 EXPORT_SYMBOL_GPL (erst_write)
 
ssize_t erst_read (u64 record_id, struct cper_record_header *record, size_t buflen)
 
 EXPORT_SYMBOL_GPL (erst_read)
 
int erst_clear (u64 record_id)
 
 EXPORT_SYMBOL_GPL (erst_clear)
 
 __setup ("erst_disable", setup_erst_disable)
 
 device_initcall (erst_init)
 

Variables

int erst_disable
 
struct cper_pstore_record __packed
 

Macro Definition Documentation

#define CPER_CREATOR_PSTORE
Value:
UUID_LE(0x75a574e3, 0x5052, 0x4b29, 0x8a, 0x8e, 0xbe, 0x2c, \
0x64, 0x90, 0xb8, 0x9d)

Definition at line 953 of file erst.c.

#define CPER_SECTION_TYPE_DMESG
Value:
UUID_LE(0xc197e04e, 0xd545, 0x4a70, 0x9c, 0x17, 0xa5, 0x54, \
0x94, 0x19, 0xeb, 0x12)

Definition at line 956 of file erst.c.

#define CPER_SECTION_TYPE_MCE
Value:
UUID_LE(0xfe08ffbe, 0x95e4, 0x4be7, 0xbc, 0x73, 0x40, 0x96, \
0x04, 0x4a, 0x38, 0xfc)

Definition at line 959 of file erst.c.

#define ERST_PFX   "ERST: "

Definition at line 42 of file erst.c.

#define ERST_RANGE_NVRAM   0x0002

Definition at line 68 of file erst.c.

#define ERST_RANGE_RESERVED   0x0001

Definition at line 67 of file erst.c.

#define ERST_RANGE_SLOW   0x0004

Definition at line 69 of file erst.c.

#define ERST_RECORD_ID_CACHE_SIZE_MAX   1024

Definition at line 434 of file erst.c.

#define ERST_RECORD_ID_CACHE_SIZE_MIN   16

Definition at line 433 of file erst.c.

#define ERST_STATUS_FAILED   0x3

Definition at line 48 of file erst.c.

#define ERST_STATUS_HARDWARE_NOT_AVAILABLE   0x2

Definition at line 47 of file erst.c.

#define ERST_STATUS_NOT_ENOUGH_SPACE   0x1

Definition at line 46 of file erst.c.

#define ERST_STATUS_RECORD_NOT_FOUND   0x5

Definition at line 50 of file erst.c.

#define ERST_STATUS_RECORD_STORE_EMPTY   0x4

Definition at line 49 of file erst.c.

#define ERST_STATUS_SUCCESS   0x0

Definition at line 45 of file erst.c.

#define ERST_TAB_ENTRY (   tab)
Value:
((struct acpi_whea_header *)((char *)(tab) + \
sizeof(struct acpi_table_erst)))

Definition at line 52 of file erst.c.

#define FIRMWARE_MAX_STALL   50 /* 50us */

Definition at line 59 of file erst.c.

#define FIRMWARE_TIMEOUT   (1 * NSEC_PER_MSEC)

Definition at line 58 of file erst.c.

#define SPIN_UNIT   100 /* 100ns */

Definition at line 56 of file erst.c.

Function Documentation

__setup ( "erst_disable"  ,
setup_erst_disable   
)
device_initcall ( erst_init  )
int erst_clear ( u64  record_id)

Definition at line 876 of file erst.c.

ssize_t erst_get_record_count ( void  )

Definition at line 417 of file erst.c.

int erst_get_record_id_begin ( int pos)

Definition at line 463 of file erst.c.

void erst_get_record_id_end ( void  )

Definition at line 620 of file erst.c.

int erst_get_record_id_next ( int pos,
u64 record_id 
)

Definition at line 556 of file erst.c.

ssize_t erst_read ( u64  record_id,
struct cper_record_header record,
size_t  buflen 
)

Definition at line 860 of file erst.c.

int erst_write ( const struct cper_record_header record)

Definition at line 784 of file erst.c.

EXPORT_SYMBOL_GPL ( erst_disable  )
EXPORT_SYMBOL_GPL ( erst_get_record_count  )
EXPORT_SYMBOL_GPL ( erst_get_record_id_begin  )
EXPORT_SYMBOL_GPL ( erst_get_record_id_next  )
EXPORT_SYMBOL_GPL ( erst_get_record_id_end  )
EXPORT_SYMBOL_GPL ( erst_write  )
EXPORT_SYMBOL_GPL ( erst_read  )
EXPORT_SYMBOL_GPL ( erst_clear  )

Variable Documentation

int erst_disable

Definition at line 61 of file erst.c.