Received: by 10.223.164.202 with SMTP id h10csp4718421wrb; Wed, 29 Nov 2017 10:41:16 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ7qbk3vlxaIwCIc4mOM4XOBkbMYOa3J3LQdLF4kFV4Idkoyi2shnWtZHmz7fO/L5UPk6yp X-Received: by 10.99.65.135 with SMTP id o129mr3662547pga.81.1511980876676; Wed, 29 Nov 2017 10:41:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511980876; cv=none; d=google.com; s=arc-20160816; b=jKfs/Xs9/1c8E+qucwq3+RGuzKOGY6z/uD5sH//sOsu8S0mGu+abP6/4xTnNDsiDxo kJhUvOrF+vvBM1yIzSkOmNLTP5X6TIihxPUJPuZhpmArhuZNxP5NAhvB5G7vmWEXlZML 80P+ML/ImqBByZOnAlYpRRBbmOPwTUF+CrGDOndHQMPtm1khGFl9NwKUEIihkNIhUdRE jCpIvlKeosHn0HDZoaHqalU8B3lEz3TlWzkQCdtAZ3Dabgr9AJUnTDofShepXXhknU/o hdUjvELkuQksY7oM1EXH7os5RdMPwcwZ8xpqnQG9yjkNMOa1GkwZ+IRN66HYnyjacJh4 7enQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=mR5zLGZJW1PaBPGfySkZ3/tOrpyBz7jP0NUN1wR9MQI=; b=lIvreZGN8Ic4QihYvhTLZz29YHndGkO6mE5bOYlAR6lq3pRNat1PzZU3CxXVc0h/zi heT5hsdo2sSLDnJTE+w+csFQobXDXgchoSqgTEetKPj7bXIaOC3j2Org/A36vH4XT/ZO C7vN2ZyUQlhOtZieL4tIEpMYx5ZQ6GROpfCYwvlSA+oQR00OG7qMI243FuwpJC0vhdR3 ePXgKBODHE0ZFoIq0kuDqWVMXX+euE3DAO17FPcz4JjBBw29qhb1TSa9roXqgiTE1YOw TBBbcelqshn2W1Rylu/wjLmiPjwDNz0wRax0KgXbzTQTK09B2SbXteQUh1KUD40XIqEE QPhQ== 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 p3si1743197pfg.369.2017.11.29.10.41.06; Wed, 29 Nov 2017 10:41:16 -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 S1751992AbdK2Sjy (ORCPT + 70 others); Wed, 29 Nov 2017 13:39:54 -0500 Received: from mga01.intel.com ([192.55.52.88]:35780 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751474AbdK2Sjw (ORCPT ); Wed, 29 Nov 2017 13:39:52 -0500 Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Nov 2017 10:39:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,338,1508828400"; d="scan'208";a="181665775" Received: from otc-chromeosbuild-1.jf.intel.com ([10.54.30.35]) by fmsmga005.fm.intel.com with ESMTP; 29 Nov 2017 10:39:51 -0800 From: Azhar Shaikh To: jarkko.sakkinen@linux.intel.com, jgunthorpe@obsidianresearch.com, peterhuewe@gmx.de Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, tpmdd-devel@lists.sourceforge.net, azhar.shaikh@intel.com Subject: [PATCH v6 0/2] Fix corner cases with disabling CLKRUN in tpm_tis Date: Wed, 29 Nov 2017 10:39:49 -0800 Message-Id: <1511980791-125269-1-git-send-email-azhar.shaikh@intel.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 From 1584286118764466643@xxx Fri Nov 17 04:29:41 +0000 2017 X-GM-THRID: 1584286118764466643 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread