aboutsummaryrefslogtreecommitdiff
path: root/driver/gator_cookies.c
diff options
context:
space:
mode:
authorPawel Moll <pawel.moll@arm.com>2011-11-17 18:14:03 +0000
committerPawel Moll <pawel.moll@arm.com>2011-11-17 18:14:03 +0000
commit6d51ed1aa2f14b8ee097e940a4d747bf04020195 (patch)
tree5fb49aff4be9956cfdb58dfe9e4129a86130d292 /driver/gator_cookies.c
parent3081bf8f00d4b17641988db512efd8828f59eb05 (diff)
gator-driver: ARM DS-5.8 Streamline gator driver (RC1)DS-5.8
Diffstat (limited to 'driver/gator_cookies.c')
-rw-r--r--driver/gator_cookies.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/driver/gator_cookies.c b/driver/gator_cookies.c
index a646fb2..c0c4b9c 100644
--- a/driver/gator_cookies.c
+++ b/driver/gator_cookies.c
@@ -122,12 +122,18 @@ static void wq_cookie_handler(struct work_struct *unused)
int cpu = smp_processor_id();
unsigned int cookie, commit;
- commit = per_cpu(translate_buffer_write, cpu);
- while (per_cpu(translate_buffer_read, cpu) != commit) {
- task = (struct task_struct *)translate_buffer_read_int(cpu);
- vma = (struct vm_area_struct *)translate_buffer_read_int(cpu);
- cookie = get_cookie(cpu, TIMER_BUF, task, vma, NULL, false);
+ mutex_lock(&start_mutex);
+
+ if (gator_started != 0) {
+ commit = per_cpu(translate_buffer_write, cpu);
+ while (per_cpu(translate_buffer_read, cpu) != commit) {
+ task = (struct task_struct *)translate_buffer_read_int(cpu);
+ vma = (struct vm_area_struct *)translate_buffer_read_int(cpu);
+ cookie = get_cookie(cpu, TIMER_BUF, task, vma, NULL, false);
+ }
}
+
+ mutex_unlock(&start_mutex);
}
// Retrieve full name from proc/pid/cmdline for java processes on Android