[tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-07 Thread Nayna Jain
The TPM burstcount status indicates the number of bytes that can be sent to the TPM without causing bus wait states. Effectively, it is the number of empty bytes in the command FIFO. Further, some TPMs have a static burstcount, when the value remains zero until the entire FIFO is empty. This

[tpmdd-devel] [PATCH] msleep() delays - replace with usleep_range() in TPM 1.2/2.0 generic drivers

2017-08-07 Thread Hamza Attak
The patch simply replaces all msleep function calls with usleep_range calls in the generic drivers. Tested with an Infineon TPM 1.2, using the generic tpm-tis module, for a thousand PCR extends, we see results going from 1m57s unpatched to 40s with the new patch. We obtain similar results when

Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-07 Thread Nayna
On 08/07/2017 05:22 PM, Peter Huewe wrote: Am 7. August 2017 13:46:32 MESZ schrieb Nayna Jain : The TPM burstcount status indicates the number of bytes that can be sent to the TPM without causing bus wait states. Effectively, it is the number of empty bytes in the

[tpmdd-devel] [PATCH 2/5] Fix "ERROR: code indent should use tabs where possible"

2017-08-07 Thread SZ Lin
ERROR: code indent should use tabs where possible +^I^I "Need to wait for TPM to finish\n");$ Signed-off-by: SZ Lin --- drivers/char/tpm/tpm_ibmvtpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/tpm/tpm_ibmvtpm.c

[tpmdd-devel] [PATCH 3/5] Fix 'void function return statements are not generally useful' warning

2017-08-07 Thread SZ Lin
WARNING: void function return statements are not generally useful + return; +} Signed-off-by: SZ Lin --- drivers/char/tpm/tpm_ibmvtpm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/char/tpm/tpm_ibmvtpm.c b/drivers/char/tpm/tpm_ibmvtpm.c index

[tpmdd-devel] [PATCH 1/5] Fix packed and aligned attribute warnings.

2017-08-07 Thread SZ Lin
WARNING: __packed is preferred over __attribute__((packed)) +} __attribute__((packed, aligned(8))); WARNING: __aligned(size) is preferred over __attribute__((aligned(size))) +} __attribute__((packed, aligned(8))); Signed-off-by: SZ Lin --- drivers/char/tpm/tpm_ibmvtpm.h | 2 +-

[tpmdd-devel] [PATCH 4/5] Remove unneccessary 'out of memory' message

2017-08-07 Thread SZ Lin
WARNING: Possible unnecessary 'out of memory' message + if (!ibmvtpm->rtce_buf) { + dev_err(ibmvtpm->dev, "Failed to allocate memory for rtce buffer\n"); WARNING: Possible unnecessary 'out of memory' message + if (!ibmvtpm) { +

[tpmdd-devel] [PATCH 2/3] char: tpm: constify attribute_group structures.

2017-08-07 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/char/tpm/tpm_ppi.c | 2 +- 1 file changed, 1

[tpmdd-devel] [PATCH 5/5] Use __func__ instead of function name

2017-08-07 Thread SZ Lin
Fix following checkpatch.pl warning: WARNING: Prefer using '"%s...", __func__' to using the function's name, in a string Signed-off-by: SZ Lin --- drivers/char/tpm/tpm_ibmvtpm.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-07 Thread Peter Huewe
Am 7. August 2017 13:46:32 MESZ schrieb Nayna Jain : >The TPM burstcount status indicates the number of bytes that can >be sent to the TPM without causing bus wait states. Effectively, >it is the number of empty bytes in the command FIFO. Further, >some TPMs have a