Skip to content

Commit 5ad21a2

Browse files
yghannambp3tk0v
authored andcommitted
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 <[email protected]> Signed-off-by: Yazen Ghannam <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Reviewed-by: Nikolay Borisov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Borislav Petkov (AMD) <[email protected]>
1 parent 8400291 commit 5ad21a2

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
@@ -118,7 +118,7 @@ static struct irq_work mce_irq_work;
118118
BLOCKING_NOTIFIER_HEAD(x86_mce_decoder_chain);
119119

120120
/* Do initial initialization of a struct mce */
121-
void mce_setup(struct mce *m)
121+
void mce_prep_record(struct mce *m)
122122
{
123123
memset(m, 0, sizeof(struct mce));
124124
m->cpu = m->extcpu = smp_processor_id();
@@ -436,11 +436,11 @@ static noinstr void mce_wrmsrl(u32 msr, u64 v)
436436
static noinstr void mce_gather_info(struct mce *m, struct pt_regs *regs)
437437
{
438438
/*
439-
* Enable instrumentation around mce_setup() which calls external
439+
* Enable instrumentation around mce_prep_record() which calls external
440440
* facilities.
441441
*/
442442
instrumentation_begin();
443-
mce_setup(m);
443+
mce_prep_record(m);
444444
instrumentation_end();
445445

446446
m->mcgstatus = mce_rdmsrl(MSR_IA32_MCG_STATUS);

0 commit comments

Comments
 (0)