From patchwork Fri Nov 11 13:54:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 18756 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp752724wru; Fri, 11 Nov 2022 05:56:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf7rvbjCC17wLF6vsdRexGQVFKfHdMCUZawJdquG2WbV5c63Lxj8zGlo9whMMyBzyJAUqrD1 X-Received: by 2002:a17:906:54cf:b0:78a:d075:98d8 with SMTP id c15-20020a17090654cf00b0078ad07598d8mr1930980ejp.324.1668175005827; Fri, 11 Nov 2022 05:56:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668175005; cv=none; d=google.com; s=arc-20160816; b=Qp/SudHRhUKmeiNmEHTkIf/gT+agVmYFVDBEzm+IqwD2mnL3gbyi6Jy+L8AG0HsJG7 P7EWrgPZUFWduXJ5BihibheNaGfkR60CWJ1iqUTXm3E8OHxagMemCekRy5kwkzOJY2NG 3RPwIRuwsSURJ3PsrtqK3wXx1xqvxMjjYPcIDIY05qCZeMbOBF5V6Ik1YiNnw8vi/UjK fgGPq9hBdHuwOlBn0yWBHocSWcfZu4FL0NA/AsvNjy5AX3zDMGL7tzV3qx7lUWDzru/j mtXwf3Zxo4zdXCYY0SNhD1mkBA9KWcQBwiYYrakcle/U0HhFNQdE8liWvSTG6eJ/a91p w4Ug== 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=uAK7e6YKYfE3NKk9044qCaJfhx6qFWH6i8PscALcCkU=; b=fUetarD9Nnk05HGCIr//HW3d7GWUJRNFHb4Nasw3OTPBb4zasR/q3NIUM9bq5lRolx cK2u+UJC2UrNGuurctx6/R3pXUr5KpghPwY5ZFrvD1tQU3hvB5t4oBExc6STkD1VpdZG G4d5sNOQJQm/XOVv4dCOUqecAbWO3zXNTCnwhMUehPT73P4UDqAYLUdLir90eX+bUDUB OpHZ2VRjqlKbTz+EPzD4RtiNpoJv+f+QEXGgGYqWI/MV52oqCtFw0VorVu/XuMDGjWjZ p8rUikfvzpSQ6trZZ762FNQiZlg66OHuIgi2AYs4En5sB/i49+DVCxMBbXZ/B9gsHwj8 gTnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=bhdG0eo2; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=CdnfXWBv; 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 he12-20020a1709073d8c00b007acf3aed493si2237415ejc.910.2022.11.11.05.56.19; Fri, 11 Nov 2022 05:56:45 -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=bhdG0eo2; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=CdnfXWBv; 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 S233852AbiKKNzX (ORCPT + 99 others); Fri, 11 Nov 2022 08:55:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233592AbiKKNyy (ORCPT ); Fri, 11 Nov 2022 08:54:54 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6610270183; Fri, 11 Nov 2022 05:54:30 -0800 (PST) Message-ID: <20221111122014.120489922@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668174869; 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=uAK7e6YKYfE3NKk9044qCaJfhx6qFWH6i8PscALcCkU=; b=bhdG0eo2d5cR5NUOFj3Ienrsw5VPaTNHp3Q9tmXe+N2uBx5Zp/1epSUs7hD/C0G7eLrHaV +C8SctVO+X4BrGfCIZMTE0ojXzDO8B42XGVZas3NbDPd0Q/HPETWT9XKnO9F2VmwX6OV9S V668vy8p1CUipfcobFboZ4vTtAxDWK63IStDKwrOKRaBdhZFOak3Blp+nwAEE7pjT3xpcw ZLBLGCh74g5FftekR3u7YTxhlQ16TIYo++JJjAD0y7eaEOF/5GUbQq9RCpuQSBLyXzaAzV C/+4MDauiberZ+DV2mcdIIvqMMOnfOqSzRFvFsw2nuyv9tz7FHZ0r4CKPbYqkA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668174869; 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=uAK7e6YKYfE3NKk9044qCaJfhx6qFWH6i8PscALcCkU=; b=CdnfXWBvUOFJUQvenC/sG/RoCl0EBsTovXNlHbcYl5w55OTi8OHqj96pgDXVqDNddziMC5 Q0FyhLFGFQVlnUCw== 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 , Michael Ellerman , Christophe Leroy , linuxppc-dev@lists.ozlabs.org, "Ahmed S. Darwish" , Reinette Chatre Subject: [patch 09/39] powerpc/pseries/msi: Use msi_domain_ops::msi_post_free() References: <20221111120501.026511281@linutronix.de> MIME-Version: 1.0 Date: Fri, 11 Nov 2022 14:54:28 +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?1749208274794391553?= X-GMAIL-MSGID: =?utf-8?q?1749208274794391553?= Use the new msi_post_free() callback which is invoked after the interrupts have been freed to tell the hypervisor about the shutdown. This allows to remove the exposure of __msi_domain_free_irqs(). Signed-off-by: Thomas Gleixner Cc: Michael Ellerman Cc: Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Jason Gunthorpe --- arch/powerpc/platforms/pseries/msi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) --- a/arch/powerpc/platforms/pseries/msi.c +++ b/arch/powerpc/platforms/pseries/msi.c @@ -447,21 +447,18 @@ static void pseries_msi_ops_msi_free(str * RTAS can not disable one MSI at a time. It's all or nothing. Do it * at the end after all IRQs have been freed. */ -static void pseries_msi_domain_free_irqs(struct irq_domain *domain, - struct device *dev) +static void pseries_msi_post_free(struct irq_domain *domain, struct device *dev) { if (WARN_ON_ONCE(!dev_is_pci(dev))) return; - __msi_domain_free_irqs(domain, dev); - rtas_disable_msi(to_pci_dev(dev)); } static struct msi_domain_ops pseries_pci_msi_domain_ops = { .msi_prepare = pseries_msi_ops_prepare, .msi_free = pseries_msi_ops_msi_free, - .domain_free_irqs = pseries_msi_domain_free_irqs, + .msi_post_free = pseries_msi_post_free, }; static void pseries_msi_shutdown(struct irq_data *d)