Re: [PATCH v16 10/12] OMAP: dmtimer: extend spinlock in request functions

2011-09-22 Thread DebBarma, Tarun Kanti
On Thu, Sep 22, 2011 at 6:12 AM, Tony Lindgren t...@atomide.com wrote:
 * Tarun Kanti DebBarma tarun.ka...@ti.com [110920 03:57]:
 The request functions now verify the success of omap_dm_timer_prepare() call
 after a timer is acquired. If *_prepare() fails then we have to release the
 timer. In order to avoid race condition during this time, include *_prepare()
 within lock.

 This I've folded into patch 5.
That should be fine.
--
Tarun

 Tony

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v16 10/12] OMAP: dmtimer: extend spinlock in request functions

2011-09-21 Thread Tony Lindgren
* Tarun Kanti DebBarma tarun.ka...@ti.com [110920 03:57]:
 The request functions now verify the success of omap_dm_timer_prepare() call
 after a timer is acquired. If *_prepare() fails then we have to release the
 timer. In order to avoid race condition during this time, include *_prepare()
 within lock.

This I've folded into patch 5.

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v16 10/12] OMAP: dmtimer: extend spinlock in request functions

2011-09-20 Thread Tarun Kanti DebBarma
The request functions now verify the success of omap_dm_timer_prepare() call
after a timer is acquired. If *_prepare() fails then we have to release the
timer. In order to avoid race condition during this time, include *_prepare()
within lock.

Signed-off-by: Tarun Kanti DebBarma tarun.ka...@ti.com
Reviewed-by: Santosh Shilimkar santosh.shilim...@ti.com
---
 arch/arm/plat-omap/dmtimer.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index f549c63..631b6af 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -166,7 +166,6 @@ struct omap_dm_timer *omap_dm_timer_request(void)
timer-reserved = 1;
break;
}
-   spin_unlock_irqrestore(dm_timer_lock, flags);
 
if (timer) {
ret = omap_dm_timer_prepare(timer);
@@ -175,6 +174,7 @@ struct omap_dm_timer *omap_dm_timer_request(void)
timer = NULL;
}
}
+   spin_unlock_irqrestore(dm_timer_lock, flags);
 
if (!timer)
pr_debug(%s: timer request failed!\n, __func__);
@@ -197,7 +197,6 @@ struct omap_dm_timer *omap_dm_timer_request_specific(int id)
break;
}
}
-   spin_unlock_irqrestore(dm_timer_lock, flags);
 
if (timer) {
ret = omap_dm_timer_prepare(timer);
@@ -206,6 +205,7 @@ struct omap_dm_timer *omap_dm_timer_request_specific(int id)
timer = NULL;
}
}
+   spin_unlock_irqrestore(dm_timer_lock, flags);
 
if (!timer)
pr_debug(%s: timer%d request failed!\n, __func__, id);
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html