Skip to content

x86/mce: Remove indirect calls

Borislav Petkov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86/mce: Get rid of the mce_severity function pointerarch/x86/include/asm/mce.h arch/x86/kernel/cpu/mce/core.c arch/x86/kernel/cpu/mce/internal.h +1 more+6 -110 replies
2/4x86/mce: Get rid of machine_check_vectorarch/x86/include/asm/mce.h arch/x86/kernel/cpu/mce/core.c arch/x86/kernel/cpu/mce/internal.h +2 more+53 -556 replies
3/4x86/mce: Get rid of msr_opsarch/x86/kernel/cpu/mce/amd.c arch/x86/kernel/cpu/mce/core.c arch/x86/kernel/cpu/mce/internal.h+44 -737 replies
4/4x86/mce: Get rid of the ->quirk_no_way_out() indirect callarch/x86/kernel/cpu/mce/core.c arch/x86/kernel/cpu/mce/internal.h+35 -345 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] x86/mce: Remove indirect calls

From: Borislav Petkov <[email protected]>

Hi folks,

this is the first part of me trying to noinstr-ify the mce mess properly. That one is dealing with making all indirect calls on the #MC exception path, direct, to avoid the compiler from adding ratpoline thunks which objtool doesn't like. And when you look at the changes, you probably would go, gee, why did we ever did indirect calls - it is even more readable with direct calls and there are practically no downsides. So let's remove former.

There's another patch ontop which does the actual noinstr annotation but that takes longer currently due to objtool changes in tip.

So for now, the first part.

As always, constructive review is welcome.

Thx.

Borislav Petkov (4):
x86/mce: Get rid of the mce_severity function pointer x86/mce: Get rid of machine_check_vector x86/mce: Get rid of msr_ops
x86/mce: Get rid of the ->quirk_no_way_out() indirect call

 arch/x86/include/asm/mce.h         |  12 --
 arch/x86/kernel/cpu/mce/amd.c      |  10 +-
 arch/x86/kernel/cpu/mce/core.c     | 217 ++++++++++++-----------------
 arch/x86/kernel/cpu/mce/internal.h |  47 +++++--
 arch/x86/kernel/cpu/mce/p5.c       |   6 +-
 arch/x86/kernel/cpu/mce/severity.c |  11 +-
 arch/x86/kernel/cpu/mce/winchip.c  |   6 +-
 7 files changed, 137 insertions(+), 172 deletions(-)
Signature · 1 line
2.29.2