From patchwork Mon Dec 5 18:25:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 29847 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2409435wrr; Mon, 5 Dec 2022 10:28:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf4G27ATsaRGT41hv+p8hf8uaGNmDbdLtbXiOoT7hM62c74IrnZJFE/TxV0s45RE+1N3QPh0 X-Received: by 2002:a17:906:d84:b0:7c0:b6e2:a1c8 with SMTP id m4-20020a1709060d8400b007c0b6e2a1c8mr15370594eji.398.1670264899847; Mon, 05 Dec 2022 10:28:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670264899; cv=none; d=google.com; s=arc-20160816; b=LbBDApZc9Ttu2/UhRhUNhIopRVp0N7w789l203oHu411L/Sa1Sb6dcwz2F48mcRHcl xhV5VR0Qg3nFd9Gp7z0M/16QSa88cQ3kUJ2aZndqFhbtO/3euw4Tuamex575zJNUtm21 xyBswlDTtGGqKZ8bDw+EuFhrO/8dIoZkK1MhARFGkRq+tBnHDlWqPArTZS12C1dnxJor FvCmEdAleqxz4FZR33KrdIoBg/jDXaQzmgaKtX4YR55QyNBJebYpfduh5XeN8T/6ZpVH nucoxvr4+KcfkfF4kIUa0jpRzb73rKZKB2Nx9B70+QNpLXazscha1en6DGyNvAVCEttX 8Xrw== 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=7XrkqEXK++v8CUKFEcz/xwkxbE6fFLQhXnmRSphJvL8=; b=cVMF/h5dkSLmm0AJFe1S3hxuVoFDpx9BrXXVIn9ayfBFJaObCKE+4gKfS5pIZKS+ll r5hh8YMOUN6wgWu2+l40ibpElWCV8t9kKQb7bkMhuwGe6MssJe4lpfyHq2OGj1fFaTA4 ffc7gAAbHiYFfWqsMegO5ietSIlAdnVnh6cRtVUNUius/L3KNUpWctiswXTG2yVwvOEm fT6k8dkqJs2y9LlwnfML/h3x38kkUBbzn9IRWbgESPNXMErvdYkuVjF9UhyYmI0TAaNC CH/aShP8JiWaKAzPjYsr8uBLc4v4Uef3ZKNIxeEC7vhp0xW60E8U9tQdpgFUUMG3v+qF C7zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=hwRPErUy; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z15-20020a17090655cf00b007ae1052555dsi9358155ejp.436.2022.12.05.10.27.56; Mon, 05 Dec 2022 10:28:19 -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=hwRPErUy; 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 S232910AbiLES1P (ORCPT + 99 others); Mon, 5 Dec 2022 13:27:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232463AbiLESZT (ORCPT ); Mon, 5 Dec 2022 13:25:19 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B2C320F52; Mon, 5 Dec 2022 10:25:18 -0800 (PST) Date: Mon, 05 Dec 2022 18:25:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670264716; 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=7XrkqEXK++v8CUKFEcz/xwkxbE6fFLQhXnmRSphJvL8=; b=hwRPErUyGZ5BozB0dtj9EvdvJz6S2s9LALOLgpIS2ITZMg55C7eQJUzi49fR6tOoMia52c 1Jd7bqbiZDIRE4UP3+bxqANaZFL7SNvyk2DunjNluu0tIgDGBaxdbDQWiK4UTwA96tTMOs 5OJthlOkkxZWfSsAzsQPv/7l1xO15LUHpzKxKd/1OHDkUOmcCLG+8Xe2Tg7sZtY2sVOyZL GhMtOOj0hyMt2B/RJVZBJSSzviNqzF3d39sTLZ4DrPxSbzbtL9JNyhxldAHhW1lSfUIsgU 5tP40vhf4ULEDtwNc+RxdTSZuRPa+V7Gey1rvHIJEggD9yNIyOj7TnMuKlCHOw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670264716; 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=7XrkqEXK++v8CUKFEcz/xwkxbE6fFLQhXnmRSphJvL8=; b=va2yoTmSD3poYzPrcMZrPYHDhhBwgplnKZpMqKZEVnVMtvt+hm72aPWDRb6g9huXkyIdUm Tby5F3CDH70FC0BQ== 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: Split msi_create_irq_domain() Cc: Thomas Gleixner , Kevin Tian , Marc Zyngier , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221124232325.559086358@linutronix.de> References: <20221124232325.559086358@linutronix.de> MIME-Version: 1.0 Message-ID: <167026471622.4906.12099453928840073878.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails 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?1750422142441834999?= X-GMAIL-MSGID: =?utf-8?q?1751399687396353573?= The following commit has been merged into the irq/core branch of tip: Commit-ID: a80c0aceeaffdb3afe9536fe747480e85841da7f Gitweb: https://git.kernel.org/tip/a80c0aceeaffdb3afe9536fe747480e85841da7f Author: Thomas Gleixner AuthorDate: Fri, 25 Nov 2022 00:25:52 +01:00 Committer: Thomas Gleixner CommitterDate: Mon, 05 Dec 2022 19:21:01 +01:00 genirq/msi: Split msi_create_irq_domain() Split the functionality of msi_create_irq_domain() so it can be reused for creating per device irq domains. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232325.559086358@linutronix.de --- kernel/irq/msi.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index 0a38905..0f7fe56 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -758,17 +758,10 @@ static void msi_domain_update_chip_ops(struct msi_domain_info *info) chip->irq_set_affinity = msi_domain_set_affinity; } -/** - * msi_create_irq_domain - Create an MSI interrupt domain - * @fwnode: Optional fwnode of the interrupt controller - * @info: MSI domain info - * @parent: Parent irq domain - * - * Return: pointer to the created &struct irq_domain or %NULL on failure - */ -struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode, - struct msi_domain_info *info, - struct irq_domain *parent) +static struct irq_domain *__msi_create_irq_domain(struct fwnode_handle *fwnode, + struct msi_domain_info *info, + unsigned int flags, + struct irq_domain *parent) { struct irq_domain *domain; @@ -787,7 +780,7 @@ struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode, if (info->flags & MSI_FLAG_USE_DEF_CHIP_OPS) msi_domain_update_chip_ops(info); - domain = irq_domain_create_hierarchy(parent, IRQ_DOMAIN_FLAG_MSI, 0, + domain = irq_domain_create_hierarchy(parent, flags | IRQ_DOMAIN_FLAG_MSI, 0, fwnode, &msi_domain_ops, info); if (domain) { @@ -800,6 +793,21 @@ struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode, } /** + * msi_create_irq_domain - Create an MSI interrupt domain + * @fwnode: Optional fwnode of the interrupt controller + * @info: MSI domain info + * @parent: Parent irq domain + * + * Return: pointer to the created &struct irq_domain or %NULL on failure + */ +struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode, + struct msi_domain_info *info, + struct irq_domain *parent) +{ + return __msi_create_irq_domain(fwnode, info, 0, parent); +} + +/** * msi_parent_init_dev_msi_info - Delegate initialization of device MSI info down * in the domain hierarchy * @dev: The device for which the domain should be created