Re: [PATCH 01/23] ARM: OMAP2+: clock: move clock provider infrastructure to clock driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Tomi Valkeinen <tomi.valkeinen@xxxxxx> [150127 03:37]:
> On 26/01/15 17:49, Tony Lindgren wrote:
> 
> >> I'm not sure if I miss something, but regmap_write does not protect from
> >> problems if there are multiple users for the same registers. You need to
> >> use regmap_update_bits() to get a protected read/write sequence, in
> >> which you can change only the bits that you want to change.
> > 
> > To me it seems that issue can be fixed by making all the code use regmap.
> > AFAIK that should work for the legacy code too.
> 
> Even if everybody uses regmap, doing
> 
> v = regmap_read()
> modify v
> regmap_write(v)
> 
> is racy. regmap_update_bits() has to be used to protect the read/write
> sequence. Which may be somewhat challenging at times with some strange
> registers, the like Roger Q encountered recently related to CAN.

Yeah that's a good point.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux