[alsa-devel] [PATCH v4 5/7] ASoC: intel - add Skylake HDA audio driver

Takashi Iwai tiwai at suse.de
Tue Jun 2 12:48:50 CEST 2015


At Tue, 2 Jun 2015 11:42:33 +0100,
Mark Brown wrote:
> 
> On Mon, Jun 01, 2015 at 07:32:14AM +0200, Takashi Iwai wrote:
> > Vinod Koul wrote:
> 
> > > > > +	ret = request_threaded_irq(hda->pci->irq, azx_interrupt,
> > > > > +			azx_threaded_handler,
> > > > > +			hda->msi ? 0 : IRQF_SHARED,
> > > > > +			KBUILD_MODNAME, sbus);
> 
> > > > Why not just always request the interrupt as shared - we don't seem to
> > > > care in the interrupt handling code?
> 
> > > I think we can move this to shared only
> 
> > MSI is the exclusive irq, thus shouldn't be shared.
> 
> Why does the driver care though?  IRQF_SHARED is advertising the
> capabilities of the hander, not a requirement on the hardware - if the
> interrupt physically can't be shared then the ability to share it will
> never get used but that shouldn't matter.

Because the kernel doesn't guarantee the exclusiveness of irq handler
registration as long as you pass IRQF_SHARED.  That is, if we keep
IRQF_SHARED and another driver tries to request_irq() for the same irq
with again IRQF_SHARED.  But this shouldn't happen with MSI.


Takashi


More information about the Alsa-devel mailing list