Skip to content

x86: Cleanup alternative_io() and friends, prep for asm_call()

Josh Poimboeuf lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest20 patches 26 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20x86/cpu: Use named asm operands in prefetch[w]()arch/x86/include/asm/processor.h+7 -70 replies
2/20x86/apic: Use named asm operands in native_apic_mem_write()arch/x86/include/asm/apic.h+3 -30 replies
3/20x86/mm: Use named asm operands in task_size_max()arch/x86/include/asm/page_64.h+3 -30 replies
4/20x86/cpu: Use named asm operands in clflushopt()arch/x86/include/asm/special_insns.h+3 -44 replies
5/20x86/asm: Always use flag output operandsarch/x86/include/asm/asm.h arch/x86/include/asm/rmwcc.h tools/arch/x86/include/asm/asm.h +1 more+2 -380 replies
6/20x86/asm: Remove CC_SET()arch/x86/boot/bitops.h arch/x86/boot/boot.h arch/x86/boot/string.c +13 more+9 -331 reply
7/20x86/alternative: Remove operand numbering restrictionsarch/x86/include/asm/alternative.h+2 -40 replies
8/20x86/asm: Replace ASM_{OUTPUT,INPUT}() with ARG()arch/x86/include/asm/apic.h arch/x86/include/asm/asm.h arch/x86/include/asm/atomic64_32.h +3 more+67 -580 replies
9/20x86/alternative: Simplify alternative_io() interfacearch/x86/include/asm/alternative.h arch/x86/include/asm/apic.h arch/x86/include/asm/special_insns.h+15 -60 replies
10/20x86/alternative: Add alternative_2_io()arch/x86/include/asm/alternative.h+8 -00 replies
11/20x86/alternative: Make alternative() a wrapper around alternative_io()arch/x86/include/asm/alternative.h+2 -20 replies
12/20x86/cpu: Use alternative_io() in prefetch[w]()arch/x86/include/asm/processor.h+8 -60 replies
13/20x86/alternative: Remove alternative_input()arch/x86/include/asm/alternative.h+0 -100 replies
14/20x86/barrier: Use alternative_io() in 32-bit barrier functionsarch/x86/include/asm/barrier.h+17 -612 replies
15/20x86/cpu/amd: Use named asm operands in asm_clear_divider()arch/x86/include/asm/processor.h+2 -22 replies
16/20x86/cpu: Use alternative_io() in amd_clear_divider()arch/x86/include/asm/processor.h+4 -21 reply
17/20x86/smap: Use named asm operands in smap_{save,restore}()arch/x86/include/asm/smap.h+6 -62 replies
18/20x86/smap: Use alternative_io() in smap_{save,restore}()arch/x86/include/asm/smap.h+10 -81 reply
19/20x86/uaccess: Use alternative_io() in __untagged_addr()arch/x86/include/asm/uaccess_64.h+4 -41 reply
20/20x86/msr: Use alternative_2_io() in rdtsc_ordered()arch/x86/include/asm/msr.h+7 -60 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 00/20] x86: Cleanup alternative_io() and friends, prep for asm_call()

Make the alternative_io() interface more straightforward and flexible, and get rid of alternative_input().

These patches are a prereq for another set[1] which will get rid of ASM_CALL_CONSTRAINT[2] in favor of a much more flexible asm_call() interface similar to the new alternative_io().

[1] Additional 20+ patches not posted yet to avoid flooding inboxes

[2] ASM_CALL_CONSTRAINT is semi-broken with Clang+KCOV+KMSAN.

    https://lore.kernel.org/174108458465.14745.15292444415957816824.tip-bot2@tip-bot2/
    https://lore.kernel.org/174099976188.10177.7153571701278544000.tip-bot2@tip-bot2

Josh Poimboeuf (20):
x86/cpu: Use named asm operands in prefetch[w]()
x86/apic: Use named asm operands in native_apic_mem_write() x86/mm: Use named asm operands in task_size_max()
x86/cpu: Use named asm operands in clflushopt()
x86/asm: Always use flag output operands
x86/asm: Remove CC_SET()
x86/alternative: Remove operand numbering restrictions x86/asm: Replace ASM_{OUTPUT,INPUT}() with ARG() x86/alternative: Simplify alternative_io() interface x86/alternative: Add alternative_2_io()
x86/alternative: Make alternative() a wrapper around alternative_io() x86/cpu: Use alternative_io() in prefetch[w]() x86/alternative: Remove alternative_input()
x86/barrier: Use alternative_io() in 32-bit barrier functions x86/cpu/amd: Use named asm operands in asm_clear_divider() x86/cpu: Use alternative_io() in amd_clear_divider() x86/smap: Use named asm operands in smap_{save,restore}() x86/smap: Use alternative_io() in smap_{save,restore}() x86/uaccess: Use alternative_io() in __untagged_addr() x86/msr: Use alternative_2_io() in rdtsc_ordered()

 arch/x86/boot/bitops.h               |  2 +-
 arch/x86/boot/boot.h                 |  4 +-
 arch/x86/boot/string.c               |  2 +-
 arch/x86/include/asm/alternative.h   | 31 +++++-----
 arch/x86/include/asm/apic.h          |  7 ++-
 arch/x86/include/asm/archrandom.h    |  2 -
 arch/x86/include/asm/asm.h           | 21 +++----
 arch/x86/include/asm/atomic64_32.h   | 93 +++++++++++++++-------------
 arch/x86/include/asm/barrier.h       | 23 +++++--
 arch/x86/include/asm/bitops.h        |  6 --
 arch/x86/include/asm/cmpxchg.h       |  4 --
 arch/x86/include/asm/cmpxchg_32.h    |  2 -
 arch/x86/include/asm/cmpxchg_64.h    |  1 -
 arch/x86/include/asm/msr.h           | 13 ++--
 arch/x86/include/asm/page_64.h       | 16 ++---
 arch/x86/include/asm/percpu.h        |  4 --
 arch/x86/include/asm/processor.h     | 22 ++++---
 arch/x86/include/asm/rmwcc.h         | 24 +------
 arch/x86/include/asm/segment.h       |  5 +-
 arch/x86/include/asm/sev.h           |  1 -
 arch/x86/include/asm/signal.h        |  2 +-
 arch/x86/include/asm/smap.h          | 18 +++---
 arch/x86/include/asm/special_insns.h |  9 ++-
 arch/x86/include/asm/uaccess.h       |  1 -
 arch/x86/include/asm/uaccess_64.h    |  8 +--
 tools/arch/x86/include/asm/asm.h     | 10 +--
 tools/perf/bench/find-bit-bench.c    |  4 --
 27 files changed, 153 insertions(+), 182 deletions(-)
Signature · 1 line
2.48.1