e099d7cb2d
The original TPM patches were applied to a modified version of the TPM module. After the download of tarballs was enabled this patch started to fail. This patch fixes the problem as uses the upstream code to apply the patch. Story: 2002945 Task: 22938 Depends-On: https://review.openstack.org/581915 Change-Id: I54d1a4655cd0dec84b6fb6d1bd2bc83e0d068c5c Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com> Signed-off-by: Scott Little <scott.little@windriver.com>
40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
From: Kam Nasim <kam.nasim@windriver.com>
|
|
Date: Tue, 26 Apr 2017 12:23:03 -0400
|
|
Subject: [PATCH] ARM64 based ACPI commands should not be compiled
|
|
|
|
---
|
|
tpm_crb.c | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
--- a/tpm_crb.c
|
|
+++ b/tpm_crb.c
|
|
@@ -531,7 +531,6 @@ static int crb_acpi_add(struct acpi_devi
|
|
struct crb_priv *priv;
|
|
struct tpm_chip *chip;
|
|
struct device *dev = &device->dev;
|
|
- struct tpm2_crb_smc *crb_smc;
|
|
acpi_status status;
|
|
u32 sm;
|
|
int rc;
|
|
@@ -564,6 +563,7 @@ static int crb_acpi_add(struct acpi_devi
|
|
sm == ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD)
|
|
priv->flags |= CRB_FL_ACPI_START;
|
|
|
|
+#ifdef CONFIG_ARM64
|
|
if (sm == ACPI_TPM2_COMMAND_BUFFER_WITH_SMC) {
|
|
if (buf->header.length < (sizeof(*buf) + sizeof(*crb_smc))) {
|
|
dev_err(dev,
|
|
@@ -572,10 +572,11 @@ static int crb_acpi_add(struct acpi_devi
|
|
ACPI_TPM2_COMMAND_BUFFER_WITH_SMC);
|
|
return -EINVAL;
|
|
}
|
|
- crb_smc = ACPI_ADD_PTR(struct tpm2_crb_smc, buf, sizeof(*buf));
|
|
+ struct tpm2_crb_smc *crb_smc = ACPI_ADD_PTR(struct tpm2_crb_smc, buf, sizeof(*buf));
|
|
priv->smc_func_id = crb_smc->smc_func_id;
|
|
priv->flags |= CRB_FL_CRB_SMC_START;
|
|
}
|
|
+#endif
|
|
|
|
rc = crb_map_io(device, priv, buf);
|
|
if (rc)
|