[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a56eac7a-fd97-b371-c426-524c71abeb1d@linux.intel.com>
Date: Thu, 24 Feb 2022 15:01:27 +0200
From: Jarkko Nikula <jarkko.nikula@...ux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Jan Dabros <jsd@...ihalf.com>
Cc: linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org,
wsa@...nel.org, rrangel@...omium.org, upstream@...ihalf.com,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH -next] i2c: designware: Fix improper usage of readl
On 2/23/22 17:07, Andy Shevchenko wrote:
> On Fri, Feb 18, 2022 at 02:33:48PM +0100, Jan Dabros wrote:
>> Kernel test robot reported incorrect type in argument 1 of readl(), but
>> more importantly it brought attention that MMIO accessor shouldn't be
>> used in this case, since req->hdr.status is part of a command-response
>> buffer in system memory.
>>
>> Since its value may be altered by PSP outside of the scope of current
>> thread (somehow similar to IRQ handler case), we need to use
>> READ_ONCE() to ensure compiler won't optimize this call.
>>
>> Fix also 'status' variable type to reflect that corresponding field in
>> command-response buffer is platform-independent u32.
>
> Thanks for the fix, seems reasonable to me.
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
>
Acked-by: Jarkko Nikula <jarkko.nikula@...ux.intel.com>
Powered by blists - more mailing lists