diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-28 23:42:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-28 23:42:33 -0500 |
commit | ad6c2c2eb34f234d6253292b9b3c047614fbfe7e (patch) | |
tree | 8ceb00db9874c09f3002b5ca579f1f9146b30a28 /include/acpi | |
parent | 19cc90f58d4f2538b4cf5371681a057d2e5209f2 (diff) | |
parent | b0769891ba7baa53f270dc70d71934748beb4c5b (diff) |
Merge branch 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac
Pull EDAC fixes and ghes-edac from Mauro Carvalho Chehab:
"For:
- Some fixes at edac drivers (i7core_edac, sb_edac, i3200_edac);
- error injection support for i5100, when EDAC debug is enabled;
- fix edac when it is loaded builtin (early init for the subsystem);
- a "Firmware First" EDAC driver, allowing ghes to report errors via
EDAC (ghes-edac).
With regards to ghes-edac, this fixes a longstanding BZ at Red Hat
that happens with Nehalem and Sandy Bridge CPUs: when both GHES and
i7core_edac or sb_edac are running, the error reports are
unpredictable, as both BIOS and OS race to access the registers. With
ghes-edac, the EDAC core will refuse to register any other concurrent
memory error driver.
This patchset moves the ghes struct definitions to a separate header
file (include/acpi/ghes.h) and adds 3 hooks at apei/ghes.c to
register/unregister and to report errors via ghes-edac. Those changes
were acked by ghes driver maintainer (Huang)."
* 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac: (30 commits)
i5100_edac: convert to use simple_open()
ghes_edac: fix to use list_for_each_entry_safe() when delete list items
ghes_edac: Fix RAS tracing
ghes_edac: Make it compliant with UEFI spec 2.3.1
ghes_edac: Improve driver's printk messages
ghes_edac: Don't credit the same memory dimm twice
ghes_edac: do a better job of filling EDAC DIMM info
ghes_edac: add support for reporting errors via EDAC
ghes_edac: Register at EDAC core the BIOS report
ghes: add the needed hooks for EDAC error report
ghes: move structures/enum to a header file
edac: add support for error type "Info"
edac: add support for raw error reports
edac: reduce stack pressure by using a pre-allocated buffer
edac: lock module owner to avoid error report conflicts
edac: remove proc_name from mci structure
edac: add a new memory layer type
edac: initialize the core earlier
edac: better report error conditions in debug mode
i5100_edac: Remove two checkpatch warnings
...
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/ghes.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h new file mode 100644 index 000000000000..720446cb243e --- /dev/null +++ b/include/acpi/ghes.h | |||
@@ -0,0 +1,72 @@ | |||
1 | #include <acpi/apei.h> | ||
2 | #include <acpi/hed.h> | ||
3 | |||
4 | /* | ||
5 | * One struct ghes is created for each generic hardware error source. | ||
6 | * It provides the context for APEI hardware error timer/IRQ/SCI/NMI | ||
7 | * handler. | ||
8 | * | ||
9 | * estatus: memory buffer for error status block, allocated during | ||
10 | * HEST parsing. | ||
11 | */ | ||
12 | #define GHES_TO_CLEAR 0x0001 | ||
13 | #define GHES_EXITING 0x0002 | ||
14 | |||
15 | struct ghes { | ||
16 | struct acpi_hest_generic *generic; | ||
17 | struct acpi_hest_generic_status *estatus; | ||
18 | u64 buffer_paddr; | ||
19 | unsigned long flags; | ||
20 | union { | ||
21 | struct list_head list; | ||
22 | struct timer_list timer; | ||
23 | unsigned int irq; | ||
24 | }; | ||
25 | }; | ||
26 | |||
27 | struct ghes_estatus_node { | ||
28 | struct llist_node llnode; | ||
29 | struct acpi_hest_generic *generic; | ||
30 | struct ghes *ghes; | ||
31 | }; | ||
32 | |||
33 | struct ghes_estatus_cache { | ||
34 | u32 estatus_len; | ||
35 | atomic_t count; | ||
36 | struct acpi_hest_generic *generic; | ||
37 | unsigned long long time_in; | ||
38 | struct rcu_head rcu; | ||
39 | }; | ||
40 | |||
41 | enum { | ||
42 | GHES_SEV_NO = 0x0, | ||
43 | GHES_SEV_CORRECTED = 0x1, | ||
44 | GHES_SEV_RECOVERABLE = 0x2, | ||
45 | GHES_SEV_PANIC = 0x3, | ||
46 | }; | ||
47 | |||
48 | /* From drivers/edac/ghes_edac.c */ | ||
49 | |||
50 | #ifdef CONFIG_EDAC_GHES | ||
51 | void ghes_edac_report_mem_error(struct ghes *ghes, int sev, | ||
52 | struct cper_sec_mem_err *mem_err); | ||
53 | |||
54 | int ghes_edac_register(struct ghes *ghes, struct device *dev); | ||
55 | |||
56 | void ghes_edac_unregister(struct ghes *ghes); | ||
57 | |||
58 | #else | ||
59 | static inline void ghes_edac_report_mem_error(struct ghes *ghes, int sev, | ||
60 | struct cper_sec_mem_err *mem_err) | ||
61 | { | ||
62 | } | ||
63 | |||
64 | static inline int ghes_edac_register(struct ghes *ghes, struct device *dev) | ||
65 | { | ||
66 | return 0; | ||
67 | } | ||
68 | |||
69 | static inline void ghes_edac_unregister(struct ghes *ghes) | ||
70 | { | ||
71 | } | ||
72 | #endif | ||