Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1214722pxy; Sat, 1 May 2021 07:04:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyn/ltVhmxjhCM4nvxxlaloY3PklGkKIII27j9w6H9LT+SP5oXkmgS4cruQmIezw3eg3NFH X-Received: by 2002:a05:6402:4a:: with SMTP id f10mr11324896edu.85.1619877867435; Sat, 01 May 2021 07:04:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619877867; cv=none; d=google.com; s=arc-20160816; b=vFUcQF5v/MTEE4YY9nVpG8uHUwN/Bs0XD6kY7GzoYaZA7wp60UmcTUVNlt4InebFbQ VAczJWvioJpru7HZQ3WTl6iTD17vDrsGMOdvchjf7275LhotoTh6cuuz9ao/9pbwaCBk ynzTIPB/uaUgHXMDJsi0AYAHfrj52XD7VE4gszgtUCDiNlPN//Je/1FM7KmddkauPRA9 Bp7rHV6ftlQF05HaYO2uTA4NlzghQWEzV1RIfFzBGb4HgClvia4O7lyvMGvDocB8Tzy7 xCq4tb93vMzt8i+hEqAvjk8FcDX1NsEbb3rbBbknXrBb/vwanWikyQvgtU3XgkihxV/K Eybw== 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=bdgo8J4TivRhaCR1yMOLb0GbU9YLD5pDkm2mF7GPaks=; b=kP14xnp54oW4YlgJot4FLKrTI3kKaEPliEf3NJjAyRNL4Ar2e364lcjlaWJfQNrGSG XKN8uLTPwbBNt/2uEsL/u2rYgu0JEELd7NyUs+5vBxz8nIzlnd8+yKl53W/ripKI4beh kGBN/zYXF4laS5VDyDIlv7UBc6a0ftqsVQd3CSzR8XudOR7WdDDWTwIpv+RIjPB9PMdi vEG6/mAoGCteD6yK046ObUAjC/9+f3t7uNsxaC7EuLgDl/h4BXZu7OqRPGFHRa/FN6j+ Z5aWiJiqK2oImgtYymsMsQB1OJIC6X/gO3iqBa2o1SGpa1XR1cWrpC32uH6uTetSGFop ypWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=FUnpwhDN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k18si4820631edv.534.2021.05.01.07.04.03; Sat, 01 May 2021 07:04:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=FUnpwhDN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232326AbhEAOCn (ORCPT + 99 others); Sat, 1 May 2021 10:02:43 -0400 Received: from mout.gmx.net ([212.227.17.20]:52145 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232138AbhEAOC2 (ORCPT ); Sat, 1 May 2021 10:02:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1619877687; bh=bdgo8J4TivRhaCR1yMOLb0GbU9YLD5pDkm2mF7GPaks=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=FUnpwhDN0gy0rPzqdmRT8cm82auiNAPkUBlJrN7Al9fLpJEqrPPfRrM9s7zaqCVeA UyINw8uNkbl2askCsqW9QHmi6WSpD4/t9ko07je8Y9qkjs6wUy2plyI+yklz7utNaC JCOlBTLrggeon6DR6pO+2AYSxB5CPfMFybVEMKZ0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([78.42.220.31]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MRmjq-1m1XnY3dBy-00TFYd; Sat, 01 May 2021 16:01:26 +0200 From: Lino Sanfilippo To: peterhuewe@gmx.de, jarkko@kernel.org, jgg@ziepe.ca Cc: stefanb@linux.vnet.ibm.com, James.Bottomley@hansenpartnership.com, keescook@chromium.org, jsnitsel@redhat.com, ml.linux@elloe.vision, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, LinoSanfilippo@gmx.de Subject: [PATCH v3 4/4] tpm: Only enable supported irqs Date: Sat, 1 May 2021 15:57:27 +0200 Message-Id: <20210501135727.17747-5-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210501135727.17747-1-LinoSanfilippo@gmx.de> References: <20210501135727.17747-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:7jLZxRXA8T/g7l9AnnNL9N15FTgU/ED0fMkRffZPiEVIKMk8H6l 4X2OqvLjhjaG6s6fkYNfNuWQww3zrkZzde7/xLfUaMhWVaAAMXPDnzgo4XjVsoY0kwMJfy0 NH5GvynI8/dbk306ZAKprQ9K2YdEQMevdCHxvbCa2wfqCCSXJfS/eMjc4/wb3Ia9j+tZBsk 7k0X1iOL+32wdxXWq78lg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:I/0z9n93ojk=:J5OZzIFHBaL8NZeZJPq1dZ 3tQ3reOr3iY1hWsl1oOWQmxMqY0YfTbkogEN/dRtlI7uzyVGuXojb7CYV/dQlGUY9kfzKy0Z4 F2XmICtP3T9B02wEdCk5yy0T/N5ELxdf0TSCtRToNJDpMbShdhBS7j9/bapJndZpLWzb8oZKg SG62ZT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