Lines Matching refs:b
58 struct mc_buffer *b = this_cpu_ptr(&mc_buffer); in xen_mc_flush() local
70 trace_xen_mc_flush(b->mcidx, b->argidx, b->cbidx); in xen_mc_flush()
72 switch (b->mcidx) { in xen_mc_flush()
75 BUG_ON(b->argidx != 0); in xen_mc_flush()
81 mc = &b->entries[0]; in xen_mc_flush()
91 memcpy(b->debug, b->entries, in xen_mc_flush()
92 b->mcidx * sizeof(struct multicall_entry)); in xen_mc_flush()
95 if (HYPERVISOR_multicall(b->entries, b->mcidx) != 0) in xen_mc_flush()
97 for (i = 0; i < b->mcidx; i++) in xen_mc_flush()
98 if (b->entries[i].result < 0) in xen_mc_flush()
106 for (i = 0; i < b->mcidx; i++) { in xen_mc_flush()
108 i+1, b->mcidx, in xen_mc_flush()
109 b->debug[i].op, in xen_mc_flush()
110 b->debug[i].args[0], in xen_mc_flush()
111 b->entries[i].result, in xen_mc_flush()
112 b->caller[i]); in xen_mc_flush()
118 b->mcidx = 0; in xen_mc_flush()
119 b->argidx = 0; in xen_mc_flush()
121 for (i = 0; i < b->cbidx; i++) { in xen_mc_flush()
122 struct callback *cb = &b->callbacks[i]; in xen_mc_flush()
126 b->cbidx = 0; in xen_mc_flush()
135 struct mc_buffer *b = this_cpu_ptr(&mc_buffer); in __xen_mc_entry() local
137 unsigned argidx = roundup(b->argidx, sizeof(u64)); in __xen_mc_entry()
142 BUG_ON(b->argidx >= MC_ARGS); in __xen_mc_entry()
144 if (unlikely(b->mcidx == MC_BATCH || in __xen_mc_entry()
146 trace_xen_mc_flush_reason((b->mcidx == MC_BATCH) ? in __xen_mc_entry()
149 argidx = roundup(b->argidx, sizeof(u64)); in __xen_mc_entry()
152 ret.mc = &b->entries[b->mcidx]; in __xen_mc_entry()
154 b->caller[b->mcidx] = __builtin_return_address(0); in __xen_mc_entry()
156 b->mcidx++; in __xen_mc_entry()
157 ret.args = &b->args[argidx]; in __xen_mc_entry()
158 b->argidx = argidx + args; in __xen_mc_entry()
160 BUG_ON(b->argidx >= MC_ARGS); in __xen_mc_entry()
166 struct mc_buffer *b = this_cpu_ptr(&mc_buffer); in xen_mc_extend_args() local
170 BUG_ON(b->argidx >= MC_ARGS); in xen_mc_extend_args()
172 if (unlikely(b->mcidx == 0 || in xen_mc_extend_args()
173 b->entries[b->mcidx - 1].op != op)) { in xen_mc_extend_args()
178 if (unlikely((b->argidx + size) >= MC_ARGS)) { in xen_mc_extend_args()
183 ret.mc = &b->entries[b->mcidx - 1]; in xen_mc_extend_args()
184 ret.args = &b->args[b->argidx]; in xen_mc_extend_args()
185 b->argidx += size; in xen_mc_extend_args()
187 BUG_ON(b->argidx >= MC_ARGS); in xen_mc_extend_args()
196 struct mc_buffer *b = this_cpu_ptr(&mc_buffer); in xen_mc_callback() local
199 if (b->cbidx == MC_BATCH) { in xen_mc_callback()
206 cb = &b->callbacks[b->cbidx++]; in xen_mc_callback()