All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/6] TPM irq fixes
@ 2022-05-09  8:05 Lino Sanfilippo
  2022-05-09  8:05 ` [PATCH v4 1/6] tpm, tpm_tis_spi: Request threaded irq Lino Sanfilippo
                   ` (5 more replies)
  0 siblings, 6 replies; 27+ messages in thread
From: Lino Sanfilippo @ 2022-05-09  8:05 UTC (permalink / raw)
  To: peterhuewe, jarkko, jgg
  Cc: stefanb, linux, linux-integrity, linux-kernel, LinoSanfilippo,
	lukas, p.rosenberger

This series fixes issues around the interrupt handling in the TPM TIS core.

Patch 1:
Request threaded interrupt handler for SPI. This is needed since SPI uses a
mutex for data transmission and since we exchange data via SPI int the irq
handler we need a sleepable context.

Patch 2:
Make locality handling simpler by only claiming it at driver startup and
releasing it at driver shutdown.

Patch 3:
Enable the irq test which is always skipped in the current code.

Patch 4:
Fix the irq test by ensuring CPU cache coherency when setting the irq test
condition on one and checking it on another CPU.

Patch 5:
Move the irq test and the check for irq test from tpm_tis_send() to
tpm_tis_probe_irq_single() so the check has not to be done for each data
transmission.

Patch 6:
Instead of blindly trying to enable all possible interrupts, use the result
from the capability query and request only the interrupts that are actually
supported.


Changes in v4:
- only request threaded irq in case of SPI as requested by Jarko.
- reimplement patch 2 to limit locality handling changes to the TIS core.
- separate fixes from cleanups as requested by Jarko.
- rephrase commit messages 

Changes in v3:
- fixed compiler error reported by kernel test robot
- rephrased commit message as suggested by Jarko Sakkinen
- added Reviewed-by tag

Changes in v2:
- rebase against 5.12
- free irq on error path


Lino Sanfilippo (6):
  tpm, tpm_tis_spi: Request threaded irq
  tpm, tpm_tis: Claim and release locality only once
  tpm, tpm_tis: enable irq test
  tpm, tpm_tis: avoid CPU cache incoherency in irq test
  tpm, tpm_tis: Move irq test from tpm_tis_send() to
    tpm_tis_probe_irq_single()
  tpm, tpm_tis: Only enable supported IRQs

 drivers/char/tpm/tpm_tis_core.c     | 202 ++++++++++++----------------
 drivers/char/tpm/tpm_tis_core.h     |   8 +-
 drivers/char/tpm/tpm_tis_spi_main.c |   5 +-
 3 files changed, 96 insertions(+), 119 deletions(-)


base-commit: fe27d189e3f42e31d3c8223d5daed7285e334c5e
-- 
2.36.0


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

end of thread, other threads:[~2022-05-18 16:08 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09  8:05 [PATCH v4 0/6] TPM irq fixes Lino Sanfilippo
2022-05-09  8:05 ` [PATCH v4 1/6] tpm, tpm_tis_spi: Request threaded irq Lino Sanfilippo
2022-05-11 11:22   ` Jarkko Sakkinen
2022-05-11 19:18     ` Lino Sanfilippo
2022-05-13 18:08       ` Jarkko Sakkinen
2022-05-16 19:52         ` Lino Sanfilippo
2022-05-17 18:23           ` Jarkko Sakkinen
2022-05-09  8:05 ` [PATCH v4 2/6] tpm, tpm_tis: Claim and release locality only once Lino Sanfilippo
2022-05-11 11:27   ` Jarkko Sakkinen
2022-05-11 19:29     ` Lino Sanfilippo
2022-05-13 17:59       ` Jarkko Sakkinen
2022-05-16 20:23         ` Lino Sanfilippo
2022-05-09  8:05 ` [PATCH v4 3/6] tpm, tpm_tis: enable irq test Lino Sanfilippo
2022-05-09  8:05 ` [PATCH v4 4/6] tpm, tpm_tis: avoid CPU cache incoherency in " Lino Sanfilippo
2022-05-11 15:06   ` Jarkko Sakkinen
2022-05-11 19:35     ` Lino Sanfilippo
2022-05-09  8:05 ` [PATCH v4 5/6] tpm, tpm_tis: Move irq test from tpm_tis_send() to tpm_tis_probe_irq_single() Lino Sanfilippo
2022-05-11 15:09   ` Jarkko Sakkinen
2022-05-11 19:56     ` Lino Sanfilippo
2022-05-16 17:51       ` Jarkko Sakkinen
2022-05-16 20:25         ` Lino Sanfilippo
2022-05-17 18:19           ` Michael Niewöhner
2022-05-18  1:26             ` Jarkko Sakkinen
2022-05-18 16:08               ` Michael Niewöhner
2022-05-09  8:05 ` [PATCH v4 6/6] tpm, tpm_tis: Only enable supported IRQs Lino Sanfilippo
2022-05-11 15:08   ` Jarkko Sakkinen
2022-05-11 19:58     ` 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.