linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Abhijeet Dharmapurikar <adharmap@codeaurora.org>,
	Fenglin Wu <quic_fenglinw@quicinc.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Kiran Gunda <kgunda@codeaurora.org>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: quic_collinsd@quicinc.com, quic_subbaram@quicinc.com,
	quic_fenglinw@quicinc.com, tglx@linutronix.de, maz@kernel.org,
	Subbaraman Narayanamurthy <subbaram@codeaurora.org>,
	David Collins <collinsd@codeaurora.org>
Subject: Re: [RESEND PATCH v6 03/10] spmi: pmic-arb: do not ack and clear peripheral interrupts in cleanup_irq
Date: Wed, 31 Aug 2022 10:39:53 -0700	[thread overview]
Message-ID: <20220831173955.C333CC433D7@smtp.kernel.org> (raw)
In-Reply-To: <1655004286-11493-4-git-send-email-quic_fenglinw@quicinc.com>

Quoting Fenglin Wu (2022-06-11 20:24:39)
> From: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
> 
> Currently, cleanup_irq() is invoked when a peripheral's interrupt
> fires and there is no mapping present in the interrupt domain of
> spmi interrupt controller.
> 
> The cleanup_irq clears the arbiter bit, clears the pmic interrupt
> and disables it at the pmic in that order. The last disable in
> cleanup_irq races with request_irq() in that it stomps over the
> enable issued by request_irq. Fix this by not writing to the pmic
> in cleanup_irq. The latched bit will be left set in the pmic,
> which will not send us more interrupts even if the enable bit
> stays enabled.
> 
> When a client wants to request an interrupt, use the activate
> callback on the irq_domain to clear latched bit. This ensures
> that the latched, if set due to the above changes in cleanup_irq
> or when the bootloader leaves it set, gets cleaned up, paving way
> for upcoming interrupts to trigger.
> 
> With this, there is a possibility of unwanted triggering of
> interrupt right after the latched bit is cleared - the interrupt
> may be left enabled too. To avoid that, clear the enable first
> followed by clearing the latched bit in the activate callback.
> 
> Fixes: 6bc546e71e50 ("spmi: pmic-arb: cleanup unrequested irqs")
> Fixes: 02abec3616c1 ("spmi: pmic-arb: rename pa_xx to pmic_arb_xx and other cleanup")
> Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
> [collinsd@codeaurora.org: fix merge conflict]
> Signed-off-by: David Collins <collinsd@codeaurora.org>
> Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
> ---

Applied to spmi-next

  reply	other threads:[~2022-08-31 17:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-12  3:24 [RESEND PATCH v6 00/10] A bunch of fix and optimization patches in spmi-pmic-arb.c Fenglin Wu
2022-06-12  3:24 ` [RESEND PATCH v6 01/10] spmi: pmic-arb: add a print in cleanup_irq Fenglin Wu
2022-08-31 17:39   ` Stephen Boyd
2022-06-12  3:24 ` [RESEND PATCH v6 02/10] spmi: pmic-arb: handle spurious interrupt Fenglin Wu
2022-08-31 17:39   ` Stephen Boyd
2022-06-12  3:24 ` [RESEND PATCH v6 03/10] spmi: pmic-arb: do not ack and clear peripheral interrupts in cleanup_irq Fenglin Wu
2022-08-31 17:39   ` Stephen Boyd [this message]
2022-06-12  3:24 ` [RESEND PATCH v6 04/10] spmi: pmic-arb: check apid against limits before calling irq handler Fenglin Wu
2022-08-31 17:40   ` Stephen Boyd
2022-06-12  3:24 ` [RESEND PATCH v6 05/10] spmi: pmic-arb: add support to dispatch interrupt based on IRQ status Fenglin Wu
2022-08-31 17:40   ` Stephen Boyd
2022-06-12  3:24 ` [RESEND PATCH v6 06/10] spmi: pmic-arb: correct duplicate APID to PPID mapping logic Fenglin Wu
2022-08-31 17:40   ` Stephen Boyd
2022-06-12  3:24 ` [RESEND PATCH v6 07/10] spmi: pmic-arb: block access for invalid PMIC arbiter v5 SPMI writes Fenglin Wu
2022-08-31 17:40   ` Stephen Boyd
2022-06-12  3:24 ` [RESEND PATCH v6 08/10] dt-bindings: spmi: spmi-pmic-arb: make interrupt properties as optional Fenglin Wu
2022-08-31 17:36   ` Stephen Boyd
2022-09-02 11:41     ` Fenglin Wu
2022-06-12  3:24 ` [RESEND PATCH v6 09/10] spmi: pmic-arb: make interrupt support optional Fenglin Wu
2022-08-30 23:38   ` Stephen Boyd
2022-06-12  3:24 ` [RESEND PATCH v6 10/10] spmi: pmic-arb: increase SPMI transaction timeout delay Fenglin Wu
2022-08-31 17:41   ` Stephen Boyd
  -- strict thread matches above, loose matches on Subject: below --
2022-04-28  1:12 [RESEND PATCH V6 00/10] A bunch of fix and optimization patches in spmi-pmic-arb.c Fenglin Wu
2022-04-28  1:12 ` [RESEND PATCH V6 03/10] spmi: pmic-arb: do not ack and clear peripheral interrupts in cleanup_irq Fenglin Wu

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=20220831173955.C333CC433D7@smtp.kernel.org \
    --to=sboyd@kernel.org \
    --cc=adharmap@codeaurora.org \
    --cc=collinsd@codeaurora.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kgunda@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=quic_collinsd@quicinc.com \
    --cc=quic_fenglinw@quicinc.com \
    --cc=quic_subbaram@quicinc.com \
    --cc=subbaram@codeaurora.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).