lkml.org 
[lkml]   [2013]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 47/50] staging: omap-thermal: switch mutex to spinlock inside omap-bandgap
On Sat, Mar 16, 2013 at 08:41:30AM -0400, Eduardo Valentin wrote:
> On 16-03-2013 04:59, Dan Carpenter wrote:
> >On Fri, Mar 15, 2013 at 09:00:35AM -0400, Eduardo Valentin wrote:
> >>@@ -502,9 +504,9 @@ int _omap_bandgap_write_threshold(struct omap_bandgap *bg_ptr, int id, int val,
> >> if (ret < 0)
> >> goto exit;
> >>
> >>- mutex_lock(&bg_ptr->bg_mutex);
> >>+ spin_lock(&bg_ptr->lock);
> >
> >These need to disable interrupts because we take the spin lock in
> >the IRQ handler.
>
> This IRQ gets masked at the IRQ controller level when served
> (ONE_SHOT). Not sure if your comment is applicable in this case..

Yes. It still applies. We need to disable IRQs from the current
CPU while we are holding a spin_lock which they will need.

regards,
dan carpenter



\
 
 \ /
  Last update: 2013-03-16 15:41    [W:0.246 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site