[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220509080559.4381-1-LinoSanfilippo@gmx.de>
Date: Mon, 9 May 2022 10:05:53 +0200
From: Lino Sanfilippo <LinoSanfilippo@....de>
To: peterhuewe@....de, jarkko@...nel.org, jgg@...pe.ca
Cc: stefanb@...ux.vnet.ibm.com, linux@...ewoehner.de,
linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org,
LinoSanfilippo@....de, lukas@...ner.de, p.rosenberger@...bus.com
Subject: [PATCH v4 0/6] TPM irq fixes
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
Powered by blists - more mailing lists