From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751512AbcFSRPt (ORCPT ); Sun, 19 Jun 2016 13:15:49 -0400 Received: from mga02.intel.com ([134.134.136.20]:33466 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751234AbcFSRPs (ORCPT ); Sun, 19 Jun 2016 13:15:48 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,494,1459839600"; d="scan'208";a="721856906" Date: Sun, 19 Jun 2016 19:15:31 +0200 From: Jarkko Sakkinen To: Peter Huewe Cc: Jason Gunthorpe , open list , "moderated list:TPM DEVICE DRIVER" Subject: Re: [PATCH v2 0/3] Runtime PM for TPM2 CRB chips Message-ID: <20160619171531.GA25349@intel.com> References: <1466262628-25530-1-git-send-email-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1466262628-25530-1-git-send-email-jarkko.sakkinen@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 18, 2016 at 05:10:25PM +0200, Jarkko Sakkinen wrote: > These patches implement support for runtime PM with TPM2 CRB chips such > as PTT in Skylake. > > This is very naive implementation since the TPM is resumed and supended > for every transaction thus causing total 40 ms latency for each > transaction but for the existing use cases this shouldn't be an issue. > > Jarkko Sakkinen (3): > tpm_crb: fix crb_req_canceled behavior > tpm, tpm_crb: remove wmb()'s > tpm, tpm_crb: runtime power management > > drivers/char/tpm/tpm-interface.c | 3 ++ > drivers/char/tpm/tpm_crb.c | 60 +++++++++++++++++++++++++++++++++++----- > 2 files changed, 56 insertions(+), 7 deletions(-) Reviewing myself: * I fsckd the description. The latency is whopping 400 ms, not 4 ms. Sorry about that. Thus it's better to use autosuspend. * Callbacks should take tpm_mutex before doing anything. I guess that tpm_tis could later on also take advantage of this work? /Jarkko