Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1292647iol; Fri, 10 Jun 2022 04:38:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzOELoxMYOmC4hq3Prk6mgIklEy1WSbzxsnMV+Gwn6aA0C/vheEg5DDpXhbM5L+IhpCvia X-Received: by 2002:a17:907:2992:b0:70c:4ddf:5d88 with SMTP id eu18-20020a170907299200b0070c4ddf5d88mr36330638ejc.20.1654861130761; Fri, 10 Jun 2022 04:38:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654861130; cv=none; d=google.com; s=arc-20160816; b=xS4insDcwOJ0y9oSGhLbfBEfGcRCax77DntEYxVylM3nR/LipZ4i3HTH2u4RvJVOlW Pi1q5mtny5WgfFey3fTMasXdag9xg0ctj5tLYka5mIQzerG98a/1w3MWhLrf0+xwcrEA NWUNthe0/VOaaNDJAH4i3Uo1RFxzArrQnFIvy4S/s6XQIa70PxTpDuA+aIH+Uc6h8TMQ GfHmPEoo9ayNC9zl3Raigw1PRsaP2gACFZTaGjUzeQ980aDNziMgA7AXel4OApDs+Z0s Qt1GAGF4cmocpy8FEoTdIaKM5Y1XWD9a6QGzgTDKbmAAX81ZXlmXQ5IDVVn1ZYjcgvwi /+iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mLuSt9GrDvQ8CHVFpIFl/BDsUxB55rqACDGcwmQPwX0=; b=dtL0U6L2mJIMWUZFxwjp5ZL5JuwVhgpcxMa0OLDhKjMFvfmQLFS3+FjtH7VCct53GC bHbPipdrtZoZ2KvS626Zpokmm9RXAvV6uu0P4YjxRjZYc8bnZHrnh8zDINiFscjUBS6y bagUFys+0Dt7ra6lRZLDs9ylwa6lS7jc5dIzMyczXwf570mod0YE5z2F0wORYqxix+Cw 8yJLA02dJ4GNONYi61OWpGdgaQUdrJ471VSuHqliE1qujURSfk+gR+PISEmUBCkGTKMm Y7B9HezQ8MKtG+HEYP7q+okNd6TmK+gEny+6uQpjUU3fr5QIVIHrbayhJf3fpxoEOZXz p8Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=IggaaXsW; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020aa7ca47000000b0043346f9c981si3433512edt.168.2022.06.10.04.38.25; Fri, 10 Jun 2022 04:38:50 -0700 (PDT) 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.net header.s=badeba3b8450 header.b=IggaaXsW; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349037AbiFJLJl (ORCPT + 99 others); Fri, 10 Jun 2022 07:09:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347832AbiFJLJX (ORCPT ); Fri, 10 Jun 2022 07:09:23 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7D7D14640A; Fri, 10 Jun 2022 04:09:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1654859345; bh=mLuSt9GrDvQ8CHVFpIFl/BDsUxB55rqACDGcwmQPwX0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=IggaaXsWOn6fl59/cFAZmlF3IkeQkvdvCn6nwxUv17A2xnKSm5Umao0tjJt1rAGr7 Jl0CLIXrachWQPVcYAuR0M7wOu1NrqM7z/tb++BaUB1FLnvICzF8aK3QhrNkDjgeY6 a4kJAtGbUgXYXTC2Xw/1lBqCwtP1uj5M7cH80guI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([46.223.3.165]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1McH5a-1nTrfJ1zEy-00cjOA; Fri, 10 Jun 2022 13:09:05 +0200 From: 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, l.sanfilippo@kunbus.com, LinoSanfilippo@gmx.de, lukas@wunner.de, p.rosenberger@kunbus.com Subject: [PATCH v5 06/10] tpm, tpm_tis: Only handle supported interrupts in wait_for_tpm_stat() Date: Fri, 10 Jun 2022 13:08:42 +0200 Message-Id: <20220610110846.8307-7-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220610110846.8307-1-LinoSanfilippo@gmx.de> References: <20220610110846.8307-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:V9ZSj7NtP38cs9cWw3vp2komO17Wj/HumTOgtp20/73V9KjgMfa cvye23uGL22ne2bQCUvSEnEZSRd2LGYpIW2f1Pr4LB9MFX6umJcv1JcLmukQFWQU0y/plI7 nLxfJDs3GEdt9sHnA+6ZVTIFrN1Difx0pvAhMY2ceYWjBm5akUvMsLxqkKlJF3gWf01eSzF pJTpVRo7VVzhElkFB+b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S7js2+4GzqtvpB AkSggowdK9xQoubhQacwbGRb4pACqZqGD0HZapke12h6B3pv4jwzE7PrHq1n4YfNc8D+9G5uL lNLd5lbx9mD2NaeaQdzbZtZ66lXz6RunpN5YZsCSSHZXVh3fZ0habllkA== X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,MIME_BASE64_TEXT,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogTGlubyBTYW5maWxpcHBvIDxsLnNhbmZpbGlwcG9Aa3VuYnVzLmNvbT4KCkFjY29yZGlu ZyB0byB0aGUgVFBNIEludGVyZmFjZSBTcGVjaWZpY2F0aW9uIChUSVMpIGludGVycnVwdHMgZm9y CiJzdHNWYWxpZCIgYW5kICJjb21tYW5kUmVhZHkiIG1pZ2h0IG5vdCBiZSBzdXBwb3J0ZWQuCgpU YWtlIHRoaXMgaW50byBhY2NvdW50IGFuZCBvbmx5IHdhaXQgZm9yIGludGVycnVwdHMgd2hpY2gg YXJlIGFjdHVhbGx5IGluCnVzZSBpbiB3YWl0X2Zvcl90cG1fc3RhdCgpLiBBZnRlciB0aGF0IHBy b2Nlc3MgYWxsIHRoZSByZW1haW5pbmcgc3RhdHVzCmNoYW5nZXMgYnkgcG9sbGluZyB0aGUgc3Rh dHVzIHJlZ2lzdGVyLgoKU2lnbmVkLW9mZi1ieTogTGlubyBTYW5maWxpcHBvIDxsLnNhbmZpbGlw cG9Aa3VuYnVzLmNvbT4KLS0tCiBkcml2ZXJzL2NoYXIvdHBtL3RwbV90aXNfY29yZS5jIHwgNDYg KysrKysrKysrKysrKysrKysrKysrKysrLS0tLS0tLS0tCiAx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