mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
Merge branch 'x86-ras-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull RAS updates from Ingo Molnar:
"The main changes in this cycle are:
- RAS tracing/events infrastructure, by Gong Chen.
- Various generalizations of the APEI code to make it available to
non-x86 architectures, by Tomasz Nowicki"
* 'x86-ras-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/ras: Fix build warnings in <linux/aer.h>
acpi, apei, ghes: Factor out ioremap virtual memory for IRQ and NMI context.
acpi, apei, ghes: Make NMI error notification to be GHES architecture extension.
apei, mce: Factor out APEI architecture specific MCE calls.
RAS, extlog: Adjust init flow
trace, eMCA: Add a knob to adjust where to save event log
trace, RAS: Add eMCA trace event interface
RAS, debugfs: Add debugfs interface for RAS subsystem
CPER: Adjust code flow of some functions
x86, MCE: Robustify mcheck_init_device
trace, AER: Move trace into unified interface
trace, RAS: Add basic RAS trace event
x86, MCE: Kill CPU_POST_DEAD
This commit is contained in:
commit
d782cebd6b
28 changed files with 653 additions and 247 deletions
|
|
@ -11,6 +11,8 @@
|
|||
#define AER_FATAL 1
|
||||
#define AER_CORRECTABLE 2
|
||||
|
||||
struct pci_dev;
|
||||
|
||||
struct aer_header_log_regs {
|
||||
unsigned int dw0;
|
||||
unsigned int dw1;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#define LINUX_CPER_H
|
||||
|
||||
#include <linux/uuid.h>
|
||||
#include <linux/trace_seq.h>
|
||||
|
||||
/* CPER record signature and the size */
|
||||
#define CPER_SIG_RECORD "CPER"
|
||||
|
|
@ -35,6 +36,13 @@
|
|||
*/
|
||||
#define CPER_RECORD_REV 0x0100
|
||||
|
||||
/*
|
||||
* CPER record length contains the CPER fields which are relevant for further
|
||||
* handling of a memory error in userspace (we don't carry all the fields
|
||||
* defined in the UEFI spec because some of them don't make any sense.)
|
||||
* Currently, a length of 256 should be more than enough.
|
||||
*/
|
||||
#define CPER_REC_LEN 256
|
||||
/*
|
||||
* Severity difinition for error_severity in struct cper_record_header
|
||||
* and section_severity in struct cper_section_descriptor
|
||||
|
|
@ -356,6 +364,24 @@ struct cper_sec_mem_err {
|
|||
__u16 mem_dev_handle; /* module handle in UEFI 2.4 */
|
||||
};
|
||||
|
||||
struct cper_mem_err_compact {
|
||||
__u64 validation_bits;
|
||||
__u16 node;
|
||||
__u16 card;
|
||||
__u16 module;
|
||||
__u16 bank;
|
||||
__u16 device;
|
||||
__u16 row;
|
||||
__u16 column;
|
||||
__u16 bit_pos;
|
||||
__u64 requestor_id;
|
||||
__u64 responder_id;
|
||||
__u64 target_id;
|
||||
__u16 rank;
|
||||
__u16 mem_array_handle;
|
||||
__u16 mem_dev_handle;
|
||||
};
|
||||
|
||||
struct cper_sec_pcie {
|
||||
__u64 validation_bits;
|
||||
__u32 port_type;
|
||||
|
|
@ -395,7 +421,13 @@ struct cper_sec_pcie {
|
|||
#pragma pack()
|
||||
|
||||
u64 cper_next_record_id(void);
|
||||
const char *cper_severity_str(unsigned int);
|
||||
const char *cper_mem_err_type_str(unsigned int);
|
||||
void cper_print_bits(const char *prefix, unsigned int bits,
|
||||
const char * const strs[], unsigned int strs_size);
|
||||
void cper_mem_err_pack(const struct cper_sec_mem_err *,
|
||||
struct cper_mem_err_compact *);
|
||||
const char *cper_mem_err_unpack(struct trace_seq *,
|
||||
struct cper_mem_err_compact *);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -63,4 +63,8 @@ extern int proc_dowatchdog(struct ctl_table *, int ,
|
|||
void __user *, size_t *, loff_t *);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HAVE_ACPI_APEI_NMI
|
||||
#include <asm/nmi.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
14
include/linux/ras.h
Normal file
14
include/linux/ras.h
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#ifndef __RAS_H__
|
||||
#define __RAS_H__
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
int ras_userspace_consumers(void);
|
||||
void ras_debugfs_init(void);
|
||||
int ras_add_daemon_trace(void);
|
||||
#else
|
||||
static inline int ras_userspace_consumers(void) { return 0; }
|
||||
static inline void ras_debugfs_init(void) { return; }
|
||||
static inline int ras_add_daemon_trace(void) { return 0; }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Loading…
Reference in a new issue