Re: [PATCH] i2c: lpi2c: cache peripheral clock rate
From: Sverdlin, Alexander
Date: Thu Mar 09 2023 - 09:59:20 EST
Hi!
On Thu, 2023-03-09 at 15:37 +0100, Alexander Stein wrote:
> From: Alexander Sverdlin <alexander.sverdlin@xxxxxxxxxxx>
> >
> > One of the reasons to do it is to save some CPU cycles on
> > cpu_freq_get()
> > under mutex. The second reason if the (false-positive) lockdep
> > splat caused
> > by the recursive feature of the "prepare_lock" (one clock instance
> > is I2C
> > peripheral clock and another is pcf85063 RTC as clock provider):
> >
> > ======================================================
> > WARNING: possible circular locking dependency detected
> > 5.15.71+... #1 Tainted: G O
>
> Which kernel is this? Mainline or downstream vendor kernel?
found and tested on downstream vendor kernel.
[...]
>
>
> What if the peripheral clock rate changes? I guess a notifier similar
> to
> 90ad2cbe88c2 ("i2c: imx: use clk notifier for rate changes") should
> be added
> as well.
>
Good point! Thank you for the hint!
--
Alexander Sverdlin
Siemens AG
www.siemens.com