From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Hogan Subject: Re: [PATCH v3 2/2] MIPS: io: add a barrier after register read in readX() Date: Thu, 12 Apr 2018 22:58:55 +0100 Message-ID: <20180412215855.GB27802@saruman> References: <1522760109-16497-1-git-send-email-okaya@codeaurora.org> <1522760109-16497-2-git-send-email-okaya@codeaurora.org> <20180412215149.GA27802@saruman> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="z6Eq5LdranGa6ru8" Return-path: Content-Disposition: inline In-Reply-To: <20180412215149.GA27802@saruman> Sender: linux-kernel-owner@vger.kernel.org To: Sinan Kaya Cc: linux-mips@linux-mips.org, arnd@arndb.de, timur@codeaurora.org, sulrich@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ralf Baechle , Paul Burton , linux-kernel@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org --z6Eq5LdranGa6ru8 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 12, 2018 at 10:51:49PM +0100, James Hogan wrote: > On Tue, Apr 03, 2018 at 08:55:04AM -0400, Sinan Kaya wrote: > > While a barrier is present in writeX() function before the register wri= te, > > a similar barrier is missing in the readX() function after the register > > read. This could allow memory accesses following readX() to observe > > stale data. > >=20 > > Signed-off-by: Sinan Kaya > > Reported-by: Arnd Bergmann >=20 > Both patches look like obvious improvements to me, so I'm happy to apply > to my fixes branch. Though having said that, a comment to go with the rmb() (as suggested by checkpatch) to detail the situation we're concerned about would be nice to have. Cheers James --z6Eq5LdranGa6ru8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEd80NauSabkiESfLYbAtpk944dnoFAlrP1p8ACgkQbAtpk944 dnpJyxAAstKXPj/zy7GXQYwhwrZE/0uBT5rfc6zSDKgjqCN4L9GzQ5vsKpg5BZd4 autxPPEiuq+GeAfalW5rIlHOZikjLwrmiV0m5i4YE+PRxlc5uMjzCQKgb41FMFkd BKuX+bT0bxUZ8Om5JrLzYGouIp2hocYiqXideYavBU+4Lm3398knuEWURT3gMvpD r1sCgr7xJFAJL0dqkV9ePwM3WV6xyvTSZ8oFZ3r7Hqtg5rLwpmOGxxZmjGEeGT82 5jy6zbIJr2J7KelJdmgUkDZ+c+xhoQ10Cop737YXBDeLOO8y6isbigT5JXJrE3Xw 2TVpfA/S/e5l+nhyoTvWxCsoo1FsAaX+gPigBBq36MYlVlV7MfgnCjmkC+NzpvKi xjgP5fH6GWP+S3rYY/sULJY2afnhqqk3Nu8soI4ilNpp5GccHZYu3ZLWTYG0x3Ag B34iQMJphD1MDQqny54Zrz1uVaEkBfHClNXkhGO9d7SotAsXFO930jnvqEVbSLU+ picWBzRyh+wTvqe+N4Rvg94dEsZP0Oh0k0xhNZSN6cALDy4dh6bdbzlYG0Ff0Hl5 JsJj6TQiUlAf473/RrpeFy/2po0DUT69txdhv3vLJYmO5ZGXVuf2qHnFh4SafffB 1O+QpxB7kj1iEmQeLn8154GbRBurKTAIVWT2H0JETzBFSMDls1Y= =HuHl -----END PGP SIGNATURE----- --z6Eq5LdranGa6ru8-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: jhogan@kernel.org (James Hogan) Date: Thu, 12 Apr 2018 22:58:55 +0100 Subject: [PATCH v3 2/2] MIPS: io: add a barrier after register read in readX() In-Reply-To: <20180412215149.GA27802@saruman> References: <1522760109-16497-1-git-send-email-okaya@codeaurora.org> <1522760109-16497-2-git-send-email-okaya@codeaurora.org> <20180412215149.GA27802@saruman> Message-ID: <20180412215855.GB27802@saruman> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Apr 12, 2018 at 10:51:49PM +0100, James Hogan wrote: > On Tue, Apr 03, 2018 at 08:55:04AM -0400, Sinan Kaya wrote: > > While a barrier is present in writeX() function before the register write, > > a similar barrier is missing in the readX() function after the register > > read. This could allow memory accesses following readX() to observe > > stale data. > > > > Signed-off-by: Sinan Kaya > > Reported-by: Arnd Bergmann > > Both patches look like obvious improvements to me, so I'm happy to apply > to my fixes branch. Though having said that, a comment to go with the rmb() (as suggested by checkpatch) to detail the situation we're concerned about would be nice to have. Cheers James -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: Digital signature URL: