From patchwork Mon Dec 6 22:51:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 12660329 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C41C3C433FE for ; Mon, 6 Dec 2021 22:51:34 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.240143.416658 (Exim 4.92) (envelope-from ) id 1muMpU-0004gY-8M; Mon, 06 Dec 2021 22:51:28 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 240143.416658; Mon, 06 Dec 2021 22:51:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1muMpU-0004fb-2D; Mon, 06 Dec 2021 22:51:28 +0000 Received: by outflank-mailman (input) for mailman id 240143; Mon, 06 Dec 2021 22:51:26 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1muMpS-0008NM-Fc for xen-devel@lists.xenproject.org; Mon, 06 Dec 2021 22:51:26 +0000 Received: from galois.linutronix.de (galois.linutronix.de [193.142.43.55]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 0aa8c2cb-56e7-11ec-a5e1-b9374ead2679; Mon, 06 Dec 2021 23:51:25 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 0aa8c2cb-56e7-11ec-a5e1-b9374ead2679 Message-ID: <20211206210748.359766435@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1638831085; 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=Zss9mzfScWFeJ2auPATLVX18AC4Qn1uic4NkiF38xfU=; b=QbOlaYLd67illK+RXm69ncvgL9zwen35YS0qk4pw2VmlWKfHuqtlqEHHBm8vTfCpXOVtGC /YwYsNN2mahTQwgaL5yHyodmBR4odrjNXlKrzL/KtcBH6KXWAa4V/sWDWnkIubcpUyPHLb WSphnGnNUyWJ23dyyU1+ZSv9x7GgoRVYZObpp2cDLcN8+Vd4BcIZ5tJ9Mu3arYQje2EL2W yzXoWqEcFaE3Ua/TtvSqE+g/9BboZUtfpvfEwH+AS94IqtD9d3NU2w2eybpzXq9zn1r0w+ rTmvXHoN/7+UEFzjo2qzKQhqJJY8iJqDqw5N5DZ2ZCTqJli84gAxmaYA1nl4KQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1638831085; 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=Zss9mzfScWFeJ2auPATLVX18AC4Qn1uic4NkiF38xfU=; b=z/DvlpsspWgWro1GdhpcO0qe0cuCFF8HxhKT/D0ITEBaCrXK2e5haCQ2KBiMQ5WWMYJW+s H9AWbWwHjRClppAw== From: Thomas Gleixner To: LKML Cc: Bjorn Helgaas , Marc Zygnier , Alex Williamson , Kevin Tian , Jason Gunthorpe , Megha Dey , Ashok Raj , linux-pci@vger.kernel.org, Cedric Le Goater , xen-devel@lists.xenproject.org, Juergen Gross , Greg Kroah-Hartman , Niklas Schnelle , linux-s390@vger.kernel.org, Heiko Carstens , Christian Borntraeger , Logan Gunthorpe , Jon Mason , Dave Jiang , Allen Hubbe , linux-ntb@googlegroups.com Subject: [patch V2 14/31] powerpc/4xx/hsta: Rework MSI handling References: <20211206210600.123171746@linutronix.de> MIME-Version: 1.0 Date: Mon, 6 Dec 2021 23:51:25 +0100 (CET) Replace the about to vanish iterators and make use of the filtering. Signed-off-by: Thomas Gleixner --- arch/powerpc/platforms/4xx/hsta_msi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) --- a/arch/powerpc/platforms/4xx/hsta_msi.c +++ b/arch/powerpc/platforms/4xx/hsta_msi.c @@ -47,7 +47,7 @@ static int hsta_setup_msi_irqs(struct pc return -EINVAL; } - for_each_pci_msi_entry(entry, dev) { + msi_for_each_desc(entry, &dev->dev, MSI_DESC_NOTASSOCIATED) { irq = msi_bitmap_alloc_hwirqs(&ppc4xx_hsta_msi.bmp, 1); if (irq < 0) { pr_debug("%s: Failed to allocate msi interrupt\n", @@ -105,10 +105,7 @@ static void hsta_teardown_msi_irqs(struc struct msi_desc *entry; int irq; - for_each_pci_msi_entry(entry, dev) { - if (!entry->irq) - continue; - + msi_for_each_desc(entry, &dev->dev, MSI_DESC_ASSOCIATED) { irq = hsta_find_hwirq_offset(entry->irq); /* entry->irq should always be in irq_map */