linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: Jerry Snitselaar <jsnitsel@redhat.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Christian Bundy <christianbundy@fraction.io>,
	Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
	Stefan Berger <stefanb@linux.vnet.ibm.com>,
	stable <stable@vger.kernel.org>,
	linux-integrity@vger.kernel.org
Subject: Re: [PATCH v2] tpm_tis: reserve chip for duration of tpm_tis_core_init
Date: Wed, 18 Dec 2019 15:31:23 -0800	[thread overview]
Message-ID: <CAPcyv4h8sK+geVvBb1534V9CgdvOnkpPeStV3B8Q1Qdve3is0A@mail.gmail.com> (raw)
In-Reply-To: <37f4ed0d6145dbe1e8724a5d05d0da82b593bf9c.camel@linux.intel.com>

On Wed, Dec 18, 2019 at 3:07 PM Jarkko Sakkinen
<jarkko.sakkinen@linux.intel.com> wrote:
>
> On Tue, 2019-12-17 at 10:18 -0700, Jerry Snitselaar wrote:
> > On Tue Dec 17 19, Jarkko Sakkinen wrote:
> > > On Mon, 2019-12-16 at 18:14 -0800, Dan Williams wrote:
> > > > On Mon, Dec 16, 2019 at 6:00 PM Jerry Snitselaar <jsnitsel@redhat.com> wrote:
> > > > > On Mon Dec 16 19, Dan Williams wrote:
> > > > > > On Mon, Dec 16, 2019 at 4:59 PM Jarkko Sakkinen
> > > > > > <jarkko.sakkinen@linux.intel.com> wrote:
> > > > > > > On Wed, 2019-12-11 at 16:54 -0700, Jerry Snitselaar wrote:
> > > > > > > > Instead of repeatedly calling tpm_chip_start/tpm_chip_stop when
> > > > > > > > issuing commands to the tpm during initialization, just reserve the
> > > > > > > > chip after wait_startup, and release it when we are ready to call
> > > > > > > > tpm_chip_register.
> > > > > > > >
> > > > > > > > Cc: Christian Bundy <christianbundy@fraction.io>
> > > > > > > > Cc: Dan Williams <dan.j.williams@intel.com>
> > > > > > > > Cc: Peter Huewe <peterhuewe@gmx.de>
> > > > > > > > Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > > > > > > > Cc: Jason Gunthorpe <jgg@ziepe.ca>
> > > > > > > > Cc: Stefan Berger <stefanb@linux.vnet.ibm.com>
> > > > > > > > Cc: stable@vger.kernel.org
> > > > > > > > Cc: linux-integrity@vger.kernel.org
> > > > > > > > Fixes: a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()")
> > > > > > > > Fixes: 5b359c7c4372 ("tpm_tis_core: Turn on the TPM before probing IRQ's")
> > > > > > > > Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
> > > > > > >
> > > > > > > I pushed to my master with minor tweaks and added my tags.
> > > > > > >
> > > > > > > Please check before I put it to linux-next.
> > > > > >
> > > > > > I don't see it yet here:
> > > > > >
> > > > > > http://git.infradead.org/users/jjs/linux-tpmdd.git/shortlog/refs/heads/master
> > > > > >
> > > > > > However, I wanted to make sure you captured that this does *not* fix
> > > > > > the interrupt issue. I.e. make sure you remove the "Fixes:
> > > > > > 5b359c7c4372 ("tpm_tis_core: Turn on the TPM before probing IRQ's")"
> > > > > > tag.
> > > > > >
> > > > > > With that said, are you going to include the revert of:
> > > > > >
> > > > > > 1ea32c83c699 tpm_tis_core: Set TPM_CHIP_FLAG_IRQ before probing for interrupts
> > > > >
> > > > > Dan, with the above reverted do you still get the screaming interrupt?
> > > >
> > > > Yes, the screaming interrupt goes away, although it is replaced by
> > > > these messages when the driver starts:
> > > >
> > > > [    3.725131] tpm_tis IFX0740:00: 2.0 TPM (device-id 0x1B, rev-id 16)
> > > > [    3.725358] tpm tpm0: tpm_try_transmit: send(): error -5
> > > > [    3.725359] tpm tpm0: [Firmware Bug]: TPM interrupt not working,
> > > > polling instead
> > > >
> > > > If the choice is "error message + polled-mode" vs "pinning a cpu with
> > > > interrupts" I'd accept the former, but wanted Jarkko with his
> > > > maintainer hat to weigh in.
> > > >
> > > > Is there a simple sanity check I can run to see if the TPM is still
> > > > operational in this state?
> > >
> > > What about T490S?
> > >
> > > /Jarkko
> > >
> >
> > Hi Jarkko, I'm waiting to hear back from the t490s user, but I imagine
> > it still has the problem as well.
> >
> > Christian, were you able to try this patch and verify it still
> > resolves the issue you were having with the kernel failing to get the
> > timeouts and durations from the tpm?
>
> Including those reverts would be a bogus change at this point.

I'm failing to see how you arrived at that conclusion.

> The fix that I already applied obviously fixes an issue even if
> it does not fix all the issues.

These patches take a usable system and make it unusable:

1ea32c83c699 tpm_tis_core: Set TPM_CHIP_FLAG_IRQ before probing for interrupts
5b359c7c4372 tpm_tis_core: Turn on the TPM before probing IRQ's

...they need to be reverted, or the regression needs to be fixed, but
asserting that you fixed something else unrelated does not help.

  reply	other threads:[~2019-12-18 23:31 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-11 23:17 [PATCH] tpm_tis: reserve chip for duration of tpm_tis_core_init Jerry Snitselaar
2019-12-11 23:26 ` Jerry Snitselaar
2019-12-11 23:30   ` Dan Williams
2019-12-11 23:49     ` Jerry Snitselaar
2019-12-11 23:54 ` [PATCH v2] " Jerry Snitselaar
2019-12-12  2:15   ` Dan Williams
2019-12-12  2:18     ` Dan Williams
2019-12-17  1:25       ` Jarkko Sakkinen
2019-12-17  0:58   ` Jarkko Sakkinen
2019-12-17  1:18     ` Dan Williams
2019-12-17  2:00       ` Jerry Snitselaar
2019-12-17  2:14         ` Dan Williams
2019-12-17 12:05           ` Jarkko Sakkinen
2019-12-17 17:18             ` Jerry Snitselaar
2019-12-17 17:26               ` Jerry Snitselaar
2019-12-18 23:09                 ` Jarkko Sakkinen
2019-12-18 23:06               ` Jarkko Sakkinen
2019-12-18 23:31                 ` Dan Williams [this message]
2019-12-19 10:07                   ` Jerry Snitselaar
2019-12-27  5:09                     ` Jarkko Sakkinen
2019-12-27  5:42                       ` Jarkko Sakkinen
2019-12-27  6:03                         ` Jarkko Sakkinen
2019-12-17 20:29             ` Jerry Snitselaar
2019-12-18 23:12               ` Jarkko Sakkinen
2019-12-17  1:19     ` Jarkko Sakkinen
2019-12-17  0:43 ` [PATCH] " 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=CAPcyv4h8sK+geVvBb1534V9CgdvOnkpPeStV3B8Q1Qdve3is0A@mail.gmail.com \
    --to=dan.j.williams@intel.com \
    --cc=christianbundy@fraction.io \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jgg@ziepe.ca \
    --cc=jsnitsel@redhat.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=stable@vger.kernel.org \
    --cc=stefanb@linux.vnet.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).