linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -rt] MIPS: Octeon: convert smp_reserve_lock to raw spinlock
@ 2012-05-17 10:15 Yong Zhang
  2012-05-17 16:30 ` David Daney
  0 siblings, 1 reply; 4+ messages in thread
From: Yong Zhang @ 2012-05-17 10:15 UTC (permalink / raw)
  To: linux-rt-users, linux-kernel; +Cc: ralf, david.daney, tglx

From: Yong Zhang <yong.zhang@windriver.com>

Because __cpu_disable is called in atomic context and spinlock
is a mutex on -rt.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
---
 arch/mips/cavium-octeon/smp.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c
index ef9c34a..473c72b 100644
--- a/arch/mips/cavium-octeon/smp.c
+++ b/arch/mips/cavium-octeon/smp.c
@@ -257,7 +257,7 @@ DEFINE_PER_CPU(int, cpu_state);
 
 extern void fixup_irqs(void);
 
-static DEFINE_SPINLOCK(smp_reserve_lock);
+static DEFINE_RAW_SPINLOCK(smp_reserve_lock);
 
 static int octeon_cpu_disable(void)
 {
@@ -266,7 +266,7 @@ static int octeon_cpu_disable(void)
 	if (cpu == 0)
 		return -EBUSY;
 
-	spin_lock(&smp_reserve_lock);
+	raw_spin_lock(&smp_reserve_lock);
 
 	set_cpu_online(cpu, false);
 	cpu_clear(cpu, cpu_callin_map);
@@ -277,7 +277,7 @@ static int octeon_cpu_disable(void)
 	flush_cache_all();
 	local_flush_tlb_all();
 
-	spin_unlock(&smp_reserve_lock);
+	raw_spin_unlock(&smp_reserve_lock);
 
 	return 0;
 }
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-18  2:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-17 10:15 [PATCH -rt] MIPS: Octeon: convert smp_reserve_lock to raw spinlock Yong Zhang
2012-05-17 16:30 ` David Daney
2012-05-17 20:50   ` Ralf Baechle
2012-05-18  2:29     ` Yong Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).