[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MN2PR19MB3693F52C3C40843C9D11667AB1579@MN2PR19MB3693.namprd19.prod.outlook.com>
Date: Thu, 29 Sep 2022 05:37:12 +0000
From: Rahul Tanwar <rtanwar@...linear.com>
To: Stephen Boyd <sboyd@...nel.org>,
"linux-clk@...r.kernel.org" <linux-clk@...r.kernel.org>,
"mturquette@...libre.com" <mturquette@...libre.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linux-lgm-soc <linux-lgm-soc@...linear.com>,
Yi xin Zhu <yzhu@...linear.com>
Subject: Re: [PATCH RESEND v2 2/5] clk: mxl: Remove unnecessary spinlocks
On 29/9/2022 8:16 am, Stephen Boyd wrote:
> This email was sent from outside of MaxLinear.
>
>
> Quoting Rahul Tanwar (2022-09-21 23:24:25)
>> This driver is now switched from direct readl/writel based register
>> access to regmap based register acceess. Regmap already has its own
>> lock to serialize the register accesses across multiple cores.
>>
>> Hence, there is no need for additional spinlocks in the driver.
>> Remove all spinlocks which are no longer required.
>
> Can you confirm that the driver doesn't do a read, modify, write (rmw)
> sequence where during the modification another CPU can rmw and corrupt
> the previous "read"?
For rmw, driver uses regmap_update_bits() API. All regmap API's use
their own spinlocks before doing any read or write or rmw.
Patch 1/5 switches from direct readl/writel to regmap based API's for
register read/write/rmw in which case additional driver spinlock becomes
redundant. So this patch 2/5 removes redundant driver spin locks.
Thanks,
Rahul
>
>
Powered by blists - more mailing lists