summaryrefslogtreecommitdiffstats
path: root/kernel/sched_cpupri.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-11-17 17:59:15 +0100
committerThomas Gleixner <tglx@linutronix.de>2009-12-14 23:55:33 +0100
commitfe841226bd954fba4fd79f037a876053fe9c3217 (patch)
tree0819ff8a78b9eeed61a1dc26b5aa900f48d0c2e3 /kernel/sched_cpupri.c
parent0986b11b12ad2baed338385f79fd0dec58a23fc6 (diff)
downloadop-kernel-dev-fe841226bd954fba4fd79f037a876053fe9c3217.zip
op-kernel-dev-fe841226bd954fba4fd79f037a876053fe9c3217.tar.gz
sched: Convert cpupri lock 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>
Diffstat (limited to 'kernel/sched_cpupri.c')
-rw-r--r--kernel/sched_cpupri.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/sched_cpupri.c b/kernel/sched_cpupri.c
index 0f052fc..597b330 100644
--- a/kernel/sched_cpupri.c
+++ b/kernel/sched_cpupri.c
@@ -135,26 +135,26 @@ void cpupri_set(struct cpupri *cp, int cpu, int newpri)
if (likely(newpri != CPUPRI_INVALID)) {
struct cpupri_vec *vec = &cp->pri_to_cpu[newpri];
- spin_lock_irqsave(&vec->lock, flags);
+ raw_spin_lock_irqsave(&vec->lock, flags);
cpumask_set_cpu(cpu, vec->mask);
vec->count++;
if (vec->count == 1)
set_bit(newpri, cp->pri_active);
- spin_unlock_irqrestore(&vec->lock, flags);
+ raw_spin_unlock_irqrestore(&vec->lock, flags);
}
if (likely(oldpri != CPUPRI_INVALID)) {
struct cpupri_vec *vec = &cp->pri_to_cpu[oldpri];
- spin_lock_irqsave(&vec->lock, flags);
+ raw_spin_lock_irqsave(&vec->lock, flags);
vec->count--;
if (!vec->count)
clear_bit(oldpri, cp->pri_active);
cpumask_clear_cpu(cpu, vec->mask);
- spin_unlock_irqrestore(&vec->lock, flags);
+ raw_spin_unlock_irqrestore(&vec->lock, flags);
}
*currpri = newpri;
@@ -180,7 +180,7 @@ int cpupri_init(struct cpupri *cp, bool bootmem)
for (i = 0; i < CPUPRI_NR_PRIORITIES; i++) {
struct cpupri_vec *vec = &cp->pri_to_cpu[i];
- spin_lock_init(&vec->lock);
+ raw_spin_lock_init(&vec->lock);
vec->count = 0;
if (!zalloc_cpumask_var(&vec->mask, gfp))
goto cleanup;
OpenPOWER on IntegriCloud