Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2261883rwb; Thu, 17 Nov 2022 08:28:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf706Po0YM8aw52PIAEB7vvirmQscS2X+TtNWCZvlmCtVoFyQga9/PvG/BJh3QA8FasR/LG1 X-Received: by 2002:a63:2c8:0:b0:457:4863:2e85 with SMTP id 191-20020a6302c8000000b0045748632e85mr2752418pgc.6.1668702535590; Thu, 17 Nov 2022 08:28:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668702535; cv=none; d=google.com; s=arc-20160816; b=iWFcAkMPUrvJSrvqJVtddKzKBnP111zP46KwPyBi+hOjpiGukS08f+NC67MH+ytJNB 6DkJ+tw1oS6q/AY3LgK1lSXegEjcxxDrj+YQBtOPWkJMHYCa7bsLi5YhXgjJgJcls6VS vj4KcnSJm9TwrSVw6QZkbWMyJOESodW7jKjkO+lMcOoYN0AdzrM6+x0PQzdDJMy5P5c+ JFxFOUedWl5DQubiZYhoDt2vhBFprVXX2oJGhec9o55ahsjeLzOWY/BMnUzeSJNxsKME cX7AOsz/1KHPWTagl9qUQpQELIVXBJO5OnRmXJbsg4UyPZxHds+4aaRDxtchc/K9GYm0 6o5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=3I3CzNiMhPDXaj6+qO5LxTRdoySb6A06cC9DobhxnIw=; b=GzOBM1UhQuoGdeoCTVIIDSQm8KrtA31DBFZbnaVcyFj12+ZiCTELkbBTps9kqPdQ1F yxbCufjlzR3m2G/HAGOKiIS2ewmcAddXDBUbDTvVm/1yKC8PlocqkHQgSDo+35J2ReH4 zG1RkjSP81S6iCzXGSphD6MG1ybgP4IqTgmgbuJ0PRReuvFWP/GP1yJpuF66kgLCcedV kdcjHFZ+8cgnbqbvJRfRC8OnDsyFFVx2wwQXEJ/EJHbKGMyFzBZnLWa9hH3DRcjW02AV w1djoUff3Hl4gW1qoFWfUkX0IwCgmiPy5nsATUTsYR/2h0C1ikI435x5eec1ritpz8oG AU7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=bQxjphwB; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=XihOv7j8; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 34-20020a630a22000000b004704320edbcsi1404811pgk.437.2022.11.17.08.28.44; Thu, 17 Nov 2022 08:28:55 -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=bQxjphwB; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=XihOv7j8; 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 S240036AbiKQP65 (ORCPT + 92 others); Thu, 17 Nov 2022 10:58:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240048AbiKQP6q (ORCPT ); Thu, 17 Nov 2022 10:58:46 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D489170A10; Thu, 17 Nov 2022 07:58:43 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668700722; 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: in-reply-to:in-reply-to:references:references; bh=3I3CzNiMhPDXaj6+qO5LxTRdoySb6A06cC9DobhxnIw=; b=bQxjphwBl7iwogrkqCjK+7FLmZa6Qtcx4r3iiQ1FC0jUbK1oTVodyNl0ST5ysr6E+f9hpK QCwMuR70kDyxRHafB6e7LjRChjCp6LSM4jCT0rPKSjsTOV70lGS2+tSQliU6n9XMpOhnuU yqUpfOIRzPRxwwiJ/swO9dWFM9ur4qLeBtdFmTtqkJ++1rCFPSzxgGgl4dNLyZGH53rC/8 8KRlCoyPSbQLam9Vp5BkvlmNm1U6rsri5IGXpI2vUShQDfvaGqtVkLI1JILog20EsMLAkN 6b9I0PiqZAxrz+u1jUItU3YaAmHIS2HFRyc7HpYsk9NhSAHLq/9yhAFEqvreEQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668700722; 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: in-reply-to:in-reply-to:references:references; bh=3I3CzNiMhPDXaj6+qO5LxTRdoySb6A06cC9DobhxnIw=; b=XihOv7j87axcUTJcuy32uNcXPd3fJu/9c5Nk4HuevLscZM4hyjLlFPIJMK40aMLZ2CztLp 7RbK5GcBuZ2latBw== To: Jason Gunthorpe Cc: LKML , x86@kernel.org, Joerg Roedel , Will Deacon , linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Marc Zyngier , Greg Kroah-Hartman , Dave Jiang , Alex Williamson , Kevin Tian , Dan Williams , Logan Gunthorpe , Ashok Raj , Jon Mason , Allen Hubbe , "Ahmed S. Darwish" , Reinette Chatre Subject: Re: [patch 02/33] genirq/msi: Provide struct msi_parent_ops In-Reply-To: References: <20221111133158.196269823@linutronix.de> <20221111135205.368911521@linutronix.de> Date: Thu, 17 Nov 2022 16:58:42 +0100 Message-ID: <8735ahmv2l.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain 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 On Wed, Nov 16 2022 at 14:57, Jason Gunthorpe wrote: > On Fri, Nov 11, 2022 at 02:58:14PM +0100, Thomas Gleixner wrote: >> + * This is the most complex problem of per device MSI domains and the >> + * underlying interrupt domain hierarchy: >> + * >> + * The device domain to be initialized requests the broadest feature set >> + * possible and the underlying domain hierarchy puts restrictions on it. >> + * >> + * That's working perfectly fine for a strict parent->device model, but it >> + * falls apart with a root_parent->real_parent->device chain because the > > This language hurt my brain :) IKR >> +bool msi_parent_init_dev_msi_info(struct device *dev, struct irq_domain *domain, >> + struct irq_domain *real_parent, struct msi_domain_info *info) > > 'real_parent' is global IRQ_DOMAIN_FLAG_MSI_PARENT of the dev for > which we are constructing a msi_domain_info to create a child aka > IRQ_DOMAIN_FLAG_MSI_DEVICE? > > 'domain' is the current step in the hierarchy as we walk up the ops > pointers? Yes. > Maybe: > > @child_info: The MSI domain info of the IRQ_DOMAIN_FLAG_MSI_DEVICE > domain to be created > @parent_domain: The IRQ_DOMAIN_FLAG_MSI_PARENT domain for the child to > be created > @domain: The domain in the hierarchy this op is being called on Definitely better. > And perhaps it would be a bit clearer to put the parent_domain inside > the msi_domain_info, which is basically acting as an argument bundle > for a future allocation call? Maybe. Let me try.