Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2168235rwb; Thu, 17 Nov 2022 07:22:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf6+HcwkdmFUtWkJylnATORkVQUooMWilRBiCK6dIj7pqYX1xozaVwKHT/WJ7IuMaX3M6lC+ X-Received: by 2002:a17:90b:3d03:b0:213:1e05:f991 with SMTP id pt3-20020a17090b3d0300b002131e05f991mr9404227pjb.216.1668698568542; Thu, 17 Nov 2022 07:22:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668698568; cv=none; d=google.com; s=arc-20160816; b=xaKQ5hS5e6Dd69CPx1CRkw9pA6kH2QaAUeIuDarNf3SQ0sEsQrLzX8QcbZVSPNObc3 facSdNHZ2FacwtV7fBxLCbXoeEiR+5XdgOyM6dgI1OqXQHoPASwGWoBUFUbB838pJL82 V/wirQ5nr8kieaJ6QcpslRS2rwVLVMsLfsgMmumdORSRtbIg9m7mNT76XHYWJK8MzFO7 UAsXpNRQIDUCwu821dgaZFRyBiuUNGN4/EChqGUA+WV2q1ZXKZHU8QFxO10d8B3XKTIW OreJ7H8hCOJRo1VWdD/9S9rDYd0erYAy4W0Ku8saP3UoMFwTrYz+Hp8bN3xJCrDG1O4i lHWg== 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=T/K9lHuiSF7Wxg1kZkD09F7nqwS2mS7RJYeIJN95CV8=; b=cYIvwvosJBkTjJK8xcu9PVMrf0sDD7Yy+uIC3q97pcU7pYdhzgFlpcDrrOoi2yB230 wLIylU5eC7Mmyw10mAfG5p5vjEX2iwkITMapgfKXrd+ebO0zqRpqFLBr7KdiJbR9Mk7a /Syr3Q5rWhDKtGt7HyFfwBoMHADoRxnuCctrCLjPZBALH6iT+0nca8tklnrDVbjGmIah 0uVNxHio8AvWzrFVi10XKzHiH+Irw4fAsxF0vKxkkXUmq+VCIrWbLLv5nZVcagcaVRFu CDOjwy3pFarVlEs9Yi9BpAuqLFCQPjemo8Aym72+nUvdAl8Be4io0kmfv8+7BC6o302l RAYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Ib59n7Ba; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t2-20020a170902b20200b001786b70f913si1158771plr.164.2022.11.17.07.22.23; Thu, 17 Nov 2022 07:22:48 -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=Ib59n7Ba; 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 S240623AbiKQPLL (ORCPT + 92 others); Thu, 17 Nov 2022 10:11:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240257AbiKQPJ2 (ORCPT ); Thu, 17 Nov 2022 10:09:28 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C17C5B7C7; Thu, 17 Nov 2022 07:08:27 -0800 (PST) Date: Thu, 17 Nov 2022 15:08:25 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668697706; 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=T/K9lHuiSF7Wxg1kZkD09F7nqwS2mS7RJYeIJN95CV8=; b=Ib59n7BaEPcE2T8pQfPHhE7nE9IRvB2k8SWL0O4sluGrZUyJzYyNSRKyHFpDVPa6rRG5Cd 3wTQ9ZhqKcQjgwVjQDBuzAeGZGE9nXLcbmt/rLthC+tdwz1VGCcnuuUhETGUrOY0043Eri ny4xTP6QdovRm2/YFoLH7PYJGaUvTQ7/i5bLT2yMPaGCgcLBkDkFjdPo1yNQx+hezAzQht T+gTdeucXBvB1za9fc6VDg4+ZaE9GHLs0dl0XjwvzasbDKQjpQpH3rg9UjpcvfVHZnG0LZ lVLYvrob795NwnSALFaqFE2WsvHLB5TL76j+qB2yY1EjQFpcpqpCKBk16rwq5Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668697706; 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=T/K9lHuiSF7Wxg1kZkD09F7nqwS2mS7RJYeIJN95CV8=; b=L/h4y9+AMmuorHcTb8831SQ5PGPJFX8Iqk/Bmt22eSHP3YZB8v4yJjy0iEgT8HziT/3bKF FD8mdNtk4udG9HBQ== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] genirq/msi: Provide msi_domain_ops:: Post_free() Cc: Thomas Gleixner , Ashok Raj , Jason Gunthorpe , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20221111122014.063153448@linutronix.de> References: <20221111122014.063153448@linutronix.de> MIME-Version: 1.0 Message-ID: <166869770523.4906.5860379495214796785.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 The following commit has been merged into the irq/core branch of tip: Commit-ID: f6d3486a3d2f3c67d732641834eec872fcc66472 Gitweb: https://git.kernel.org/tip/f6d3486a3d2f3c67d732641834eec872fcc66472 Author: Thomas Gleixner AuthorDate: Fri, 11 Nov 2022 14:54:27 +01:00 Committer: Thomas Gleixner CommitterDate: Thu, 17 Nov 2022 15:15:19 +01:00 genirq/msi: Provide msi_domain_ops:: Post_free() To prepare for removing the exposure of __msi_domain_free_irqs() provide a post_free() callback in the MSI domain ops which can be used to solve the problem of the only user of __msi_domain_free_irqs() in arch/powerpc. Signed-off-by: Thomas Gleixner Reviewed-by: Ashok Raj Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20221111122014.063153448@linutronix.de --- include/linux/msi.h | 4 ++++ kernel/irq/msi.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/include/linux/msi.h b/include/linux/msi.h index 9b552ee..7f6aba9 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -315,6 +315,8 @@ struct msi_domain_info; * function. * @domain_free_irqs: Optional function to override the default free * function. + * @msi_post_free: Optional function which is invoked after freeing + * all interrupts. * * @get_hwirq, @msi_init and @msi_free are callbacks used by the underlying * irqdomain. @@ -359,6 +361,8 @@ struct msi_domain_ops { struct device *dev, int nvec); void (*domain_free_irqs)(struct irq_domain *domain, struct device *dev); + void (*msi_post_free)(struct irq_domain *domain, + struct device *dev); }; /** diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index 3ccc7f6..c71c37d 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -1026,6 +1026,8 @@ void msi_domain_free_irqs_descs_locked(struct irq_domain *domain, struct device lockdep_assert_held(&dev->msi.data->mutex); ops->domain_free_irqs(domain, dev); + if (ops->msi_post_free) + ops->msi_post_free(domain, dev); msi_domain_free_msi_descs(info, dev); }