mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiada Wang <jiada_wang@mentor.com>
To: Fabrizio Castro <fabrizio.castro@bp.renesas.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	ALSA Development Mailing List <alsa-devel@alsa-project.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH linux-next v2 1/2] ASoC: rsnd: src: Avoid a potential deadlock
Date: Tue, 19 Mar 2019 12:34:56 +0900	[thread overview]
Message-ID: <3f76f14b-b520-a0fa-b354-765a9e60551d@mentor.com> (raw)
In-Reply-To: <TY1PR01MB177056C725F16385A627111EC04A0@TY1PR01MB1770.jpnprd01.prod.outlook.com>

Hi Fabrizio

On 2019/03/14 3:19, Fabrizio Castro wrote:
> Hello Jiada,
> 
>> From: Jiada Wang <jiada_wang@mentor.com>
>> Sent: 13 March 2019 11:56
>> Subject: Re: [PATCH linux-next v2 1/2] ASoC: rsnd: src: Avoid a potential deadlock
>>
>> Hi Geert
>>
>> On 2019/03/12 18:15, Geert Uytterhoeven wrote:
>>> Hi Jiada, Fabrizio,
>>>
>>> On Thu, Mar 7, 2019 at 7:17 AM Jiada Wang <jiada_wang@mentor.com> wrote:
>>>> lockdep warns us that priv->lock and k->k_lock can cause a
>>>> deadlock when after acquire of k->k_lock, process is interrupted
>>>> by src, while in another routine of src .init, k->k_lock is
>>>> acquired with priv->lock held.
>>>>
>>>> This patch avoids a potential deadlock by not calling soc_device_match()
>>>> in SRC .init callback, instead it adds new soc fields in priv->flags to
>>>> differentiate SoCs.
>>>>
>>>> Fixes: linux-next commit 7674bec4fc09 ("ASoC: rsnd: update BSDSR/BSDISR handling")
>>>> Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
>>>> ---
>>>>    sound/soc/sh/rcar/core.c | 2 ++
>>>>    sound/soc/sh/rcar/rsnd.h | 5 +++++
>>>>    sound/soc/sh/rcar/src.c  | 9 +--------
>>>>    3 files changed, 8 insertions(+), 8 deletions(-)
>>>>
>>>> diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
>>>> index 022996d2db13..4fe83e611c01 100644
>>>> --- a/sound/soc/sh/rcar/core.c
>>>> +++ b/sound/soc/sh/rcar/core.c
>>>> @@ -110,6 +110,8 @@ static const struct of_device_id rsnd_of_match[] = {
>>>>           { .compatible = "renesas,rcar_sound-gen1", .data = (void *)RSND_GEN1 },
>>>>           { .compatible = "renesas,rcar_sound-gen2", .data = (void *)RSND_GEN2 },
>>>>           { .compatible = "renesas,rcar_sound-gen3", .data = (void *)RSND_GEN3 },
>>>> +       /* Special Handling */
>>>> +       { .compatible = "renesas,rcar_sound-r8a77990", .data = (void *)(RSND_GEN3 | RSND_SOC_E) },
>>>
>>> I guess we need an entry for RZ/G2E, too?
> 
> Geert has a point, I am looking at the User manual for the RZ/G2E and it looks like the
> implementation for the RZ/G2E is the same as the one for the r8a77990
> 
>>>
>> Sorry, I don't have user manual for RZ/G2E,
>> if you can let me know where to find RZ/G2E's user manual,
>> I can add entry for these SoCs
> 
> If you prefer I could add that after running some tests? I do have a board with a RZ/G2E.
> 
Yes, please
since I have neither RZ/G2E board to test nor its user manual

Thanks,
Jiada
> Thanks,
> Fab
> 
>>
>> Thanks,
>> Jiada
>>> Gr{oetje,eeting}s,
>>>
>>>                           Geert
>>>

  reply	other threads:[~2019-03-19  3:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07  6:15 [PATCH linux-next v2 0/2] misc fix in src.c Jiada Wang
2019-03-07  6:15 ` [PATCH linux-next v2 1/2] ASoC: rsnd: src: Avoid a potential deadlock Jiada Wang
2019-03-11 17:23   ` Applied "ASoC: rsnd: src: Avoid a potential deadlock" to the asoc tree Mark Brown
2019-03-12  9:15   ` [PATCH linux-next v2 1/2] ASoC: rsnd: src: Avoid a potential deadlock Geert Uytterhoeven
2019-03-13 11:55     ` Jiada Wang
2019-03-13 18:19       ` Fabrizio Castro
2019-03-19  3:34         ` Jiada Wang [this message]
2019-03-07  6:15 ` [PATCH linux-next v2 2/2] ASoC: rsnd: src: fix compiler warnings Jiada Wang
2019-03-07  6:20 ` [PATCH linux-next v2 0/2] misc fix in src.c Kuninori Morimoto

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=3f76f14b-b520-a0fa-b354-765a9e60551d@mentor.com \
    --to=jiada_wang@mentor.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=fabrizio.castro@bp.renesas.com \
    --cc=geert@linux-m68k.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®