Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1393700

Re: [RESEND PATCH v2 04/13] eeprom: at24: make locking more fine-grained

From Bartosz Golaszewski <bgolaszewski@baylibre.com>
Newsgroups linux.kernel
Subject Re: [RESEND PATCH v2 04/13] eeprom: at24: make locking more fine-grained
Date 2016-05-03 20:00 +0200
Message-ID <ruMM3-41x-41@gated-at.bofh.it> (permalink)
References <rmPe2-21s-15@gated-at.bofh.it> <rmPnI-2oc-25@gated-at.bofh.it> <roFtU-14z-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2016-04-16 22:56 GMT+02:00 Wolfram Sang <wsa@the-dreams.de>:
> On Mon, Apr 11, 2016 at 11:57:20AM -0700, Bartosz Golaszewski wrote:
>> The only field in struct at24_data that needs locking in the module
>> code is u8 *writebuf. Other data is already protected by i2c core.
>>
>> Rename the lock in at24_data to wrbuf_lock and only use it where
>> writebuf is accessed.
>>
>> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>
> Did you run some tests to verify our assumption?
>

Hi Wolfram,

I had done concurrent read/write tests on a chip using i2c operations,
but I carried this patch over from before porting at24 to nvmem. I
didn't notice previously, but currently all read/write operations are
protected by the regmap lock in regmap_raw_write()/read().

There's no need for any locking in the driver anymore. I'll remove the
mutex altogether in the next version of the patchset.

Speaking of which: I don't think I'll find the time to complete the
driver rework before the next merge window. Would you mind picking up
patches [2/13] & [3/13] for 4.7?

Best regards,
Bartosz Golaszewski

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [RESEND PATCH v2 04/13] eeprom: at24: make locking more fine-grained Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-05-03 20:00 +0200

csiph-web