Skip to content

Commit cc59565

Browse files
author
CKI KWF Bot
committed
Merge: x86/mce/amd: updates for default names for MCA banks and blocks
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1505 Description: updates for default names for MCA banks and blocks JIRA: https://issues.redhat.com/browse/RHEL-117597 Build Info: 68996340 Tested: Successful platform test results on AMD (amd-turin-volcano-06) system. Signed-off-by: Steve Best <sbest@redhat.com> Approved-by: David Arcari <darcari@redhat.com> Approved-by: Lenny Szubowicz <lszubowi@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 5c62cbc + 2691a8d commit cc59565

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

arch/x86/kernel/cpu/mce/amd.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,13 +1109,20 @@ static const char *get_name(unsigned int cpu, unsigned int bank, struct threshol
11091109
}
11101110

11111111
bank_type = smca_get_bank_type(cpu, bank);
1112-
if (bank_type >= N_SMCA_BANK_TYPES)
1113-
return NULL;
11141112

11151113
if (b && (bank_type == SMCA_UMC || bank_type == SMCA_UMC_V2)) {
11161114
if (b->block < ARRAY_SIZE(smca_umc_block_names))
11171115
return smca_umc_block_names[b->block];
1118-
return NULL;
1116+
}
1117+
1118+
if (b && b->block) {
1119+
snprintf(buf_mcatype, MAX_MCATYPE_NAME_LEN, "th_block_%u", b->block);
1120+
return buf_mcatype;
1121+
}
1122+
1123+
if (bank_type >= N_SMCA_BANK_TYPES) {
1124+
snprintf(buf_mcatype, MAX_MCATYPE_NAME_LEN, "th_bank_%u", bank);
1125+
return buf_mcatype;
11191126
}
11201127

11211128
if (per_cpu(smca_bank_counts, cpu)[bank_type] == 1)

arch/x86/kernel/cpu/mce/core.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2756,15 +2756,9 @@ static int mce_cpu_dead(unsigned int cpu)
27562756
static int mce_cpu_online(unsigned int cpu)
27572757
{
27582758
struct timer_list *t = this_cpu_ptr(&mce_timer);
2759-
int ret;
27602759

27612760
mce_device_create(cpu);
2762-
2763-
ret = mce_threshold_create_device(cpu);
2764-
if (ret) {
2765-
mce_device_remove(cpu);
2766-
return ret;
2767-
}
2761+
mce_threshold_create_device(cpu);
27682762
mce_reenable_cpu();
27692763
mce_start_timer(t);
27702764
return 0;

0 commit comments

Comments
 (0)