Skip to contentSkip to conversation

x86/alt: Fix wrong usage of as_max in OLDINSTR_2

PATCH In review Zhenzhong Duan 3 participants 5 messages Mar 28, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/alt: Fix wrong usage of as_max in OLDINSTR_2

When ALTERNATIVE_2 is used, we see below error during build. "error: macro "as_max" requires 2 arguments, but only 1 given"

---
 xen/include/asm-x86/alternative.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
xen/include/asm-x86/alternative.h +2 -2
index 4803368..3b577c4 100644
@@ -54,8 +54,8 @@ extern void alternative_instructions(void);
 
 #define OLDINSTR_2(oldinstr, n1, n2)                             \
     OLDINSTR(oldinstr,                                           \
-             as_max((alt_repl_len(n1),                           \
-                     alt_repl_len(n2)) "-" alt_orig_len))
+             as_max(alt_repl_len(n1),                            \
+                     alt_repl_len(n2)) "-" alt_orig_len)
 
 #define ALTINSTR_ENTRY(feature, num)                                    \
         " .long .LXEN%=_orig_s - .\n"             /* label           */ \
Signature · 6 lines
1.7.3

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw
Quoted 5 lines
Quoted 1 line
Quoted 1 line

Zhenzhong Duan <[email protected]> 03/28/18 4:03 AM >>>

When ALTERNATIVE_2 is used, we see below error during build. "error: macro "as_max" requires 2 arguments, but only 1 given"

See "[PATCH v2 2/6] x86: fix OLDINSTR_2()" sent on Mar 13th.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw

On 2018/3/28 13:52, Jan Beulich write:

Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line

Zhenzhong Duan <[email protected]> 03/28/18 4:03 AM >>>

When ALTERNATIVE_2 is used, we see below error during build. "error: macro "as_max" requires 2 arguments, but only 1 given"

See "[PATCH v2 2/6] x86: fix OLDINSTR_2()" sent on Mar 13th.

Oh, I see.

Thanks
Zhenzhong

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw
In reply to Jan Beulich
Quoted 8 lines · Jan Beulich
Quoted 5 lines
Quoted 1 line
Quoted 1 line

Zhenzhong Duan <[email protected]> 03/28/18 4:03 AM >>>

When ALTERNATIVE_2 is used, we see below error during build. "error: macro "as_max" requires 2 arguments, but only 1 given"

See "[PATCH v2 2/6] x86: fix OLDINSTR_2()" sent on Mar 13th.

Oh, I might as well transfer my Rb there.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel