Messages in this thread | | | Date | Sat, 16 Mar 2013 17:22:16 +0300 | From | Dan Carpenter <> | Subject | Re: [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
| |