Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181945
b: refs/heads/master
c: be833f3
h: refs/heads/master
i:
  181943: 4b4a447
v: v3
  • Loading branch information
Thomas Gleixner authored and Benjamin Herrenschmidt committed Feb 19, 2010
1 parent e238fc1 commit ff1d3b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: 87d31345c0a90ccdf185feed9923ed14764f45dc
refs/heads/master: be833f3371bd9580d9f5a507390d72452577f394
14 changes: 7 additions & 7 deletions trunk/arch/powerpc/mm/mmu_context_nohash.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static unsigned int next_context, nr_free_contexts;
static unsigned long *context_map;
static unsigned long *stale_map[NR_CPUS];
static struct mm_struct **context_mm;
static DEFINE_SPINLOCK(context_lock);
static DEFINE_RAW_SPINLOCK(context_lock);

#define CTX_MAP_SIZE \
(sizeof(unsigned long) * (last_context / BITS_PER_LONG + 1))
Expand Down Expand Up @@ -121,9 +121,9 @@ static unsigned int steal_context_smp(unsigned int id)
/* This will happen if you have more CPUs than available contexts,
* all we can do here is wait a bit and try again
*/
spin_unlock(&context_lock);
raw_spin_unlock(&context_lock);
cpu_relax();
spin_lock(&context_lock);
raw_spin_lock(&context_lock);

/* This will cause the caller to try again */
return MMU_NO_CONTEXT;
Expand Down Expand Up @@ -194,7 +194,7 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next)
unsigned long *map;

/* No lockless fast path .. yet */
spin_lock(&context_lock);
raw_spin_lock(&context_lock);

pr_hard("[%d] activating context for mm @%p, active=%d, id=%d",
cpu, next, next->context.active, next->context.id);
Expand Down Expand Up @@ -278,7 +278,7 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next)
/* Flick the MMU and release lock */
pr_hardcont(" -> %d\n", id);
set_context(id, next->pgd);
spin_unlock(&context_lock);
raw_spin_unlock(&context_lock);
}

/*
Expand Down Expand Up @@ -307,7 +307,7 @@ void destroy_context(struct mm_struct *mm)

WARN_ON(mm->context.active != 0);

spin_lock_irqsave(&context_lock, flags);
raw_spin_lock_irqsave(&context_lock, flags);
id = mm->context.id;
if (id != MMU_NO_CONTEXT) {
__clear_bit(id, context_map);
Expand All @@ -318,7 +318,7 @@ void destroy_context(struct mm_struct *mm)
context_mm[id] = NULL;
nr_free_contexts++;
}
spin_unlock_irqrestore(&context_lock, flags);
raw_spin_unlock_irqrestore(&context_lock, flags);
}

#ifdef CONFIG_SMP
Expand Down

0 comments on commit ff1d3b1

Please sign in to comment.