Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1220186rdb; Wed, 20 Sep 2023 03:13:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGcmJ5x1Kmkb/xihrldwGe5AEEXvxrGkJBd5UR5Vr1ssyciChp0aKJ2i9tzTrrx9iLD+xD1 X-Received: by 2002:a05:6602:2c0a:b0:790:958e:a667 with SMTP id w10-20020a0566022c0a00b00790958ea667mr2617839iov.2.1695204790406; Wed, 20 Sep 2023 03:13:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695204790; cv=none; d=google.com; s=arc-20160816; b=ddiZvumL8IVnkIotdJS7IxHUOzSd1GlfByElliMRGFQKC+P1LK2IIz33qGNprsX/XT k+kElZwpRCBuxXtlJXJps8uAQ/9oRQxSV137TO7Bi+B2mFmqytZU/L/rsapc6HZFdrQF d+p4kpuardMKXp/ekJtQD8SIjfL8VYghonnuXs6BVel+3Ym1B/nXFV2fIFKRbvYjoKSF hfI612mH3p0MRjWzFNDE2yPauDdQoux1Rvcmtt1b9ZtkaLexkQWojlakZ07HB6hvvQUM aeJ6xPCd0wZ3r+c7JnceUUA2xO//68J9s4RI3Us1UswAkiah4NykYNYPrZH6Mqtqfi22 qpNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=KDLFhdb644cHrZOLWzQ8V+K6zX88dn61KX3Sc3RY9p0=; fh=Xy0MyjNA/kgzO1m/QBWzkoA/G38XL7A72HFRPBY+4cg=; b=VDwHrcO1egheysMiH6FhOWwIsKP9l1pGF7/H1ce5xUjfmvAuhdQP0t3j+wZtnuLbGT 49ZBHcOvhaaQNwLngUXJtYeJ1dD7+w+c3aYRHs86PzJn4+tbc4Mq4fEt9ptwDzyr89cw mF3BmgeGdxvxFu/ltWSvdDBxOmpHWcu/1lOwXrE66elbrM3rvZvFPjmzcgvy9iirXT1i 1SMnfBrF4WrVaAUv0S5Q8HfCud8DU+Zgm1KNfer0/eiBoyRkUVKn72+H5JcLxNQ3o6Mn vyR2MCKOkWI8o6UU+DfpDUSGG+QDISxDzh0PYguc609WJmt3rf0pq7YH5ti3tkEm7JT/ krBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VS9i6xtJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id x7-20020a654147000000b00573fa4cfe4asi11350332pgp.39.2023.09.20.03.13.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 03:13:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VS9i6xtJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9F87C81DA391; Wed, 20 Sep 2023 02:08:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233822AbjITJIN (ORCPT + 99 others); Wed, 20 Sep 2023 05:08:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233706AbjITJIL (ORCPT ); Wed, 20 Sep 2023 05:08:11 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D63EA93; Wed, 20 Sep 2023 02:08:05 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F8E6C433C7; Wed, 20 Sep 2023 09:08:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695200885; bh=N1lD23FkrwrqkdmSA/OHQhTfc6OPAn97xACvmG+HoZM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VS9i6xtJXAC3RNG85DP8J8Yf23d2W4hItE+BfvJUq3wIEq8IItgkJHpdNQPYZupTp JGGg/0o/1vq2QG0YtBN+5qUKaML4qQ7P5hIXnGF/y+qJDNwgz94T98SVEqJ+f2tfUf dpdQhQ0K7nMVlmWt3LzFLrugqCzFH265FTXOSC/NgFGz9J7zz0f02QxUsVhsFc3s49 S2lMRXw39DzxP6Yk7zQF1VQ4LTb+MiUSzByCu49CCIWCOj0tz68pYjXZWDVoEqYa7n Y410yoQ3JvN+hMK47sOIkmxWG5l/V7ha5mEIbDdCC6p7YT0oNwSExdAzjC41Bdp5jT vfwgSOD8JVYgw== Date: Wed, 20 Sep 2023 11:08:01 +0200 From: Wolfram Sang To: Serge Semin Cc: Jan Bottorff , Catalin Marinas , Yann Sionneau , Yann Sionneau , Will Deacon , Jarkko Nikula , Andy Shevchenko , Mika Westerberg , Jan Dabros , Andi Shyti , Philipp Zabel , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] i2c: designware: Fix corrupted memory seen in the ISR Message-ID: Mail-Followup-To: Wolfram Sang , Serge Semin , Jan Bottorff , Catalin Marinas , Yann Sionneau , Yann Sionneau , Will Deacon , Jarkko Nikula , Andy Shevchenko , Mika Westerberg , Jan Dabros , Andi Shyti , Philipp Zabel , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org References: <37e10c3d-b5ab-75ec-3c96-76e15eb9bef8@sionneau.net> <9de89e14-35bd-415d-97f1-4b6db1258997@os.amperecomputing.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zbsmrbM1UnXjFOBG" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 20 Sep 2023 02:08:11 -0700 (PDT) --zbsmrbM1UnXjFOBG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > same thread." [1] Thus I'd suggest the next fix for the problem: >=20 > --- a/drivers/i2c/busses/i2c-designware-common.c > +++ b/drivers/i2c/busses/i2c-designware-common.c > @@ -72,7 +72,10 @@ static int dw_reg_write(void *context, unsigned int re= g, unsigned int val) > { > struct dw_i2c_dev *dev =3D context; > =20 > - writel_relaxed(val, dev->base + reg); > + if (reg =3D=3D DW_IC_INTR_MASK) > + writel(val, dev->base + reg); > + else > + writel_relaxed(val, dev->base + reg); > =20 > return 0; > } >=20 > (and similar changes for dw_reg_write_swab() and dw_reg_write_word().) >=20 > What do you think? To me, this looks reasonable and much more what I would have expected as a result (from a high level point of view). Let's hope it works. I am optimistic, though... --zbsmrbM1UnXjFOBG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmUKtnEACgkQFA3kzBSg KbYfuBAAjbkiEJ7rAKZvK0lG+E7VkpVCxQYb0nBQMNxMBfhnTSIUhqpk7AQtOaL+ dJ5fwsjD0N1ospSPgveqMWJuYhfXwjel5Nw1sACYXkfKTS6iMzPDa7OSvyGxa31P WG+25P+XVwgieYGpaNCucgDEw5wEURJ2h7mlCCSrnRx/42z2C7pAKKzo9BoEC2Or EAcduW+L6ZcieP8ApXlQU6emtWumRuCGmjOB6mna8zHGqQjNLZBTCWkgkqI6qeNq 8SDF3jp2YulvyP6LXEOxkDly/Bw4+dTEXIAEVfwix6/1tB2EpNPqWKljEcA1PlT/ dtgNnrv0SdT8jo2xjP+tcnXCREx7XVSTGYuXJhpXdAeQmL28ALrmbZOThcbQmgDO EPDFJK+IytAklYSxUxXsiFtKr+tHLVCjmmZY4eTonXll8gzirsIW0hDaRvAT5dp1 wdwd6b0mnJDTGcGtYLqBDvlk7lAcAdo/M8TnJyrP2arQOzZ19Whb6iuutoCfr5iJ Zz026mN8SM78yi8OzHeZog6rZ9GbFTejSwhK7y6zMUwjBsFPLJLLLCW/n7YX8a2V jcgohkOKCja192+3zY4zRjIY9J8nUypPF8QZdxSQtMEU6wkCsY+wEhIkPDxGv0mw HnGBPd5C1lOJa1U9mlOOfOe6dUYrnxMyDTbFPU+8nAegUtEb5bo= =Crw0 -----END PGP SIGNATURE----- --zbsmrbM1UnXjFOBG--