Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1609452

Re: [RFC PATCH 1/1] tpm_tis: convert to using locality callbacks

From Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 1/1] tpm_tis: convert to using locality callbacks
Date 2017-03-27 07:30 +0200
Message-ID <tpvo6-2YI-3@gated-at.bofh.it> (permalink)
References <tp0aB-5Sl-3@gated-at.bofh.it> <tp0aC-5Sl-9@gated-at.bofh.it>
Organization Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

Show all headers | View raw


On Sat, Mar 25, 2017 at 01:05:21PM -0700, Jerry Snitselaar wrote:
> This patch converts tpm_tis to use of the new tpm class ops
> request_locality, and relinquish_locality.
> 
> With the move to using the callbacks, release_locality is changed so
> that we now release the locality even if there is no request pending.
> 
> This required some changes to the tpm_tis_core_init code path to
> make sure locality is requested when needed:
> 
>   - tpm2_probe code path will end up calling request/release through
>     callbacks, so request_locality prior to tpm2_probe not needed.
> 
>   - probe_itpm makes calls to tpm_tis_send_data which no longer calls
>     request_locality, so add request_locality prior to tpm_tis_send_data
>     calls. Also drop release_locality call in middleof probe_itpm, and
>     keep locality until release_locality called at end of probe_itpm.
> 
> Cc: Peter Huewe <peterhuewe@gmx.de>
> Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> Cc: Marcel Selhorst <tpmdd@selhorst.net>
> Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
> ---
>  drivers/char/tpm/tpm_tis_core.c | 35 +++++++++--------------------------
>  1 file changed, 9 insertions(+), 26 deletions(-)

LGTM except what Jason said earlier.

/Jarkko

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC PATCH 0/1] tpm_tis: convert to use locality callbacks Jerry Snitselaar <jsnitsel@redhat.com> - 2017-03-25 21:10 +0100
  [RFC PATCH 1/1] tpm_tis: convert to using locality callbacks Jerry Snitselaar <jsnitsel@redhat.com> - 2017-03-25 21:10 +0100
    Re: [RFC PATCH 1/1] tpm_tis: convert to using locality callbacks Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2017-03-26 22:40 +0200
      Re: [RFC PATCH 1/1] tpm_tis: convert to using locality callbacks Jerry Snitselaar <jsnitsel@redhat.com> - 2017-03-27 00:50 +0200
    Re: [RFC PATCH 1/1] tpm_tis: convert to using locality callbacks Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-03-27 07:30 +0200

csiph-web