All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Fixes for TPM interrupt handling
@ 2021-02-22  0:56 Lino Sanfilippo
  2021-02-22  0:56 ` [PATCH 1/4] tpm: Use a threaded interrupt handler Lino Sanfilippo
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Lino Sanfilippo @ 2021-02-22  0:56 UTC (permalink / raw)
  To: peterhuewe, jarkko, jgg
  Cc: stefanb, James.Bottomley, jsnitsel, linux-integrity,
	linux-kernel, LinoSanfilippo

This series fixes issues around the TPM driver interrupt handling. These
issues prevent TPM chips like the SLB 9670 to work over SPI. 

PATCH 1: The SPI implementation of the functions to read/write to/from
registers uses mutexes and thus require a sleepable context. For this
reason request a threaded interrupt handler.

PATCH 2: Simplify locality handling by taking the driver locality (0) at
driver startup and releasing it at driver shutdown. This also fixes a
warning at driver startup that is caused by a register access without prior
locality request.

PATCH 3: Fix and simplify the test for working interrupts.

PATCH 4: Only set the interrupts which are reported as being available.

With these patches applied the SLB 9670 works as expected: interrupts are
detected and the transmit/receive operations are controlled by interrupt
handling.

The patches are based on Linux mainline V5.11


Lino Sanfilippo (4):
  tpm: Use a threaded interrupt handler
  tpm: get locality before writing to TPM chip
  tpm: Fix test for interrupts
  tpm: Only enable supported irqs

 drivers/char/tpm/tpm-chip.c     |  10 ----
 drivers/char/tpm/tpm_tis_core.c | 127 +++++++++++++++++++---------------------
 drivers/char/tpm/tpm_tis_core.h |   2 +-
 include/linux/tpm.h             |   2 +-
 4 files changed, 62 insertions(+), 79 deletions(-)

-- 
2.7.4


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

end of thread, other threads:[~2021-02-22  1:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-22  0:56 [PATCH 0/4] Fixes for TPM interrupt handling Lino Sanfilippo
2021-02-22  0:56 ` [PATCH 1/4] tpm: Use a threaded interrupt handler Lino Sanfilippo
2021-02-22  0:56 ` [PATCH 2/4] tpm: get locality before writing to TPM chip Lino Sanfilippo
2021-02-22  0:56 ` [PATCH 3/4] tpm: Fix test for interrupts Lino Sanfilippo
2021-02-22  0:56 ` [PATCH 4/4] tpm: Only enable supported irqs Lino Sanfilippo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.