Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181951
b: refs/heads/master
c: 7cc8a5e
h: refs/heads/master
i:
  181949: 3962108
  181947: 308889d
  181943: 4b4a447
  181935: fab13b0
  181919: f67adc2
  181887: 64c2925
v: v3
  • Loading branch information
Thomas Gleixner authored and Benjamin Herrenschmidt committed Feb 19, 2010
1 parent 79c3db9 commit b53a0c8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 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: 3d3726282850761938078cd2013435eeeb2d0375
refs/heads/master: 7cc8a5e3f52c146d46d286f3778b09181639dc61
24 changes: 12 additions & 12 deletions trunk/arch/powerpc/platforms/cell/beat_htab.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#define DBG_LOW(fmt...) do { } while (0)
#endif

static DEFINE_SPINLOCK(beat_htab_lock);
static DEFINE_RAW_SPINLOCK(beat_htab_lock);

static inline unsigned int beat_read_mask(unsigned hpte_group)
{
Expand Down Expand Up @@ -114,18 +114,18 @@ static long beat_lpar_hpte_insert(unsigned long hpte_group,
if (rflags & _PAGE_NO_CACHE)
hpte_r &= ~_PAGE_COHERENT;

spin_lock(&beat_htab_lock);
raw_spin_lock(&beat_htab_lock);
lpar_rc = beat_read_mask(hpte_group);
if (lpar_rc == 0) {
if (!(vflags & HPTE_V_BOLTED))
DBG_LOW(" full\n");
spin_unlock(&beat_htab_lock);
raw_spin_unlock(&beat_htab_lock);
return -1;
}

lpar_rc = beat_insert_htab_entry(0, hpte_group, lpar_rc << 48,
hpte_v, hpte_r, &slot);
spin_unlock(&beat_htab_lock);
raw_spin_unlock(&beat_htab_lock);

/*
* Since we try and ioremap PHBs we don't own, the pte insert
Expand Down Expand Up @@ -198,17 +198,17 @@ static long beat_lpar_hpte_updatepp(unsigned long slot,
"avpnv=%016lx, slot=%016lx, psize: %d, newpp %016lx ... ",
want_v & HPTE_V_AVPN, slot, psize, newpp);

spin_lock(&beat_htab_lock);
raw_spin_lock(&beat_htab_lock);
dummy0 = beat_lpar_hpte_getword0(slot);
if ((dummy0 & ~0x7FUL) != (want_v & ~0x7FUL)) {
DBG_LOW("not found !\n");
spin_unlock(&beat_htab_lock);
raw_spin_unlock(&beat_htab_lock);
return -1;
}

lpar_rc = beat_write_htab_entry(0, slot, 0, newpp, 0, 7, &dummy0,
&dummy1);
spin_unlock(&beat_htab_lock);
raw_spin_unlock(&beat_htab_lock);
if (lpar_rc != 0 || dummy0 == 0) {
DBG_LOW("not found !\n");
return -1;
Expand Down Expand Up @@ -262,13 +262,13 @@ static void beat_lpar_hpte_updateboltedpp(unsigned long newpp,
vsid = get_kernel_vsid(ea, MMU_SEGSIZE_256M);
va = (vsid << 28) | (ea & 0x0fffffff);

spin_lock(&beat_htab_lock);
raw_spin_lock(&beat_htab_lock);
slot = beat_lpar_hpte_find(va, psize);
BUG_ON(slot == -1);

lpar_rc = beat_write_htab_entry(0, slot, 0, newpp, 0, 7,
&dummy0, &dummy1);
spin_unlock(&beat_htab_lock);
raw_spin_unlock(&beat_htab_lock);

BUG_ON(lpar_rc != 0);
}
Expand All @@ -285,18 +285,18 @@ static void beat_lpar_hpte_invalidate(unsigned long slot, unsigned long va,
slot, va, psize, local);
want_v = hpte_encode_v(va, psize, MMU_SEGSIZE_256M);

spin_lock_irqsave(&beat_htab_lock, flags);
raw_spin_lock_irqsave(&beat_htab_lock, flags);
dummy1 = beat_lpar_hpte_getword0(slot);

if ((dummy1 & ~0x7FUL) != (want_v & ~0x7FUL)) {
DBG_LOW("not found !\n");
spin_unlock_irqrestore(&beat_htab_lock, flags);
raw_spin_unlock_irqrestore(&beat_htab_lock, flags);
return;
}

lpar_rc = beat_write_htab_entry(0, slot, 0, 0, HPTE_V_VALID, 0,
&dummy1, &dummy2);
spin_unlock_irqrestore(&beat_htab_lock, flags);
raw_spin_unlock_irqrestore(&beat_htab_lock, flags);

BUG_ON(lpar_rc != 0);
}
Expand Down

0 comments on commit b53a0c8

Please sign in to comment.