Lines Matching refs:b
57 struct mc_buffer *b = &__get_cpu_var(mc_buffer); in xen_mc_flush() local
69 trace_xen_mc_flush(b->mcidx, b->argidx, b->cbidx); in xen_mc_flush()
71 switch (b->mcidx) { in xen_mc_flush()
74 BUG_ON(b->argidx != 0); in xen_mc_flush()
80 mc = &b->entries[0]; in xen_mc_flush()
90 memcpy(b->debug, b->entries, in xen_mc_flush()
91 b->mcidx * sizeof(struct multicall_entry)); in xen_mc_flush()
94 if (HYPERVISOR_multicall(b->entries, b->mcidx) != 0) in xen_mc_flush()
96 for (i = 0; i < b->mcidx; i++) in xen_mc_flush()
97 if (b->entries[i].result < 0) in xen_mc_flush()
105 for (i = 0; i < b->mcidx; i++) { in xen_mc_flush()
107 i+1, b->mcidx, in xen_mc_flush()
108 b->debug[i].op, in xen_mc_flush()
109 b->debug[i].args[0], in xen_mc_flush()
110 b->entries[i].result, in xen_mc_flush()
111 b->caller[i]); in xen_mc_flush()
117 b->mcidx = 0; in xen_mc_flush()
118 b->argidx = 0; in xen_mc_flush()
120 for (i = 0; i < b->cbidx; i++) { in xen_mc_flush()
121 struct callback *cb = &b->callbacks[i]; in xen_mc_flush()
125 b->cbidx = 0; in xen_mc_flush()
134 struct mc_buffer *b = &__get_cpu_var(mc_buffer); in __xen_mc_entry() local
136 unsigned argidx = roundup(b->argidx, sizeof(u64)); in __xen_mc_entry()
141 BUG_ON(b->argidx >= MC_ARGS); in __xen_mc_entry()
143 if (unlikely(b->mcidx == MC_BATCH || in __xen_mc_entry()
145 trace_xen_mc_flush_reason((b->mcidx == MC_BATCH) ? in __xen_mc_entry()
148 argidx = roundup(b->argidx, sizeof(u64)); in __xen_mc_entry()
151 ret.mc = &b->entries[b->mcidx]; in __xen_mc_entry()
153 b->caller[b->mcidx] = __builtin_return_address(0); in __xen_mc_entry()
155 b->mcidx++; in __xen_mc_entry()
156 ret.args = &b->args[argidx]; in __xen_mc_entry()
157 b->argidx = argidx + args; in __xen_mc_entry()
159 BUG_ON(b->argidx >= MC_ARGS); in __xen_mc_entry()
165 struct mc_buffer *b = &__get_cpu_var(mc_buffer); in xen_mc_extend_args() local
169 BUG_ON(b->argidx >= MC_ARGS); in xen_mc_extend_args()
171 if (unlikely(b->mcidx == 0 || in xen_mc_extend_args()
172 b->entries[b->mcidx - 1].op != op)) { in xen_mc_extend_args()
177 if (unlikely((b->argidx + size) >= MC_ARGS)) { in xen_mc_extend_args()
182 ret.mc = &b->entries[b->mcidx - 1]; in xen_mc_extend_args()
183 ret.args = &b->args[b->argidx]; in xen_mc_extend_args()
184 b->argidx += size; in xen_mc_extend_args()
186 BUG_ON(b->argidx >= MC_ARGS); in xen_mc_extend_args()
195 struct mc_buffer *b = &__get_cpu_var(mc_buffer); in xen_mc_callback() local
198 if (b->cbidx == MC_BATCH) { in xen_mc_callback()
205 cb = &b->callbacks[b->cbidx++]; in xen_mc_callback()