mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Tony Lindgren <tony@atomide.com>
Cc: Lee Jones <lee.jones@linaro.org>,
	linux-kernel@vger.kernel.org,
	Carl Philipp Klemm <philipp@uvos.xyz>,
	Laxminath Kasam <lkasam@codeaurora.org>,
	Merlijn Wajer <merlijn@wizzup.org>,
	Mark Brown <broonie@kernel.org>,
	Sebastian Reichel <sre@kernel.org>,
	Tim Harvey <tharvey@gateworks.com>
Subject: Re: [PATCH] mfd: cpcap: Fix interrupt regression with regmap clear_ack
Date: Sun, 15 Nov 2020 18:31:30 +0100	[thread overview]
Message-ID: <20201115173130.GA32085@duo.ucw.cz> (raw)
In-Reply-To: <20201111170613.46057-1-tony@atomide.com>

[-- Attachment #1: Type: text/plain, Size: 1443 bytes --]

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.
> 
> 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@gateworks.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")

Tested-by: Pavel Machek <pavel@ucw.cz>

Thank you, culomb counter issue is now gone.

Best regards,
								Pavel
-- 
http://www.livejournal.com/~pavelmachek

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  parent reply	other threads:[~2020-11-15 17:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11 17:06 Tony Lindgren
2020-11-13 10:21 ` Lee Jones
2020-11-13 22:06   ` Tim Harvey
2020-11-15  8:43     ` Tony Lindgren
2020-11-16 20:45       ` Tim Harvey
2020-11-16 18:59     ` Mark Brown
2020-11-16 20:43       ` Tim Harvey
2020-11-16 21:14         ` Mark Brown
2020-11-15 17:31 ` Pavel Machek [this message]
2020-11-17  8:25 ` Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201115173130.GA32085@duo.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=broonie@kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkasam@codeaurora.org \
    --cc=merlijn@wizzup.org \
    --cc=philipp@uvos.xyz \
    --cc=sre@kernel.org \
    --cc=tharvey@gateworks.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®