From patchwork Mon Nov 21 14:38:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 23823 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1628099wrr; Mon, 21 Nov 2022 06:40:37 -0800 (PST) X-Google-Smtp-Source: AA0mqf7d7n1lUxMvyw0d9LanI5an/zfUTQDxCuHS4eMx1e01MfeOOMA7r5L1aV0bSuzuhG4kDgfJ X-Received: by 2002:a63:4e0c:0:b0:476:dd4f:a2c7 with SMTP id c12-20020a634e0c000000b00476dd4fa2c7mr1304173pgb.523.1669041637100; Mon, 21 Nov 2022 06:40:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669041637; cv=none; d=google.com; s=arc-20160816; b=bFo3To6IGPqVZf1gzYEfbSDxXiSY3h9ZkB+GaaKa3GEoljtZCoEQBt/3kZ4Mmi0h0q 86MSBZi9WbVudxnSsbAguLcA4BuKM+Hy112qm8JWgNOb545yQ6ebm4CatIlB1S+li+RW ifLa8VxKcbBLO0KVkYHt50Uw8sEYwj5pGU4St5dz4y37nbnlVa1KQQgvF52onpXaxxnL T9xfHQ4YT7IN2ityzMSVjelYzOH6k1hkvbxZT9kTYdYX7UkKDSC+Hy6erYEAfoSaI6Vj u+1rxiEjEIjqhfA1Uj4soJPrc2v1044nUK+DFSYUnQcct8+H12jGRUBzZN1+tfUwKiTF epRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=pglOtQogKZeQllvETY7CSk7rnX36uaU40AecgPWhjoQ=; b=DDK1FjOkRrtfgARrjFfNbcpyY2FpUEplNxoU93KEmTm1Ce/jNeAK59KIJGyRePPHga /uz+o7oKk4MUCNIwcme9AArtSz7P/2Ly7Js9z7sBXhDm+np08Qb5G7eLkFKsVEx/Tk6V eiHvPGaDl/Ij4UWpCrrv4vRROqnwb2ujNDiVNrMSk7YvPJUc0wW1WlDcMVkzmZ9GL+6u rhQGq+6se4Z2y4GU5VNs0m/2k9ntzBnT0ksbmc5IXHS/E1Zv/biMaeO19K9e+GxzNMR2 xIO4t8+LQ58t2hXEHK6HQrJL5oJkqDJjyoND3fBVdxbWm3hDluRGEqwaxXJmey9n5ZlE giig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=391M42bB; dkim=neutral (no key) header.i=@linutronix.de; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rm1-20020a17090b3ec100b0020ad4d5b9e8si16037571pjb.89.2022.11.21.06.40.21; Mon, 21 Nov 2022 06:40:37 -0800 (PST) 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=@linutronix.de header.s=2020 header.b=391M42bB; dkim=neutral (no key) header.i=@linutronix.de; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231822AbiKUOj5 (ORCPT + 99 others); Mon, 21 Nov 2022 09:39:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231565AbiKUOiH (ORCPT ); Mon, 21 Nov 2022 09:38:07 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED46D9152D; Mon, 21 Nov 2022 06:38:05 -0800 (PST) Message-ID: <20221121091327.271728371@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669041483; 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=pglOtQogKZeQllvETY7CSk7rnX36uaU40AecgPWhjoQ=; b=391M42bBt6zLla3u1QfX8pFEu7R357b3+nCAD3BmLZ5p1BBDOUjjpcKkNPe/banH7YtiUO q1QBbThvPTFWQ91FwQnNXhmGzZrZeuZMlhLvQ4o4vaUtnOk6lAYZmVeDwrQKy1ccpmD4fh qxa8waJZiHYml7mqDk/gDwdgW/UpOe6z2HFENoF2KWRm2TPwQw0PyZ6WDx0rbAn8zVfVji juZVSoO1N+ozdmfSEV5n+bx7AO6DoWVV7PKPHNbsUM4SPv1oM/Jnitm5lkc4/dCdI2/lMM qSGqNQHh/eDmMGzAXdQeWBSmTuYRDyRQlsW6/iCQx1GYcKfFXxeCpV7eFMklWA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669041483; 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=pglOtQogKZeQllvETY7CSk7rnX36uaU40AecgPWhjoQ=; b=Ek5r2C0PHrpj7mIvSrtps1M2Vcl7Jw8jYkqwi3nsLAi9V2DZ1DeQflV54Jf48xz9X3aYvo zT7J24GKIx5wBoCg== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Joerg Roedel , Will Deacon , linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Marc Zyngier , Greg Kroah-Hartman , Jason Gunthorpe , Dave Jiang , Alex Williamson , Kevin Tian , Dan Williams , Logan Gunthorpe , Ashok Raj , Jon Mason , Allen Hubbe Subject: [patch V2 14/33] PCI/MSI: Remove unused pci_dev_has_special_msi_domain() References: <20221121083657.157152924@linutronix.de> MIME-Version: 1.0 Date: Mon, 21 Nov 2022 15:38:03 +0100 (CET) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750117003611247593?= X-GMAIL-MSGID: =?utf-8?q?1750117003611247593?= The check for special MSI domains like VMD which prevents the interrupt remapping code to overwrite device::msi::domain is not longer required and has been replaced by an x86 specific version which is aware of MSI parent domains. Remove it. Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas --- drivers/pci/msi/irqdomain.c | 21 --------------------- include/linux/msi.h | 1 - 2 files changed, 22 deletions(-) --- a/drivers/pci/msi/irqdomain.c +++ b/drivers/pci/msi/irqdomain.c @@ -414,24 +414,3 @@ struct irq_domain *pci_msi_get_device_do DOMAIN_BUS_PCI_MSI); return dom; } - -/** - * pci_dev_has_special_msi_domain - Check whether the device is handled by - * a non-standard PCI-MSI domain - * @pdev: The PCI device to check. - * - * Returns: True if the device irqdomain or the bus irqdomain is - * non-standard PCI/MSI. - */ -bool pci_dev_has_special_msi_domain(struct pci_dev *pdev) -{ - struct irq_domain *dom = dev_get_msi_domain(&pdev->dev); - - if (!dom) - dom = dev_get_msi_domain(&pdev->bus->dev); - - if (!dom) - return true; - - return dom->bus_token != DOMAIN_BUS_PCI_MSI; -} --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -606,7 +606,6 @@ struct irq_domain *pci_msi_create_irq_do struct irq_domain *parent); u32 pci_msi_domain_get_msi_rid(struct irq_domain *domain, struct pci_dev *pdev); struct irq_domain *pci_msi_get_device_domain(struct pci_dev *pdev); -bool pci_dev_has_special_msi_domain(struct pci_dev *pdev); #else /* CONFIG_PCI_MSI */ static inline struct irq_domain *pci_msi_get_device_domain(struct pci_dev *pdev) {