From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 45790C433F5 for ; Sat, 27 Nov 2021 02:13:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Date:MIME-Version:References:Subject:Cc :To:From:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: List-Owner; bh=Hgavr4vEir/vR0597Gs3swjxmpgLooZN/XZ7TrRLxTM=; b=UFNDODr7M7tBvW P0SgFTDy/jzkjpq1JklKrObC5BD9lriV3qJBtOSyjcrpYBQ1Sfrg9ZS3M4JY7/tdrmD/aRWZiOnIG l1wtp8o82hnFAM9v2AMTecm3F5agX6EOkn0FNK9sUXOb5HDMG43rZCBwXpqefUIheTJQKd/mgqgh6 OsLAMseg8/UBoE5dxSQo/QnZQ7pnqkAUJfL7cvjTl8d5S8JqAldAOM2naE3fvuWXn0x7W8NJRVCyR N3PS7dDy4bm+83QGX2Tdsg2rS1qYO8nw4r1YdmE+aDOd7X8hIYeNdCT9Ilj2OKLk0CcPFaunsczTh zA0HExqErOAtIeEplS0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqnBX-00CWXX-0E; Sat, 27 Nov 2021 02:11:27 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqmPX-00CAyF-F5 for linux-arm-kernel@lists.infradead.org; Sat, 27 Nov 2021 01:21:56 +0000 Message-ID: <20211126230525.137299282@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1637976109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=ZWaHMo5/cxTSb8aCm3CN77ES3jPYHd9BeCyQKbhAf1Q=; b=hy97HFE6I814pV4rx+xUrwuUAhL4IUA798mts+smaySzKuUadOTBalyUe9VTE3Hx8vG+TZ hIuTfOk36OH3vQYQZefI5I3Rw3EAi8HCjA/3s6icu+vdv2PFRY7dWD3CUk+dgwwntHLSFg YyNTHMOWkiuKCIWIb0zFBNJpiz69LHC5rMFKk3ShYcanbbVttRGLGrJZCnI6+Ecd/BlckC OEvsof342hr0uLMAcDan61lIqCeE6/Kee5YFN6JIGUB30gTy4531wLcwnPea6KcxvzCp4M gjKx6hMBTQKuf2Ls44rtIPD7505IuqKnel6KsjHMq+66g5dCaastAkR/IPEcWQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1637976109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=ZWaHMo5/cxTSb8aCm3CN77ES3jPYHd9BeCyQKbhAf1Q=; b=DfYv5Qo1fNDyy/u2FnjloE8DeN/fnIR0Tl+Jv4cf71yMysYcKARkCZEL1g1Y02rzlDPgNE w4pJ5/U3r3YQu1Bg== From: Thomas Gleixner To: LKML Cc: Bjorn Helgaas , Marc Zygnier , Alex Williamson , Kevin Tian , Jason Gunthorpe , Megha Dey , Ashok Raj , linux-pci@vger.kernel.org, Greg Kroah-Hartman , Santosh Shilimkar , iommu@lists.linux-foundation.org, dmaengine@vger.kernel.org, Stuart Yoder , Laurentiu Tudor , Nishanth Menon , Tero Kristo , linux-arm-kernel@lists.infradead.org, x86@kernel.org, Vinod Koul , Mark Rutland , Will Deacon , Sinan Kaya Subject: [patch 20/37] PCI/MSI: Store properties in device::msi::data References: <20211126224100.303046749@linutronix.de> MIME-Version: 1.0 Date: Sat, 27 Nov 2021 02:21:49 +0100 (CET) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211126_172151_712278_E7126215 X-CRM114-Status: UNSURE ( 8.67 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Message-ID: <20211127012149.GSfckNNortzzG8wuu5rObNeIrage-sE_9Raska3XoKc@z> Store the properties which are interesting for various places so the MSI descriptor fiddling can be removed. Signed-off-by: Thomas Gleixner --- drivers/pci/msi/msi.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/pci/msi/msi.c +++ b/drivers/pci/msi/msi.c @@ -244,6 +244,8 @@ static void free_msi_irqs(struct pci_dev iounmap(dev->msix_base); dev->msix_base = NULL; } + + dev->dev.msi.data->properties = 0; } static void pci_intx_for_msi(struct pci_dev *dev, int enable) @@ -372,6 +374,9 @@ msi_setup_entry(struct pci_dev *dev, int if (entry->pci.msi_attrib.can_mask) pci_read_config_dword(dev, entry->pci.mask_pos, &entry->pci.msi_mask); + dev->dev.msi.data->properties = MSI_PROP_PCI_MSI; + if (entry->pci.msi_attrib.is_64) + dev->dev.msi.data->properties |= MSI_PROP_64BIT; out: kfree(masks); return entry; @@ -514,6 +519,7 @@ static int msix_setup_entries(struct pci if (masks) curmsk++; } + dev->dev.msi.data->properties = MSI_PROP_PCI_MSIX | MSI_PROP_64BIT; ret = 0; out: kfree(masks); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel