All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod <vkoul@kernel.org>
To: Yu Zhao <yuzhao@google.com>
Cc: Takashi Iwai <tiwai@suse.de>, Mark Brown <broonie@kernel.org>,
	alsa-devel@alsa-project.org,
	Rakesh Ughreja <rakesh.a.ughreja@intel.com>,
	Jaroslav Kysela <perex@perex.cz>,
	linux-kernel@vger.kernel.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>
Subject: Re: [PATCH 2/3] sound: enable interrupt after dma buffer initialization
Date: Wed, 12 Sep 2018 09:34:56 +0530	[thread overview]
Message-ID: <20180912040456.GD2766@vkoul-mobl> (raw)
In-Reply-To: <20180911205825.GB18086@google.com>

On 11-09-18, 14:58, Yu Zhao wrote:
> On Tue, Sep 11, 2018 at 08:06:49AM +0200, Takashi Iwai wrote:
> > On Mon, 10 Sep 2018 23:21:50 +0200,
> > Yu Zhao wrote:
> > > 
> > > In snd_hdac_bus_init_chip(), we enable interrupt before
> > > snd_hdac_bus_init_cmd_io() initializing dma buffers. If irq has
> > > been acquired and irq handler uses the dma buffer, kernel may crash
> > > when interrupt comes in.
> > > 
> > > Fix the problem by postponing enabling irq after dma buffer
> > > initialization. And warn once on null dma buffer pointer during the
> > > initialization.
> > > 
> > > Signed-off-by: Yu Zhao <yuzhao@google.com>
> > 
> > Looks good to me.
> > 
> > Reviewed-by: Takashi Iwai <tiwai@suse.de>
> > 
> > 
> > BTW, the reason why this hasn't been hit on the legacy HD-audio driver
> > is that we allocate usually with MSI, so the irq is isolated.
> > 
> > Any reason that Intel SKL driver doesn't use MST?
> 
> This I'm not sure. Vinod might have answer to it, according to
> https://patchwork.kernel.org/patch/6375831/#13796611

IIRC (seemed quite some time back) we faced issues with using MSI on SKL
and didnt try afterwards. If Intel folks can try it and check. Pierre is
out, maybe Liam can help..?

-- 
~Vinod

  reply	other threads:[~2018-09-12  4:05 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-10 21:17 [PATCH 1/3] Revert "ASoC: Intel: Skylake: Acquire irq after RIRB allocation" Yu Zhao
2018-09-10 21:21 ` [PATCH 2/3] sound: enable interrupt after dma buffer initialization Yu Zhao
2018-09-10 21:23   ` [PATCH 3/3] sound: don't call skl_init_chip() to reset intel skl soc Yu Zhao
2018-09-11  6:17     ` Takashi Iwai
2018-09-11  6:17       ` Takashi Iwai
2018-09-11  6:06   ` [PATCH 2/3] sound: enable interrupt after dma buffer initialization Takashi Iwai
2018-09-11  6:06     ` Takashi Iwai
2018-09-11 20:58     ` Yu Zhao
2018-09-12  4:04       ` Vinod [this message]
2018-09-11  6:03 ` [PATCH 1/3] Revert "ASoC: Intel: Skylake: Acquire irq after RIRB allocation" Takashi Iwai
2018-09-11  6:03   ` Takashi Iwai
2018-09-11 16:36   ` Mark Brown
2018-09-11 16:36     ` Mark Brown
2018-09-11 20:44     ` Yu Zhao
2018-09-11 21:12 ` [PATCH v2 " Yu Zhao
2018-09-11 21:14   ` [PATCH v2 2/3] sound: enable interrupt after dma buffer initialization Yu Zhao
2018-09-11 21:15     ` [PATCH v2 3/3] sound: don't call skl_init_chip() to reset intel skl soc Yu Zhao
2018-09-12 10:20   ` [PATCH v2 1/3] Revert "ASoC: Intel: Skylake: Acquire irq after RIRB allocation" Mark Brown
2018-09-12 10:20     ` Mark Brown
2018-09-12 19:32     ` Yu Zhao
2018-09-13 11:31       ` Mark Brown
2018-09-13 11:31         ` Mark Brown
2018-09-12 19:43   ` [PATCH v3 1/3] ASoC: " Yu Zhao
2018-09-12 19:44     ` [PATCH v3 2/3] ASoC: enable interrupt after dma buffer initialization Yu Zhao
2018-09-12 19:45       ` [PATCH v3 3/3] ASoC: don't call skl_init_chip() to reset intel skl soc Yu Zhao
2018-09-13 11:31       ` [PATCH v3 2/3] ASoC: enable interrupt after dma buffer initialization Mark Brown
2018-09-13 11:31         ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180912040456.GD2766@vkoul-mobl \
    --to=vkoul@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=rakesh.a.ughreja@intel.com \
    --cc=tiwai@suse.de \
    --cc=yuzhao@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.