# Re: \[PATCH 2/3\] syscon: add support for "syscon-smc" compatible

- From: Mark Brown \<broonie@kernel.org\>
- Date: 2021-07-23 16:42:08 
- List: linux-devicetree
- Page: https://ratatoskr.run/linux-devicetree/2021/07/1456121
- Thread: https://ratatoskr.run/linux-devicetree/2021/07/1455982/t.md

```text
On Fri, Jul 23, 2021 at 06:07:44PM +0200, Arnd Bergmann wrote:

> There is also a problem with locking: In the case that both firmware and
> kernel have to access registers within a syscon area, you may need to
> have a semaphore to protect an atomic sequence of accesses, but since
> the interface only provides a single register load/store, there is no way for
> a kernel driver to serialize against a firmware-internal driver.

The standard solution to this for the read/modify/write case would be to
expose an explicit update_bits() operation (some hardware does this for
concurrency and/or bus bandwidth/latency reasons), though that doesn't
help with larger or multi-register sequences (and to be clear as I've
been saying I don't think we should do this at all).
```

## Attachments

- [signature.asc](https://ratatoskr.run/linux-devicetree/2021/07/1456121/attachment/0) (application/pgp-signature, 488 bytes)
