linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <Peter.Huewe@infineon.com>
To: <jarkko@kernel.org>, <LinoSanfilippo@gmx.de>
Cc: <peterhuewe@gmx.de>, <jgg@ziepe.ca>, <stefanb@linux.vnet.ibm.com>,
	<James.Bottomley@hansenpartnership.com>, <keescook@chromium.org>,
	<jsnitsel@redhat.com>, <ml.linux@elloe.vision>,
	<linux-integrity@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2 2/4] tpm: Simplify locality handling
Date: Wed, 28 Apr 2021 07:13:28 +0000	[thread overview]
Message-ID: <42097d7cc31c4cf495d1f8b46b3587af@infineon.com> (raw)
In-Reply-To: <YIii8RQR/Mcc7PKJ@kernel.org>

On Mon, Apr 26, 2021 at 01:47:18AM +0200, Lino Sanfilippo wrote:
> Currently the TPM (default) locality is claimed and released for each 
> access to the TPM registers which require a claimed locality. This 
> results in locality claim/release combos at various code places. For 
> interrupt handling we also need such a combo in the interrupt handler 
> (for clearing the interrupts) which makes the locality handling even 
> more complicated since now we also have to synchronize concurrent 
> accesses in process and in interrupt context.
>
> Since currently the driver uses only one locality anyway, avoid the 
> increasing complexity by claiming it once at driver startup and only 
> releasing it at driver shutdown.
>
> Due to the simplifications the functions tpm_request_locality() and
> tpm_relinquish_locality() are not needed any more an can be removed.
>

+1
I like the idea, as it also improves performance a bit.
Peter

  reply	other threads:[~2021-04-28  7:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-25 23:47 [PATCH v2 0/4] Fixes for TPM interrupt handling Lino Sanfilippo
2021-04-25 23:47 ` [PATCH v2 1/4] tpm: Use a threaded interrupt handler Lino Sanfilippo
2021-04-26 14:37   ` Stefan Berger
2021-04-27 23:53   ` Jarkko Sakkinen
2021-04-28 22:37     ` Lino Sanfilippo
2021-04-29  6:58       ` Jarkko Sakkinen
2021-05-01  9:01         ` Lino Sanfilippo
2021-04-25 23:47 ` [PATCH v2 2/4] tpm: Simplify locality handling Lino Sanfilippo
2021-04-27 23:49   ` Jarkko Sakkinen
2021-04-28  7:13     ` Peter.Huewe [this message]
2021-04-28 22:44     ` Lino Sanfilippo
2021-04-25 23:47 ` [PATCH v2 3/4] tpm: Fix test for interrupts Lino Sanfilippo
2021-04-26 14:49   ` Stefan Berger
2021-04-28 22:13     ` Lino Sanfilippo
2021-04-25 23:47 ` [PATCH v2 4/4] tpm: Only enable supported irqs Lino Sanfilippo
2021-04-26  5:08   ` kernel test robot
2021-04-26 14:23   ` Stefan Berger

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=42097d7cc31c4cf495d1f8b46b3587af@infineon.com \
    --to=peter.huewe@infineon.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=LinoSanfilippo@gmx.de \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=jsnitsel@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ml.linux@elloe.vision \
    --cc=peterhuewe@gmx.de \
    --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).