diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2011-08-24 12:44:22 -0400 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2011-10-06 06:34:04 -0400 |
commit | b0b07a2bd4fbb6198d4e7142337214eeb77c417a (patch) | |
tree | 5beb6c94ff556abaa381a55b94f70e74d98c57a7 /drivers/edac | |
parent | 295d8cda2689a74ae88bcece7b4cfe0bf8bf9a91 (diff) |
EDAC, MCE, AMD: Simplify NB MCE decoder interface
Drop third nbcfg argument which is old remains and not required anymore.
No functionality change.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/amd64_edac.c | 6 | ||||
-rw-r--r-- | drivers/edac/mce_amd.c | 20 | ||||
-rw-r--r-- | drivers/edac/mce_amd.h | 6 |
3 files changed, 15 insertions, 17 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 9a8bebcf6b17..9bf0b6228529 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c | |||
@@ -1953,11 +1953,9 @@ static inline void __amd64_decode_bus_error(struct mem_ctl_info *mci, | |||
1953 | amd64_handle_ue(mci, m); | 1953 | amd64_handle_ue(mci, m); |
1954 | } | 1954 | } |
1955 | 1955 | ||
1956 | void amd64_decode_bus_error(int node_id, struct mce *m, u32 nbcfg) | 1956 | void amd64_decode_bus_error(int node_id, struct mce *m) |
1957 | { | 1957 | { |
1958 | struct mem_ctl_info *mci = mcis[node_id]; | 1958 | __amd64_decode_bus_error(mcis[node_id], m); |
1959 | |||
1960 | __amd64_decode_bus_error(mci, m); | ||
1961 | } | 1959 | } |
1962 | 1960 | ||
1963 | /* | 1961 | /* |
diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c index b81c5da542c0..d0864d9c38ad 100644 --- a/drivers/edac/mce_amd.c +++ b/drivers/edac/mce_amd.c | |||
@@ -9,7 +9,7 @@ static u8 xec_mask = 0xf; | |||
9 | static u8 nb_err_cpumask = 0xf; | 9 | static u8 nb_err_cpumask = 0xf; |
10 | 10 | ||
11 | static bool report_gart_errors; | 11 | static bool report_gart_errors; |
12 | static void (*nb_bus_decoder)(int node_id, struct mce *m, u32 nbcfg); | 12 | static void (*nb_bus_decoder)(int node_id, struct mce *m); |
13 | 13 | ||
14 | void amd_report_gart_errors(bool v) | 14 | void amd_report_gart_errors(bool v) |
15 | { | 15 | { |
@@ -17,13 +17,13 @@ void amd_report_gart_errors(bool v) | |||
17 | } | 17 | } |
18 | EXPORT_SYMBOL_GPL(amd_report_gart_errors); | 18 | EXPORT_SYMBOL_GPL(amd_report_gart_errors); |
19 | 19 | ||
20 | void amd_register_ecc_decoder(void (*f)(int, struct mce *, u32)) | 20 | void amd_register_ecc_decoder(void (*f)(int, struct mce *)) |
21 | { | 21 | { |
22 | nb_bus_decoder = f; | 22 | nb_bus_decoder = f; |
23 | } | 23 | } |
24 | EXPORT_SYMBOL_GPL(amd_register_ecc_decoder); | 24 | EXPORT_SYMBOL_GPL(amd_register_ecc_decoder); |
25 | 25 | ||
26 | void amd_unregister_ecc_decoder(void (*f)(int, struct mce *, u32)) | 26 | void amd_unregister_ecc_decoder(void (*f)(int, struct mce *)) |
27 | { | 27 | { |
28 | if (nb_bus_decoder) { | 28 | if (nb_bus_decoder) { |
29 | WARN_ON(nb_bus_decoder != f); | 29 | WARN_ON(nb_bus_decoder != f); |
@@ -592,11 +592,12 @@ static bool nb_noop_mce(u16 ec, u8 xec) | |||
592 | return false; | 592 | return false; |
593 | } | 593 | } |
594 | 594 | ||
595 | void amd_decode_nb_mce(int node_id, struct mce *m, u32 nbcfg) | 595 | void amd_decode_nb_mce(struct mce *m) |
596 | { | 596 | { |
597 | struct cpuinfo_x86 *c = &boot_cpu_data; | 597 | struct cpuinfo_x86 *c = &boot_cpu_data; |
598 | u16 ec = EC(m->status); | 598 | int node_id = amd_get_nb_id(m->extcpu); |
599 | u8 xec = XEC(m->status, 0x1f); | 599 | u16 ec = EC(m->status); |
600 | u8 xec = XEC(m->status, 0x1f); | ||
600 | 601 | ||
601 | pr_emerg(HW_ERR "Northbridge Error (node %d): ", node_id); | 602 | pr_emerg(HW_ERR "Northbridge Error (node %d): ", node_id); |
602 | 603 | ||
@@ -630,7 +631,7 @@ void amd_decode_nb_mce(int node_id, struct mce *m, u32 nbcfg) | |||
630 | 631 | ||
631 | if (c->x86 == 0xf || c->x86 == 0x10 || c->x86 == 0x15) | 632 | if (c->x86 == 0xf || c->x86 == 0x10 || c->x86 == 0x15) |
632 | if ((xec == 0x8 || xec == 0x0) && nb_bus_decoder) | 633 | if ((xec == 0x8 || xec == 0x0) && nb_bus_decoder) |
633 | nb_bus_decoder(node_id, m, nbcfg); | 634 | nb_bus_decoder(node_id, m); |
634 | 635 | ||
635 | return; | 636 | return; |
636 | 637 | ||
@@ -746,7 +747,7 @@ int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data) | |||
746 | { | 747 | { |
747 | struct mce *m = (struct mce *)data; | 748 | struct mce *m = (struct mce *)data; |
748 | struct cpuinfo_x86 *c = &boot_cpu_data; | 749 | struct cpuinfo_x86 *c = &boot_cpu_data; |
749 | int node, ecc; | 750 | int ecc; |
750 | 751 | ||
751 | if (amd_filter_mce(m)) | 752 | if (amd_filter_mce(m)) |
752 | return NOTIFY_STOP; | 753 | return NOTIFY_STOP; |
@@ -795,8 +796,7 @@ int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data) | |||
795 | break; | 796 | break; |
796 | 797 | ||
797 | case 4: | 798 | case 4: |
798 | node = amd_get_nb_id(m->extcpu); | 799 | amd_decode_nb_mce(m); |
799 | amd_decode_nb_mce(node, m, 0); | ||
800 | break; | 800 | break; |
801 | 801 | ||
802 | case 5: | 802 | case 5: |
diff --git a/drivers/edac/mce_amd.h b/drivers/edac/mce_amd.h index 795a3206acf5..0106747e240c 100644 --- a/drivers/edac/mce_amd.h +++ b/drivers/edac/mce_amd.h | |||
@@ -86,9 +86,9 @@ struct amd_decoder_ops { | |||
86 | }; | 86 | }; |
87 | 87 | ||
88 | void amd_report_gart_errors(bool); | 88 | void amd_report_gart_errors(bool); |
89 | void amd_register_ecc_decoder(void (*f)(int, struct mce *, u32)); | 89 | void amd_register_ecc_decoder(void (*f)(int, struct mce *)); |
90 | void amd_unregister_ecc_decoder(void (*f)(int, struct mce *, u32)); | 90 | void amd_unregister_ecc_decoder(void (*f)(int, struct mce *)); |
91 | void amd_decode_nb_mce(int, struct mce *, u32); | 91 | void amd_decode_nb_mce(struct mce *); |
92 | int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data); | 92 | int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data); |
93 | 93 | ||
94 | #endif /* _EDAC_MCE_AMD_H */ | 94 | #endif /* _EDAC_MCE_AMD_H */ |