From patchwork Mon Nov 21 14:38:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 23825 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1628214wrr; Mon, 21 Nov 2022 06:40:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf6kx+VZrJeHuqhBcbVH9z9Y/RePFh4crKpL4YRsf/TIRL3CmYxmFr15Nkl9MO2oySii/9Qk X-Received: by 2002:a17:902:aa06:b0:182:f36b:3221 with SMTP id be6-20020a170902aa0600b00182f36b3221mr331918plb.36.1669041649214; Mon, 21 Nov 2022 06:40:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669041649; cv=none; d=google.com; s=arc-20160816; b=yheb79HnurPLs/5foBHZV22kXVavluWLvnbHQgUhOvYV1+09suesaYy8e/oyXpO+sR FrpTp7UV1laAI73ScmVvYhJHuKPHg1wOlG1dUM5JoPYqR1PJ7wmxcxjWr2/W4vbYCqp6 WZQj3HR20wOWuc6MKqEqoHP+45SuJvy2Uk2bSua78XVKxcHcY5bzacltDdugzZRfjKI/ HINfUJwkmrf7nU67GPSUHnzh2NyS02vyxKSU13J9q1nu3P7tV3xyc295h92yR0hLvqvU wadT20aUyj8HzGu9Nh8LsugM7feNr9Y2OEJZSCbJV94Ax9Nd9dK8PokMj3D9T7hGZOmG ZKYw== 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=T4PJKhvy3BXQPG8m3pythcilM8fEjCtnrP9dFwguEN8=; b=xJieUFf5zZ6nQ+6Qfrf5IBK/K5fKJmmN3ufCuSrGlFZxvepWEd1k/mk1BR3pOWd8Tn ue9Rh8x/77BC3fzAfwg7E+H89jzDPCvz5aEwzvCAZ131g66b9TLWNHOYbY0EaA1NM60/ Ey6nJbhHuvI4cqIhzlYSDyp3zy4z4YmDCn2rw69eaDXIM8SB979HgWpiUydKJZej5WbF dGDKwci+0H0Eg6HgnudjMpJDDle9+jjW/EU/RIJKMF16RFIG+fl1B9DTfEfP1C8jTYvP Cy2O8wihkW037XvmbtNaJW++pkyq1jWarLLi84Oee1bfGqeYhe9dUIwztZ1wy4LtvzMl oFkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=RtPrEADL; dkim=neutral (no key) header.i=@linutronix.de header.b=aWd8PCCv; 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 e3-20020a170902ed8300b001868a25da0dsi6383261plj.40.2022.11.21.06.40.34; Mon, 21 Nov 2022 06:40:49 -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=RtPrEADL; dkim=neutral (no key) header.i=@linutronix.de header.b=aWd8PCCv; 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 S231839AbiKUOkK (ORCPT + 99 others); Mon, 21 Nov 2022 09:40:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231567AbiKUOiJ (ORCPT ); Mon, 21 Nov 2022 09:38:09 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E347F942D5; Mon, 21 Nov 2022 06:38:08 -0800 (PST) Message-ID: <20221121091327.434824195@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669041487; 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=T4PJKhvy3BXQPG8m3pythcilM8fEjCtnrP9dFwguEN8=; b=RtPrEADLQ4F09PZEf7MRYrk1DKs2OkxJk+s5MlC4pyGrdJej891wfDCd/fORtsNyjHvFQP RF+zvuDHRAxMziDZ34F3pVHKeRVjp3Cvs4LFBD8gG8xekg1V7XgG7EfuZe47+uCgM7lX+7 3o+9jAaM9ZMm+cSIkIyxQn3tuIl813XQY0dgkrh9CUS3HLkPWyvQS7U2NJdjE7BzVdyt3B SZyjsRFiPdcZVT6b/EjzhbI1/vUGwdTQVWNef/ehw/+VJXu7VmXhE5ziy8WO/ttIGMmqiV YpX0XjOvpRmltFPubbY0V2LzT8Kan8XqOnFCui/kVnm5wSPfpdjPt3u+HnDSnw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669041487; 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=T4PJKhvy3BXQPG8m3pythcilM8fEjCtnrP9dFwguEN8=; b=aWd8PCCvc63ClVG88p5VQoROv7Oe2rDRMPbz7IjkMKsR8wjbom7ao8Gw5pclxgYa9dt8x1 Z4aYP3crdT1MP3BA== 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 17/33] x86/apic/msi: Remove arch_create_remap_msi_irq_domain() References: <20221121083657.157152924@linutronix.de> MIME-Version: 1.0 Date: Mon, 21 Nov 2022 15:38:07 +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?1750117016790880026?= X-GMAIL-MSGID: =?utf-8?q?1750117016790880026?= and related code which is not longer required now that the interrupt remap code has been converted to MSI parent domains. Signed-off-by: Thomas Gleixner --- arch/x86/include/asm/irq_remapping.h | 4 --- arch/x86/kernel/apic/msi.c | 42 ----------------------------------- 2 files changed, 1 insertion(+), 45 deletions(-) --- a/arch/x86/include/asm/irq_remapping.h +++ b/arch/x86/include/asm/irq_remapping.h @@ -44,10 +44,6 @@ extern int irq_remapping_reenable(int); extern int irq_remap_enable_fault_handling(void); extern void panic_if_irq_remap(const char *msg); -/* Create PCI MSI/MSIx irqdomain, use @parent as the parent irqdomain. */ -extern struct irq_domain * -arch_create_remap_msi_irq_domain(struct irq_domain *par, const char *n, int id); - /* Get parent irqdomain for interrupt remapping irqdomain */ static inline struct irq_domain *arch_get_ir_parent_domain(void) { --- a/arch/x86/kernel/apic/msi.c +++ b/arch/x86/kernel/apic/msi.c @@ -277,7 +277,7 @@ void __init x86_create_pci_msi_domain(vo x86_pci_msi_default_domain = x86_init.irqs.create_pci_msi_domain(); } -/* Keep around for hyperV and the remap code below */ +/* Keep around for hyperV */ int pci_msi_prepare(struct irq_domain *domain, struct device *dev, int nvec, msi_alloc_info_t *arg) { @@ -291,46 +291,6 @@ int pci_msi_prepare(struct irq_domain *d } EXPORT_SYMBOL_GPL(pci_msi_prepare); -#ifdef CONFIG_IRQ_REMAP -static struct msi_domain_ops pci_msi_domain_ops = { - .msi_prepare = pci_msi_prepare, -}; - -static struct irq_chip pci_msi_ir_controller = { - .name = "IR-PCI-MSI", - .irq_unmask = pci_msi_unmask_irq, - .irq_mask = pci_msi_mask_irq, - .irq_ack = irq_chip_ack_parent, - .irq_retrigger = irq_chip_retrigger_hierarchy, - .flags = IRQCHIP_SKIP_SET_WAKE | - IRQCHIP_AFFINITY_PRE_STARTUP, -}; - -static struct msi_domain_info pci_msi_ir_domain_info = { - .flags = MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS | - MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX, - .ops = &pci_msi_domain_ops, - .chip = &pci_msi_ir_controller, - .handler = handle_edge_irq, - .handler_name = "edge", -}; - -struct irq_domain *arch_create_remap_msi_irq_domain(struct irq_domain *parent, - const char *name, int id) -{ - struct fwnode_handle *fn; - struct irq_domain *d; - - fn = irq_domain_alloc_named_id_fwnode(name, id); - if (!fn) - return NULL; - d = pci_msi_create_irq_domain(fn, &pci_msi_ir_domain_info, parent); - if (!d) - irq_domain_free_fwnode(fn); - return d; -} -#endif - #ifdef CONFIG_DMAR_TABLE /* * The Intel IOMMU (ab)uses the high bits of the MSI address to contain the