diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-02-15 03:41:22 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-02-21 12:16:28 -0500 |
commit | 40e064153814ce534a28714b25cb98259f107d96 (patch) | |
tree | 835c07367569b2d244fe7db8ff23e565e76b72f3 /drivers/acpi | |
parent | 8dd93d450bff251575c56b8f058393124e1f00fb (diff) |
ghes: move structures/enum to a header file
As a ghes_edac driver will need to access ghes structures, in order
to properly handle the errors, move those structures to a separate
header file. No functional changes.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/apei/ghes.c | 47 |
1 files changed, 2 insertions, 45 deletions
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 7ae2750bb457..6d0e146e0fee 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c | |||
@@ -48,8 +48,8 @@ | |||
48 | #include <linux/genalloc.h> | 48 | #include <linux/genalloc.h> |
49 | #include <linux/pci.h> | 49 | #include <linux/pci.h> |
50 | #include <linux/aer.h> | 50 | #include <linux/aer.h> |
51 | #include <acpi/apei.h> | 51 | |
52 | #include <acpi/hed.h> | 52 | #include <acpi/ghes.h> |
53 | #include <asm/mce.h> | 53 | #include <asm/mce.h> |
54 | #include <asm/tlbflush.h> | 54 | #include <asm/tlbflush.h> |
55 | #include <asm/nmi.h> | 55 | #include <asm/nmi.h> |
@@ -84,42 +84,6 @@ | |||
84 | ((struct acpi_hest_generic_status *) \ | 84 | ((struct acpi_hest_generic_status *) \ |
85 | ((struct ghes_estatus_node *)(estatus_node) + 1)) | 85 | ((struct ghes_estatus_node *)(estatus_node) + 1)) |
86 | 86 | ||
87 | /* | ||
88 | * One struct ghes is created for each generic hardware error source. | ||
89 | * It provides the context for APEI hardware error timer/IRQ/SCI/NMI | ||
90 | * handler. | ||
91 | * | ||
92 | * estatus: memory buffer for error status block, allocated during | ||
93 | * HEST parsing. | ||
94 | */ | ||
95 | #define GHES_TO_CLEAR 0x0001 | ||
96 | #define GHES_EXITING 0x0002 | ||
97 | |||
98 | struct ghes { | ||
99 | struct acpi_hest_generic *generic; | ||
100 | struct acpi_hest_generic_status *estatus; | ||
101 | u64 buffer_paddr; | ||
102 | unsigned long flags; | ||
103 | union { | ||
104 | struct list_head list; | ||
105 | struct timer_list timer; | ||
106 | unsigned int irq; | ||
107 | }; | ||
108 | }; | ||
109 | |||
110 | struct ghes_estatus_node { | ||
111 | struct llist_node llnode; | ||
112 | struct acpi_hest_generic *generic; | ||
113 | }; | ||
114 | |||
115 | struct ghes_estatus_cache { | ||
116 | u32 estatus_len; | ||
117 | atomic_t count; | ||
118 | struct acpi_hest_generic *generic; | ||
119 | unsigned long long time_in; | ||
120 | struct rcu_head rcu; | ||
121 | }; | ||
122 | |||
123 | bool ghes_disable; | 87 | bool ghes_disable; |
124 | module_param_named(disable, ghes_disable, bool, 0); | 88 | module_param_named(disable, ghes_disable, bool, 0); |
125 | 89 | ||
@@ -333,13 +297,6 @@ static void ghes_fini(struct ghes *ghes) | |||
333 | apei_unmap_generic_address(&ghes->generic->error_status_address); | 297 | apei_unmap_generic_address(&ghes->generic->error_status_address); |
334 | } | 298 | } |
335 | 299 | ||
336 | enum { | ||
337 | GHES_SEV_NO = 0x0, | ||
338 | GHES_SEV_CORRECTED = 0x1, | ||
339 | GHES_SEV_RECOVERABLE = 0x2, | ||
340 | GHES_SEV_PANIC = 0x3, | ||
341 | }; | ||
342 | |||
343 | static inline int ghes_severity(int severity) | 300 | static inline int ghes_severity(int severity) |
344 | { | 301 | { |
345 | switch (severity) { | 302 | switch (severity) { |