Re: [PATCH 47/50] staging: omap-thermal: switch mutex to spinlockinside omap-bandgap
From: Dan Carpenter
Date: Sat Mar 16 2013 - 10:22:38 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/