Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 70933
b: refs/heads/master
c: a122d62
h: refs/heads/master
i:
  70931: eb897a1
v: v3
  • Loading branch information
Jeremy Fitzhardinge authored and Jeremy Fitzhardinge committed Oct 16, 2007
1 parent 29a9219 commit 0e06807
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e3d2697669abbe26c08dc9b95e2a71c634d096ed
refs/heads/master: a122d6230e8d8ac7cffdf0bc9cc4b256b928fe49
25 changes: 25 additions & 0 deletions trunk/arch/x86/xen/multicalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@

#include "multicalls.h"

#define MC_DEBUG 1

#define MC_BATCH 32
#define MC_ARGS (MC_BATCH * 16 / sizeof(u64))

struct mc_buffer {
struct multicall_entry entries[MC_BATCH];
#if MC_DEBUG
struct multicall_entry debug[MC_BATCH];
#endif
u64 args[MC_ARGS];
struct callback {
void (*fn)(void *);
Expand All @@ -56,11 +61,31 @@ void xen_mc_flush(void)
local_irq_save(flags);

if (b->mcidx) {
#if MC_DEBUG
memcpy(b->debug, b->entries,
b->mcidx * sizeof(struct multicall_entry));
#endif

if (HYPERVISOR_multicall(b->entries, b->mcidx) != 0)
BUG();
for (i = 0; i < b->mcidx; i++)
if (b->entries[i].result < 0)
ret++;

#if MC_DEBUG
if (ret) {
printk(KERN_ERR "%d multicall(s) failed: cpu %d\n",
ret, smp_processor_id());
for(i = 0; i < b->mcidx; i++) {
printk(" call %2d/%d: op=%lu arg=[%lx] result=%ld\n",
i+1, b->mcidx,
b->debug[i].op,
b->debug[i].args[0],
b->entries[i].result);
}
}
#endif

b->mcidx = 0;
b->argidx = 0;
} else
Expand Down

0 comments on commit 0e06807

Please sign in to comment.