]> git.itanic.dy.fi Git - linux-stable/commitdiff
x86/mce: Mark mce_read_aux() noinstr
authorBorislav Petkov <bp@suse.de>
Tue, 2 Nov 2021 10:14:48 +0000 (11:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 08:04:25 +0000 (09:04 +0100)
[ Upstream commit db6c996d6ce45dfb44891f0824a65ecec216f47a ]

Fixes

  vmlinux.o: warning: objtool: do_machine_check()+0x681: call to mce_read_aux() leaves .noinstr.text section

Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20211208111343.8130-10-bp@alien8.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kernel/cpu/mcheck/mce.c

index 26adaad3f2587d8aec9e0cd7a249a6665391e1d9..8f36ccf26cecab05884db9233649864fb35d3653 100644 (file)
@@ -651,7 +651,7 @@ static struct notifier_block mce_default_nb = {
 /*
  * Read ADDR and MISC registers.
  */
-static void mce_read_aux(struct mce *m, int i)
+static noinstr void mce_read_aux(struct mce *m, int i)
 {
        if (m->status & MCI_STATUS_MISCV)
                m->misc = mce_rdmsrl(msr_ops.misc(i));