(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

x86/asm/segment: Implement loadsegment()/savesegment() macros with static inline helpers

Convert the __loadsegment_simple() and savesegment() macro implementations into static inline helper functions generated via small helper macros. Historically loadsegment() and savesegment() relied on macros that embedded inline assembly. This approach obscures types, complicates debugging, and makes the call sites harder for the compiler and static analysis tools to reason about. This change is purely mechanical and does not alter the generated code, but improves readability, type safety, and compiler visibility of the helpers. Suggested-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://patch.msgid.link/20260330055823.5793-4-ubizjak@gmail.com


Author Uros Bizjak Committer Ingo Molnar Date Commit Parent caf3cb2e
+35 -22
1 changed file
+35 -22
1 changed file