Received: by 10.223.164.202 with SMTP id h10csp176222wrb; Thu, 30 Nov 2017 08:35:48 -0800 (PST) X-Google-Smtp-Source: AGs4zMZEMKGJAtUK2UZC3K7YwoaLuy1fiqZCa/nm87nOTX5KnRrePcOWcY9l8XI41U5pwU433w8a X-Received: by 10.159.195.72 with SMTP id z8mr3186948pln.183.1512059748689; Thu, 30 Nov 2017 08:35:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512059748; cv=none; d=google.com; s=arc-20160816; b=up2hbwS99KWfg9PV7OCcQ9hVbQnNoXvNzfJzaGQjc1KCdT1/RdkW5cYNSeQhkdhO7o CmwYkwBQ5eQ9d/IkP2vca9eI+yS1zYbY3S7Fy3WHHR67ldEJ4mtgvgmjzs3XRKI0GwH1 hmSZ1zkASEgmUm5F0k9/2mBXjiKcMQn3GvrF4aPWfCEgVkiz7HadHJA66G2EKYS/6JQt +uS2nV8+NE753Lelr6pEHGfr30WpjhnLQdyGpDYvSGodR4RD2nwkPPCQnb1OsqNOILYJ cM5FYmhbw6nAxiJ5MsO8E0R+3zjfzteId8QjODNuVXuD3BUs248ZgwEfohVgLtlysfCM SNEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=+Gs0sAndYAB9VgTD4Io6kw+MwcMKOsIjv1PnK3G2rxY=; b=oyZL04cZl7nXzn7kwsyoyQoXTyFc9ae45s5RcBYeu9pEhk7SytfvdLoLesW63Qj2sG KjpwwwhY8x5zqke7hPY47O78zn0XU5vKG+4zZuTnLvKsb1lAq/LFuslSKimm9T48VZTU di1yH9VKXc0xm/LYAbeaI+a8+0WR22YBVmYPiZOcrFWTPlg+TXdwQOZ2Z0WDJaA7D8UE ZNuyGszsz/C3W6wnR9BIG2iN+CVbozABd113QPgA3FoYUAXY72OBl2L4bXUkO98uWp9G YBIp/n3AQeVKr+F6v6iFkZMraL0Z9JX0g5Jf2SnukZgc7POcFh1v/kNV42zN4ZNUCVRV ZUQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j12si3237427pgf.678.2017.11.30.08.35.35; Thu, 30 Nov 2017 08:35:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752564AbdK3QfX (ORCPT + 99 others); Thu, 30 Nov 2017 11:35:23 -0500 Received: from mga02.intel.com ([134.134.136.20]:9222 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750742AbdK3QfV (ORCPT ); Thu, 30 Nov 2017 11:35:21 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Nov 2017 08:35:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,341,1508828400"; d="scan'208";a="8945130" Received: from garyamar-mobl1.ger.corp.intel.com (HELO localhost) ([10.249.254.220]) by fmsmga001.fm.intel.com with ESMTP; 30 Nov 2017 08:35:17 -0800 Date: Thu, 30 Nov 2017 18:35:16 +0200 From: Jarkko Sakkinen To: Azhar Shaikh Cc: jgunthorpe@obsidianresearch.com, peterhuewe@gmx.de, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, tpmdd-devel@lists.sourceforge.net Subject: Re: [PATCH v6 0/2] Fix corner cases with disabling CLKRUN in tpm_tis Message-ID: <20171130163516.uazhkglg7yfzpuvo@linux.intel.com> References: <1511980791-125269-1-git-send-email-azhar.shaikh@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1511980791-125269-1-git-send-email-azhar.shaikh@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 29, 2017 at 10:39:49AM -0800, Azhar Shaikh wrote: > Changes from v1: > - Patch 1: "tpm: Keep CLKRUN enabled throughout the duration of transmit_cmd()" > - Add NULL checks before calling clk_toggle callback > - Use IS_ENABLED instead of ifdef in tpm_tis_clkrun_toggle() > - Do not call tpm_platform_begin_xfer() and tpm_platform_end_xfer() > from tpm_tis_clkrun_toggle(). Make them static again. > > - Patch 2: "tpm_tis: Move ilb_base_addr to tpm_tis_tcg_phy" > - This is a new patch in this series as per suggestion from Jason. > - Is the current implementation ok or I should move the code in tpm_tis_pnp_remove() > and tpm_tis_plat_remove() inside tpm_tis_remove(). That way all the unmapping > can be done in one place, instead of 3 different places now. Also the unmapping > in tpm_tis_init() can be moved to tpm_tis_remove(), since in case of error > tpm_tis_core_init() calls tpm_tis_remove(). Kindly suggest. > > Changes from v2: > - Patch 1: "tpm: Keep CLKRUN enabled throughout the duration of transmit_cmd()" > - No changes > > - Patch 2: "tpm_tis: Move ilb_base_addr to tpm_tis_tcg_phy" > - Updated is_bsw() function to have the #ifdef CONFIG_X86 check within the function > itself. Also removed the #ifdef CONFIG_X86 from all other places around is_bsw() > > Changes from v3: > - Patch 1: "tpm: Keep CLKRUN enabled throughout the duration of transmit_cmd()" > - Change function name from clk_toggle to clk_enable > - Update the commit message. > > - Patch 2: "tpm_tis: Move ilb_base_addr to tpm_tis_tcg_phy" > - No changes > > Changes from v4: > - The numbering of patches is now interchanged. > > - Patch 1: "tpm_tis: Move ilb_base_addr to tpm_tis_data" > - Had to move ilb_base_addr to tpm_tis_data, from tpm_tis_tcg_phy. > Since the ioremapping of ilb_base_addr had to be done before any TPM access, > hence moved the variable to tpm_tis_data. > - Also move the ioremapping of ilb_base_addr from tpm_tis_init() to > tpm_tis_core_init() i.e. before any TPM access is done. > - Rename marco LPC_CNTRL_REG_OFFSET to LPC_CNTRL_OFFSET > - Update the commit message. > > - Patch 2: "tpm: Keep CLKRUN enabled throughout the duration of transmit_cmd()" > - Remove the functions tpm_platform_begin_xfer() and tpm_platform_end_xfer() > - Move the code from these functions to tpm_tis_clkrun_enable(). > > Changes from v5: > - Patch 1: "tpm_tis: Move ilb_base_addr to tpm_tis_data" > - No changes > > - Patch 2: "tpm: Keep CLKRUN enabled throughout the duration of transmit_cmd()" > - Update the commit message. > > Azhar Shaikh (2): > tpm_tis: Move ilb_base_addr to tpm_tis_data > tpm: Keep CLKRUN enabled throughout the duration of transmit_cmd() > > drivers/char/tpm/tpm-interface.c | 6 ++ > drivers/char/tpm/tpm_tis.c | 121 ++++++--------------------------------- > drivers/char/tpm/tpm_tis_core.c | 111 +++++++++++++++++++++++++++++++++-- > drivers/char/tpm/tpm_tis_core.h | 17 ++++++ > include/linux/tpm.h | 1 + > 5 files changed, 147 insertions(+), 109 deletions(-) > > -- > 1.9.1 I'll go through this next week and test with SPI based TPM that it doesn't break anything. /Jarkko From 1585426859785919312@xxx Wed Nov 29 18:41:16 +0000 2017 X-GM-THRID: 1585426859785919312 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread