Skip to content

Commit

Permalink
perf_event: Convert to raw_spinlock
Browse files Browse the repository at this point in the history
Convert locks which cannot be sleeping locks in preempt-rt to
raw_spinlocks.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Thomas Gleixner committed Dec 14, 2009
1 parent ecb49d1 commit e625cce
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 56 deletions.
2 changes: 1 addition & 1 deletion include/linux/perf_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ struct perf_event_context {
* Protect the states of the events in the list,
* nr_active, and the list:
*/
spinlock_t lock;
raw_spinlock_t lock;
/*
* Protect the list of events. Locking either mutex or lock
* is sufficient to ensure the list doesn't change; to change
Expand Down
4 changes: 2 additions & 2 deletions kernel/hw_breakpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static int task_bp_pinned(struct task_struct *tsk)

list = &ctx->event_list;

spin_lock_irqsave(&ctx->lock, flags);
raw_spin_lock_irqsave(&ctx->lock, flags);

/*
* The current breakpoint counter is not included in the list
Expand All @@ -107,7 +107,7 @@ static int task_bp_pinned(struct task_struct *tsk)
count++;
}

spin_unlock_irqrestore(&ctx->lock, flags);
raw_spin_unlock_irqrestore(&ctx->lock, flags);

return count;
}
Expand Down
Loading

0 comments on commit e625cce

Please sign in to comment.