Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1291598iol; Fri, 10 Jun 2022 04:37:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAK6lMF0N5awgkbc/+DGuBvtrz/Fzritxh7YerTY0mr1dE7npSPNT4c/CT8SZGBuKEY/fS X-Received: by 2002:a05:6402:32a6:b0:42d:ed8b:3d8 with SMTP id f38-20020a05640232a600b0042ded8b03d8mr49981836eda.225.1654861042174; Fri, 10 Jun 2022 04:37:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654861042; cv=none; d=google.com; s=arc-20160816; b=WZAEOcUgClp++K8sWcg5t78pZoIboPqG28PU6X7tVVCgvRdDFmPFGYsiyzrgTtBjz6 Nse/ajamWqsulQxs5d8kZ0VjHuDrnNuWO2sHlVJZcd+oJjEMYJxfKJH68SIAJKM9iGuI GFZHv1IOOjNTQTH/N/G2v8Fu+ptmCWNW2E2EK+XLoZtYty821ucmIfX+5FlclJhMDGQU NnB/j4LBpQLBdQulwNMWazzHKo8PsszDX5u77FIFeuisbwKBJBvLdqsGdFPbNrZhg1my 9qM3gUQ96swDwPwbTtxOTGK2T1H8pL1WGH3yw0Nn00gK32UXk82bb6ihssdSVetmFMrm KWAQ== 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=cRKDsGN0VdsCFTBnRcstCXzf84DjLh3s5S//H6evbxU=; b=RdR27GzOq2PA9ApC2g9FQb0lO5CdEZCLQn1llRA8RT5+2+/XMOYbYkIW7D9Keu0iD7 xgDXfWkqwk48L7uRjgYCJPcbSmNZjQBFm9L4oEd6K4YwGRj9i9st2HEH91KrLJ/xse/F OwZ2yZMuoepm7KquGoCft+aHp5cw1B31ynzGqQy8maYjvWFQPGx1jprQ3oXbXpc5SEbs vlNrADoAPY0TJydvRXB1gwJR9j4/5o+x5jjOtE1tL43ewFjNVVhOVjaUMmWeD2B8HUKC 6oNId37THSXQrCLQe3E33Nh7n+R9rDgak5W66UdzeXZ+jEo6KGRaXERP5lGJhQcIgcOn PDrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=RxvoEM2s; 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 ds18-20020a170907725200b00711d0b0e601si12626822ejc.760.2022.06.10.04.36.55; Fri, 10 Jun 2022 04:37:22 -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=RxvoEM2s; 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 S1349268AbiFJLJ7 (ORCPT + 99 others); Fri, 10 Jun 2022 07:09:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348322AbiFJLJY (ORCPT ); Fri, 10 Jun 2022 07:09:24 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E81EA14642B; Fri, 10 Jun 2022 04:09:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1654859344; bh=cRKDsGN0VdsCFTBnRcstCXzf84DjLh3s5S//H6evbxU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=RxvoEM2s+GCQWM8A+/5BrjdTPCe9c9CIHvswgUwXjKtrwa8Bh1/Cnfi68qad2XeMA /HDZYht5oWlChjbdATxTWqYm/u5vg3ff3iE6nmmsF0b4g6z4uaO4yGlNN2dL/RV4id NRLRDrLTC8i8mNBBt1TSn4DdoRFe4q3cgJQm5maA= 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 1MrhQ6-1nNEtv3Rky-00njsc; Fri, 10 Jun 2022 13:09:03 +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 01/10] tpm, tpm_tis: Avoid cache incoherency in test for interrupts Date: Fri, 10 Jun 2022 13:08:37 +0200 Message-Id: <20220610110846.8307-2-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:q8bU0YAnT48OWQ7N8IAEbPbVAzWl5CCrfbTQSDm5sbhGjdqIjlf LbPynvy15Ag5+DzsHakUiEJN8MAPK3p2HVIPpLQmW9Jzl9oSsSoxhzQYbvj+qFcNP9d5Xyo rMu8RFCICskwoiPKXu4yquCQ8+rtWeySkPHonWidwznKy+CcyivcOWXgVNob0aLl7v/Ms1S aJHRweNtbDjWhkWs5ujDA== X-UI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3lejuEPHaBZjzHWYbW+gVjf3sn4VVcOHK78LpPrKt3q1woyYbcrCQmKz2qX2rsa8hAvBBthPM ZTmfIHcUrXou4du8VYN7iyb6S8YpwXnk/5Uff28GKsVuITRuQrBn8S+ZQ== 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 RnJvbTogTGlubyBTYW5maWxpcHBvIDxsLnNhbmZpbGlwcG9Aa3VuYnVzLmNvbT4KClRoZSBpbnRl cnJ1cHQgaGFuZGxlciB0aGF0IHNldHMgdGhlIGJvb2xlYW4gdmFyaWFibGUgaXJxX3Rlc3RlZCBt YXkgcnVuIG9uCmFub3RoZXIgQ1BVIGFzIHRoZSB0aHJlYWQgdGhhdCBjaGVja3MgaXJxX3Rlc3Rl ZCBhcyBwYXJ0IG9mIHRoZSBpcnEgdGVzdCBpbgp0bXBfdGlzX3NlbmQoKS4KClNpbmNlIG5vdGhp bmcgZ3VhcmFudGVlcyBjYWNoZSBjb2hlcmVuY3kgYmV0d2VlbiBDUFVzIGZvciB1bnN5bmNocm9u aXplZAphY2Nlc3NlcyB0byBib29sZWFuIHZhcmlhYmxlcyB0aGUgdGVzdGluZyB0aHJlYWQgbWln aHQgbm90IHBlcmNlaXZlIHRoZQp2YWx1ZSBjaGFuZ2UgZG9uZSBpbiB0aGUgaW50ZXJydXB0IGhh bmRsZXIuCgpBdm9pZCB0aGlzIGlzc3VlIGJ5IHVzaW5nIGEgYml0ZmllbGQgaW5zdGVhZCBvZiBh IGJvb2xlYW4gdmFyaWFibGUgYW5kIGJ5CmFj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