char: tpm: Keep TPM_INF_IO_PORT define for HAS_IOPORT=n
Subsystems (2)
PATCH 1/1 char: tpm: Keep TPM_INF_IO_PORT define for HAS_IOPORT=n
The recent change to handle HAS_IOPORT removed the TPM_INF_IO_PORT define for the HAS_IOPORT=n case despite the define being used in sections of code not covered by the same ifdef check. This was missed because at the moment TCG_INFINEON indirectly depends on HAS_IOPORT via PNP which depends on ACPI || ISA. As TCG_INFINEON does in principle support MMIO only use add it for COMPILE_TEST to cover the HAS_IOPORT=n case.
---
Note 0: I compile tested this with allyesconfig on s390 using my branch with
compile-time disabled in*()/out*() and verified that TCG_INFINEON was built
Note 1: The SHA of the fixed commit is from linux-next
drivers/char/tpm/Kconfig | 2 +- drivers/char/tpm/tpm_infineon.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/char/tpm/Kconfig +1 -1
@@ -157,7 +157,7 @@ config TCG_ATMEL config TCG_INFINEON tristate "Infineon Technologies TPM Interface" - depends on PNP + depends on PNP || COMPILE_TEST help If you have a TPM security chip from Infineon Technologies (either SLD 9630 TT 1.1 or SLB 9635 TT 1.2) say Yes and it
drivers/char/tpm/tpm_infineon.c +0 -2
@@ -26,9 +26,7 @@#define TPM_MAX_TRIES 5000#define TPM_INFINEON_DEV_VEN_VALUE 0x15D1 -#ifdef CONFIG_HAS_IOPORT #define TPM_INF_IO_PORT 0x0 -#endif #define TPM_INF_IO_MEM 0x1#define TPM_INF_ADDR 0x0
Signature · 1 line
2.40.1
Quoted 11 lines · Niklas Schnelle
The recent change to handle
HAS_IOPORTremoved theTPM_INF_IO_PORTdefine for the HAS_IOPORT=n case despite the define being used in sections of code not covered by the same ifdef check. This was missed because at the momentTCG_INFINEONindirectly depends onHAS_IOPORTvia PNP which depends on ACPI || ISA. AsTCG_INFINEONdoes in principle support MMIO only use add it forCOMPILE_TESTto cover the HAS_IOPORT=n case.Fixes dab56f80e7f9 ("char: tpm: handle HAS_IOPORT dependencies")Signed-off-by Niklas Schnelle <[email protected]>
Thanks!
I applied it to my master but for some reason it is not yet reflected to web ui:
https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git/log/
But it is still applied and perhaps also visible when you seee this!
BR, Jarkko