]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/mce: Rename mce_setup() to mce_prep_record()
authorYazen Ghannam <yazen.ghannam@amd.com>
Tue, 30 Jul 2024 18:29:56 +0000 (13:29 -0500)
committerBorislav Petkov (AMD) <bp@alien8.de>
Thu, 1 Aug 2024 16:20:24 +0000 (18:20 +0200)
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>
arch/x86/include/asm/mce.h
arch/x86/kernel/cpu/mce/amd.c
arch/x86/kernel/cpu/mce/apei.c
arch/x86/kernel/cpu/mce/core.c

index 3ad29b12894329731736a099cf24dadfc9221030..3b9970117a0fa7b354468c6b04ac00d5e9009338 100644 (file)
@@ -221,7 +221,7 @@ static inline int apei_smca_report_x86_error(struct cper_ia_proc_ctx *ctx_info,
                                             u64 lapic_id) { return -EINVAL; }
 #endif
 
-void mce_setup(struct mce *m);
+void mce_prep_record(struct mce *m);
 void mce_log(struct mce *m);
 DECLARE_PER_CPU(struct device *, mce_device);
 
index 9a0133ef7e20ab60e36fa1d3f2e89382767f3f23..14bf8c232e457f1532ed5c7aaf4834539ba4fc5a 100644 (file)
@@ -780,7 +780,7 @@ static void __log_error(unsigned int bank, u64 status, u64 addr, u64 misc)
 {
        struct mce m;
 
-       mce_setup(&m);
+       mce_prep_record(&m);
 
        m.status = status;
        m.misc   = misc;
index 7f7309ff67d0feffd5b78fa495968a61e5ee1405..8f509c8a4e98de957f12b96eeb73ec7616a12897 100644 (file)
@@ -44,7 +44,7 @@ void apei_mce_report_mem_error(int severity, struct cper_sec_mem_err *mem_err)
        else
                lsb = PAGE_SHIFT;
 
-       mce_setup(&m);
+       mce_prep_record(&m);
        m.bank = -1;
        /* Fake a memory read error with unknown channel */
        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)
        if (ctx_info->reg_arr_size < 48)
                return -EINVAL;
 
-       mce_setup(&m);
+       mce_prep_record(&m);
 
        m.extcpu = -1;
        m.socketid = -1;
index b85ec7a4ec9e61761aa1f97208f949ef70f55d36..dd5192ef52e0b04d1976e2a7b2bab8cc23860fe7 100644 (file)
@@ -118,7 +118,7 @@ static struct irq_work mce_irq_work;
 BLOCKING_NOTIFIER_HEAD(x86_mce_decoder_chain);
 
 /* Do initial initialization of a struct mce */
-void mce_setup(struct mce *m)
+void mce_prep_record(struct mce *m)
 {
        memset(m, 0, sizeof(struct mce));
        m->cpu = m->extcpu = smp_processor_id();
@@ -436,11 +436,11 @@ static noinstr void mce_wrmsrl(u32 msr, u64 v)
 static noinstr void mce_gather_info(struct mce *m, struct pt_regs *regs)
 {
        /*
-        * Enable instrumentation around mce_setup() which calls external
+        * Enable instrumentation around mce_prep_record() which calls external
         * facilities.
         */
        instrumentation_begin();
-       mce_setup(m);
+       mce_prep_record(m);
        instrumentation_end();
 
        m->mcgstatus = mce_rdmsrl(MSR_IA32_MCG_STATUS);