Skip to content

char: tpm: Adjust cr50_i2c locking mechanism

Grzegorz Bernacki linux-integrity 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 2 repliesIn review
  2. v22 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- remove unnecesary locality checking

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2char: tpm: cr50: Use generic request/relinquish locality opsdrivers/char/tpm/tpm_tis_i2c_cr50.c+54 -400 replies
2/2char: tpm: cr50: Move i2c locking to request/relinquish locality opsdrivers/char/tpm/tpm_tis_i2c_cr50.c+13 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH V3 0/2] char: tpm: Adjust cr50_i2c locking mechanism

From: Grzegorz Bernacki <[email protected]>

This patchset contains two patches from original patchset which have not yet be merged. As per original description:

This patchset aims to add support for a platforms with cr50(tpm) i2c chip shared across two CPUs. We need to provide a mechanism, which will allow to synchronize accesses on a TPM-transaction boundaries.

These two patches are modifying cr50 to use generic callbacks for locality management and then leverage this solution to apply i2c bus locking on a TPM-operation level.

Changes from V1:
- add dev_err() and return instead of WARN_ONCE()
- correct returned value in tpm_cr50_i2c_probe() functions
- I did not address Tim's suggestion to return 0 instead of loc in check and request locality, I would like to follow convention from tpm_tis_core.c file

Changes from V2:
- remove unnecesary locality checking

Jan Dabros (2):
char: tpm: cr50: Use generic request/relinquish locality ops
char: tpm: cr50: Move i2c locking to request/relinquish locality ops

 drivers/char/tpm/tpm_tis_i2c_cr50.c | 114 ++++++++++++++++------------
 1 file changed, 66 insertions(+), 48 deletions(-)
Signature · 1 line
2.47.0.rc0.187.ge670bccf7e-goog