From patchwork Thu Nov 17 15:08:19 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: 21728 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp453451wrr; Thu, 17 Nov 2022 07:11:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf4khXIWpyIxLvDKV/cU2otCjlscgbeL3Xub2D/FK3c3evoCSPJNjYzjV+T3snoCPw56GtNP X-Received: by 2002:a05:6402:1f0a:b0:459:b29:d896 with SMTP id b10-20020a0564021f0a00b004590b29d896mr2529100edb.9.1668697918671; Thu, 17 Nov 2022 07:11:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668697918; cv=none; d=google.com; s=arc-20160816; b=n9FxUCgY6+b1lJjghQAjDy0in13kfQmWJUQegH+b99iZ3R8ZvDzTnW5QbWZFq7o+q1 jGawaDwiRItvLKQKpSkKm/a4NN4HC4MDFqa7/t1nU8qvl/XopLAGvPynikvjM0GE8JGx LkC26xz0tALIhXBIp3cBbhybszkEJnCq0oHIX17wrQxvQVkeoSk7SGQWKU6l3hj2I35H XWInb13LbABum0Z2XlyT7A5Zk+ymdemL1DdPpBmpynvgnRjkm8Y9xCaz3TMJHll8tV3L dlnGd0z02OMGnLfPTamqLMOxKhQIvhAOJsgnkDb1DNkU1FwTIJ9gbgDyBvbhqvM2IxjX M0RA== 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=dHx44bw9gOAKcRiej7C0sHzGPZuS6ci+wmSucl6EQN8=; b=Nr4XTHVhokrRMEERHC1o2/YyLJsklrlkTPRBpwrVPlG6DRrZ9LbbYrOKR8i6aCN46F sD827L+DUKP6EE9KIQSufV07f6AmWI4UE1QVnLk+L2q4SYZtFPMI0SZrGeO+Yw0nR8Vt /KTD0eMDIT5uEJCBlC20hDOBtnuE45SlsGerE4SNdQBgTIRAO68NOWJA20vs9y7mhop+ oidZfgXIUFVa1VKqxCG9XVWolE94OAWsGYosvvwu13ARNg7z+R1rF/Mt23jOTRYBWFlc 6+UL32+/LBiqG/lK3peEco4LZMPp7XxqHSh/Ij0WzZ0EAADHcKFdvpO81DOGqRfpo+lE aM/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gRi9L4gS; dkim=neutral (no key) header.i=@linutronix.de header.b=E3ScY126; 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 ef8-20020a05640228c800b0045c9dbe290csi953189edb.406.2022.11.17.07.11.31; Thu, 17 Nov 2022 07:11:58 -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=gRi9L4gS; dkim=neutral (no key) header.i=@linutronix.de header.b=E3ScY126; 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 S240599AbiKQPKs (ORCPT + 99 others); Thu, 17 Nov 2022 10:10:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239492AbiKQPJ0 (ORCPT ); Thu, 17 Nov 2022 10:09:26 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9009781B0; Thu, 17 Nov 2022 07:08:22 -0800 (PST) Date: Thu, 17 Nov 2022 15:08:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668697701; 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=dHx44bw9gOAKcRiej7C0sHzGPZuS6ci+wmSucl6EQN8=; b=gRi9L4gSYIymFdAFxTkx7/fEpeIO57MRGzMQPpJnNgeET/WR2wyneNzk0dw+wc4BVicxjl ny4jF+t6qN5zhUvHPQa5ONq5ycc7WttLSMfP4eWulHN9fOEEcCPZPacZOi8+2cRhHa7+V5 E12JhvGJC4caizs3V77h8AifEmgCBFDuwZf0RCV5Rey7TtaHyo88ejIrSskGCizA6asNMg m4R15CISq7yMuvtN02tRIQ7TuzzXYgsriTid3TzyikkiRwUi+TAiJL2U2GMq39W2SlXodA ++h0q/bsl5UNYUvvhWabrVFLRxY9RguhUvvDmSZreVrHQsfle6cTc5wtUhrJAg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668697701; 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=dHx44bw9gOAKcRiej7C0sHzGPZuS6ci+wmSucl6EQN8=; b=E3ScY126KN3X3to8lIb0thA87sip0/+ZlD9M9PLx2KlmBJY3QIiJpqn8kkvMhOY01aI26e 3PcHUf8nifaandAg== From: "tip-bot2 for Ahmed S. Darwish" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] PCI/MSI: Use msi_domain_info:: Bus_token Cc: "Ahmed S. Darwish" , Thomas Gleixner , Jason Gunthorpe , Bjorn Helgaas , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20221111122014.352437595@linutronix.de> References: <20221111122014.352437595@linutronix.de> MIME-Version: 1.0 Message-ID: <166869769975.4906.9057339878445768964.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?1749756588910800849?= X-GMAIL-MSGID: =?utf-8?q?1749756588910800849?= The following commit has been merged into the irq/core branch of tip: Commit-ID: 38c0c10ae6a3d386c50e182227f606d8243124b8 Gitweb: https://git.kernel.org/tip/38c0c10ae6a3d386c50e182227f606d8243124b8 Author: Ahmed S. Darwish AuthorDate: Fri, 11 Nov 2022 14:54:35 +01:00 Committer: Thomas Gleixner CommitterDate: Thu, 17 Nov 2022 15:15:19 +01:00 PCI/MSI: Use msi_domain_info:: Bus_token Set the bus token in the msi_domain_info structure and let the core code handle the update. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122014.352437595@linutronix.de --- drivers/pci/msi/irqdomain.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/pci/msi/irqdomain.c b/drivers/pci/msi/irqdomain.c index e9cf318..7766fa6 100644 --- a/drivers/pci/msi/irqdomain.c +++ b/drivers/pci/msi/irqdomain.c @@ -162,8 +162,6 @@ struct irq_domain *pci_msi_create_irq_domain(struct fwnode_handle *fwnode, struct msi_domain_info *info, struct irq_domain *parent) { - struct irq_domain *domain; - if (WARN_ON(info->flags & MSI_FLAG_LEVEL_CAPABLE)) info->flags &= ~MSI_FLAG_LEVEL_CAPABLE; @@ -178,13 +176,10 @@ struct irq_domain *pci_msi_create_irq_domain(struct fwnode_handle *fwnode, /* PCI-MSI is oneshot-safe */ info->chip->flags |= IRQCHIP_ONESHOT_SAFE; + /* Let the core update the bus token */ + info->bus_token = DOMAIN_BUS_PCI_MSI; - domain = msi_create_irq_domain(fwnode, info, parent); - if (!domain) - return NULL; - - irq_domain_update_bus_token(domain, DOMAIN_BUS_PCI_MSI); - return domain; + return msi_create_irq_domain(fwnode, info, parent); } EXPORT_SYMBOL_GPL(pci_msi_create_irq_domain);