From patchwork Mon Nov 21 14:36:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 13051109 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3B7CC43219 for ; Mon, 21 Nov 2022 14:37:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230453AbiKUOhO (ORCPT ); Mon, 21 Nov 2022 09:37:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230086AbiKUOgp (ORCPT ); Mon, 21 Nov 2022 09:36:45 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45A86C6BFE; Mon, 21 Nov 2022 06:36:41 -0800 (PST) Message-ID: <20221121083326.451412447@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669041399; 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=g4QPlbf/kZK7IE6hnczsu6AmVOXaYfuEpjg2N6VHa1U=; b=JhNtr/myl7sTYsZkFaNXoZvsyFXwR7OsO5tGwrf0hUhsIoeB2vfgzbvdci+jZxbbxYU4Yn GrjMKBmOUYe4nZ8i1eFehzLYDcKYq8LzTeTZIwcnnquXm1pOgxbvJUhtbuQ2Fptk1+I4qF UGBT2sakYMRQVqr6f9jaunHUaCESHQ8o/LvCu3m5Yh9Nd7Jtv38FrUfIon3dVuZL3JWjKc wEX5aW6srGp9g4I0Q/svAouCR3HqFXrg3YS4Cld57SSDV0JCZ2BhbCdsfkAhVLE8TkIr2A qY0x+Kv8PHFpj2XcTfRXWTxJGE8/hXNlqVSS2U9vr6vi/1KSjJCoCHliy+oJWw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669041399; 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=g4QPlbf/kZK7IE6hnczsu6AmVOXaYfuEpjg2N6VHa1U=; b=R4JlIJg7yrPBj1VvEB0zM08yCyUsfvtNcRcEXwT0rxRbiBaMx9pM6gugtWAraRu71rFZH/ zi5XsKplaUbLuGAg== 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/21] PCI/MSI: Use msi_domain_alloc/free_irqs_all_locked() References: <20221121083210.309161925@linutronix.de> MIME-Version: 1.0 Date: Mon, 21 Nov 2022 15:36:39 +0100 (CET) Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Switch to the new domain id aware interfaces to phase out the previous ones. This uses the _all() variants of the MSI allocation/free interfaces because due to potentially sparse indices of the preallocated MSI descriptors describing the range precisely is not possible. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas --- drivers/pci/msi/irqdomain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/pci/msi/irqdomain.c +++ b/drivers/pci/msi/irqdomain.c @@ -14,7 +14,7 @@ int pci_msi_setup_msi_irqs(struct pci_de domain = dev_get_msi_domain(&dev->dev); if (domain && irq_domain_is_hierarchy(domain)) - return msi_domain_alloc_irqs_descs_locked(domain, &dev->dev, nvec); + return msi_domain_alloc_irqs_all_locked(&dev->dev, MSI_DEFAULT_DOMAIN, nvec); return pci_msi_legacy_setup_msi_irqs(dev, nvec, type); } @@ -25,7 +25,7 @@ void pci_msi_teardown_msi_irqs(struct pc domain = dev_get_msi_domain(&dev->dev); if (domain && irq_domain_is_hierarchy(domain)) { - msi_domain_free_irqs_descs_locked(domain, &dev->dev); + msi_domain_free_irqs_all_locked(&dev->dev, MSI_DEFAULT_DOMAIN); } else { pci_msi_legacy_teardown_msi_irqs(dev); msi_free_msi_descs(&dev->dev);