diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2009-02-06 16:35:57 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-16 02:56:11 -0500 |
commit | b93d51dc62a41b5c2d6f32a0870709dc0cc55545 (patch) | |
tree | 173035613b5a51b733c339b2ba5b7bf07a9798cd | |
parent | 9033304a1520df346862c95743a6c2023f21f057 (diff) |
x86, xen: record and display initiator of each multicall when debugging
Store the caller for each multicall so we can report it on failure.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/xen/multicalls.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/xen/multicalls.c b/arch/x86/xen/multicalls.c index c738644b5435..82f2513e9758 100644 --- a/arch/x86/xen/multicalls.c +++ b/arch/x86/xen/multicalls.c | |||
@@ -39,6 +39,7 @@ struct mc_buffer { | |||
39 | struct multicall_entry entries[MC_BATCH]; | 39 | struct multicall_entry entries[MC_BATCH]; |
40 | #if MC_DEBUG | 40 | #if MC_DEBUG |
41 | struct multicall_entry debug[MC_BATCH]; | 41 | struct multicall_entry debug[MC_BATCH]; |
42 | void *caller[MC_BATCH]; | ||
42 | #endif | 43 | #endif |
43 | unsigned char args[MC_ARGS]; | 44 | unsigned char args[MC_ARGS]; |
44 | struct callback { | 45 | struct callback { |
@@ -154,11 +155,12 @@ void xen_mc_flush(void) | |||
154 | ret, smp_processor_id()); | 155 | ret, smp_processor_id()); |
155 | dump_stack(); | 156 | dump_stack(); |
156 | for (i = 0; i < b->mcidx; i++) { | 157 | for (i = 0; i < b->mcidx; i++) { |
157 | printk(KERN_DEBUG " call %2d/%d: op=%lu arg=[%lx] result=%ld\n", | 158 | printk(KERN_DEBUG " call %2d/%d: op=%lu arg=[%lx] result=%ld\t%pF\n", |
158 | i+1, b->mcidx, | 159 | i+1, b->mcidx, |
159 | b->debug[i].op, | 160 | b->debug[i].op, |
160 | b->debug[i].args[0], | 161 | b->debug[i].args[0], |
161 | b->entries[i].result); | 162 | b->entries[i].result, |
163 | b->caller[i]); | ||
162 | } | 164 | } |
163 | } | 165 | } |
164 | #endif | 166 | #endif |
@@ -197,6 +199,9 @@ struct multicall_space __xen_mc_entry(size_t args) | |||
197 | } | 199 | } |
198 | 200 | ||
199 | ret.mc = &b->entries[b->mcidx]; | 201 | ret.mc = &b->entries[b->mcidx]; |
202 | #ifdef MC_DEBUG | ||
203 | b->caller[b->mcidx] = __builtin_return_address(0); | ||
204 | #endif | ||
200 | b->mcidx++; | 205 | b->mcidx++; |
201 | ret.args = &b->args[argidx]; | 206 | ret.args = &b->args[argidx]; |
202 | b->argidx = argidx + args; | 207 | b->argidx = argidx + args; |