linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] tpm_tis: Detect interrupt storms
@ 2020-12-05  1:43 Jerry Snitselaar
  2020-12-05  1:43 ` [PATCH v3 1/4] irq: export kstat_irqs Jerry Snitselaar
                   ` (3 more replies)
  0 siblings, 4 replies; 27+ messages in thread
From: Jerry Snitselaar @ 2020-12-05  1:43 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-integrity, intel-gfx, dri-devel, Thomas Gleixner,
	Jani Nikula, Rodrigo Vivi, David Airlie, Daniel Vetter,
	Jarkko Sakkinen, Jason Gunthorpe, Peter Huewe, James Bottomley,
	Matthew Garrett, Hans de Goede

This patchset is an attempt to try and catch tpm_tis devices that have
interrupt storm issues, disable the interrupt, and use polling. In
2016 the tpm_tis interrupt code was accidently disabled, and polling
was just being used. When we initially tried to enable interrupts
again there were some reports of systems being hit with interrupt
storms. It turned out that the ThinkPad T490s had misconfigured a gpio
pin being used for the interrupt.  The problem is more widespread
though, with interrupt storms also being seen on other platforms and
different TPM vendors. With the L490 the system hangs at tpm_tis
initialization even with the detection code, so change the earlier
detection code that used dmi to look for the T490s to instead look for
the L490 and disable interrupts.

Since kstat_irqs needs to be exported to allow building of tpm_tis
as a module, I've included a patch to change the i915_pmu code to
use kstat_irqs where before it was using its own version. If this
isn't desired it can be dropped.

I've been testing this on top of James' proposed patchset which
re-enables interrupts for tpm_tis. With the patchsets applied
it detects the problem on the T490s and on the Ice Lake development
system where I found the issue. I have Lenovo verifying that the
dmi detection code will now detect the L490 and avoid the hang
it experiences. I'm also working on getting access to an L490
to see if I can figure out what the underlying issue is.



Changes from v2:
	- Export kstat_irqs to allow building tpm_tis as a module.
    	- Change i915_pmu.c to use kstat_irqs instead of it's own
      	  version count_interrupts.
    	- Change include from linux/kernel_stat.h to linux/irq.h.
    	- Change dmi checking code to now look for L490 instead of
	  T490s.

Changes from v1:
	- drop tpm_tis specific workqueue and use just system_w.

Jerry Snitselaar (4):
  irq: export kstat_irqs
  drm/i915/pmu: Use kstat_irqs to get interrupt count
  tpm_tis: Disable interrupts if interrupt storm detected
  tpm_tis: Disable Interrupts on the ThinkPad L490


Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org 
Cc: dri-devel@lists.freedesktop.org
Cc: Jarkko Sakkinen <jarkko@kernel.org>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Peter Huewe <peterhuewe@gmx.de>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Matthew Garrett <mjg59@google.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: linux-integrity@vger.kernel.org

 drivers/char/tpm/tpm_tis.c      |  4 ++--
 drivers/char/tpm/tpm_tis_core.c | 27 +++++++++++++++++++++++++++
 drivers/char/tpm/tpm_tis_core.h |  2 ++
 drivers/gpu/drm/i915/i915_pmu.c | 18 +-----------------
 include/linux/irqdesc.h         |  1 +
 kernel/irq/irqdesc.c            |  1 +
 6 files changed, 34 insertions(+), 19 deletions(-)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2020-12-10 17:56 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-05  1:43 [PATCH v3 0/4] tpm_tis: Detect interrupt storms Jerry Snitselaar
2020-12-05  1:43 ` [PATCH v3 1/4] irq: export kstat_irqs Jerry Snitselaar
2020-12-05 10:39   ` Jarkko Sakkinen
2020-12-06 16:40     ` Thomas Gleixner
2020-12-06 17:40       ` James Bottomley
2020-12-06 19:29         ` Thomas Gleixner
2020-12-06 17:54   ` Thomas Gleixner
2020-12-06 21:46     ` Jerry Snitselaar
2020-12-05  1:43 ` [PATCH v3 2/4] drm/i915/pmu: Use kstat_irqs to get interrupt count Jerry Snitselaar
2020-12-06 16:38   ` Thomas Gleixner
2020-12-06 21:33     ` Thomas Gleixner
2020-12-08  9:54       ` Jarkko Sakkinen
2020-12-06 21:47     ` Jerry Snitselaar
2020-12-06 23:38       ` Thomas Gleixner
2020-12-10  7:53     ` [Intel-gfx] " Joonas Lahtinen
2020-12-10 10:45       ` Tvrtko Ursulin
2020-12-10 16:35         ` Thomas Gleixner
2020-12-10 17:09           ` Tvrtko Ursulin
2020-12-10 17:44             ` Thomas Gleixner
2020-12-10 17:51               ` Tvrtko Ursulin
2020-12-05  1:43 ` [PATCH v3 3/4] tpm_tis: Disable interrupts if interrupt storm detected Jerry Snitselaar
2020-12-06 19:26   ` Thomas Gleixner
2020-12-07 19:28     ` Jason Gunthorpe
2020-12-07 19:58       ` James Bottomley
2020-12-08 17:43         ` Jarkko Sakkinen
2020-12-08 17:42       ` Jarkko Sakkinen
2020-12-05  1:43 ` [PATCH v3 4/4] tpm_tis: Disable Interrupts on the ThinkPad L490 Jerry Snitselaar

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).