[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201117082506.GR3718728@dell>
Date: Tue, 17 Nov 2020 08:25:06 +0000
From: Lee Jones <lee.jones@...aro.org>
To: Tony Lindgren <tony@...mide.com>
Cc: linux-kernel@...r.kernel.org,
Carl Philipp Klemm <philipp@...s.xyz>,
Laxminath Kasam <lkasam@...eaurora.org>,
Merlijn Wajer <merlijn@...zup.org>,
Mark Brown <broonie@...nel.org>, Pavel Machek <pavel@....cz>,
Sebastian Reichel <sre@...nel.org>,
Tim Harvey <tharvey@...eworks.com>
Subject: Re: [PATCH] mfd: cpcap: Fix interrupt regression with regmap
clear_ack
On Wed, 11 Nov 2020, Tony Lindgren wrote:
> 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.
>
> 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.
>
> Tim Harvey <tharvey@...eworks.com> 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.
>
> 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.
>
> Fixes: 3a6f0fb7b8eb ("regmap: irq: Add support to clear ack registers")
> Cc: Carl Philipp Klemm <philipp@...s.xyz>
> Cc: Laxminath Kasam <lkasam@...eaurora.org>
> Cc: Merlijn Wajer <merlijn@...zup.org>
> Cc: Mark Brown <broonie@...nel.org>
> Cc: Pavel Machek <pavel@....cz>
> Cc: Sebastian Reichel <sre@...nel.org>
> Cc: Tim Harvey <tharvey@...eworks.com>
> Signed-off-by: Tony Lindgren <tony@...mide.com>
> ---
> drivers/mfd/motorola-cpcap.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Applied, thanks.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Powered by blists - more mailing lists