aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorTrusted Logic <smc_support@trusted-logic.com>2011-09-23 13:14:00 -0700
committerDan Murphy <dmurphy@ti.com>2011-10-12 08:07:02 -0500
commitcd9bf944a5a45a22f5cf39e3086c992ea7626ebc (patch)
tree9a18e253e3faf74c344ac94a4aa9cb619e7d029d /security
parent42b184990676ff8076da845475ba18d7bad39d40 (diff)
downloadkernel_samsung_espresso10-cd9bf944a5a45a22f5cf39e3086c992ea7626ebc.zip
kernel_samsung_espresso10-cd9bf944a5a45a22f5cf39e3086c992ea7626ebc.tar.gz
kernel_samsung_espresso10-cd9bf944a5a45a22f5cf39e3086c992ea7626ebc.tar.bz2
OMAP4: SMC: Correct a spinlock during rpc_execute
Change-Id: Ia87a536468a57256fb24de60e3782142825bd6aa Signed-off-by: Gonzalo Alexandre <alexandre.gonzalo@trusted-logic.com> Signed-off-by: Trusted Logic <smc_support@trusted-logic.com> Signed-off-by: Bryan Buckley <bryan.buckley@ti.com>
Diffstat (limited to 'security')
-rw-r--r--security/smc/tf_comm_mshield.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/security/smc/tf_comm_mshield.c b/security/smc/tf_comm_mshield.c
index b148e6c..c36473e 100644
--- a/security/smc/tf_comm_mshield.c
+++ b/security/smc/tf_comm_mshield.c
@@ -471,9 +471,11 @@ int tf_rpc_execute(struct tf_comm *comm)
* L4 SEC Clock domain handling
*-------------------------------------------------------------------------- */
+static DEFINE_SPINLOCK(clk_lock);
void tf_l4sec_clkdm_wakeup(bool wakelock)
{
- spin_lock(&tf_get_device()->sm.lock);
+ unsigned long flags;
+ spin_lock_irqsave(&clk_lock, flags);
#ifdef CONFIG_HAS_WAKELOCK
if (wakelock) {
tf_wake_lock_count++;
@@ -482,7 +484,7 @@ void tf_l4sec_clkdm_wakeup(bool wakelock)
#endif
smc_l4_sec_clkdm_use_count++;
clkdm_wakeup(smc_l4_sec_clkdm);
- spin_unlock(&tf_get_device()->sm.lock);
+ spin_unlock_irqrestore(&clk_lock, flags);
}
void tf_l4sec_clkdm_allow_idle(bool wakeunlock)
@@ -499,7 +501,7 @@ void tf_l4sec_clkdm_allow_idle(bool wakeunlock)
wake_unlock(&g_tf_wake_lock);
}
#endif
- spin_unlock(&tf_get_device()->sm.lock);
+ spin_unlock_irqrestore(&clk_lock, flags);
}
/*--------------------------------------------------------------------------