Skip to content

Commit e625cce

Browse files
committed
perf_event: Convert to raw_spinlock
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>
1 parent ecb49d1 commit e625cce

3 files changed

Lines changed: 56 additions & 56 deletions

File tree

‎include/linux/perf_event.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ struct perf_event_context {
681681
* Protect the states of the events in the list,
682682
* nr_active, and the list:
683683
*/
684-
spinlock_t lock;
684+
raw_spinlock_t lock;
685685
/*
686686
* Protect the list of events. Locking either mutex or lock
687687
* is sufficient to ensure the list doesn't change; to change

‎kernel/hw_breakpoint.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static int task_bp_pinned(struct task_struct *tsk)
9696

9797
list = &ctx->event_list;
9898

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

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

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

112112
return count;
113113
}

0 commit comments

Comments
 (0)