[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <42097d7cc31c4cf495d1f8b46b3587af@infineon.com>
Date: Wed, 28 Apr 2021 07:13:28 +0000
From: <Peter.Huewe@...ineon.com>
To: <jarkko@...nel.org>, <LinoSanfilippo@....de>
CC: <peterhuewe@....de>, <jgg@...pe.ca>, <stefanb@...ux.vnet.ibm.com>,
<James.Bottomley@...senpartnership.com>, <keescook@...omium.org>,
<jsnitsel@...hat.com>, <ml.linux@...oe.vision>,
<linux-integrity@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2 2/4] tpm: Simplify locality handling
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
Powered by blists - more mailing lists