From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F2E1C63697 for ; Sun, 15 Nov 2020 17:32:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B17E22384 for ; Sun, 15 Nov 2020 17:32:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727207AbgKORbe (ORCPT ); Sun, 15 Nov 2020 12:31:34 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:34846 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726923AbgKORbe (ORCPT ); Sun, 15 Nov 2020 12:31:34 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 062001C0B9E; Sun, 15 Nov 2020 18:31:31 +0100 (CET) Date: Sun, 15 Nov 2020 18:31:30 +0100 From: Pavel Machek To: Tony Lindgren Cc: Lee Jones , linux-kernel@vger.kernel.org, Carl Philipp Klemm , Laxminath Kasam , Merlijn Wajer , Mark Brown , Sebastian Reichel , Tim Harvey Subject: Re: [PATCH] mfd: cpcap: Fix interrupt regression with regmap clear_ack Message-ID: <20201115173130.GA32085@duo.ucw.cz> References: <20201111170613.46057-1-tony@atomide.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EVF5PPMfhYS0aIcm" Content-Disposition: inline In-Reply-To: <20201111170613.46057-1-tony@atomide.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --EVF5PPMfhYS0aIcm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > With commit 3a6f0fb7b8eb ("regmap: irq: Add support to clear ack > registers"), the cpcap interrupts are no longer getting acked properly > leading to a very unresponsive device with CPUs fully loaded spinning > in the threaded IRQ handlers. >=20 > To me it looks like the clear_ack commit above actually fixed a long > standing bug in regmap_irq_thread() where we unconditionally acked the > interrupts earlier without considering ack_invert. And the issue with > cpcap started happening as we now also consider ack_invert. >=20 > Tim Harvey tried to fix this issue earlier with > "[PATCH v2] regmap: irq: fix ack-invert", but the reading of the ack > register was considered unnecessary for just ack_invert, and we did not > have clear_ack available yet. As the cpcap irqs worked both with and > without ack_invert earlier because of the unconditional ack, the > problem remained hidden until now. >=20 > Also, looks like the earlier v3.0.8 based Motorola Android Linux kernel > does clear_ack style read-clear-write with "ireg_val & ~mreg_val" instead > of just ack_invert style write. So let's switch cpcap to use clear_ack > to fix the issue. >=20 > Fixes: 3a6f0fb7b8eb ("regmap: irq: Add support to clear ack registers") Tested-by: Pavel Machek Thank you, culomb counter issue is now gone. Best regards, Pavel --=20 http://www.livejournal.com/~pavelmachek --EVF5PPMfhYS0aIcm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCX7Fl8gAKCRAw5/Bqldv6 8lwCAJ9uJs0Bdz5l5K0mgXtFFqWx/sTcwACfWTMrgo9TLu2B1px+X54+n6zKjRU= =HTYp -----END PGP SIGNATURE----- --EVF5PPMfhYS0aIcm--