Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp9037267rwb; Thu, 24 Nov 2022 07:19:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf7iMwjRJAQUym8AHogGt2gYl/EvSYxvM0Z8ICP4xwxvPJ65GRYkGH2F+ixn++oaNlzramg9 X-Received: by 2002:a05:6402:449b:b0:459:2b41:3922 with SMTP id er27-20020a056402449b00b004592b413922mr23261728edb.160.1669303159381; Thu, 24 Nov 2022 07:19:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669303159; cv=none; d=google.com; s=arc-20160816; b=yM3N1S1lS3jqeX5OdtUzE9bmp7f+fMsIwQj2SYdpw6YVHevzSc56TM11fQ9lO9aOJs fVvO2emMapCJAnVo+4MUKzO9umq/ONW+srgaZTo25W+frLz0rXAMY/nMY+AtTKs7oAEf 3zPwxIkW4uCymcfKnC3sVqxc/QyV6aNTXxSPeJKLGBFsRT8A/+zig50sWgzYfT1Khtn2 UW6H6cmesysDJC3xkDY6V/hETEsPoKK4fQGhyKB0iz+8H6Flf8USptvIA0Hs00Nrpdvu 2Ve6jkvbuNGMgKViSmrYDcmIVr18VkyUpm2GOIxaynjf8drSrMBnL4250LP1SghMDPa6 7IbA== 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=As2quWrcxzQIkDEARcYEWHVDkutncLkwzqhhKmGdvMw=; b=u+rIuTkO9XUvRJh0wDkAi4qBhYOk+0iyrGfJF+L1g4gRFsYgicHTWiIFBE7X+nWXtt xNNB3hRP7MMWyBpYMThgua4RJ2Bggo/GVsmy5I+bvpHfCF0NUDfoXn7rEiYzYuEN4aFy ZE/isvn9fpox+IhNKY0LOaCKYPf+oYTEiwchhw/aXSNSl4QFBjaGfNMwdqOJx1ZF2hTn LFzaqs3PvTpFnD9pp7R1sSVCc/P6Zq/IYiG3pSncgYmfE1vOmoNXQUMWjqZg7u+ckSa0 +2CwaZpvc7PRUbk8V9XlowmvQI40Cl3BtLK64NTXitpXxvlP91XKcTwfYQFZ3ZhGorL2 Hk8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=34Yd40+U; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x4-20020a05640226c400b0046a711ae873si1462311edd.202.2022.11.24.07.18.58; Thu, 24 Nov 2022 07:19: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=34Yd40+U; 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 S229745AbiKXPCw (ORCPT + 86 others); Thu, 24 Nov 2022 10:02:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229749AbiKXPCt (ORCPT ); Thu, 24 Nov 2022 10:02:49 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA7633FBB0; Thu, 24 Nov 2022 07:02:45 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669302163; 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=As2quWrcxzQIkDEARcYEWHVDkutncLkwzqhhKmGdvMw=; b=34Yd40+UTZBp/sha+xv+rNinYpSfcwi2Jcocjjr9PpyAEm4vrBbGmg8snq/BD4uPPzcuIA 7SxEuVhcrY2olTmiYO+sS79nXQDdQ+qDiTL1XVwfClY3bAaNoxuQ9eVrP675PT1lBBZXGo CP4CKu5omPHllJ0AUFYG/+0cG644GKBu+uKAmFg1YNR4fule5XxYIxjYVpX9I0HMOIQpim DnmwfL0pRtvPmuG6+4Psiu3o7Fma8qVMSb8QM1k7RcTqH3ypeG4oxmebPQI78c0ab9NhyR ZAkOc+ts2nGXfZo51d1OVLCnqR3gCrjduYbQ5r1/mrzRFc7pAADw1TOgZjXDQQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669302163; 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=As2quWrcxzQIkDEARcYEWHVDkutncLkwzqhhKmGdvMw=; b=w2QOB3Yjre/huurRuvL5yVUpNVJHxEd8h7mXvOwjewYm1clQcwxVDxFwyqZo4iPU84fRoX c+oVdXuCP3c1bnBw== To: Marc Zyngier Cc: LKML , x86@kernel.org, Joerg Roedel , Will Deacon , linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Greg Kroah-Hartman , Jason Gunthorpe , Dave Jiang , Alex Williamson , Kevin Tian , Dan Williams , Logan Gunthorpe , Ashok Raj , Jon Mason , Allen Hubbe Subject: Re: [patch V2 08/21] genirq/msi: Add pointers for per device irq domains In-Reply-To: <86sfi8mmee.wl-maz@kernel.org> References: <20221121083210.309161925@linutronix.de> <20221121083325.950255253@linutronix.de> <86sfi8mmee.wl-maz@kernel.org> Date: Thu, 24 Nov 2022 16:02:43 +0100 Message-ID: <8735a8cs4s.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 Thu, Nov 24 2022 at 14:56, Marc Zyngier wrote: > On Mon, 21 Nov 2022 14:36:28 +0000, > Thomas Gleixner wrote: >> static inline int msi_sysfs_create_group(struct device *dev); >> >> +static inline void msi_setup_default_irqdomain(struct device *dev, struct msi_device_data *md) > > Do we really need this to be inline? I'm sure the compiler can figure > it out. No. I'll fix that up. >> +{ >> + if (!dev->msi.domain) >> + return; >> + /* >> + * If @dev::msi::domain is a global MSI domain, copy the pointer >> + * into the domain array to avoid conditionals all over the place. >> + */ >> + if (!irq_domain_is_msi_parent(dev->msi.domain)) >> + md->__irqdomains[MSI_DEFAULT_DOMAIN] = dev->msi.domain; >> +} >> + >> /** >> * msi_alloc_desc - Allocate an initialized msi_desc >> * @dev: Pointer to the device for which this is allocated >> @@ -213,6 +225,8 @@ int msi_setup_device_data(struct device >> return ret; >> } >> >> + msi_setup_default_irqdomain(dev, md); >> + > > nit: if you move the setup below the msi.data assignment, you could > only pass dev as a parameter. Or pass both and move the assignment in > the function? In which order we do that it all looks wrong :) >> xa_init(&md->__store); >> mutex_init(&md->mutex); >> dev->msi.data = md; >> >> > > Irrespective of the above, > > Reviewed-by: Marc Zyngier > > M.