Skip to content

Commit 185e101

Browse files
committed
x86/mce: Rename mce_setup() to mce_prep_record()
JIRA: https://issues.redhat.com/browse/RHEL-52657 Tested: by AMD commit 5ad21a2 Author: Yazen Ghannam <yazen.ghannam@amd.com> Date: Tue Jul 30 13:29:56 2024 -0500 x86/mce: Rename mce_setup() to mce_prep_record() There is no MCE "setup" done in mce_setup(). Rather, this function initializes and prepares an MCE record. Rename the function to highlight what it does. No functional change is intended. Suggested-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Nikolay Borisov <nik.borisov@suse.com> Link: https://lore.kernel.org/r/20240730182958.4117158-2-yazen.ghannam@amd.com Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
1 parent 462e429 commit 185e101

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

arch/x86/include/asm/mce.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ static inline int apei_smca_report_x86_error(struct cper_ia_proc_ctx *ctx_info,
221221
u64 lapic_id) { return -EINVAL; }
222222
#endif
223223

224-
void mce_setup(struct mce *m);
224+
void mce_prep_record(struct mce *m);
225225
void mce_log(struct mce *m);
226226
DECLARE_PER_CPU(struct device *, mce_device);
227227

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ static void __log_error(unsigned int bank, u64 status, u64 addr, u64 misc)
780780
{
781781
struct mce m;
782782

783-
mce_setup(&m);
783+
mce_prep_record(&m);
784784

785785
m.status = status;
786786
m.misc = misc;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void apei_mce_report_mem_error(int severity, struct cper_sec_mem_err *mem_err)
4444
else
4545
lsb = PAGE_SHIFT;
4646

47-
mce_setup(&m);
47+
mce_prep_record(&m);
4848
m.bank = -1;
4949
/* Fake a memory read error with unknown channel */
5050
m.status = MCI_STATUS_VAL | MCI_STATUS_EN | MCI_STATUS_ADDRV | MCI_STATUS_MISCV | 0x9f;
@@ -97,7 +97,7 @@ int apei_smca_report_x86_error(struct cper_ia_proc_ctx *ctx_info, u64 lapic_id)
9797
if (ctx_info->reg_arr_size < 48)
9898
return -EINVAL;
9999

100-
mce_setup(&m);
100+
mce_prep_record(&m);
101101

102102
m.extcpu = -1;
103103
m.socketid = -1;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static struct irq_work mce_irq_work;
117117
BLOCKING_NOTIFIER_HEAD(x86_mce_decoder_chain);
118118

119119
/* Do initial initialization of a struct mce */
120-
void mce_setup(struct mce *m)
120+
void mce_prep_record(struct mce *m)
121121
{
122122
memset(m, 0, sizeof(struct mce));
123123
m->cpu = m->extcpu = smp_processor_id();
@@ -435,11 +435,11 @@ static noinstr void mce_wrmsrl(u32 msr, u64 v)
435435
static noinstr void mce_gather_info(struct mce *m, struct pt_regs *regs)
436436
{
437437
/*
438-
* Enable instrumentation around mce_setup() which calls external
438+
* Enable instrumentation around mce_prep_record() which calls external
439439
* facilities.
440440
*/
441441
instrumentation_begin();
442-
mce_setup(m);
442+
mce_prep_record(m);
443443
instrumentation_end();
444444

445445
m->mcgstatus = mce_rdmsrl(MSR_IA32_MCG_STATUS);

0 commit comments

Comments
 (0)