From: Vinod Koul <vkoul@kernel.org>
To: Richard Fitzgerald <rf@opensource.cirrus.com>
Cc: yung-chuan.liao@linux.intel.com,
pierre-louis.bossart@linux.intel.com,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
patches@opensource.cirrus.com
Subject: Re: [PATCH 1/2] soundwire: bus: Prevent lockdep asserts when stream has multiple buses
Date: Wed, 21 Jun 2023 16:23:49 +0530 [thread overview]
Message-ID: <ZJLWvSRevDmdP/Cy@matsya> (raw)
In-Reply-To: <20230615141208.679011-1-rf@opensource.cirrus.com>
On 15-06-23, 15:12, Richard Fitzgerald wrote:
> Give the bus_lock and msg_lock of each bus a different unique key
> so that it is possible to acquire the locks of multiple buses
> without lockdep asserting a possible deadlock.
>
> Using mutex_init() to initialize a mutex gives all those mutexes
> the same lock class. Lockdep checking treats it as an error to
> attempt to take a mutex while already holding a mutex of the same
> class. This causes a lockdep assert when sdw_acquire_bus_lock()
> attempts to lock multiple buses, and when do_bank_switch() takes
> multiple msg_lock.
Applied both, thanks
--
~Vinod
prev parent reply other threads:[~2023-06-21 10:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-15 14:12 [PATCH 1/2] soundwire: bus: Prevent lockdep asserts when stream has multiple buses Richard Fitzgerald
2023-06-15 14:12 ` [PATCH 2/2] soundwire: stream: Make master_list ordered to prevent deadlocks Richard Fitzgerald
2023-06-15 16:46 ` Pierre-Louis Bossart
2023-06-15 16:31 ` [PATCH 1/2] soundwire: bus: Prevent lockdep asserts when stream has multiple buses Pierre-Louis Bossart
2023-06-21 10:53 ` Vinod Koul [this message]
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=ZJLWvSRevDmdP/Cy@matsya \
--to=vkoul@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=rf@opensource.cirrus.com \
--cc=yung-chuan.liao@linux.intel.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