Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754654AbcKIXhJ (ORCPT ); Wed, 9 Nov 2016 18:37:09 -0500 Received: from mail-qt0-f194.google.com ([209.85.216.194]:35930 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754570AbcKIXhF (ORCPT ); Wed, 9 Nov 2016 18:37:05 -0500 MIME-Version: 1.0 In-Reply-To: <20161109141948.19244-2-lorenzo.pieralisi@arm.com> References: <20161109141948.19244-1-lorenzo.pieralisi@arm.com> <20161109141948.19244-2-lorenzo.pieralisi@arm.com> From: "Rafael J. Wysocki" Date: Thu, 10 Nov 2016 00:37:04 +0100 X-Google-Sender-Auth: pH5D-_5BlCmeH-BDCXhKy9Z_VBM Message-ID: Subject: Re: [PATCH v7 01/16] drivers: acpi: add FWNODE_ACPI_STATIC fwnode type To: Lorenzo Pieralisi Cc: "open list:AMD IOMMU (AMD-VI)" , "Rafael J. Wysocki" , Will Deacon , Marc Zyngier , Robin Murphy , Joerg Roedel , Tomasz Nowicki , Hanjun Guo , Jon Masters , Eric Auger , Sinan Kaya , Nate Watterson , Prem Mallappa , Dennis Chen , ACPI Devel Maling List , Linux PCI , Linux Kernel Mailing List , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1827 Lines: 37 On Wed, Nov 9, 2016 at 3:19 PM, Lorenzo Pieralisi wrote: > On systems booting with a device tree, every struct device is associated > with a struct device_node, that provides its DT firmware representation. > The device node can be used in generic kernel contexts (eg IRQ > translation, IOMMU streamid mapping), to retrieve the properties > associated with the device and carry out kernel operations accordingly. > Owing to the 1:1 relationship between the device and its device_node, > the device_node can also be used as a look-up token for the device (eg > looking up a device through its device_node), to retrieve the device in > kernel paths where the device_node is available. > > On systems booting with ACPI, the same abstraction provided by > the device_node is required to provide look-up functionality. > > The struct acpi_device, that represents firmware objects in the > ACPI namespace already includes a struct fwnode_handle of > type FWNODE_ACPI as their member; the same abstraction is missing > though for devices that are instantiated out of static ACPI tables > entries (eg ARM SMMU devices). > > Add a new fwnode_handle type to associate devices created out > of static ACPI table entries to the respective firmware components > and create a simple ACPI core layer interface to dynamically allocate > and free the corresponding firmware nodes so that kernel subsystems > can use it to instantiate the nodes and associate them with the > respective devices. > > Signed-off-by: Lorenzo Pieralisi > Reviewed-by: Hanjun Guo > Tested-by: Hanjun Guo > Tested-by: Tomasz Nowicki > Cc: "Rafael J. Wysocki" Acked-by: Rafael J. Wysocki Thanks!