aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/prcmu-fw.c
diff options
context:
space:
mode:
authorKumar Sanghvi <Kumar.Sanghvi@stericsson.com>2010-03-24 19:32:43 +0530
committerJohn Rigby <john.rigby@linaro.org>2010-09-02 22:44:49 -0600
commitc2a79b595b9aac2a3d31f672ea9607770024d8a1 (patch)
treed6dc56cf5cba4224bcae4a8e429af2b1ba807db6 /arch/arm/mach-ux500/prcmu-fw.c
parent3cace697fa0583e9acafcdfbb46b8d9fe3a97759 (diff)
downloadlinux-2.6.34-ux500-c2a79b595b9aac2a3d31f672ea9607770024d8a1.tar.gz
PRCMU: Fixing lock-ups resulting due to misplaced spin_unlock(s)
in prcmu_apply_state_transition function Signed-off-by: Kumar Sanghvi <Kumar.Sanghvi@stericsson.com>
Diffstat (limited to 'arch/arm/mach-ux500/prcmu-fw.c')
-rwxr-xr-xarch/arm/mach-ux500/prcmu-fw.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/arm/mach-ux500/prcmu-fw.c b/arch/arm/mach-ux500/prcmu-fw.c
index 025cf5dd204..5c8f7102a6b 100755
--- a/arch/arm/mach-ux500/prcmu-fw.c
+++ b/arch/arm/mach-ux500/prcmu-fw.c
@@ -1083,16 +1083,16 @@ int prcmu_apply_ap_state_transition(enum ap_pwrst_trans_t transition,
*/
if (smp_processor_id()) {
if (!(readl(PRCM_ARM_WFI_STANDBY) & 0x8)) {
+ spin_unlock(&req_mb0_lock);
__asm__ __volatile__(
"dsb\n\t" "wfi\n\t" : : : "memory");
- spin_unlock(&req_mb0_lock);
return 0;
}
} else /* running on CPU0, check for CPU1 WFI standby */ {
if (!(readl(PRCM_ARM_WFI_STANDBY) & 0x10)) {
+ spin_unlock(&req_mb0_lock);
__asm__ __volatile__(
"dsb\n\t" "wfi\n\t" : : : "memory");
- spin_unlock(&req_mb0_lock);
return 0;
}
}
@@ -1108,9 +1108,9 @@ int prcmu_apply_ap_state_transition(enum ap_pwrst_trans_t transition,
*/
if (readl(PRCM_ITSTATUS0) == 0x80) {
printk(KERN_WARNING "PRCM_ITSTATUS0 Not cleared\n");
+ spin_unlock(&req_mb0_lock);
__asm__ __volatile__(
"dsb\n\t" "wfi\n\t" : : : "memory");
- spin_unlock(&req_mb0_lock);
return -EBUSY;
}
@@ -1201,16 +1201,16 @@ int prcmu_apply_ap_state_transition(enum ap_pwrst_trans_t transition,
*/
if (smp_processor_id()) {
if (!(readl(PRCM_ARM_WFI_STANDBY) & 0x8)) {
+ spin_unlock(&req_mb0_lock);
__asm__ __volatile__(
"dsb\n\t" "wfi\n\t" : : : "memory");
- spin_unlock(&req_mb0_lock);
return 0;
}
} else /* running on CPU0, check for CPU1 WFI standby */ {
if (!(readl(PRCM_ARM_WFI_STANDBY) & 0x10)) {
+ spin_unlock(&req_mb0_lock);
__asm__ __volatile__(
"dsb\n\t" "wfi\n\t" : : : "memory");
- spin_unlock(&req_mb0_lock);
return 0;
}
}
@@ -1232,9 +1232,9 @@ int prcmu_apply_ap_state_transition(enum ap_pwrst_trans_t transition,
*/
if (readl(PRCM_ITSTATUS0) == 0x80) {
printk(KERN_WARNING "PRCM_ITSTATUS0 Not cleared\n");
+ spin_unlock(&req_mb0_lock);
__asm__ __volatile__(
"dsb\n\t" "wfi\n\t" : : : "memory");
- spin_unlock(&req_mb0_lock);
return -EBUSY;
}
@@ -1287,16 +1287,16 @@ int prcmu_apply_ap_state_transition(enum ap_pwrst_trans_t transition,
*/
if (smp_processor_id()) {
if (!(readl(PRCM_ARM_WFI_STANDBY) & 0x8)) {
+ spin_unlock(&req_mb0_lock);
__asm__ __volatile__(
"dsb\n\t" "wfi\n\t" : : : "memory");
- spin_unlock(&req_mb0_lock);
return 0;
}
} else /* running on CPU0, check for CPU1 WFI standby */ {
if (!(readl(PRCM_ARM_WFI_STANDBY) & 0x10)) {
+ spin_unlock(&req_mb0_lock);
__asm__ __volatile__(
"dsb\n\t" "wfi\n\t" : : : "memory");
- spin_unlock(&req_mb0_lock);
return 0;
}
}
@@ -1312,9 +1312,9 @@ int prcmu_apply_ap_state_transition(enum ap_pwrst_trans_t transition,
*/
if (readl(PRCM_ITSTATUS0) == 0x80) {
printk(KERN_WARNING "PRCM_ITSTATUS0 Not cleared\n");
+ spin_unlock(&req_mb0_lock);
__asm__ __volatile__(
"dsb\n\t" "wfi\n\t" : : : "memory");
- spin_unlock(&req_mb0_lock);
return -EBUSY;
}