[-next,v5,3/3] x86/mce: rename MCE_IN_KERNEL_COPYIN to MCE_IN_KERNEL_COPY_MC
Commit Message
In the x86 mce processing, error_context() use MCE_IN_KERNEL_COPYIN for
user-to-kernel copy(EX_TYPE_UACCESS) and kernel-to-kernel copy
(EX_TYPE_DEFAULT_MCE_SAFE).
"COPYIN" only stands for user-to-kernel copy and can't stands for
kernel-to-kernel copy, this can cause some misunderstandings. So rename
MCE_IN_KERNEL_COPYIN to MCE_IN_KERNEL_COPY_MC.
Signed-off-by: Tong Tiangen <tongtiangen@huawei.com>
---
arch/x86/include/asm/mce.h | 8 ++++----
arch/x86/kernel/cpu/mce/core.c | 2 +-
arch/x86/kernel/cpu/mce/severity.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
@@ -151,11 +151,11 @@
/*
* Indicates an MCE that happened in kernel space while copying data
- * from user. In this case fixup_exception() gets the kernel to the
- * error exit for the copy function. Machine check handler can then
- * treat it like a fault taken in user mode.
+ * from user or kernel. In this case fixup_exception() gets the kernel
+ * to the error exit for the copy function. Machine check handler can
+ * then treat it like a fault taken in user or kernel mode.
*/
-#define MCE_IN_KERNEL_COPYIN BIT_ULL(7)
+#define MCE_IN_KERNEL_COPY_MC BIT_ULL(7)
/*
* This structure contains all data related to the MCE log. Also
@@ -1608,7 +1608,7 @@ noinstr void do_machine_check(struct pt_regs *regs)
mce_panic("Failed kernel mode recovery", &m, msg);
}
- if (m.kflags & MCE_IN_KERNEL_COPYIN)
+ if (m.kflags & MCE_IN_KERNEL_COPY_MC)
queue_task_work(&m, msg, kill_me_never);
}
@@ -294,7 +294,7 @@ static noinstr int error_context(struct mce *m, struct pt_regs *regs)
return IN_KERNEL;
fallthrough;
case EX_TYPE_DEFAULT_MCE_SAFE:
- m->kflags |= MCE_IN_KERNEL_COPYIN;
+ m->kflags |= MCE_IN_KERNEL_COPY_MC;
fallthrough;
case EX_TYPE_FAULT_MCE_SAFE:
m->kflags |= MCE_IN_KERNEL_RECOV;