public inbox for linux-integrity@vger.kernel.org
 help / color / mirror / Atom feed
From: "Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>
To: peterhuewe@gmx.de, jarkko@kernel.org
Cc: jgg@ziepe.ca, linux-integrity@vger.kernel.org,
	linux-kernel@vger.kernel.org, l.sanfilippo@kunbus.com,
	jsnitsel@redhat.com
Subject: Re: [PATCH - for 6.4] tpm: tpm_tis: Disable interrupts for AEON UPX-i11
Date: Wed, 17 May 2023 16:15:18 +0300	[thread overview]
Message-ID: <886904c2-26ea-8876-a6cf-b8de6ff94799@linux.intel.com> (raw)
In-Reply-To: <20230517122931.22385-1-peter.ujfalusi@linux.intel.com>



On 17/05/2023 15:29, Peter Ujfalusi wrote:
> The interrupts initially works on the device but they will stop arriving
> after about 200 interrupts.
> 
> On system reboot/shutdown this will cause a long wait (120000 jiffies).
> 
> The interrupts on this device got enabled by commit
> e644b2f498d2 ("tpm, tpm_tis: Enable interrupt test")
> 
> Prior to this point the interrupts were not enabled on this machine.
> 
> Complements: e644b2f498d2 ("tpm, tpm_tis: Enable interrupt test")
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
> ---
> Hi,
> 
> This patch applies on top of mainline since 6.4-rc1 takes about 2 minutes to
> reboot on this machine, linux-next have
> e7d3e5c4b1dd tpm/tpm_tis: Disable interrupts for more Lenovo devices
> 
> I'm not sure if I shouold send this on top of next or mainline is fine, please
> let me know the preferred way to get this to 6.4.

In 6.3 the kernel prints this on boot:
# dmesg -w | grep tpm
tpm_tis MSFT0101:00: 2.0 TPM (device-id 0x1B, rev-id 22)
tpm tpm0: [Firmware Bug]: TPM interrupt not working, polling instead

It is interesting that with 6.4 most of the times the interrupts got
enabled (without this patch) resulting stall during reboot/shutdown but
there are few boots when the driver falls back to polling and thus the
TPM driver works.

The command which 'locks' the system is TPM2_CC_SHUTDOWN, it is given
TPM_UNDEFINED as duration index by tpm2_ordinal_duration_index().

> 
> Regards,
> Peter
> 
>  drivers/char/tpm/tpm_tis.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
> index 7af389806643..aad682c2ab21 100644
> --- a/drivers/char/tpm/tpm_tis.c
> +++ b/drivers/char/tpm/tpm_tis.c
> @@ -122,6 +122,13 @@ static const struct dmi_system_id tpm_tis_dmi_table[] = {
>  			DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T490s"),
>  		},
>  	},
> +	{
> +		.callback = tpm_tis_disable_irq,
> +		.ident = "UPX-TGL",
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "AAEON"),
> +		},
> +	},
>  	{}
>  };
>  

-- 
Péter

  reply	other threads:[~2023-05-17 13:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17 12:29 [PATCH - for 6.4] tpm: tpm_tis: Disable interrupts for AEON UPX-i11 Peter Ujfalusi
2023-05-17 13:15 ` Péter Ujfalusi [this message]
2023-05-18 18:37 ` Jarkko Sakkinen
2023-05-18 18:47   ` Jarkko Sakkinen
2023-05-18 18:50 ` Jerry Snitselaar
2023-05-18 18:53   ` Jarkko Sakkinen
2023-05-18 20:24     ` Péter Ujfalusi
2023-05-22  7:40       ` Péter Ujfalusi
2023-05-24  2:50         ` Jarkko Sakkinen
2023-05-24  2:24       ` 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=886904c2-26ea-8876-a6cf-b8de6ff94799@linux.intel.com \
    --to=peter.ujfalusi@linux.intel.com \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=jsnitsel@redhat.com \
    --cc=l.sanfilippo@kunbus.com \
    --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