diff options
author | Kumar Sanghvi <Kumar.Sanghvi@stericsson.com> | 2010-03-24 19:32:43 +0530 |
---|---|---|
committer | John Rigby <john.rigby@linaro.org> | 2010-09-02 22:44:49 -0600 |
commit | c2a79b595b9aac2a3d31f672ea9607770024d8a1 (patch) | |
tree | d6dc56cf5cba4224bcae4a8e429af2b1ba807db6 /arch/arm | |
parent | 3cace697fa0583e9acafcdfbb46b8d9fe3a97759 (diff) |
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')
-rwxr-xr-x | arch/arm/mach-ux500/prcmu-fw.c | 18 |
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; } |