Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176471
b: refs/heads/master
c: fe84122
h: refs/heads/master
i:
  176469: f78c91c
  176467: 049a69a
  176463: b605c23
v: v3
  • Loading branch information
Thomas Gleixner committed Dec 14, 2009
1 parent 60f583a commit 2047a59
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0986b11b12ad2baed338385f79fd0dec58a23fc6
refs/heads/master: fe841226bd954fba4fd79f037a876053fe9c3217
10 changes: 5 additions & 5 deletions trunk/kernel/sched_cpupri.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/sched_cpupri.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/* values 2-101 are RT priorities 0-99 */

struct cpupri_vec {
spinlock_t lock;
raw_spinlock_t lock;
int count;
cpumask_var_t mask;
};
Expand Down

0 comments on commit 2047a59

Please sign in to comment.