Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4869980iob; Mon, 9 May 2022 03:39:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQ1U5/u+NlhLKEOZLD46wAH5mh1btjzGlJaYPQD+RJpDsCIRNmqJ/OV5h/R5OSdzNhMUex X-Received: by 2002:a17:90a:bc8a:b0:1db:382d:6fb5 with SMTP id x10-20020a17090abc8a00b001db382d6fb5mr25592913pjr.100.1652092786187; Mon, 09 May 2022 03:39:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652092786; cv=none; d=google.com; s=arc-20160816; b=Qzd/RcCSgwGxuq15H887OXrmJNFQa+aHzfxy3QkdnXsGjHjDCXJ40f5nrq/ungKUx7 bXLoS/hQB5rtnIGh2QDJMrWlHX49oZF/pHqcslS4+Sd8qXk5+Rtw0MM8x9LPHB19CbrN pZ22C7GKAHqz6iRhv0LXNlJyxXGfRH6NTYYBJgEc1cskM/Z6fB9StR6LVrCRYgMV5yC2 hYIXEdWVH50/htBtmLGOmW5PY3U7worCT8btRPagXMFU5Uy39SiRmNQ2QVt7HlYk8vsx Q2/CdTI+1W8DbOSlfGHkZQyjHIRui1SEkbKcihb6JocJu4uETCrcQtKDOBzS4fep4zsB t2pw== 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=XQDSzEYmlgJhOdBUnEG20yQFV5PTnn/Qs44xno+mB9E=; b=wQBHo/IBhH13wTWDoLg1+xr/aUW4RBg8tjclvpJYDMpo7/rmri6PkVYKelT6Fv20Io 4gtKWQrWtBfKT1nni8ZnXpBmsSVMyszxz61vEXCj8pTmWDrHrw22oZD7pCAFSA1yask1 yJtl3kYjyFR8t0GJK74TilSe3dcHMMql4iMEF+w01zs5F1VHCWv6YqtbDenu/K1IzKKu O5RNIp8gnIELteFR2kX5PNn3b6ONgtJR5pa5UAuHC8ZgHd3IjNNSqvfqrtU3+6t9Bubh hmcjBzbZupnFZ5Hqi8lBy0cwxV/buj5aoH9EM8MJHHwOgD2UGLs9nTaiUY+wwb0oS3VP tYPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=hVQ2W9b2; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id rm13-20020a17090b3ecd00b001da3d4b292csi15993217pjb.33.2022.05.09.03.39.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 03:39:46 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=hVQ2W9b2; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7FE1A1E324B; Mon, 9 May 2022 03:06:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236978AbiEII1v (ORCPT + 99 others); Mon, 9 May 2022 04:27:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235691AbiEIIOx (ORCPT ); Mon, 9 May 2022 04:14:53 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B40751D075D; Mon, 9 May 2022 01:10:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1652083627; bh=XQDSzEYmlgJhOdBUnEG20yQFV5PTnn/Qs44xno+mB9E=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=hVQ2W9b2tfB7146tpn+kH7M/xmPM0JWeRSOhFaFdJu2+Qy+K73Kf/V2jiG8reON26 ebh7O2hG/nTyl6yENGOm36kTmTm31LR5c55iPrjsbKRCzs66TRYlmnmN4VMaXBRfd3 bbvMTP8sz2el9606JdkYjkDQ3xHt3m9/4l4kTGnk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([46.223.3.89]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MIMfc-1nbvjD1aNQ-00EOnx; Mon, 09 May 2022 10:07:07 +0200 From: Lino Sanfilippo 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, LinoSanfilippo@gmx.de, lukas@wunner.de, p.rosenberger@kunbus.com, Lino Sanfilippo Subject: [PATCH v4 5/6] tpm, tpm_tis: Move irq test from tpm_tis_send() to tpm_tis_probe_irq_single() Date: Mon, 9 May 2022 10:05:58 +0200 Message-Id: <20220509080559.4381-6-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220509080559.4381-1-LinoSanfilippo@gmx.de> References: <20220509080559.4381-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:4kJWVwqbBEo2xvrqes8YKbtx9fvrePzaXpK+nDtCFLzgR0AV2U2 4nsfL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zw1MSRvO3+cb8iSQDGjA3QFWipgMr knflQCw2p41x0mI1Lzcla/XoT7KqXCH9q3xPdyUhMHcAUxj3I15cnYdt7MFg9XU5Sugo+UHBE UxDjOisR3e9yCG43hDEjCO1YbAv3J0E6MADScXWPclOqvno3VYcSekX2acqt0ugtWpB7hp5eL sQQNCzYTqOUI0Ly9NUrYBZ7LYaxUbz1PkzjfDbdcLOjV1Ag7HaJqObg3J+IVB6vWJy3kqOdX+ neNg/urj4wy/bk= X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MIME_BASE64_TEXT, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 RnJvbTogTGlubyBTYW5maWxpcHBvIDxsLnNhbmZpbGlwcG9Aa3VuYnVzLmNvbT4KClRoZXJlIGlz IG5vIG5lZWQgdG8gY2hlY2sgZm9yIHRoZSBpcnEgdGVzdCBjb21wbGV0aW9uIGF0IGVhY2ggZGF0 YQp0cmFuc21pc3Npb24gZHVyaW5nIHRoZSBkcml2ZXIgbGl2ZXRpbWUuIEluc3RlYWQgZG8gdGhl IGNoZWNrIG9ubHkgb25jZSBhdApkcml2ZXIgc3RhcnR1cC4KClNpZ25lZC1vZmYtYnk6IExpbm8g U2FuZmlsaXBwbyA8bC5zYW5maWxpcHBvQGt1bmJ1cy5jb20+Ci0tLQogZHJpdmVycy9jaGFyL3Rw bS90cG1fdGlzX2NvcmUuYyB8IDY4ICsrKysrKysrKysrLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQog MSBmaWxlIGNoYW5nZWQsIDIyIGluc2VydGlvbnMoKyksIDQ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