From patchwork Tue Dec 13 14:08:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 2915 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp141386wrn; Tue, 13 Dec 2022 06:10:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf56rWLZXStpmyQNU+Nhn0uu/oif3/ig3KSqChJsuexz+y0LySomSnrlJ4efCsCArx72zm7o X-Received: by 2002:a05:6a20:3d22:b0:9d:efbf:48e8 with SMTP id y34-20020a056a203d2200b0009defbf48e8mr31985344pzi.44.1670940645223; Tue, 13 Dec 2022 06:10:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670940645; cv=none; d=google.com; s=arc-20160816; b=Ky8X1Fua9WMqii+oH7uNOK6HqV+uRmsjXm1UuNOIGhjLovZyhX7hx/ZHD2dgJlVJrC e5XmvNPH4sNUMQZFevcasRDBmcAewJcmYAKmwNBVovTEf+r0nxL+G8+cvwPeb6z1ymD9 ffeQE8Vb40mN2nbU/s64+KwCMlK+2ww2JpNyUYItAYYyWW8BhJiFTfT6ktTf7lOjp58k F3UcxP0jPEQTLPgmoPFq/9K4kTfo7srrq2QzxcyjFTWRp3ik02hoaeoUeINhQh0P7ByS 26Qr1uc+VqyX5E732MZyjEgQURi77y5r6I1m9DX7xdfCn31FUxNoMygEhjH1jRDb+AXj sfKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=WjuA139Uy2jI1TqI7YH8iaHA0yOKVEhH3mYMtXrQ/nc=; b=zRkAm8Azah1RgMvmaMiLJPApujah6u2pr73REQiPY3vMGlYSxdO0nxHzapRY5XO0Ou 3btQPnhci/hdPZRr81SnnDuVZbZRqilWt3WXyOeayb31+1VDC8g3pt/2uSJYFXSGTXE4 TlKZN7P2DOK3lfQXjF/TKaYpqyRONux+4NfP3mSRPW5VKzktrRpHOZ5qoeicYLHmkfJI eTDYcsL1G+vZHpAnuiiPNNChDDftLU1GNTLwoLg8lNwAZQbKfs781ASi8K9RhsQzEOIa +zk2pMWqZ971npGM8aoSmLMGEIfANowxN3GfDOMPjysAKuvWySRLMVtplZWyBXiHZ0pg jFhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o5JPbh7R; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x24-20020a63b218000000b0046f33e14597si13113840pge.106.2022.12.13.06.10.30; Tue, 13 Dec 2022 06:10: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=@kernel.org header.s=k20201202 header.b=o5JPbh7R; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230054AbiLMOJZ (ORCPT + 99 others); Tue, 13 Dec 2022 09:09:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235854AbiLMOIx (ORCPT ); Tue, 13 Dec 2022 09:08:53 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 125A420BF9 for ; Tue, 13 Dec 2022 06:08:42 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 682F261548 for ; Tue, 13 Dec 2022 14:08:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82776C433F0; Tue, 13 Dec 2022 14:08:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670940521; bh=ZhS1+Jlq3PtbDqoFD6tZt00rbsFDNMR0cDrwPMM46IU=; h=From:To:Cc:Subject:Date:From; b=o5JPbh7RIfNUgRAwbMU1AkQ+gPqagF91VvU4yE+e2MCAPxBOXwA/PdyXxq2qtOycq svx6xe4s/pD8Dx42oAxi2Rz9GR41biHEuk7wVf5kfBwFg7M5wkaqnJyI1c96z+1f7K CdmKZQrlvDWqqcHonGcNqkOYmDlAnEc7X45AejsE/iMtZOyV6UfxMCYEZEkPPyNCpA 8JKx5Eg2g1FnqyAlHC9joBIm6GRwgeMmTuGK/leaU9Ck2/FwrVG51kLZhYw9LAy+j6 vrwdGqTV4eWB/4+sXPtEJSfLpdgZCcguFDmHj8ijGKFQcV528i2/7N+lLRW43bNP9E tM3ZcuUrF3RzA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1p55xz-00042J-9t; Tue, 13 Dec 2022 15:09:07 +0100 From: Johan Hovold To: Thomas Gleixner , Marc Zyngier Cc: Hector Martin , Sven Peter , Alyssa Rosenzweig , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, Johan Hovold Subject: [PATCH 0/2] irqchip/genirq/msi: Use irq_domain_alloc_irqs() Date: Tue, 13 Dec 2022 15:08:42 +0100 Message-Id: <20221213140844.15470-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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?1752108257749786102?= X-GMAIL-MSGID: =?utf-8?q?1752108257749786102?= When reworking the irqdomain locking I noticed that we had quite a few users of the __irq_domain_alloc_irqs() interface which was initially only intended for some legacy x86 use cases. This first patch updates the irqchip driver so that the irq_domain_alloc_irqs() wrapper is instead used consistently. The second patch adds a matching irq_domain_alloc_irqs_affinity() helper which can be used when an affinity hint needs to be provided and updates the sole user. With this update to gpiolib: https://lore.kernel.org/lkml/20221213135227.14398-1-johan+linaro@kernel.org the only remaining users of the full interface (with preallocated descriptors) are the two original calls in x86/io_apic and the later added one for IPI. Johan Johan Hovold (2): irqchip: Use irq_domain_alloc_irqs() genirq/irqdomain/msi: Add irq_domain_alloc_irqs_affinity() wrapper drivers/irqchip/irq-apple-aic.c | 5 ++--- drivers/irqchip/irq-armada-370-xp.c | 4 ++-- drivers/irqchip/irq-bcm2836.c | 6 ++---- drivers/irqchip/irq-gic-v3.c | 5 ++--- drivers/irqchip/irq-gic-v4.c | 10 ++++------ drivers/irqchip/irq-gic.c | 5 ++--- include/linux/irqdomain.h | 15 +++++++++++++++ kernel/irq/msi.c | 6 +++--- 8 files changed, 32 insertions(+), 24 deletions(-)