[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z0BNug5KZp74t4MA@smile.fi.intel.com>
Date: Fri, 22 Nov 2024 11:24:10 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
Cc: Luca Ceresoli <luca.ceresoli@...tlin.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
Wolfram Sang <wsa@...nel.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Cosmin Tanislav <demonsingur@...il.com>,
Tomi Valkeinen <tomi.valkeinen+renesas@...asonboard.com>
Subject: Re: [PATCH 2/3] i2c: atr: Fix lockdep for nested ATRs
On Fri, Nov 22, 2024 at 09:51:39AM +0200, Tomi Valkeinen wrote:
> From: Tomi Valkeinen <tomi.valkeinen+renesas@...asonboard.com>
>
> When we have an ATR, and another ATR as a subdevice of the first ATR,
> we get lockdep warnings for the i2c_atr.lock and
> i2c_atr_chan.orig_addrs_lock. This is because lockdep uses a static key
> for the locks, and doesn't see the locks of the separate ATR instances
> as separate.
...
> + lockdep_register_key(&atr->lock_key);
> mutex_init(&atr->lock);
> + lockdep_set_class(&atr->lock, &atr->lock_key);
mutext_init_with_key()
...
> + lockdep_register_key(&chan->orig_addrs_lock_key);
> mutex_init(&chan->orig_addrs_lock);
> + lockdep_set_class(&chan->orig_addrs_lock, &chan->orig_addrs_lock_key);
Ditto.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists