Skip to content

Commit 8ea8153

Browse files
jbeulichjgross1
authored andcommitted
compiler: remove __ADDRESSABLE_ASM{_STR,}() again
__ADDRESSABLE_ASM_STR() is where the necessary stringification happens. As long as "sym" doesn't contain any odd characters, no quoting is required for its use with .quad / .long. In fact the quotation gets in the way with gas 2.25; it's only from 2.26 onwards that quoted symbols are half-way properly supported. However, assembly being different from C anyway, drop __ADDRESSABLE_ASM_STR() and its helper macro altogether. A simple .global directive will suffice to get the symbol "declared", i.e. into the symbol table. While there also stop open-coding STATIC_CALL_TRAMP() and STATIC_CALL_KEY(). Fixes: 0ef8047 ("x86/static-call: provide a way to do very early static-call updates") Signed-off-by: Jan Beulich <[email protected]> Acked-by: Josh Poimboeuf <[email protected]> Cc: [email protected] Signed-off-by: Juergen Gross <[email protected]> Message-ID: <[email protected]>
1 parent 114a2de commit 8ea8153

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

arch/x86/include/asm/xen/hypercall.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,13 @@ DECLARE_STATIC_CALL(xen_hypercall, xen_hypercall_func);
9494
#ifdef MODULE
9595
#define __ADDRESSABLE_xen_hypercall
9696
#else
97-
#define __ADDRESSABLE_xen_hypercall __ADDRESSABLE_ASM_STR(__SCK__xen_hypercall)
97+
#define __ADDRESSABLE_xen_hypercall \
98+
__stringify(.global STATIC_CALL_KEY(xen_hypercall);)
9899
#endif
99100

100101
#define __HYPERCALL \
101102
__ADDRESSABLE_xen_hypercall \
102-
"call __SCT__xen_hypercall"
103+
__stringify(call STATIC_CALL_TRAMP(xen_hypercall))
103104

104105
#define __HYPERCALL_ENTRY(x) "a" (x)
105106

include/linux/compiler.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -288,14 +288,6 @@ static inline void *offset_to_ptr(const int *off)
288288
#define __ADDRESSABLE(sym) \
289289
___ADDRESSABLE(sym, __section(".discard.addressable"))
290290

291-
#define __ADDRESSABLE_ASM(sym) \
292-
.pushsection .discard.addressable,"aw"; \
293-
.align ARCH_SEL(8,4); \
294-
ARCH_SEL(.quad, .long) __stringify(sym); \
295-
.popsection;
296-
297-
#define __ADDRESSABLE_ASM_STR(sym) __stringify(__ADDRESSABLE_ASM(sym))
298-
299291
/*
300292
* This returns a constant expression while determining if an argument is
301293
* a constant expression, most importantly without evaluating the argument.

0 commit comments

Comments
 (0)