Message ID | 20221120133134.28926-12-LinoSanfilippo@gmx.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1117447wrr; Sun, 20 Nov 2022 05:36:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf4gMq1+EQD/KJbGoUy5Xji6IhFMna3Q2gAvmbMdvfVOUuApogPN9ZKR0Sm04T0ncZtNxFjg X-Received: by 2002:a63:a05:0:b0:42b:42fb:3da1 with SMTP id 5-20020a630a05000000b0042b42fb3da1mr14212123pgk.538.1668951379961; Sun, 20 Nov 2022 05:36:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668951379; cv=none; d=google.com; s=arc-20160816; b=wYDiw5/Sg1WBFO30R5fhIcyuuPjwGkgaIliBVHLPB1zv62VTYNbFAnJ+ttWBlkoXvb LRUKL/AdsI/p59waDr/eJs+YIvDk6Cqrl0htHDSkD6cggnhyFbB8953bfUvX9nYGHqyv hDK31qXp65GJZJfP3aGhFZ7vRC8Eq+dFxGzlxHy4FkaNB2B7GsCqXA7fa8KHBe3eHmAc X1E36j3uPOHkSRS4TN/ll2tU+vXM12PcQOz2vT/Zdn7qOebpC5KW17q2sb3gllyStsX2 mODRyPQRnnSigbZme4YcX/fQihuQ2mu6SLV4cyEvg0Bxae8dw04RtE50IDbceAjeO0qo 7mTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oScRVbxrfAZvMb4vGMxtk0THIEPoRWv4PH6mpzzQxyU=; b=lveiOQEcTpxOoFaYM/xn4wdU7veAMVGklikPkS+ZrK7u+nRChbTl24w3FMV196nmkB pU9HkQfO7UrdEEasAut3wKxisCuQkt543uM3XGbX8U7LH5vFVMD6F0OAI3zo4kPDO/Hr OitXHSjB5k/s62I4Fe+LCswGbBZ3PVSHq+fMNXAhWKpSylLx47Q/1bpbSCoy/QF/2utr ce0xsbk0IfVI/cWMbwpLxTKc9/KVMqyKjqqYMUwxuwFLws//C+wC8e0Ws627YI1GK9N3 0gqRpYtnuay9WcHSIlEGNkkyZ6OpLMiVJWWw551L0kuvRP4nbOzLXm+z6sF2synWcGco /zpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=BIsKDu9o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i11-20020a17090332cb00b00186de874df8si9938749plr.442.2022.11.20.05.36.05; Sun, 20 Nov 2022 05:36:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=BIsKDu9o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229848AbiKTNdM (ORCPT <rfc822;yuanzuo1009@gmail.com> + 99 others); Sun, 20 Nov 2022 08:33:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229693AbiKTNci (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 20 Nov 2022 08:32:38 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6848AB7A; Sun, 20 Nov 2022 05:32:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1668951128; bh=oScRVbxrfAZvMb4vGMxtk0THIEPoRWv4PH6mpzzQxyU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=BIsKDu9oeKvrALhGSAcrokwQfOIXZZdmtP22KCKbqiS+dD4mhMEu4dRm5H1hRBhKG ZnoutdrPJewrCEBcauz1gcFlvHcGsu8cS0pQCU7UoeIg/1ieF6eV03XjWs37woIL64 n522vv32jRvY0/euLkMlUApdc9hJ4OJkN5Qy3CAtrnPCRmbt/7uHfJDsiK6V9n6URD 5uSMLCXMVoODZgP99ZyfMWfZGEgXWnr7tSe8gp3i5b8uHg1PvPOCrkOXpYZchqcJ0o T8YxJVVSoL/63XURzZIV5OAG9K65iOL2/mJuxBTyNbc3st37kAcwfhClAriXJkBJmY 3TSND06Ta8aqg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from Venus.speedport.ip ([84.162.7.17]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MGhuK-1oiz3S1l22-00DotB; Sun, 20 Nov 2022 14:32:08 +0100 From: Lino Sanfilippo <LinoSanfilippo@gmx.de> To: peterhuewe@gmx.de, jarkko@kernel.org, jgg@ziepe.ca Cc: stefanb@linux.vnet.ibm.com, linux@mniewoehner.de, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, jandryuk@gmail.com, pmenzel@molgen.mpg.de, l.sanfilippo@kunbus.com, LinoSanfilippo@gmx.de, lukas@wunner.de, p.rosenberger@kunbus.com Subject: [PATCH v10 11/14] tpm, tpm_tis: Claim locality in interrupt handler Date: Sun, 20 Nov 2022 14:31:31 +0100 Message-Id: <20221120133134.28926-12-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20221120133134.28926-1-LinoSanfilippo@gmx.de> References: <20221120133134.28926-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:84xPu3tCUK7zirPgmWTPn+CQfvQtzq9WkhaRX7+boR4TkLhrnOf g79mgN5DxYpBbTu+2iAPgUpC+mRLb8F5Toqpr01QbqCVvNAFIEVo8Oip6IwFpMtFl/sdZ0A 0PPkjD6FApCR4ldNCUga/kuiNUP+mENaq6xHCPkQJLNjw5t1dRtPKp2zl84pvdw2L/HlB66 nbkO1VEqsCOYCc3HfdfTQ== UI-OutboundReport: notjunk:1;M01:P0:38sDud5K77I=;2r4LHhx5wFQcp81SQEy+mGfWmDT fnLE8e969kQ8lOHGNbx2PbfY3myXkYjBqa1879OBiYEi95v0qusWI2Kv17iG3yNxdD0GdOZOV CKA5N9MyP/oTfCjerxtXD3b1W3nQ7H1QAa1Ffz0nWd0hsDP9hbqUxduthWKPPP1XPvdO51oux zIm9cM4xoMdTsJYq6+Uzi1ywTLNrNfjE1EuJxPTCHpg8/yFJblVaYPz2Ue/qOYT54zX0qP45t ZMTgcj1gybtmimxoRnSZrIyzaEp+cZsrPaCI95b2KqKpupqjgFybhF3D4XfLLhdQaZWvLY94W qyV5cGp4YKuaSJEvTQUVZncWFTKungOinQCx7U349SlGIPlMsU4WAw2r68A9T8V6reAx5JpSo Wl1uZ4co/o0dTCTudXXLPVzQZx618ZQm6k591m0y2AgFYVy0gqNWh8MNiWRjsYjKxZoWNqnYJ ql0NQnjshQ5nlL5/yf68Rx/dj5hiEP6YG+XBAH/ysqH7nHj5W+uVvY7uR08xklJXbXhtjTFD2 sNrTz4EqFU4YCe9cH1DnUO87VGgN1qwR9zV/CKQm1dCoWQoJPePE1PkBMEMlwU28q5DccNW0p yj330R+jS62JWu4bO9xG4yebvXjizW/Sikfwgc5wrGuINFzLk56uJDCXk/PpFLTHrrkNeMSpz xnq//WurEtCX8pv6cDC9+bIW0+jdYi0CB/f0YSPKeaiM7ppxka2zk7ggl4iTWtYgTVxMldtdI uB/7m7fp7MfdNFN41UI7qgNxvjpptPaZnwr1MsDWQV3rCTsVtALFxnnKUKv4yqVR4ZKsJgBLT wgIjmD9EySj18BkN3leeWgcmU+dfoGw2NeNPKTj+tnuTMNbWcRn7jrl1xhebr3oFJTDZwvEH0 1XcPL3/iJEjyfHulcOGOtEU1TpZW/Yq2J2omPHV30qRYdmyJBrjfBQIqsfEbHbs8JUO9NNJjL HrXqOA== X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750022362153516742?= X-GMAIL-MSGID: =?utf-8?q?1750022362153516742?= |
Series |
TPM IRQ fixes
|
|
Commit Message
Lino Sanfilippo
Nov. 20, 2022, 1:31 p.m. UTC
From: Lino Sanfilippo <l.sanfilippo@kunbus.com> Writing the TPM_INT_STATUS register in the interrupt handler to clear the interrupts only has effect if a locality is held. Since this is not guaranteed at the time the interrupt is fired, claim the locality explicitly in the handler. Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Tested-by: Michael Niewöhner <linux@mniewoehner.de> --- drivers/char/tpm/tpm_tis_core.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index 6c765a4406bc..4312c5cc13da 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -772,7 +772,9 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id) wake_up_interruptible(&priv->int_queue); /* Clear interrupts handled with TPM_EOI */ + tpm_tis_request_locality(chip, 0); rc = tpm_tis_write32(priv, TPM_INT_STATUS(priv->locality), interrupt); + tpm_tis_relinquish_locality(chip, 0); if (rc < 0) return IRQ_NONE;