On x86, the opening if of call_handlers_*() is indented 4 spaces which
breaks alignment. The alignment is broken by printf(" "), but
that actually aligns ARM's opening "if ( likely() )". Move the indent
to the if that needs it.
This results in x86 hypercall-defs.h changes like:
#define call_handlers_hvm64(num, ret, a1, a2, a3, a4, a5) \
({ \
uint64_t mask = (num) > 63 ? 0 : 1ULL << (num); \
- if ( likely(mask & ((1ULL << __HYPERVISOR_vcpu_op) | (1ULL <<
__HYPERVISOR_event_channel_op))) ) \
+ if ( likely(mask & ((1ULL << __HYPERVISOR_vcpu_op) | (1ULL <<
__HYPERVISOR_event_channel_op))) ) \
{ \
if ( (num) == __HYPERVISOR_vcpu_op ) \
ARM's hypercall-defs.h does not change.
Signed-off-by: Jason Andryuk <[email protected]>
---
xen/scripts/gen_hypercall.awk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/scripts/gen_hypercall.awk b/xen/scripts/gen_hypercall.awk
index 47a18cd75e..b544fe1c4d 100644
--- a/xen/scripts/gen_hypercall.awk
+++ b/xen/scripts/gen_hypercall.awk
@@ -266,7 +266,7 @@ END {
printf("({ \\\n");
if (need_mask)
printf(" uint64_t mask = (num) > 63 ? 0 : 1ULL << (num); \\\n");
- printf(" ");
+
for (pl = 1; pl <= n_prios[ca]; pl++) {
if (prios[ca, p_list[pl]] > 1) {
if (pl < n_prios[ca]) {
@@ -292,7 +292,7 @@ END {
} else {
for (i = 1; i <= nc; i++)
if (call[i] == ca && call_prio[i] == p_list[pl]) {
- printf("if ( likely((num) == __HYPERVISOR_%s) ) \\\n",
fn[call_fn[i]]);
+ printf(" if ( likely((num) == __HYPERVISOR_%s) )
\\\n", fn[call_fn[i]]);
do_call(call_fn[i], call_p[i]);
}
}
--
2.51.1