Received: by 10.223.164.202 with SMTP id h10csp2357308wrb; Mon, 27 Nov 2017 16:05:28 -0800 (PST) X-Google-Smtp-Source: AGs4zMYZIZO/JY9Ke/TY53ts6br2sy/GFmvLw4WNpsfZHQ6slFUTkDYkQVeq/skqbrLPArdmo371 X-Received: by 10.99.113.5 with SMTP id m5mr39291340pgc.9.1511827528376; Mon, 27 Nov 2017 16:05:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511827528; cv=none; d=google.com; s=arc-20160816; b=LrIjAfO7Yj4SfAWzWQ4/0CmdBKAPquN2mG6df6iB+tdaIcRXDIQuc0MxWuoSgu8Kpt qTV/D1YueDgfwZtN7DSc8CJXEYNYZCmahbdcvZ+Uy0xYApK+rcKt8TN9+tsoVekaUR/K FeJ84ZSb909vjBjQheFl/9LvqQHy+7J9FE540PZob9ClMdCGulh1cN4OaCaesHH9BSvO +iaP6hWD4y1ToGQBXAVa4Kmhui3jRSlMmSLq7z5Z6Q9EJ46BmJdwkfjLhamiH1lrFmAk nR1zzxOCH4FKfygKt9TJbuKhgU0BkAw+ypFcYUIcpAUiMufBbV/FUnK2B6WYxmRKx/J3 1Bcg== 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=qDrwd6Owz2/l1EqpwzHMArXqWjAC6Y/jYMbMEJuY7wI=; b=mHElUqVxu97K2aj8XI/De7Fyl1uWV/CsnpJcpYfKkC3bRUc5z9byrZ0PkOfz5m2suK zNfM7zYH3wum341tWqhV2Q8pyawsKCo1Y28zBh9hXStkL8RpHucpgDhCtStYAyH9p6GW lijw4wx3puUGv+oJ8Sc5MksFwpGC99jx0cZTiNWNLWQKIm8QnzaElbFgFpSP78mBJSww EHDzfUEVP6y03tOY+6dS/6GUtrrspwkH4t/aMfKul3goxVN28A4g/LRVcx5YddgbqWOA 1Oq0uz9ADvMzlMwmqtG+606NBZmoTCYVYrK9wxIwk/bluiW3CCWyc3XI35pnTMDX1PXD xgBQ== 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 i6si2620189plt.461.2017.11.27.16.05.16; Mon, 27 Nov 2017 16:05:28 -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 S1753395AbdK1AEY (ORCPT + 78 others); Mon, 27 Nov 2017 19:04:24 -0500 Received: from mga09.intel.com ([134.134.136.24]:26857 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752651AbdK1AEW (ORCPT ); Mon, 27 Nov 2017 19:04:22 -0500 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Nov 2017 16:04:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,466,1505804400"; d="scan'208";a="6831414" Received: from otc-chromeosbuild-1.jf.intel.com ([10.54.30.35]) by fmsmga004.fm.intel.com with ESMTP; 27 Nov 2017 16:04:20 -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 v5 0/2] Fix corner cases with disabling CLKRUN in tpm_tis Date: Mon, 27 Nov 2017 16:04:18 -0800 Message-Id: <1511827460-29941-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(). 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 1585306549489803580@xxx Tue Nov 28 10:48:59 +0000 2017 X-GM-THRID: 1585306549489803580 X-Gmail-Labels: Inbox,Category Promotions,HistoricalUnread