Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2580333pxb; Sun, 15 Nov 2020 09:48:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZ79YeX9kRRA/Zs3oXSAJQ9AVGwN4uwFUj3UymYlms956grjwOOAcnMxuw/dV4do4Beuey X-Received: by 2002:a05:6402:411:: with SMTP id q17mr12550971edv.125.1605462496973; Sun, 15 Nov 2020 09:48:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605462496; cv=none; d=google.com; s=arc-20160816; b=p9USTh9KXQ2VWiBww9jOuIgxOFICnS/JSA9N21q8/1UG5jMJlXkERnb94SQvpn1oP4 0+ml4ulkEJt6JY7CRF0SaNVTECJeE8NuKgxOYoz8935O9YUF1So9X1857xMrh6uaKq6i hNy33qGSXHpnxnP50Or5x4zpybL38xUYGbkr947gqtyWs0awVcc8owwlQnbEZtyRtsRq n+Ppd0mxtqLS9BRTYvo87jj+10scKBN/yEQzUbHAUtqBDbz0eKWKbzIClKHc65PLeRIT UQI34ZGEH+tJxET2U696xXeppCGC6VL0Aiebl7w8pGHXduGahbZlUTSQPQS512UTiwUI JQ/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=+5af+O7Un0MQudMynGjT3j2z3xuTyBmxrF0UlW/mlXA=; b=0z/gDZdFR+CxPHxf34W/XcDjka4RhH0utLdzeiB5zAOkfQ60cfNJMf3aMrxjv5pHZR 1Ca3VD/2BUt5QqV5k7oGZh0PaEvD9RwLN/Axc5xtPbXTUm63RbQ2LHFEowXQB8f8APZT xH9jhb3WVpg4oRX/CLIX7uN4WF4Ig6RY5pA1BfmWFaahFq6HWx4Y6x0cH+Zjz40I32Qs PU8RJaLlxB5xgOLfTtetL5yfsW3+yzRFETV7qibRSVZKCg+vH0/gb/SxJitxXmIWcjkb Nsxxp2lmuaAVYooFK0oXFMmtSLQgq9kUYhOL7CvAfAmR0GZO3aw7U58tmg5aXpnA045b QEXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t16si13694180edi.258.2020.11.15.09.47.53; Sun, 15 Nov 2020 09:48:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727156AbgKORbe (ORCPT + 99 others); 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--