| From faf35813f204901f85dd0c6b3c5092e0064c6c2f Mon Sep 17 00:00:00 2001 |
| From: Thomas Gleixner <tglx@linutronix.de> |
| Date: Wed, 16 Jun 2010 16:58:34 +0200 |
| Subject: [PATCH] timer_stats: Convert table_lock to raw_spin_lock |
| |
| commit faf35813f204901f85dd0c6b3c5092e0064c6c2f in tip. |
| |
| table_lock is taken in atomic contexts and therefor cannot be |
| converted to a sleeping spinlock on rt. Make it raw. |
| |
| Reported-by: Andreas Sundebo <kernel@sundebo.dk> |
| Signed-off-by: Thomas Gleixner <tglx@linutronix.de> |
| Tested-by: Andreas Sundebo <kernel@sundebo.dk> |
| |
| diff --git a/kernel/time/timer_stats.c b/kernel/time/timer_stats.c |
| index 2f3b585..30cb955 100644 |
| --- a/kernel/time/timer_stats.c |
| +++ b/kernel/time/timer_stats.c |
| @@ -81,7 +81,7 @@ struct entry { |
| /* |
| * Spinlock protecting the tables - not taken during lookup: |
| */ |
| -static DEFINE_SPINLOCK(table_lock); |
| +static DEFINE_RAW_SPINLOCK(table_lock); |
| |
| /* |
| * Per-CPU lookup locks for fast hash lookup: |
| @@ -188,7 +188,7 @@ static struct entry *tstat_lookup(struct entry *entry, char *comm) |
| prev = NULL; |
| curr = *head; |
| |
| - spin_lock(&table_lock); |
| + raw_spin_lock(&table_lock); |
| /* |
| * Make sure we have not raced with another CPU: |
| */ |
| @@ -215,7 +215,7 @@ static struct entry *tstat_lookup(struct entry *entry, char *comm) |
| *head = curr; |
| } |
| out_unlock: |
| - spin_unlock(&table_lock); |
| + raw_spin_unlock(&table_lock); |
| |
| return curr; |
| } |
| -- |
| 1.7.1.1 |
| |