diff options
Diffstat (limited to 'drivers/acpi/apei')
-rw-r--r-- | drivers/acpi/apei/apei-internal.h | 10 | ||||
-rw-r--r-- | drivers/acpi/apei/ghes.c | 32 |
2 files changed, 21 insertions, 21 deletions
diff --git a/drivers/acpi/apei/apei-internal.h b/drivers/acpi/apei/apei-internal.h index e5bcd919d4e6..16129c78b489 100644 --- a/drivers/acpi/apei/apei-internal.h +++ b/drivers/acpi/apei/apei-internal.h | |||
@@ -121,11 +121,11 @@ struct dentry; | |||
121 | struct dentry *apei_get_debugfs_dir(void); | 121 | struct dentry *apei_get_debugfs_dir(void); |
122 | 122 | ||
123 | #define apei_estatus_for_each_section(estatus, section) \ | 123 | #define apei_estatus_for_each_section(estatus, section) \ |
124 | for (section = (struct acpi_generic_data *)(estatus + 1); \ | 124 | for (section = (struct acpi_hest_generic_data *)(estatus + 1); \ |
125 | (void *)section - (void *)estatus < estatus->data_length; \ | 125 | (void *)section - (void *)estatus < estatus->data_length; \ |
126 | section = (void *)(section+1) + section->error_data_length) | 126 | section = (void *)(section+1) + section->error_data_length) |
127 | 127 | ||
128 | static inline u32 cper_estatus_len(struct acpi_generic_status *estatus) | 128 | static inline u32 cper_estatus_len(struct acpi_hest_generic_status *estatus) |
129 | { | 129 | { |
130 | if (estatus->raw_data_length) | 130 | if (estatus->raw_data_length) |
131 | return estatus->raw_data_offset + \ | 131 | return estatus->raw_data_offset + \ |
@@ -135,9 +135,9 @@ static inline u32 cper_estatus_len(struct acpi_generic_status *estatus) | |||
135 | } | 135 | } |
136 | 136 | ||
137 | void cper_estatus_print(const char *pfx, | 137 | void cper_estatus_print(const char *pfx, |
138 | const struct acpi_generic_status *estatus); | 138 | const struct acpi_hest_generic_status *estatus); |
139 | int cper_estatus_check_header(const struct acpi_generic_status *estatus); | 139 | int cper_estatus_check_header(const struct acpi_hest_generic_status *estatus); |
140 | int cper_estatus_check(const struct acpi_generic_status *estatus); | 140 | int cper_estatus_check(const struct acpi_hest_generic_status *estatus); |
141 | 141 | ||
142 | int apei_osc_setup(void); | 142 | int apei_osc_setup(void); |
143 | #endif | 143 | #endif |
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index dab7cb7349df..7a38d1465b61 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c | |||
@@ -74,13 +74,13 @@ | |||
74 | #define GHES_ESTATUS_CACHE_LEN(estatus_len) \ | 74 | #define GHES_ESTATUS_CACHE_LEN(estatus_len) \ |
75 | (sizeof(struct ghes_estatus_cache) + (estatus_len)) | 75 | (sizeof(struct ghes_estatus_cache) + (estatus_len)) |
76 | #define GHES_ESTATUS_FROM_CACHE(estatus_cache) \ | 76 | #define GHES_ESTATUS_FROM_CACHE(estatus_cache) \ |
77 | ((struct acpi_generic_status *) \ | 77 | ((struct acpi_hest_generic_status *) \ |
78 | ((struct ghes_estatus_cache *)(estatus_cache) + 1)) | 78 | ((struct ghes_estatus_cache *)(estatus_cache) + 1)) |
79 | 79 | ||
80 | #define GHES_ESTATUS_NODE_LEN(estatus_len) \ | 80 | #define GHES_ESTATUS_NODE_LEN(estatus_len) \ |
81 | (sizeof(struct ghes_estatus_node) + (estatus_len)) | 81 | (sizeof(struct ghes_estatus_node) + (estatus_len)) |
82 | #define GHES_ESTATUS_FROM_NODE(estatus_node) \ | 82 | #define GHES_ESTATUS_FROM_NODE(estatus_node) \ |
83 | ((struct acpi_generic_status *) \ | 83 | ((struct acpi_hest_generic_status *) \ |
84 | ((struct ghes_estatus_node *)(estatus_node) + 1)) | 84 | ((struct ghes_estatus_node *)(estatus_node) + 1)) |
85 | 85 | ||
86 | bool ghes_disable; | 86 | bool ghes_disable; |
@@ -408,7 +408,7 @@ static void ghes_clear_estatus(struct ghes *ghes) | |||
408 | ghes->flags &= ~GHES_TO_CLEAR; | 408 | ghes->flags &= ~GHES_TO_CLEAR; |
409 | } | 409 | } |
410 | 410 | ||
411 | static void ghes_handle_memory_failure(struct acpi_generic_data *gdata, int sev) | 411 | static void ghes_handle_memory_failure(struct acpi_hest_generic_data *gdata, int sev) |
412 | { | 412 | { |
413 | #ifdef CONFIG_ACPI_APEI_MEMORY_FAILURE | 413 | #ifdef CONFIG_ACPI_APEI_MEMORY_FAILURE |
414 | unsigned long pfn; | 414 | unsigned long pfn; |
@@ -441,10 +441,10 @@ static void ghes_handle_memory_failure(struct acpi_generic_data *gdata, int sev) | |||
441 | } | 441 | } |
442 | 442 | ||
443 | static void ghes_do_proc(struct ghes *ghes, | 443 | static void ghes_do_proc(struct ghes *ghes, |
444 | const struct acpi_generic_status *estatus) | 444 | const struct acpi_hest_generic_status *estatus) |
445 | { | 445 | { |
446 | int sev, sec_sev; | 446 | int sev, sec_sev; |
447 | struct acpi_generic_data *gdata; | 447 | struct acpi_hest_generic_data *gdata; |
448 | 448 | ||
449 | sev = ghes_severity(estatus->error_severity); | 449 | sev = ghes_severity(estatus->error_severity); |
450 | apei_estatus_for_each_section(estatus, gdata) { | 450 | apei_estatus_for_each_section(estatus, gdata) { |
@@ -498,7 +498,7 @@ static void ghes_do_proc(struct ghes *ghes, | |||
498 | 498 | ||
499 | static void __ghes_print_estatus(const char *pfx, | 499 | static void __ghes_print_estatus(const char *pfx, |
500 | const struct acpi_hest_generic *generic, | 500 | const struct acpi_hest_generic *generic, |
501 | const struct acpi_generic_status *estatus) | 501 | const struct acpi_hest_generic_status *estatus) |
502 | { | 502 | { |
503 | static atomic_t seqno; | 503 | static atomic_t seqno; |
504 | unsigned int curr_seqno; | 504 | unsigned int curr_seqno; |
@@ -520,7 +520,7 @@ static void __ghes_print_estatus(const char *pfx, | |||
520 | 520 | ||
521 | static int ghes_print_estatus(const char *pfx, | 521 | static int ghes_print_estatus(const char *pfx, |
522 | const struct acpi_hest_generic *generic, | 522 | const struct acpi_hest_generic *generic, |
523 | const struct acpi_generic_status *estatus) | 523 | const struct acpi_hest_generic_status *estatus) |
524 | { | 524 | { |
525 | /* Not more than 2 messages every 5 seconds */ | 525 | /* Not more than 2 messages every 5 seconds */ |
526 | static DEFINE_RATELIMIT_STATE(ratelimit_corrected, 5*HZ, 2); | 526 | static DEFINE_RATELIMIT_STATE(ratelimit_corrected, 5*HZ, 2); |
@@ -542,13 +542,13 @@ static int ghes_print_estatus(const char *pfx, | |||
542 | * GHES error status reporting throttle, to report more kinds of | 542 | * GHES error status reporting throttle, to report more kinds of |
543 | * errors, instead of just most frequently occurred errors. | 543 | * errors, instead of just most frequently occurred errors. |
544 | */ | 544 | */ |
545 | static int ghes_estatus_cached(struct acpi_generic_status *estatus) | 545 | static int ghes_estatus_cached(struct acpi_hest_generic_status *estatus) |
546 | { | 546 | { |
547 | u32 len; | 547 | u32 len; |
548 | int i, cached = 0; | 548 | int i, cached = 0; |
549 | unsigned long long now; | 549 | unsigned long long now; |
550 | struct ghes_estatus_cache *cache; | 550 | struct ghes_estatus_cache *cache; |
551 | struct acpi_generic_status *cache_estatus; | 551 | struct acpi_hest_generic_status *cache_estatus; |
552 | 552 | ||
553 | len = cper_estatus_len(estatus); | 553 | len = cper_estatus_len(estatus); |
554 | rcu_read_lock(); | 554 | rcu_read_lock(); |
@@ -573,12 +573,12 @@ static int ghes_estatus_cached(struct acpi_generic_status *estatus) | |||
573 | 573 | ||
574 | static struct ghes_estatus_cache *ghes_estatus_cache_alloc( | 574 | static struct ghes_estatus_cache *ghes_estatus_cache_alloc( |
575 | struct acpi_hest_generic *generic, | 575 | struct acpi_hest_generic *generic, |
576 | struct acpi_generic_status *estatus) | 576 | struct acpi_hest_generic_status *estatus) |
577 | { | 577 | { |
578 | int alloced; | 578 | int alloced; |
579 | u32 len, cache_len; | 579 | u32 len, cache_len; |
580 | struct ghes_estatus_cache *cache; | 580 | struct ghes_estatus_cache *cache; |
581 | struct acpi_generic_status *cache_estatus; | 581 | struct acpi_hest_generic_status *cache_estatus; |
582 | 582 | ||
583 | alloced = atomic_add_return(1, &ghes_estatus_cache_alloced); | 583 | alloced = atomic_add_return(1, &ghes_estatus_cache_alloced); |
584 | if (alloced > GHES_ESTATUS_CACHE_ALLOCED_MAX) { | 584 | if (alloced > GHES_ESTATUS_CACHE_ALLOCED_MAX) { |
@@ -621,7 +621,7 @@ static void ghes_estatus_cache_rcu_free(struct rcu_head *head) | |||
621 | 621 | ||
622 | static void ghes_estatus_cache_add( | 622 | static void ghes_estatus_cache_add( |
623 | struct acpi_hest_generic *generic, | 623 | struct acpi_hest_generic *generic, |
624 | struct acpi_generic_status *estatus) | 624 | struct acpi_hest_generic_status *estatus) |
625 | { | 625 | { |
626 | int i, slot = -1, count; | 626 | int i, slot = -1, count; |
627 | unsigned long long now, duration, period, max_period = 0; | 627 | unsigned long long now, duration, period, max_period = 0; |
@@ -753,7 +753,7 @@ static void ghes_proc_in_irq(struct irq_work *irq_work) | |||
753 | struct llist_node *llnode, *next; | 753 | struct llist_node *llnode, *next; |
754 | struct ghes_estatus_node *estatus_node; | 754 | struct ghes_estatus_node *estatus_node; |
755 | struct acpi_hest_generic *generic; | 755 | struct acpi_hest_generic *generic; |
756 | struct acpi_generic_status *estatus; | 756 | struct acpi_hest_generic_status *estatus; |
757 | u32 len, node_len; | 757 | u32 len, node_len; |
758 | 758 | ||
759 | llnode = llist_del_all(&ghes_estatus_llist); | 759 | llnode = llist_del_all(&ghes_estatus_llist); |
@@ -786,7 +786,7 @@ static void ghes_print_queued_estatus(void) | |||
786 | struct llist_node *llnode; | 786 | struct llist_node *llnode; |
787 | struct ghes_estatus_node *estatus_node; | 787 | struct ghes_estatus_node *estatus_node; |
788 | struct acpi_hest_generic *generic; | 788 | struct acpi_hest_generic *generic; |
789 | struct acpi_generic_status *estatus; | 789 | struct acpi_hest_generic_status *estatus; |
790 | u32 len, node_len; | 790 | u32 len, node_len; |
791 | 791 | ||
792 | llnode = llist_del_all(&ghes_estatus_llist); | 792 | llnode = llist_del_all(&ghes_estatus_llist); |
@@ -845,7 +845,7 @@ static int ghes_notify_nmi(unsigned int cmd, struct pt_regs *regs) | |||
845 | #ifdef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG | 845 | #ifdef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG |
846 | u32 len, node_len; | 846 | u32 len, node_len; |
847 | struct ghes_estatus_node *estatus_node; | 847 | struct ghes_estatus_node *estatus_node; |
848 | struct acpi_generic_status *estatus; | 848 | struct acpi_hest_generic_status *estatus; |
849 | #endif | 849 | #endif |
850 | if (!(ghes->flags & GHES_TO_CLEAR)) | 850 | if (!(ghes->flags & GHES_TO_CLEAR)) |
851 | continue; | 851 | continue; |
@@ -925,7 +925,7 @@ static int ghes_probe(struct platform_device *ghes_dev) | |||
925 | 925 | ||
926 | rc = -EIO; | 926 | rc = -EIO; |
927 | if (generic->error_block_length < | 927 | if (generic->error_block_length < |
928 | sizeof(struct acpi_generic_status)) { | 928 | sizeof(struct acpi_hest_generic_status)) { |
929 | pr_warning(FW_BUG GHES_PFX "Invalid error block length: %u for generic hardware error source: %d\n", | 929 | pr_warning(FW_BUG GHES_PFX "Invalid error block length: %u for generic hardware error source: %d\n", |
930 | generic->error_block_length, | 930 | generic->error_block_length, |
931 | generic->header.source_id); | 931 | generic->header.source_id); |