From: Matt Redfearn <matt.redfearn@mips.com>
To: NeilBrown <neil@brown.name>, John Crispin <john@phrozen.org>,
Ralf Baechle <ralf@linux-mips.org>,
James Hogan <jhogan@kernel.org>
Cc: <linux-mips@linux-mips.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] MIPS: ralink: fix booting on mt7621
Date: Wed, 21 Mar 2018 08:51:58 +0000 [thread overview]
Message-ID: <a27180db-4fcf-7b6d-2cac-03aab25a71a6@mips.com> (raw)
In-Reply-To: <874lla874z.fsf@notabene.neil.brown.name>
Hi Neil,
On 21/03/18 03:00, NeilBrown wrote:
> On Tue, Mar 20 2018, Matt Redfearn wrote:
>
>> Hi Neil,
>>
>>
>> On 20/03/18 08:22, NeilBrown wrote:
>>>
>>> Further testing showed that the original version of this
>>> patch wasn't 100% reliable. Very occasionally the read
>>> of SYSC_REG_CHIP_NAME0 returns garbage. Repeating the
>>> read seems to be reliable, but it hasn't happened enough
>>> for me to be completely confident.
>>> So this version repeats that first read.
>>
>> You almost certainly need a sync() to ensure that the write to gcr_reg0
>> has completed before attempting to read sysc + SYSC_REG_CHIP_NAME0.
>
> That sound like exactly the right sort of thing to do, though
> I assume you mean __sync().
Indeed I did :-)
>
> I tried to reproduce the problem so I could test the fix, and of course
> I failed. Over 700 reboot cycles and never read any garbage from
> SYSC_REG_CHIP_NAME0.
Funny how things conspire like that :-) __sync() is definitely the
correct barrier required to ensure the write completes before the read
begins and will guarantee that the memory operations are ordered.
Thanks,
Matt
>
> So I cannot test that this works, but I have tested that it doesn't
> cause any obvious regression.
> I'll send the v3 patch separately.
>
> Thanks a lot,
> NeilBrown
>
next prev parent reply other threads:[~2018-03-21 8:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-20 4:00 [PATCH] " NeilBrown
2018-03-20 8:22 ` [PATCH v2] " NeilBrown
2018-03-20 11:01 ` Matt Redfearn
2018-03-21 3:00 ` NeilBrown
2018-03-21 8:51 ` Matt Redfearn [this message]
2018-03-21 3:02 ` [PATCH v3] " NeilBrown
2018-03-21 8:52 ` Matt Redfearn
2018-03-22 0:11 ` James Hogan
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=a27180db-4fcf-7b6d-2cac-03aab25a71a6@mips.com \
--to=matt.redfearn@mips.com \
--cc=jhogan@kernel.org \
--cc=john@phrozen.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=neil@brown.name \
--cc=ralf@linux-mips.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
all inboxes | Powered by JetHome®