[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZJLWvSRevDmdP/Cy@matsya>
Date: Wed, 21 Jun 2023 16:23:49 +0530
From: Vinod Koul <vkoul@...nel.org>
To: Richard Fitzgerald <rf@...nsource.cirrus.com>
Cc: yung-chuan.liao@...ux.intel.com,
pierre-louis.bossart@...ux.intel.com, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org, patches@...nsource.cirrus.com
Subject: Re: [PATCH 1/2] soundwire: bus: Prevent lockdep asserts when stream
has multiple buses
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
Powered by blists - more mailing lists