Linux Integrity Measurement development
 help / color / mirror / Atom feed
* [PATCH] tpm: atmel: depend on X86
@ 2026-07-12 18:32 Karl Mehltretter
  2026-07-18 18:35 ` Jarkko Sakkinen
  0 siblings, 1 reply; 2+ messages in thread
From: Karl Mehltretter @ 2026-07-12 18:32 UTC (permalink / raw)
  To: Jarkko Sakkinen, Peter Huewe
  Cc: Jason Gunthorpe, linux-integrity, linux-kernel, Karl Mehltretter

tpm_atmel probes for the chip at fixed x86 Super-I/O ports (0x4e) with
inb()/outb(), so it only works on x86. TCG_ATMEL nevertheless depends
only on HAS_IOPORT_MAP/HAS_IOPORT, which arm and arm64 also satisfy.
There the probe is useless, and on platforms whose unbacked I/O access
faults it oopses in init_atmel() at boot (e.g. arm/versatile):

  Unable to handle kernel paging request at virtual address fee0004e
  PC is at init_atmel+0x34/0x244

TCG_NSC and TCG_TIS already "depends on X86" (commit 2f592f2a7d74 ("TPM:
NSC and TIS drivers X86 dependency fix")); TCG_ATMEL was missed. Add the
same dependency.

Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
---
 drivers/char/tpm/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig
index 8a8f692b6088..5f672f2c01b0 100644
--- a/drivers/char/tpm/Kconfig
+++ b/drivers/char/tpm/Kconfig
@@ -163,8 +163,7 @@ config TCG_NSC
 
 config TCG_ATMEL
 	tristate "Atmel TPM Interface"
-	depends on HAS_IOPORT_MAP
-	depends on HAS_IOPORT
+	depends on X86
 	help
 	  If you have a TPM security chip from Atmel say Yes and it 
 	  will be accessible from within Linux.  To compile this driver 
-- 
2.39.5 (Apple Git-154)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tpm: atmel: depend on X86
  2026-07-12 18:32 [PATCH] tpm: atmel: depend on X86 Karl Mehltretter
@ 2026-07-18 18:35 ` Jarkko Sakkinen
  0 siblings, 0 replies; 2+ messages in thread
From: Jarkko Sakkinen @ 2026-07-18 18:35 UTC (permalink / raw)
  To: Karl Mehltretter
  Cc: Peter Huewe, Jason Gunthorpe, linux-integrity, linux-kernel

On Sun, Jul 12, 2026 at 08:32:34PM +0200, Karl Mehltretter wrote:
> tpm_atmel probes for the chip at fixed x86 Super-I/O ports (0x4e) with
> inb()/outb(), so it only works on x86. TCG_ATMEL nevertheless depends
> only on HAS_IOPORT_MAP/HAS_IOPORT, which arm and arm64 also satisfy.
> There the probe is useless, and on platforms whose unbacked I/O access
> faults it oopses in init_atmel() at boot (e.g. arm/versatile):
> 
>   Unable to handle kernel paging request at virtual address fee0004e
>   PC is at init_atmel+0x34/0x244
> 
> TCG_NSC and TCG_TIS already "depends on X86" (commit 2f592f2a7d74 ("TPM:
> NSC and TIS drivers X86 dependency fix")); TCG_ATMEL was missed. Add the
> same dependency.
> 
> Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
> ---
>  drivers/char/tpm/Kconfig | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig
> index 8a8f692b6088..5f672f2c01b0 100644
> --- a/drivers/char/tpm/Kconfig
> +++ b/drivers/char/tpm/Kconfig
> @@ -163,8 +163,7 @@ config TCG_NSC
>  
>  config TCG_ATMEL
>  	tristate "Atmel TPM Interface"
> -	depends on HAS_IOPORT_MAP
> -	depends on HAS_IOPORT
> +	depends on X86
>  	help
>  	  If you have a TPM security chip from Atmel say Yes and it 
>  	  will be accessible from within Linux.  To compile this driver 
> -- 
> 2.39.5 (Apple Git-154)
> 

Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>

BR, Jarkko

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-18 18:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-12 18:32 [PATCH] tpm: atmel: depend on X86 Karl Mehltretter
2026-07-18 18:35 ` Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox