From: Niklas Schnelle <schnelle@linux.ibm.com>
To: Peter Huewe <peterhuewe@gmx.de>, Jarkko Sakkinen <jarkko@kernel.org>
Cc: linux-integrity@vger.kernel.org,
Heiko Carstens <hca@linux.ibm.com>,
linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@kernel.org>,
Niklas Schnelle <schnelle@linux.ibm.com>
Subject: [PATCH] char: tpm: Keep TPM_INF_IO_PORT define for HAS_IOPORT=n
Date: Mon, 22 Apr 2024 14:37:11 +0200 [thread overview]
Message-ID: <20240422123711.1739063-1-schnelle@linux.ibm.com> (raw)
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.
Link: https://lore.kernel.org/lkml/9d9fa267-067e-421b-9a39-aa178b913298@app.fastmail.com/
Fixes: dab56f80e7f9 ("char: tpm: handle HAS_IOPORT dependencies")
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
---
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(-)
diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig
index 418c9ed59ffd..852bb9344788 100644
--- a/drivers/char/tpm/Kconfig
+++ b/drivers/char/tpm/Kconfig
@@ -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
diff --git a/drivers/char/tpm/tpm_infineon.c b/drivers/char/tpm/tpm_infineon.c
index 99c6e565ec8d..2d2ae37153ba 100644
--- a/drivers/char/tpm/tpm_infineon.c
+++ b/drivers/char/tpm/tpm_infineon.c
@@ -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
--
2.40.1
next reply other threads:[~2024-04-22 12:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-22 12:37 Niklas Schnelle [this message]
2024-04-23 21:33 ` [PATCH] char: tpm: Keep TPM_INF_IO_PORT define for HAS_IOPORT=n Jarkko Sakkinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240422123711.1739063-1-schnelle@linux.ibm.com \
--to=schnelle@linux.ibm.com \
--cc=arnd@kernel.org \
--cc=hca@linux.ibm.com \
--cc=jarkko@kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox