[Intel-gfx] [PATCH v5 5/6] i2c: designware-baytrail: Fix race when resetting the semaphore
jarkko.nikula at linux.intel.com
Tue Jan 10 13:16:22 UTC 2017
On 01/02/2017 12:06 PM, Andy Shevchenko wrote:
> On Mon, 2017-01-02 at 10:55 +0100, Hans de Goede wrote:
>> On 02-01-17 10:36, Andy Shevchenko wrote:
>>> On Sun, 2017-01-01 at 21:15 +0100, Hans de Goede wrote:
>>>> Use iosf_mbi_modify instead of iosf_mbi_read + iosf_mbi_write so
>>>> we keep the iosf_mbi_lock locked during the read-modify-write done
>>>> reset the semaphore.
>>> While patch itself looks good to me, I think it reduces a
>>> probability to
>>> race and doesn't eliminate an issue completely.
>> All accesses through this register are done through the
>> iosf_mbi_ helpers, and the modify helper holds the
>> iosf_mbi_lock during the entire read-modify-wrtie cycle,
>> so I don't see how there can still be any issue left.
> Ah, seems you are right.
> Reviewed-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula at linux.intel.com>
More information about the Intel-gfx