public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Jan Dabros <jsd@semihalf.com>
Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
	wsa@kernel.org, rrangel@chromium.org, upstream@semihalf.com,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH -next] i2c: designware: Fix improper usage of readl
Date: Thu, 24 Feb 2022 15:01:27 +0200	[thread overview]
Message-ID: <a56eac7a-fd97-b371-c426-524c71abeb1d@linux.intel.com> (raw)
In-Reply-To: <YhZNu0pHKiK9Vf55@smile.fi.intel.com>

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@linux.intel.com>
> 
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

  reply	other threads:[~2022-02-24 13:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-18 13:33 [PATCH -next] i2c: designware: Fix improper usage of readl Jan Dabros
2022-02-23 15:07 ` Andy Shevchenko
2022-02-24 13:01   ` Jarkko Nikula [this message]
2022-03-01 15:15 ` Wolfram Sang
2022-03-01 17:29   ` Jan Dąbroś
2022-03-01 19:29     ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a56eac7a-fd97-b371-c426-524c71abeb1d@linux.intel.com \
    --to=jarkko.nikula@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jsd@semihalf.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=rrangel@chromium.org \
    --cc=upstream@semihalf.com \
    --cc=wsa@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox