Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp35748rwn; Wed, 7 Sep 2022 12:04:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR4R8HDE4wbf2N4jBRG3BH/416wSQ1hkbx+x2ZE0E47o6ofHaxL9v+FVRrZtah7bTpW7nhfo X-Received: by 2002:a17:902:e94e:b0:16d:12b6:b9fe with SMTP id b14-20020a170902e94e00b0016d12b6b9femr5360139pll.152.1662577445036; Wed, 07 Sep 2022 12:04:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662577445; cv=none; d=google.com; s=arc-20160816; b=leagq7rID0sbVto2gsObdbiHDjqsgeUwShpdn8lOm2pmL46e7syZbabBOjniCwaH20 4Knb32TxE8/Lr77Qj5K7G1FNbTGmUqUKhUE6ylae4AoivJ+OTYExrAYpiuNzxBwxQQFE dFL35FpX75ztkhUpz0lPrem+FrS7n6U4KIZFAY+apmnOyzHwUEda2DtEdiGxZnEa5+YW R23JpghNyQDwUO6SrPttrYDNnIbWGGGoa473zifkD/mlME876YQethaAorYWzARfuhTq Tmyj43oX9KPREtz++KlBbVe5AFI/YABkANXxb2+eXWhspeizsXVKXvxZKITl4XsXn1jq nF1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=b/4GfYrroSeLrbqqOL4wn0z2uy/tBcy19cVOuPsIBiM=; b=VcWXkFOUVYT6ssYXHfUePI7YdQ5cT6mWYWsTiA74Yo+J9Y+lCY5xfy0N9gSnbnRQG9 n/Z4qQZo//EfKlmbmw7QA6vLKThkbYYFcXBtHFu1JjO72Eu8xf8b7i1QakVb3jbPSEbS NppzS564Lb+7hYYe0uUF/uNSYtz+ZyRt6LFsByPOxEHy31iYzaqZxhRlxTSTRqa3QsCF t8z9Io+DD4EVvFFOr+p0dRciH87SZc/odZiKu2MXi/79WpeHC4sMBSgXm+oSqUDHdYJT qpeVNZ/+w6saTkAFqI7pGkZp77qagBBxbNEVkGKBEPI4LX3FEOhH2B9x+zTCzbIrZZh5 h6YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sZqzpIu7; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u6-20020a170903124600b00172de894f52si15750174plh.396.2022.09.07.12.03.51; Wed, 07 Sep 2022 12:04:05 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=sZqzpIu7; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230013AbiIGShR (ORCPT + 99 others); Wed, 7 Sep 2022 14:37:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbiIGShP (ORCPT ); Wed, 7 Sep 2022 14:37:15 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 970B1240A7; Wed, 7 Sep 2022 11:37:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 41034B81E0B; Wed, 7 Sep 2022 18:37:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96067C433D6; Wed, 7 Sep 2022 18:37:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662575831; bh=yw5tnjCIg9cU1IHKjQaN3CQznJuLfIIzqEokj4ejUFA=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=sZqzpIu7bsZtRoOc6VkKjhyu696HXrcN+7AvIZrtIrE9EfJJKToDZb66Qi9Ukhiac Tto7arLXfcH8Wy2XfkvHsegZ9ojFU6vN8MUC4ZDJTR7N/EJohyxjIxJi8w0Lu1bAgY HE/OhimksViawt/NtkzCN6IQwwsuS8JvY7EcvjQ7cxwOFGMxza8TYgMkPOX0LwrAPT flaycBSIdonb5vjUYdOTVbcuuV536GT0I1Yt711FGE0DKYzlXMGd0qo7565oi6u/zM o7iJMn1npPThOLXvlW1Z3PIcSzPJBHTCSd+dqQ+Cmqjp6zpPYFM+On2LGAEP8+u0g0 OEytENdyztAJQ== Date: Wed, 7 Sep 2022 13:37:09 -0500 From: Bjorn Helgaas To: Robert Richter Cc: Alison Schofield , Vishal Verma , Ira Weiny , Ben Widawsky , Dan Williams , Bjorn Helgaas , "Rafael J. Wysocki" , linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, Len Brown , linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org Subject: Re: [PATCH 06/15] PCI/ACPI: Link host bridge to its ACPI fw node Message-ID: <20220907183709.GA136851@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220831081603.3415-7-rrichter@amd.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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, Aug 31, 2022 at 10:15:54AM +0200, Robert Richter wrote: > A lookup of a host bridge's corresponding acpi device (struct > acpi_device) is not possible, for example: > > adev = ACPI_COMPANION(&host_bridge->dev); > > This could be useful to find a host bridge's fwnode handle and to > determine and call additional host bridge ACPI parameters and methods > such as HID/CID or _UID. > > Make this work by linking the host bridge to its ACPI fw node. s/acpi device/ACPI device/ to match other "ACPI" usage s/fw node/fwnode/ (if it should match "fwnode handle" above) I guess this patch makes ACPI_COMPANION() work where it didn't before, right? E.g., the two ACPI_COMPANION() uses added by this series (cxl_find_next_rch() and cxl_restricted_host_probe()). I'm not really clear on the strategy of when we should use acpi_device vs acpi_handle, but does this mean there's code in places like pci_root.c that should be reworked to take advantage of this? That code evaluates _DSM and _OSC, but I think it currently uses acpi_handle for that. Bjorn