From patchwork Thu Nov 24 23:25:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 25744 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3660859wrr; Thu, 24 Nov 2022 15:29:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf7FG6uLzFbdRylbt1IbvV5DfJ3V/C7NIHMRqe3KDB/986Y63baguqjLfyHzMpnLZffyLIWr X-Received: by 2002:a17:906:9f02:b0:7b5:f5c9:b450 with SMTP id fy2-20020a1709069f0200b007b5f5c9b450mr18648724ejc.65.1669332572263; Thu, 24 Nov 2022 15:29:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669332572; cv=none; d=google.com; s=arc-20160816; b=mXOKcKh6VtnbbWLYzNLbrI0ryyuEcbCKiQ4UCMZwY/mPCS3N8AYW3kTBzJWr2MaY2f Jgstj5Y1FEeNNARenkV3Jkotdsl2dHqM0G359wAX6vAf+invunRk1wdPed7QcFhsmqDx CRGhmlV195ptELwd5aRb/NzNAZhBA73IBQUOqlMvaclwK9QyPSNBvSUK7g9HIBHd2/sm mp12ld26vcBRCs1wLQlsfSNZRl35GmVLAxDMTEpPOp1tneXdUiymf70CcZcciityx6sb SUUjLNuUfFx40bXBybZzEYONREuRsjgNlDO7jSnFyo+tQoci8h4JXvYCSYdwjvmk4sUO LZKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=xdXQN8DRlFx/ul31qn4JSIb+1+AWkLgJWGGnxBYyOqY=; b=iyXFo5ZAa7sEaOHRWiigT0WPA1illMdnJec7B/Wit5w16WdnNhTOB6dcCNRLbZSypp j8oIsJUMiV6CHqAS1tbz+eaRI8u4/xkfip5pPDQj9wck2IvjUTrGZ7UtuAhN5KGnc2mZ Mo21SOA4OvCE0pbkuR3w7zA+UHxPGllGPq2983yfyxG0K8oWLFaZwFPpSQvJ6EMYxKwk cqC8i6P5sz4LHaVOCt68DGB6+XhyJsrrpdc0+2oujKughkTYGeVpSnSvu3EX71Ac5cJk RQlaqgSfUqqrvhXfvSvXP3dkNisy/Ym3HpppO6tUxheoD8v2SBgDh6TZa6/O03/nR+Hy SzBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Vlm0wQdG; dkim=neutral (no key) header.i=@linutronix.de header.b=AVFno4In; 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 hd8-20020a170907968800b007ae86742c3bsi1775062ejc.1009.2022.11.24.15.29.09; Thu, 24 Nov 2022 15:29:32 -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=Vlm0wQdG; dkim=neutral (no key) header.i=@linutronix.de header.b=AVFno4In; 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 S229804AbiKXX1z (ORCPT + 99 others); Thu, 24 Nov 2022 18:27:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbiKXX1W (ORCPT ); Thu, 24 Nov 2022 18:27:22 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 319A5CFA6C; Thu, 24 Nov 2022 15:26:15 -0800 (PST) Message-ID: <20221124232325.618807601@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669332355; 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=xdXQN8DRlFx/ul31qn4JSIb+1+AWkLgJWGGnxBYyOqY=; b=Vlm0wQdGH0cvpPDw9AF5vvmxmHq927pTmvBgDIh99qQEiq4jdu45fdvTx1D3Tt1fiEpHs4 yBKGesX7U/LcOMMDk560CEY4/+3YlGzH18XsNFqHPKJBTL8tenQ6rpdd9nJQFly+geH9/b FZPnfCKKqrLNjCqS0yNKP0vsht/dzlVVxMBs8mPoG3H9krJ8RyGg6S3WJuMSIZP8KIQoQ2 Ot1aa4guG2NkztvZUKwJMaWDK1/mzwa1qIcaIPkSniBe5F0yCYotBEYxtkiEoq8w3Tlgyr zpRy7fhJ/hs9cZjEl7nPk5HxayStXhsuB8cLUBHaMDFt5AewPu7o/7f2C99pbg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669332355; 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=xdXQN8DRlFx/ul31qn4JSIb+1+AWkLgJWGGnxBYyOqY=; b=AVFno4In/9G6BVel7cWwEfGpIFeOHiNWGDWUDht/TIbuCqDY3yB+KyZvAACsUcKa/1xU0S Rcjkwulq8PRkUHDQ== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Joerg Roedel , Will Deacon , linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Marc Zyngier , Greg Kroah-Hartman , Jason Gunthorpe , Dave Jiang , Alex Williamson , Kevin Tian , Dan Williams , Logan Gunthorpe , Ashok Raj , Jon Mason , Allen Hubbe Subject: [patch V3 06/33] genirq/irqdomain: Add irq_domain::dev for per device MSI domains References: <20221124230505.073418677@linutronix.de> MIME-Version: 1.0 Date: Fri, 25 Nov 2022 00:25:54 +0100 (CET) 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?1750422071463681902?= X-GMAIL-MSGID: =?utf-8?q?1750422071463681902?= Per device domains require the device pointer of the device which instantiated the domain for some purposes. Add the pointer to struct irq_domain. It will be used in the next step which provides the infrastructure to create per device MSI domains. Signed-off-by: Thomas Gleixner --- include/linux/irqdomain.h | 4 ++++ 1 file changed, 4 insertions(+) --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -132,6 +132,9 @@ struct irq_domain_chip_generic; * @gc: Pointer to a list of generic chips. There is a helper function for * setting up one or more generic chips for interrupt controllers * drivers using the generic chip library which uses this pointer. + * @dev: Pointer to the device which instantiated the irqdomain + * With per device irq domains this is not necessarily the same + * as @pm_dev. * @pm_dev: Pointer to a device that can be utilized for power management * purposes related to the irq domain. * @parent: Pointer to parent irq_domain to support hierarchy irq_domains @@ -155,6 +158,7 @@ struct irq_domain { struct fwnode_handle *fwnode; enum irq_domain_bus_token bus_token; struct irq_domain_chip_generic *gc; + struct device *dev; struct device *pm_dev; #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY struct irq_domain *parent;