[PATCH v4 2/4] tpm: ignore burstcount to improve tpm_tis send() performance
From: Jarkko Sakkinen <hidden>
Date: 2017-11-28 20:19:07
Also in:
linux-integrity, lkml
From: Jarkko Sakkinen <hidden>
Date: 2017-11-28 20:19:07
Also in:
linux-integrity, lkml
On Mon, Nov 27, 2017 at 07:08:51AM +0000, Leendert van Doorn wrote:
Hmm, this is almost 20 years old code ( I think the original code did a burst write and didn't check for error conditions until the very last byte write. I seem to remember that there was some text in the original standard to that effect (this may have gone back as far as IBM's ESS spec). The current code does check for error conditions after each write byte(s) so I don't think there is any reason for this anymore. Changing the while condition to count < len and setting burstcnt = min_t(int, burstcnt, len - count) and remove the tpm_tis_write8/wait_for_tpm_stat/tpm_tis_status clauses after the while loop should be sufficient.
Thank you for sharing this!
Leendert
/Jarkko -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html