From patchwork Tue Oct 17 19:53:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 154447 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4365372vqb; Tue, 17 Oct 2023 12:54:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHxrPHzyxjfZ+79NQYpTXblSYqvIQdoyDcuc9i4MOJoD0+fBWO2JBr/ET9/Z7N1jh+gMi+d X-Received: by 2002:a05:6359:6699:b0:166:e1a1:9ecb with SMTP id so25-20020a056359669900b00166e1a19ecbmr1651434rwb.0.1697572447246; Tue, 17 Oct 2023 12:54:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697572447; cv=none; d=google.com; s=arc-20160816; b=ii6g9AULi+eoXHnQqKmQqkSDosyi1p5N88/P+LydHyLlEK7vt9sDq6a03n9GXQNbjo SySqHo7bfortQvBuP5t68Bf9PrncgjGnLaOX1OyRubuJHvTOZI5BhoAKw3GE5mZzeosS T//Td+EETOuwOivyyN7GlQwr80797ky1+0XOKulZOB1Ze79+HOS9M6mxloz+oIV0kHDE sS8jtEowOT992E2VVqQrkdGaqR01WdXoSWBHDfr6eBuxd4HKHFvXBnbiaBy2XjCB2l71 mJsmcsKykqd7BrictFBYzQnVmBMQSqpYCSKYpvtHv+Gu5RoRf9BfE2rjEfv1eyVErSEq q1cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=IcBt2xPQ1tUNJXBgNwttFf5lFVdSWnHxCfEhD6ZM68I=; fh=wWRiGBvi25bfP1nJwaR3rHUQ83SU+nN5fc+cPrgo96o=; b=O+5DbtDOUMyp/mbJcKXQmqytUwlMIHfFoZY5TI/1VHv/nVBIaTJg8SHiGBV3DC3tzQ jBkUsXZDh//Z+MZRI7BBcV6LAd9WgpsPXXbmDr7NI5my+fq0xWmFDb9W6SUrme9IpiS0 RTMoIbBgkY/NezUE3B4USumhXQSVvTKokCXeIF2g43EhabR7AvKNv0ao4tgelE1OG3Nm iMg86P6mC3OLTCGcNuYueLbArJMdnolEH51RVU0deBrMfgZuTgFCHOeAvFXkEre+jS7U v7Br/sRmeUCtaPa4sQoqC/MYT3pDaKhVyG8S2i6HU6MFrM7w81C8n4NpQkETsaEr6zdy ZYvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=iThQ3UrO; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="/ez8FsxA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id a21-20020a63e855000000b005859aa3da1esi489337pgk.492.2023.10.17.12.54.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 12:54:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=iThQ3UrO; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="/ez8FsxA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id C33C98031D4E; Tue, 17 Oct 2023 12:54:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234966AbjJQTxp (ORCPT + 21 others); Tue, 17 Oct 2023 15:53:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232208AbjJQTxo (ORCPT ); Tue, 17 Oct 2023 15:53:44 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93961C4; Tue, 17 Oct 2023 12:53:42 -0700 (PDT) Date: Tue, 17 Oct 2023 19:53:40 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1697572421; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IcBt2xPQ1tUNJXBgNwttFf5lFVdSWnHxCfEhD6ZM68I=; b=iThQ3UrOyEEsz5vSXD5NDmPkz+NGGIilz+OLZ8LnszH0GEedadxc30TcfCYVFRVYKuIsnc k+ouC61PQj/qze/Sskn3sz6aqDMWbvgB2APu5JHFv0WghijqBcyHHU/EaT7VXvKEe7J9XQ lWEf5k/3hrTd3XnwI1Su3ZMFSC0DjBbTWkJWqdnujcZbyeDzzwuTaQw28nldJ+0vQ0Ne6X GcHrOd9sVMIEe0DHZv3/78gkujupu/HRZVUCPw13/LxD2o+0upizfdRH0lJMGZywgqcocA UqEUjpOlhlL1CQaRZZ5RpwjG8U1572USJqmC2pkZ+GHhlhOXqIdy7LIMDQLZqQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1697572421; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IcBt2xPQ1tUNJXBgNwttFf5lFVdSWnHxCfEhD6ZM68I=; b=/ez8FsxAtD6Ql9RlArNIEBmOR3FjtgvEA5zfQDh/9ukX74ZgJXypu15Uqh4fJSET4Ds3x2 lWu7uG7zMXpi/IDQ== From: "tip-bot2 for Reinette Chatre" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] PCI/MSI: Provide stubs for IMS functions Cc: Reinette Chatre , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: =?utf-8?q?=3C14ff656899a3757453f8584c1109d7a9b98fa258=2E1697564?= =?utf-8?q?731=2Egit=2Ereinette=2Echatre=40intel=2Ecom=3E?= References: =?utf-8?q?=3C14ff656899a3757453f8584c1109d7a9b98fa258=2E16975647?= =?utf-8?q?31=2Egit=2Ereinette=2Echatre=40intel=2Ecom=3E?= MIME-Version: 1.0 Message-ID: <169757242009.3135.5502383859327174030.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 17 Oct 2023 12:54:04 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780026353853788946 X-GMAIL-MSGID: 1780033726421553203 The following commit has been merged into the irq/core branch of tip: Commit-ID: 41efa431244f6498833ff8ee8dde28c4924c5479 Gitweb: https://git.kernel.org/tip/41efa431244f6498833ff8ee8dde28c4924c5479 Author: Reinette Chatre AuthorDate: Tue, 17 Oct 2023 10:56:38 -07:00 Committer: Thomas Gleixner CommitterDate: Tue, 17 Oct 2023 21:46:33 +02:00 PCI/MSI: Provide stubs for IMS functions The IMS related functions (pci_create_ims_domain(), pci_ims_alloc_irq(), and pci_ims_free_irq()) are not declared when CONFIG_PCI_MSI is disabled. Provide definitions of these functions for use when callers are compiled with CONFIG_PCI_MSI disabled. Fixes: 0194425af0c8 ("PCI/MSI: Provide IMS (Interrupt Message Store) support") Fixes: c9e5bea27383 ("PCI/MSI: Provide pci_ims_alloc/free_irq()") Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/14ff656899a3757453f8584c1109d7a9b98fa258.1697564731.git.reinette.chatre@intel.com --- include/linux/pci.h | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/include/linux/pci.h b/include/linux/pci.h index 8c7c2c3..b564172 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1624,6 +1624,8 @@ struct msix_entry { u16 entry; /* Driver uses to specify entry, OS writes */ }; +struct msi_domain_template; + #ifdef CONFIG_PCI_MSI int pci_msi_vec_count(struct pci_dev *dev); void pci_disable_msi(struct pci_dev *dev); @@ -1656,6 +1658,11 @@ void pci_msix_free_irq(struct pci_dev *pdev, struct msi_map map); void pci_free_irq_vectors(struct pci_dev *dev); int pci_irq_vector(struct pci_dev *dev, unsigned int nr); const struct cpumask *pci_irq_get_affinity(struct pci_dev *pdev, int vec); +bool pci_create_ims_domain(struct pci_dev *pdev, const struct msi_domain_template *template, + unsigned int hwsize, void *data); +struct msi_map pci_ims_alloc_irq(struct pci_dev *pdev, union msi_instance_cookie *icookie, + const struct irq_affinity_desc *affdesc); +void pci_ims_free_irq(struct pci_dev *pdev, struct msi_map map); #else static inline int pci_msi_vec_count(struct pci_dev *dev) { return -ENOSYS; } @@ -1719,6 +1726,25 @@ static inline const struct cpumask *pci_irq_get_affinity(struct pci_dev *pdev, { return cpu_possible_mask; } + +static inline bool pci_create_ims_domain(struct pci_dev *pdev, + const struct msi_domain_template *template, + unsigned int hwsize, void *data) +{ return false; } + +static inline struct msi_map pci_ims_alloc_irq(struct pci_dev *pdev, + union msi_instance_cookie *icookie, + const struct irq_affinity_desc *affdesc) +{ + struct msi_map map = { .index = -ENOSYS, }; + + return map; +} + +static inline void pci_ims_free_irq(struct pci_dev *pdev, struct msi_map map) +{ +} + #endif /** @@ -2616,14 +2642,6 @@ static inline bool pci_is_thunderbolt_attached(struct pci_dev *pdev) void pci_uevent_ers(struct pci_dev *pdev, enum pci_ers_result err_type); #endif -struct msi_domain_template; - -bool pci_create_ims_domain(struct pci_dev *pdev, const struct msi_domain_template *template, - unsigned int hwsize, void *data); -struct msi_map pci_ims_alloc_irq(struct pci_dev *pdev, union msi_instance_cookie *icookie, - const struct irq_affinity_desc *affdesc); -void pci_ims_free_irq(struct pci_dev *pdev, struct msi_map map); - #include #define pci_printk(level, pdev, fmt, arg...) \