From: Yann Sionneau <ysionneau@kalrayinc.com>
To: Wolfram Sang <wsa@kernel.org>,
Jan Bottorff <janb@os.amperecomputing.com>,
Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Jan Dabros <jsd@semihalf.com>, Andi Shyti <andi.shyti@kernel.org>,
linux-i2c@vger.kernel.org
Subject: Re: [PATCH v4] i2c: designware: Fix corrupted memory seen in the ISR
Date: Thu, 16 Nov 2023 10:34:04 +0100 [thread overview]
Message-ID: <30a146e4-bcef-71ce-1753-5ca4a017154e@kalrayinc.com> (raw)
In-Reply-To: <ZVGB0ul4MYIdLaWX@shikoro>
On 11/13/23 02:54, Wolfram Sang wrote:
> On Thu, Nov 09, 2023 at 03:19:27AM +0000, Jan Bottorff wrote:
>> When running on a many core ARM64 server, errors were
>> happening in the ISR that looked like corrupted memory. These
>> corruptions would fix themselves if small delays were inserted
>> in the ISR. Errors reported by the driver included "i2c_designware
>> APMC0D0F:00: i2c_dw_xfer_msg: invalid target address" and
>> "i2c_designware APMC0D0F:00:controller timed out" during
>> in-band IPMI SSIF stress tests.
>>
>> The problem was determined to be memory writes in the driver were not
>> becoming visible to all cores when execution rapidly shifted between
>> cores, like when a register write immediately triggers an ISR.
>> Processors with weak memory ordering, like ARM64, make no
>> guarantees about the order normal memory writes become globally
>> visible, unless barrier instructions are used to control ordering.
>>
>> To solve this, regmap accessor functions configured by this driver
>> were changed to use non-relaxed forms of the low-level register
>> access functions, which include a barrier on platforms that require
>> it. This assures memory writes before a controller register access are
>> visible to all cores. The community concluded defaulting to correct
>> operation outweighed defaulting to the small performance gains from
>> using relaxed access functions. Being a low speed device added weight to
>> this choice of default register access behavior.
>>
>> Signed-off-by: Jan Bottorff <janb@os.amperecomputing.com>
> Applied to for-current, thanks!
>
A bit late but FYI:
Tested-by: Yann Sionneau <ysionneau@kalrayinc.com>
--
Yann
next prev parent reply other threads:[~2023-11-16 9:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-09 3:19 [PATCH v4] i2c: designware: Fix corrupted memory seen in the ISR Jan Bottorff
2023-11-09 18:00 ` Andy Shevchenko
2023-11-10 12:02 ` Jarkko Nikula
2023-11-13 1:54 ` Wolfram Sang
2023-11-16 9:34 ` Yann Sionneau [this message]
2023-11-13 9:48 ` Serge Semin
2023-11-13 9:51 ` Wolfram Sang
2023-11-13 10:01 ` Serge Semin
2023-11-15 18:25 ` Jan Bottorff
2023-11-15 18:52 ` 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=30a146e4-bcef-71ce-1753-5ca4a017154e@kalrayinc.com \
--to=ysionneau@kalrayinc.com \
--cc=andi.shyti@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=janb@os.amperecomputing.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=jsd@semihalf.com \
--cc=linux-i2c@vger.kernel.org \
--cc=mika.westerberg@linux.intel.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