Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257960
b: refs/heads/master
c: eac303b
h: refs/heads/master
v: v3
  • Loading branch information
Jeremy Fitzhardinge committed Jul 18, 2011
1 parent ccdae8f commit a4843cd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4a7b005dbfa554e7cc7fbc08e0299a9b7a91ef3b
refs/heads/master: eac303bf2ef63e7f7b6971badea0ff7bf08a2b22
27 changes: 22 additions & 5 deletions trunk/arch/x86/xen/multicalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ DEFINE_PER_CPU(unsigned long, xen_mc_irq_flags);
void xen_mc_flush(void)
{
struct mc_buffer *b = &__get_cpu_var(mc_buffer);
struct multicall_entry *mc;
int ret = 0;
unsigned long flags;
int i;
Expand All @@ -67,7 +68,24 @@ void xen_mc_flush(void)

trace_xen_mc_flush(b->mcidx, b->argidx, b->cbidx);

if (b->mcidx) {
switch (b->mcidx) {
case 0:
/* no-op */
BUG_ON(b->argidx != 0);
break;

case 1:
/* Singleton multicall - bypass multicall machinery
and just do the call directly. */
mc = &b->entries[0];

mc->result = privcmd_call(mc->op,
mc->args[0], mc->args[1], mc->args[2],
mc->args[3], mc->args[4]);
ret = mc->result < 0;
break;

default:
#if MC_DEBUG
memcpy(b->debug, b->entries,
b->mcidx * sizeof(struct multicall_entry));
Expand All @@ -94,11 +112,10 @@ void xen_mc_flush(void)
}
}
#endif
}

b->mcidx = 0;
b->argidx = 0;
} else
BUG_ON(b->argidx != 0);
b->mcidx = 0;
b->argidx = 0;

for (i = 0; i < b->cbidx; i++) {
struct callback *cb = &b->callbacks[i];
Expand Down

0 comments on commit a4843cd

Please sign in to comment.