From patchwork Thu Nov 17 15:08:26 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: 21735 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp453849wrr; Thu, 17 Nov 2022 07:12:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf64Io5swGatCF0Ujt4NoCPeajh1XntDB6YH+YL2MTp1/zreCi3luBYgPWv9QXawD2RwO/Jb X-Received: by 2002:a05:6402:f11:b0:467:8813:cab5 with SMTP id i17-20020a0564020f1100b004678813cab5mr2533935eda.369.1668697954110; Thu, 17 Nov 2022 07:12:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668697954; cv=none; d=google.com; s=arc-20160816; b=VvUrmmW8LKtz5EP2PVoLYqnJ5UegBj2HxU8R6ZeUT/P6cfZFFm5s/6aOoGrmUEWK6d SBF9lkCq7oz+F6ZUeo7dzeNKsOxN1t+i8riQnFgX+dfFxg7xsP21snHCqJvE8LAiUY8a JKebX1MTvud/0xccNmbT7lvxq2ixlzdh2M1wMJhVNC/NLPYeP4+dXv0VYJgPoIz+LYvX I1U1fDdSuYyYisRuIvBvp2+cq0m5wOAyRxt6f5a5frY1XS6uEgyLAvH5d0eZzXUwWOrN dKA6btbFWq0TTXNcPcssEHinORp7d9DdZBs74Knpb6jPg2u3WWVO7wdKkfezrMTeAtui hsFg== 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=LyHlI/t1kqikxkbw7l9K1KAQSUdfreCZ0zx+OpwNRoQ=; b=DKz0Iqu3CJ/fq+vW/nUU9gk/5AyfZSrf/fXliOozXy/hcaRGt2KpynJBxAOH9/RJht PIzPp/a4pF+KH+qGLmzgGyW2ArtFZoKtDX45y2JhCDG79PVoFcWkjWWyjZ9gz/k6RBoq 4c/q9KhIS/ypu0hmBDHkGBlibubysuLFxbO5dDmUqMWslUai1jOosgSj0ypq0in/VtXH CZ4ZnQk3y1DpDsBtkrsz2ic2dMaU4ER3i1yNRrOracp+oEWNsroLHcfLhBgkcHsltjLn oGus6YK2TMko1GDknX89w/EfE//zct9nFqvlElwO+7UOwr2+PG8oHMaGW8muALTfVABK F1Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=N+u4tjrL; 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 fj10-20020a0564022b8a00b00461f7a83e58si1049728edb.46.2022.11.17.07.12.10; Thu, 17 Nov 2022 07:12:34 -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=N+u4tjrL; 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 S240635AbiKQPLO (ORCPT + 99 others); Thu, 17 Nov 2022 10:11:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240498AbiKQPJf (ORCPT ); Thu, 17 Nov 2022 10:09:35 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41D7610FF7; Thu, 17 Nov 2022 07:08:29 -0800 (PST) Date: Thu, 17 Nov 2022 15:08:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668697707; 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=LyHlI/t1kqikxkbw7l9K1KAQSUdfreCZ0zx+OpwNRoQ=; b=N+u4tjrL/StNbjJ/jjGfiVMrrMgiio+BVu1GvbBVplaxuZwJ2DkUCwPIl/XkNAcP4QNh9d bP6KJ615KDDT1HQliJudMuZ+O3tXF5ssDK8UFZqn3SV0kuoYu/hG/J79BDO7LOQkRzTFbf nTFaB0tNVWoIcYnLLEUGnk386fNbB/RS0GbcLlPb9VoEUabJC6hJFBGpwHpUCcRYQuTi/H PN/O2m70NpkzKJQdoTJb0MZc0OqpFd7bZWfYeJUUyqysRpsJD+GFUgrPLGVoXXETwA2G9B fBXyfzM/iIojgZJif7KRqhr/pV8rhLLFnFpItReKM9TWgzdqmr8/KiClwnlrxQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668697707; 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=LyHlI/t1kqikxkbw7l9K1KAQSUdfreCZ0zx+OpwNRoQ=; b=GQQVfyPxIgd2MM2GBYfkRS4/fGrjqU9B84vdlR12EuAi3TSS+P4kQrATAjlm4qWjnQv8ys EkAiAcVdLBUPbLAw== 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: Make __msi_domain_alloc_irqs() static Cc: Thomas Gleixner , Ashok Raj , Jason Gunthorpe , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20221111122014.004725919@linutronix.de> References: <20221111122014.004725919@linutronix.de> MIME-Version: 1.0 Message-ID: <166869770630.4906.17217504433732664741.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?1749208395139332618?= X-GMAIL-MSGID: =?utf-8?q?1749756626099176895?= The following commit has been merged into the irq/core branch of tip: Commit-ID: 762687ceb31fc296e2e1406559e8bb50251c5277 Gitweb: https://git.kernel.org/tip/762687ceb31fc296e2e1406559e8bb50251c5277 Author: Thomas Gleixner AuthorDate: Fri, 11 Nov 2022 14:54:25 +01:00 Committer: Thomas Gleixner CommitterDate: Thu, 17 Nov 2022 15:15:18 +01:00 genirq/msi: Make __msi_domain_alloc_irqs() static Nothing outside of the core code requires this. Signed-off-by: Thomas Gleixner Reviewed-by: Ashok Raj Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20221111122014.004725919@linutronix.de --- include/linux/msi.h | 7 ++----- kernel/irq/msi.c | 6 ++++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/linux/msi.h b/include/linux/msi.h index 969ce46..9b552ee 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -334,9 +334,8 @@ struct msi_domain_info; * MSI_FLAG_USE_DEF_DOM_OPS is not set to avoid breaking existing users and * because these callbacks are obviously mandatory. * - * This is NOT meant to be abused, but it can be useful to build wrappers - * for specialized MSI irq domains which need extra work before and after - * calling __msi_domain_alloc_irqs()/__msi_domain_free_irqs(). + * __msi_domain_free_irqs() is exposed for PPC pseries to handle extra + * work after all interrupts and descriptors have been freed. */ struct msi_domain_ops { irq_hw_number_t (*get_hwirq)(struct msi_domain_info *info, @@ -425,8 +424,6 @@ int msi_domain_set_affinity(struct irq_data *data, const struct cpumask *mask, struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode, struct msi_domain_info *info, struct irq_domain *parent); -int __msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, - int nvec); int msi_domain_alloc_irqs_descs_locked(struct irq_domain *domain, struct device *dev, int nvec); int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index 8a6d0dc..3ccc7f6 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -462,6 +462,8 @@ static inline void msi_sysfs_remove_desc(struct device *dev, struct msi_desc *de #endif /* !CONFIG_SYSFS */ #ifdef CONFIG_GENERIC_MSI_IRQ_DOMAIN +static int __msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, int nvec); + static inline void irq_chip_write_msi_msg(struct irq_data *data, struct msi_msg *msg) { @@ -852,8 +854,8 @@ static int msi_init_virq(struct irq_domain *domain, int virq, unsigned int vflag return 0; } -int __msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, - int nvec) +static int __msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, + int nvec) { struct msi_domain_info *info = domain->host_data; struct msi_domain_ops *ops = info->ops;