All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: "Shaikh, Azhar" <azhar.shaikh@intel.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
	"peterhuewe@gmx.de" <peterhuewe@gmx.de>,
	"linux-integrity@vger.kernel.org"
	<linux-integrity@vger.kernel.org>
Subject: Re: [PATCH RFC v3 1/2] tpm: Keep CLKRUN enabled throughout the duration of transmit_cmd()
Date: Tue, 21 Nov 2017 01:19:20 +0200	[thread overview]
Message-ID: <20171120231920.hewcmv2h76rqltes@linux.intel.com> (raw)
In-Reply-To: <5FFFAD06ADE1CA4381B3F0F7C6AF582896E937@ORSMSX109.amr.corp.intel.com>

On Mon, Nov 20, 2017 at 06:52:13PM +0000, Shaikh, Azhar wrote:
> 
> 
> >-----Original Message-----
> >From: Jason Gunthorpe [mailto:jgg@ziepe.ca]
> >Sent: Monday, November 20, 2017 10:35 AM
> >To: Shaikh, Azhar <azhar.shaikh@intel.com>
> >Cc: jarkko.sakkinen@linux.intel.com; peterhuewe@gmx.de; linux-
> >integrity@vger.kernel.org
> >Subject: Re: [PATCH RFC v3 1/2] tpm: Keep CLKRUN enabled throughout the
> >duration of transmit_cmd()
> >
> >On Wed, Nov 15, 2017 at 02:07:11PM -0800, Azhar Shaikh wrote:
> >
> >> -static void tpm_platform_begin_xfer(void)
> >> +static void tpm_platform_begin_xfer(struct tpm_tis_data *data)
> >>  {
> >>  	u32 clkrun_val;
> >> +	struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data);
> >>
> >> -	if (!is_bsw())
> >> +	if (!is_bsw() || ((data->flags & TPM_TIS_CLK_ENABLE) &&
> >> +					phy->begin_xfer_done))
> >>  		return;
> >
> >I think everything looks OK now, but I was reading over the series again, and I
> >admit I don't quite get it..
> >
> >Why do we continue to have tpm_platform_begin_xfer after you added
> >clk_toggle?
> >
> 
> We want to have the CLKRUN disabled for any/all TPM transactions.
> The clk_toggle handles only the case while a TPM command is being sent and received.
> We have to take into consideration other places too where TPM access is happening outside the TPM command flow. For eg: request_locality, check_locality, release_locality, wait_startup which might be called outside the flow of a TPM command.
> 
> >Why not just directly enable CLK_RUN in clk_toggle and get rid of
> >tpm_platform_begin_xfer/etc ??
> >
> >Is there some reason we still need to to per transfer stuff???
> >
> >clk_enable or device_enable would also be a better name than clock_toggle.
> >
> 
> Will change it to clk_enable.
> Should I then upload the next patch for review and remove the "RFC" tag now? And if so, should I retain the change history of the patch versions?

Please do and keep my reviewed-by.

/Jarkko

  parent reply	other threads:[~2017-11-20 23:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15 22:07 [PATCH RFC v3 0/2] Fix corner cases with disabling CLKRUN in tpm_tis Azhar Shaikh
2017-11-15 22:07 ` [PATCH RFC v3 1/2] tpm: Keep CLKRUN enabled throughout the duration of transmit_cmd() Azhar Shaikh
2017-11-20 18:34   ` Jason Gunthorpe
2017-11-20 18:52     ` Shaikh, Azhar
2017-11-20 19:21       ` Jason Gunthorpe
2017-11-20 19:34         ` Shaikh, Azhar
2017-11-20 19:38           ` Jason Gunthorpe
2017-11-20 21:19             ` Shaikh, Azhar
2017-11-20 23:26               ` Jason Gunthorpe
2017-11-21 19:18                 ` Shaikh, Azhar
2017-11-21 19:27                   ` Jason Gunthorpe
2017-11-20 23:19       ` Jarkko Sakkinen [this message]
2017-11-20 23:17   ` Jarkko Sakkinen
2017-11-15 22:07 ` [PATCH RFC v3 2/2] tpm_tis: Move ilb_base_addr to tpm_tis_tcg_phy Azhar Shaikh
2017-11-20 23:18   ` Jarkko Sakkinen
2017-11-20 15:58 ` [PATCH RFC v3 0/2] Fix corner cases with disabling CLKRUN in tpm_tis Shaikh, Azhar

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=20171120231920.hewcmv2h76rqltes@linux.intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=azhar.shaikh@intel.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.