From: Lino Sanfilippo <l.sanfilippo@kunbus.com>
To: Lukas Wunner <lukas@wunner.de>
Cc: "Jarkko Sakkinen" <jarkko@kernel.org>,
oe-lkp@lists.linux.dev, lkp@intel.com,
linux-kernel@vger.kernel.org,
"Michael Niewöhner" <linux@mniewoehner.de>,
linux-integrity@vger.kernel.org,
"Philipp Rosenberger" <p.rosenberger@kunbus.com>,
jsnitsel@redhat.com, peterz@infradead.org
Subject: Re: [linus:master] [tpm, tpm_tis] e644b2f498: RIP:acpi_safe_halt
Date: Thu, 11 May 2023 16:22:02 +0200 [thread overview]
Message-ID: <1a8ecf90-80a4-9aac-95e1-9ce0c4e09ba5@kunbus.com> (raw)
In-Reply-To: <20230511141607.GA32208@wunner.de>
Hi Lukas,
On 11.05.23 16:16, Lukas Wunner wrote:
> ATTENTION: This e-mail is from an external sender. Please check attachments and links before opening e.g. with mouseover.
>
>
> On Thu, May 11, 2023 at 01:22:19PM +0200, Lino Sanfilippo wrote:
>> Since beside the one reported by Peter Zijlstra
>> (https://lore.kernel.org/linux-integrity/CSJ0AD1CFYQP.T6T68M6ZVK49@suppilovahvero/T/#t)
>> we have another interrupt storm here, it is probably the best to handle those in general
>> and to disable interrupts in this case to fall back to polling (this is also what Jerry
>> suggested in the thread above).
>>
>> I will try to provide a patch for this.
>
> In tpm_tis_probe_irq_single(), after you've requested the irq,
> you could convert it to a struct irq_desc (via irq_to_desc()
> from <linux/irqnr.h>) and cache that pointer in priv.
>
> Then in tis_int_handler(), you could access the irqs_unhandled
> member of struct irq_desc (from <linux/irqdesc.h>) and check
> if it exceeds, say, 5000.
This is the solution I am currently working on, but thanks for confirming that
I am on the right track with this :)
>
> If it does, schedule a work_struct which calls disable_interrupts().
> You can't call that from the IRQ handler because devm_free_irq()
> waits for the IRQ handler to finish, so you'd deadlock. You *can*
> of course clear the TPM_GLOBAL_INT_ENABLE bit from the IRQ handler,
> though it's unclear to me if that's sufficient to quiesce the
> interrupt line.
>
Will try this, thx.
> By reusing the genirq subsystem's irqs_unhandled infrastructure,
> you avoid having to reimplement all of that.
>
Agreed.
Regards,
Lino
> Thanks,
>
> Lukas
next prev parent reply other threads:[~2023-05-11 14:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <202305041325.ae8b0c43-yujie.liu@intel.com>
2023-05-10 22:00 ` [linus:master] [tpm, tpm_tis] e644b2f498: RIP:acpi_safe_halt Jarkko Sakkinen
2023-05-11 11:22 ` Lino Sanfilippo
2023-05-11 14:16 ` Lukas Wunner
2023-05-11 14:22 ` Lino Sanfilippo [this message]
2023-05-11 14:59 ` Jerry Snitselaar
2023-05-29 15:07 ` Michael Niewöhner
2023-05-29 20:58 ` Jerry Snitselaar
2023-05-30 14:40 ` Michael Niewöhner
2023-05-30 16:27 ` Jerry Snitselaar
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=1a8ecf90-80a4-9aac-95e1-9ce0c4e09ba5@kunbus.com \
--to=l.sanfilippo@kunbus.com \
--cc=jarkko@kernel.org \
--cc=jsnitsel@redhat.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@mniewoehner.de \
--cc=lkp@intel.com \
--cc=lukas@wunner.de \
--cc=oe-lkp@lists.linux.dev \
--cc=p.rosenberger@kunbus.com \
--cc=peterz@infradead.org \
/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).