public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/20] x86: Cleanup alternative_io() and friends, prep for asm_call()
@ 2025-03-14 21:41 Josh Poimboeuf
  2025-03-14 21:41 ` [PATCH 01/20] x86/cpu: Use named asm operands in prefetch[w]() Josh Poimboeuf
                   ` (20 more replies)
  0 siblings, 21 replies; 47+ messages in thread
From: Josh Poimboeuf @ 2025-03-14 21:41 UTC (permalink / raw)
  To: x86
  Cc: linux-kernel, Linus Torvalds, Peter Zijlstra, Borislav Petkov,
	H. Peter Anvin, Uros Bizjak, Andrew Cooper, Ingo Molnar

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(-)

-- 
2.48.1


^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2025-03-18 22:29 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-14 21:41 [PATCH 00/20] x86: Cleanup alternative_io() and friends, prep for asm_call() Josh Poimboeuf
2025-03-14 21:41 ` [PATCH 01/20] x86/cpu: Use named asm operands in prefetch[w]() Josh Poimboeuf
2025-03-14 21:41 ` [PATCH 02/20] x86/apic: Use named asm operands in native_apic_mem_write() Josh Poimboeuf
2025-03-14 21:41 ` [PATCH 03/20] x86/mm: Use named asm operands in task_size_max() Josh Poimboeuf
2025-03-14 21:41 ` [PATCH 04/20] x86/cpu: Use named asm operands in clflushopt() Josh Poimboeuf
2025-03-14 23:46   ` Linus Torvalds
2025-03-15  0:07     ` Josh Poimboeuf
2025-03-15  8:42       ` Ingo Molnar
2025-03-15  9:25         ` Ingo Molnar
2025-03-14 21:41 ` [PATCH 05/20] x86/asm: Always use flag output operands Josh Poimboeuf
2025-03-14 21:41 ` [PATCH 06/20] x86/asm: Remove CC_SET() Josh Poimboeuf
2025-03-15  9:25   ` Uros Bizjak
2025-03-14 21:41 ` [PATCH 07/20] x86/alternative: Remove operand numbering restrictions Josh Poimboeuf
2025-03-14 21:41 ` [PATCH 08/20] x86/asm: Replace ASM_{OUTPUT,INPUT}() with ARG() Josh Poimboeuf
2025-03-14 21:41 ` [PATCH 09/20] x86/alternative: Simplify alternative_io() interface Josh Poimboeuf
2025-03-14 21:41 ` [PATCH 10/20] x86/alternative: Add alternative_2_io() Josh Poimboeuf
2025-03-14 21:41 ` [PATCH 11/20] x86/alternative: Make alternative() a wrapper around alternative_io() Josh Poimboeuf
2025-03-14 21:41 ` [PATCH 12/20] x86/cpu: Use alternative_io() in prefetch[w]() Josh Poimboeuf
2025-03-14 21:41 ` [PATCH 13/20] x86/alternative: Remove alternative_input() Josh Poimboeuf
2025-03-14 21:41 ` [PATCH 14/20] x86/barrier: Use alternative_io() in 32-bit barrier functions Josh Poimboeuf
2025-03-14 23:49   ` Linus Torvalds
2025-03-14 23:54     ` Linus Torvalds
2025-03-15  0:09       ` Josh Poimboeuf
2025-03-15  0:16         ` Linus Torvalds
2025-03-15  8:47           ` Ingo Molnar
2025-03-15  0:05     ` Josh Poimboeuf
2025-03-15  9:14       ` Ingo Molnar
2025-03-17 20:04       ` David Laight
2025-03-18  0:11         ` Josh Poimboeuf
2025-03-18 22:06           ` David Laight
2025-03-18 22:29             ` Josh Poimboeuf
2025-03-15  8:52     ` Ingo Molnar
2025-03-14 21:41 ` [PATCH 15/20] x86/cpu/amd: Use named asm operands in asm_clear_divider() Josh Poimboeuf
2025-03-15  9:01   ` Uros Bizjak
2025-03-15 10:00     ` Uros Bizjak
2025-03-14 21:41 ` [PATCH 16/20] x86/cpu: Use alternative_io() in amd_clear_divider() Josh Poimboeuf
2025-03-15  9:03   ` Uros Bizjak
2025-03-14 21:41 ` [PATCH 17/20] x86/smap: Use named asm operands in smap_{save,restore}() Josh Poimboeuf
2025-03-14 22:51   ` Andrew Cooper
2025-03-14 23:56     ` Andrew Cooper
2025-03-14 21:41 ` [PATCH 18/20] x86/smap: Use alternative_io() " Josh Poimboeuf
2025-03-15  9:09   ` Uros Bizjak
2025-03-14 21:41 ` [PATCH 19/20] x86/uaccess: Use alternative_io() in __untagged_addr() Josh Poimboeuf
2025-03-15  9:12   ` Uros Bizjak
2025-03-14 21:41 ` [PATCH 20/20] x86/msr: Use alternative_2_io() in rdtsc_ordered() Josh Poimboeuf
2025-03-14 22:25 ` [PATCH 00/20] x86: Cleanup alternative_io() and friends, prep for asm_call() Josh Poimboeuf
2025-03-15  9:52   ` Uros Bizjak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox