9e954e3680
Move content from stx-gplv2 into stx-integ Packages will be relocated to stx-integ: base/ bash cgcs-users cluster-resource-agents dpkg haproxy libfdt netpbm rpm database/ mariadb filesystem/ iscsi-initiator-utils filesystem/drbd/ drbd-tools kernel/kernel-modules/ drbd integrity intel-e1000e intel-i40e intel-i40evf intel-ixgbe intel-ixgbevf qat17 tpmdd ldap/ ldapscripts networking/ iptables net-tools Change-Id: I0a9070e35559e5545b14e1fdd933a2ca2e969fd1 Story: 2002801 Task: 22687 Signed-off-by: Scott Little <scott.little@windriver.com>
38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
From 86d94390d9b97639fecb3e032120b93004a3036d Mon Sep 17 00:00:00 2001
|
|
From: Nayna Jain <nayna@linux.vnet.ibm.com>
|
|
Date: Fri, 10 Nov 2017 16:42:19 -0500
|
|
Subject: [PATCH] tpm: use tpm_msleep() value as max delay
|
|
|
|
Currently, tpm_msleep() uses delay_msec as the minimum value in
|
|
usleep_range. However, that is the maximum time we want to wait.
|
|
The function is modified to use the delay_msec as the maximum
|
|
value, not the minimum value.
|
|
|
|
After this change, performance on a TPM 1.2 with an 8 byte
|
|
burstcount for 1000 extends improved from ~9sec to ~8sec.
|
|
|
|
Signed-off-by: Nayna Jain <nayna@linux.vnet.ibm.com>
|
|
Acked-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
|
|
---
|
|
tpm.h | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/tpm.h b/tpm.h
|
|
index d9c3659..6f3297e 100644
|
|
--- a/tpm.h
|
|
+++ b/tpm.h
|
|
@@ -550,8 +550,8 @@ int wait_for_tpm_stat(struct tpm_chip *chip, u8 mask, unsigned long timeout,
|
|
|
|
static inline void tpm_msleep(unsigned int delay_msec)
|
|
{
|
|
- usleep_range(delay_msec * 1000,
|
|
- (delay_msec * 1000) + TPM_TIMEOUT_RANGE_US);
|
|
+ usleep_range((delay_msec * 1000) - TPM_TIMEOUT_RANGE_US,
|
|
+ delay_msec * 1000);
|
|
};
|
|
|
|
struct tpm_chip *tpm_chip_find_get(int chip_num);
|
|
--
|
|
1.8.3.1
|
|
|