RE: [PATCH v2 2/4] tpm: Simplify locality handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux