Skip to contentSkip to conversation

hw/tpm: Only build tpm_ppi.o if any of TPM_TIS/TPM_CRB is built

PATCH In review Philippe Mathieu-Daudé 3 participants 4 messages Apr 27, 2019 – Apr 28, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/tpm: Only build tpm_ppi.o if any of TPM_TIS/TPM_CRB is built

The TPM Physical Presence Interface routines are only used by the CRB/TIS interfaces. Do not compile this file if any of them is built.

---
Marc-André:
You might want to add yourself as reviewer/maintainer of TPM ;)

---
 hw/tpm/Makefile.objs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/tpm/Makefile.objs +2 -2
index 700c8786228..de0b85d02ae 100644
@@ -1,5 +1,5 @@
-common-obj-y += tpm_util.o
-obj-y += tpm_ppi.o
+common-obj-$(CONFIG_TPM) += tpm_util.o
+obj-$(call lor,$(CONFIG_TPM_TIS),$(CONFIG_TPM_CRB)) += tpm_ppi.o
 common-obj-$(CONFIG_TPM_TIS) += tpm_tis.o
 common-obj-$(CONFIG_TPM_CRB) += tpm_crb.o
 common-obj-$(CONFIG_TPM_PASSTHROUGH) += tpm_passthrough.o
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw

Hi

Quoted 6 lines · Philippe Mathieu-Daudé

The TPM Physical Presence Interface routines are only used by the CRB/TIS interfaces. Do not compile this file if any of them is built.

Quoted 3 lines

---
Marc-André:
You might want to add yourself as reviewer/maintainer of TPM ;)

yes, I suppose Stefan wouldn't mind having me as R: :)

Quoted 19 lines
---
 hw/tpm/Makefile.objs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/tpm/Makefile.objs +2 -3
index 700c8786228..de0b85d02ae 100644
@@ -1,5 +1,5 @@
-common-obj-y += tpm_util.o
-obj-y += tpm_ppi.o
+common-obj-$(CONFIG_TPM) += tpm_util.o
+obj-$(call lor,$(CONFIG_TPM_TIS),$(CONFIG_TPM_CRB)) += tpm_ppi.o
 common-obj-$(CONFIG_TPM_TIS) += tpm_tis.o
 common-obj-$(CONFIG_TPM_CRB) += tpm_crb.o
 common-obj-$(CONFIG_TPM_PASSTHROUGH) += tpm_passthrough.o
--

2.20.1

#2 lore raw
Quoted 8 lines · Marc-André Lureau

Hi

Quoted 4 lines · Philippe Mathieu-Daudé

The TPM Physical Presence Interface routines are only used by the CRB/TIS interfaces. Do not compile this file if any of them is built.

Quoted 7 lines
Quoted 1 line
Quoted 3 lines

---
Marc-André:
You might want to add yourself as reviewer/maintainer of TPM ;)

yes, I suppose Stefan wouldn't mind having me as R: :)

I don't mind.

Reviewed-by on v1 1/1
#3 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 5 lines · Philippe Mathieu-Daudé

The TPM Physical Presence Interface routines are only used by the CRB/TIS interfaces. Do not compile this file if any of them is built.

Quoted 19 lines

---
Marc-André:
You might want to add yourself as reviewer/maintainer of TPM ;)

---
  hw/tpm/Makefile.objs | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
hw/tpm/Makefile.objs +2 -2
index 700c8786228..de0b85d02ae 100644
@@ -1,5 +1,5 @@
-common-obj-y += tpm_util.o
-obj-y += tpm_ppi.o
+common-obj-$(CONFIG_TPM) += tpm_util.o
+obj-$(call lor,$(CONFIG_TPM_TIS),$(CONFIG_TPM_CRB)) += tpm_ppi.o
  common-obj-$(CONFIG_TPM_TIS) += tpm_tis.o
  common-obj-$(CONFIG_TPM_CRB) += tpm_crb.o
  common-obj-$(CONFIG_TPM_PASSTHROUGH) += tpm_passthrough.o