From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758673AbcIHJgA (ORCPT ); Thu, 8 Sep 2016 05:36:00 -0400 Received: from vrout10.yaziba.net ([185.56.204.32]:60355 "EHLO vrout10.yaziba.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758358AbcIHJf7 (ORCPT ); Thu, 8 Sep 2016 05:35:59 -0400 X-Greylist: delayed 1233 seconds by postgrey-1.27 at vger.kernel.org; Thu, 08 Sep 2016 05:35:59 EDT Date: Thu, 8 Sep 2016 11:15:20 +0200 From: Vincent Siles To: Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: lsl / lsr possible confusion in v7_flush_dcache_all Message-ID: <20160908091520.GE14909@vsiles-Desktop> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="a+b56+3nqLzpiR9O" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-DRWEB-SCAN: ok X-VRSPAM-SCORE: 0 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrfeeluddriedvgdduheculddtuddrfeeltddrtddtmdcutefuodetggdotefrucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtuggfsehgtderredtreejnecuhfhrohhmpeggihhntggvnhhtucfuihhlvghsuceovhhinhgtvghnthdrshhilhgvshesphhrohhvvghnrhhunhdrtghomheqnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphepkedvrddvfedtrddukeejrdduieelnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhht X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --a+b56+3nqLzpiR9O Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hi ! While reading the v7_flush_dcache_all (arch/arm/mm/cache-v7.S), I stumbled upon this line: # r10 is the current cache level 127: add r2, r10, r10, lsr #1 @ work out 3x current cache level If we want r2 to be 3 * r10, we should compute r10 + (r10 << 1), which is lsl, not lsr. I check for a recent kernel, the issue seems to still be here: repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git revision: d71f058617564750261b673ea9b3352382b9cde4 Best regards, Vincent Siles --a+b56+3nqLzpiR9O Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJX0SwoAAoJEMXnukaOoP+CvlgIAJ4mDtZoFoPnGjvVULsdRb1m pT4xuBHzgm5lOVNVW6NGMAReSvKQt2As2B4kyY3vesRiE1FKsvCtH4Lk+g2TMsYP MGFjC6xmUwUpZRxwPg9R9Z6wmnhlLYXc8rBNj3059IGkNCHRJlvHIgulybuNm4li AYxAhgYedqZc3Hthcs8pSh/ckKDCMhFrZpFv+QSmZw8Q90xaKEP9U2J/bir1fiA/ IU0dsduTySFummhbuQQJ4HINoDif/hi2SNZ8KZoCDmwodmedHyV8HWZ6RyUg06pW ZCZAbFFSrpEwk3ABWjBCro60iX0bKrTGW6uzNqcc+svbS0bIGKqBmpjZgcpbPA4= =Q8oe -----END PGP SIGNATURE----- --a+b56+3nqLzpiR9O--