aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-02-17 21:22:47 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-02-18 22:52:31 -0500
commit7cc8a5e3f52c146d46d286f3778b09181639dc61 (patch)
tree2e3ca79d7be3129f4d8ef44eac4c0daf5aee118c /arch/powerpc/platforms
parent3d3726282850761938078cd2013435eeeb2d0375 (diff)
powerpc: Convert beat_htab_lock to raw_spinlock
beat_htab_lock needs to be a real spinlock in RT. Convert it to raw_spinlock. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/cell/beat_htab.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/powerpc/platforms/cell/beat_htab.c b/arch/powerpc/platforms/cell/beat_htab.c
index 35b1ec492715..2516c1cf8467 100644
--- a/arch/powerpc/platforms/cell/beat_htab.c
+++ b/arch/powerpc/platforms/cell/beat_htab.c
@@ -40,7 +40,7 @@
40#define DBG_LOW(fmt...) do { } while (0) 40#define DBG_LOW(fmt...) do { } while (0)
41#endif 41#endif
42 42
43static DEFINE_SPINLOCK(beat_htab_lock); 43static DEFINE_RAW_SPINLOCK(beat_htab_lock);
44 44
45static inline unsigned int beat_read_mask(unsigned hpte_group) 45static inline unsigned int beat_read_mask(unsigned hpte_group)
46{ 46{
@@ -114,18 +114,18 @@ static long beat_lpar_hpte_insert(unsigned long hpte_group,
114 if (rflags & _PAGE_NO_CACHE) 114 if (rflags & _PAGE_NO_CACHE)
115 hpte_r &= ~_PAGE_COHERENT; 115 hpte_r &= ~_PAGE_COHERENT;
116 116
117 spin_lock(&beat_htab_lock); 117 raw_spin_lock(&beat_htab_lock);
118 lpar_rc = beat_read_mask(hpte_group); 118 lpar_rc = beat_read_mask(hpte_group);
119 if (lpar_rc == 0) { 119 if (lpar_rc == 0) {
120 if (!(vflags & HPTE_V_BOLTED)) 120 if (!(vflags & HPTE_V_BOLTED))
121 DBG_LOW(" full\n"); 121 DBG_LOW(" full\n");
122 spin_unlock(&beat_htab_lock); 122 raw_spin_unlock(&beat_htab_lock);
123 return -1; 123 return -1;
124 } 124 }
125 125
126 lpar_rc = beat_insert_htab_entry(0, hpte_group, lpar_rc << 48, 126 lpar_rc = beat_insert_htab_entry(0, hpte_group, lpar_rc << 48,
127 hpte_v, hpte_r, &slot); 127 hpte_v, hpte_r, &slot);
128 spin_unlock(&beat_htab_lock); 128 raw_spin_unlock(&beat_htab_lock);
129 129
130 /* 130 /*
131 * Since we try and ioremap PHBs we don't own, the pte insert 131 * Since we try and ioremap PHBs we don't own, the pte insert
@@ -198,17 +198,17 @@ static long beat_lpar_hpte_updatepp(unsigned long slot,
198 "avpnv=%016lx, slot=%016lx, psize: %d, newpp %016lx ... ", 198 "avpnv=%016lx, slot=%016lx, psize: %d, newpp %016lx ... ",
199 want_v & HPTE_V_AVPN, slot, psize, newpp); 199 want_v & HPTE_V_AVPN, slot, psize, newpp);
200 200
201 spin_lock(&beat_htab_lock); 201 raw_spin_lock(&beat_htab_lock);
202 dummy0 = beat_lpar_hpte_getword0(slot); 202 dummy0 = beat_lpar_hpte_getword0(slot);
203 if ((dummy0 & ~0x7FUL) != (want_v & ~0x7FUL)) { 203 if ((dummy0 & ~0x7FUL) != (want_v & ~0x7FUL)) {
204 DBG_LOW("not found !\n"); 204 DBG_LOW("not found !\n");
205 spin_unlock(&beat_htab_lock); 205 raw_spin_unlock(&beat_htab_lock);
206 return -1; 206 return -1;
207 } 207 }
208 208
209 lpar_rc = beat_write_htab_entry(0, slot, 0, newpp, 0, 7, &dummy0, 209 lpar_rc = beat_write_htab_entry(0, slot, 0, newpp, 0, 7, &dummy0,
210 &dummy1); 210 &dummy1);
211 spin_unlock(&beat_htab_lock); 211 raw_spin_unlock(&beat_htab_lock);
212 if (lpar_rc != 0 || dummy0 == 0) { 212 if (lpar_rc != 0 || dummy0 == 0) {
213 DBG_LOW("not found !\n"); 213 DBG_LOW("not found !\n");
214 return -1; 214 return -1;
@@ -262,13 +262,13 @@ static void beat_lpar_hpte_updateboltedpp(unsigned long newpp,
262 vsid = get_kernel_vsid(ea, MMU_SEGSIZE_256M); 262 vsid = get_kernel_vsid(ea, MMU_SEGSIZE_256M);
263 va = (vsid << 28) | (ea & 0x0fffffff); 263 va = (vsid << 28) | (ea & 0x0fffffff);
264 264
265 spin_lock(&beat_htab_lock); 265 raw_spin_lock(&beat_htab_lock);
266 slot = beat_lpar_hpte_find(va, psize); 266 slot = beat_lpar_hpte_find(va, psize);
267 BUG_ON(slot == -1); 267 BUG_ON(slot == -1);
268 268
269 lpar_rc = beat_write_htab_entry(0, slot, 0, newpp, 0, 7, 269 lpar_rc = beat_write_htab_entry(0, slot, 0, newpp, 0, 7,
270 &dummy0, &dummy1); 270 &dummy0, &dummy1);
271 spin_unlock(&beat_htab_lock); 271 raw_spin_unlock(&beat_htab_lock);
272 272
273 BUG_ON(lpar_rc != 0); 273 BUG_ON(lpar_rc != 0);
274} 274}
@@ -285,18 +285,18 @@ static void beat_lpar_hpte_invalidate(unsigned long slot, unsigned long va,
285 slot, va, psize, local); 285 slot, va, psize, local);
286 want_v = hpte_encode_v(va, psize, MMU_SEGSIZE_256M); 286 want_v = hpte_encode_v(va, psize, MMU_SEGSIZE_256M);
287 287
288 spin_lock_irqsave(&beat_htab_lock, flags); 288 raw_spin_lock_irqsave(&beat_htab_lock, flags);
289 dummy1 = beat_lpar_hpte_getword0(slot); 289 dummy1 = beat_lpar_hpte_getword0(slot);
290 290
291 if ((dummy1 & ~0x7FUL) != (want_v & ~0x7FUL)) { 291 if ((dummy1 & ~0x7FUL) != (want_v & ~0x7FUL)) {
292 DBG_LOW("not found !\n"); 292 DBG_LOW("not found !\n");
293 spin_unlock_irqrestore(&beat_htab_lock, flags); 293 raw_spin_unlock_irqrestore(&beat_htab_lock, flags);
294 return; 294 return;
295 } 295 }
296 296
297 lpar_rc = beat_write_htab_entry(0, slot, 0, 0, HPTE_V_VALID, 0, 297 lpar_rc = beat_write_htab_entry(0, slot, 0, 0, HPTE_V_VALID, 0,
298 &dummy1, &dummy2); 298 &dummy1, &dummy2);
299 spin_unlock_irqrestore(&beat_htab_lock, flags); 299 raw_spin_unlock_irqrestore(&beat_htab_lock, flags);
300 300
301 BUG_ON(lpar_rc != 0); 301 BUG_ON(lpar_rc != 0);
302} 302}