.. | .. |
---|
69 | 69 | |
---|
70 | 70 | trace_xen_mc_flush(b->mcidx, b->argidx, b->cbidx); |
---|
71 | 71 | |
---|
| 72 | +#if MC_DEBUG |
---|
| 73 | + memcpy(b->debug, b->entries, |
---|
| 74 | + b->mcidx * sizeof(struct multicall_entry)); |
---|
| 75 | +#endif |
---|
| 76 | + |
---|
72 | 77 | switch (b->mcidx) { |
---|
73 | 78 | case 0: |
---|
74 | 79 | /* no-op */ |
---|
.. | .. |
---|
87 | 92 | break; |
---|
88 | 93 | |
---|
89 | 94 | default: |
---|
90 | | -#if MC_DEBUG |
---|
91 | | - memcpy(b->debug, b->entries, |
---|
92 | | - b->mcidx * sizeof(struct multicall_entry)); |
---|
93 | | -#endif |
---|
94 | | - |
---|
95 | 95 | if (HYPERVISOR_multicall(b->entries, b->mcidx) != 0) |
---|
96 | 96 | BUG(); |
---|
97 | 97 | for (i = 0; i < b->mcidx; i++) |
---|
98 | 98 | if (b->entries[i].result < 0) |
---|
99 | 99 | ret++; |
---|
| 100 | + } |
---|
100 | 101 | |
---|
| 102 | + if (WARN_ON(ret)) { |
---|
| 103 | + pr_err("%d of %d multicall(s) failed: cpu %d\n", |
---|
| 104 | + ret, b->mcidx, smp_processor_id()); |
---|
| 105 | + for (i = 0; i < b->mcidx; i++) { |
---|
| 106 | + if (b->entries[i].result < 0) { |
---|
101 | 107 | #if MC_DEBUG |
---|
102 | | - if (ret) { |
---|
103 | | - printk(KERN_ERR "%d multicall(s) failed: cpu %d\n", |
---|
104 | | - ret, smp_processor_id()); |
---|
105 | | - dump_stack(); |
---|
106 | | - for (i = 0; i < b->mcidx; i++) { |
---|
107 | | - printk(KERN_DEBUG " call %2d/%d: op=%lu arg=[%lx] result=%ld\t%pF\n", |
---|
108 | | - i+1, b->mcidx, |
---|
| 108 | + pr_err(" call %2d: op=%lu arg=[%lx] result=%ld\t%pS\n", |
---|
| 109 | + i + 1, |
---|
109 | 110 | b->debug[i].op, |
---|
110 | 111 | b->debug[i].args[0], |
---|
111 | 112 | b->entries[i].result, |
---|
112 | 113 | b->caller[i]); |
---|
| 114 | +#else |
---|
| 115 | + pr_err(" call %2d: op=%lu arg=[%lx] result=%ld\n", |
---|
| 116 | + i + 1, |
---|
| 117 | + b->entries[i].op, |
---|
| 118 | + b->entries[i].args[0], |
---|
| 119 | + b->entries[i].result); |
---|
| 120 | +#endif |
---|
113 | 121 | } |
---|
114 | 122 | } |
---|
115 | | -#endif |
---|
116 | 123 | } |
---|
117 | 124 | |
---|
118 | 125 | b->mcidx = 0; |
---|
.. | .. |
---|
126 | 133 | b->cbidx = 0; |
---|
127 | 134 | |
---|
128 | 135 | local_irq_restore(flags); |
---|
129 | | - |
---|
130 | | - WARN_ON(ret); |
---|
131 | 136 | } |
---|
132 | 137 | |
---|
133 | 138 | struct multicall_space __xen_mc_entry(size_t args) |
---|