From 4a0ae64c47b159d4dd0ea471f1f8044503843a7f Mon Sep 17 00:00:00 2001 From: David Smith Date: Wed, 2 Dec 2009 15:16:10 -0600 Subject: Fix PR 11034 by directly allocating per-cpu context data. * translate.cxx (emit_common_header): Change type of 'contexts' to an array of struct context pointers. (emit_module_init): Allocate a context structure for each possible cpu. Free each if an error occurs. (emit_module_exit): Update contexts reference. Free each possible cpu's context structure. * tapsets.cxx (common_probe_entryfn_prologue): Use array instead of percpu data for context structure. --- tapsets.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index 7bae4615..51f1ccc9 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -100,7 +100,7 @@ common_probe_entryfn_prologue (translator_output* o, string statestr, o->newline(1) << "goto probe_epilogue;"; o->indent(-1); - o->newline() << "c = per_cpu_ptr (contexts, smp_processor_id());"; + o->newline() << "c = contexts[smp_processor_id()];"; o->newline() << "if (atomic_inc_return (& c->busy) != 1) {"; o->newline(1) << "#if !INTERRUPTIBLE"; o->newline() << "atomic_inc (& skipped_count);"; -- cgit