From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hanjun Guo Subject: Re: [PATCH v9 15/16] drivers: acpi: iort: add single mapping function Date: Wed, 30 Nov 2016 11:22:42 +0800 Message-ID: References: <20161121100148.24769-1-lorenzo.pieralisi@arm.com> <20161121100148.24769-16-lorenzo.pieralisi@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pg0-f48.google.com ([74.125.83.48]:34809 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752395AbcK3DXS (ORCPT ); Tue, 29 Nov 2016 22:23:18 -0500 Received: by mail-pg0-f48.google.com with SMTP id x23so76704792pgx.1 for ; Tue, 29 Nov 2016 19:23:18 -0800 (PST) In-Reply-To: <20161121100148.24769-16-lorenzo.pieralisi@arm.com> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Lorenzo Pieralisi , iommu@lists.linux-foundation.org Cc: Tomasz Nowicki , "Rafael J. Wysocki" , Will Deacon , Marc Zyngier , Robin Murphy , Joerg Roedel , Jon Masters , Eric Auger , Sinan Kaya , Nate Watterson , Prem Mallappa , Dennis Chen , linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org On 2016/11/21 18:01, Lorenzo Pieralisi wrote: > The current IORT id mapping API requires components to provide > an input requester ID (a Bus-Device-Function (BDF) identifier for > PCI devices) to translate an input identifier to an output > identifier through an IORT range mapping. > > Named components do not have an identifiable source ID therefore > their respective input/output mapping can only be defined in > IORT tables through single mappings, that provide a translation > that does not require any input identifier. > > Current IORT interface for requester id mappings (iort_node_map_rid()) > is not suitable for components that do not provide a requester id, > so it cannot be used for IORT named components. > > Add an interface to the IORT API to enable retrieval of id > by allowing an indexed walk of the single mappings array for > a given component, therefore completing the IORT mapping API. > > Signed-off-by: Lorenzo Pieralisi > Reviewed-by: Tomasz Nowicki > Tested-by: Hanjun Guo > Tested-by: Tomasz Nowicki > Cc: Hanjun Guo > Cc: Tomasz Nowicki > Cc: "Rafael J. Wysocki" > --- > drivers/acpi/arm64/iort.c | 39 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 39 insertions(+) Acked-by: Hanjun Guo Thanks Hanjun From mboxrd@z Thu Jan 1 00:00:00 1970 From: hanjun.guo@linaro.org (Hanjun Guo) Date: Wed, 30 Nov 2016 11:22:42 +0800 Subject: [PATCH v9 15/16] drivers: acpi: iort: add single mapping function In-Reply-To: <20161121100148.24769-16-lorenzo.pieralisi@arm.com> References: <20161121100148.24769-1-lorenzo.pieralisi@arm.com> <20161121100148.24769-16-lorenzo.pieralisi@arm.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 2016/11/21 18:01, Lorenzo Pieralisi wrote: > The current IORT id mapping API requires components to provide > an input requester ID (a Bus-Device-Function (BDF) identifier for > PCI devices) to translate an input identifier to an output > identifier through an IORT range mapping. > > Named components do not have an identifiable source ID therefore > their respective input/output mapping can only be defined in > IORT tables through single mappings, that provide a translation > that does not require any input identifier. > > Current IORT interface for requester id mappings (iort_node_map_rid()) > is not suitable for components that do not provide a requester id, > so it cannot be used for IORT named components. > > Add an interface to the IORT API to enable retrieval of id > by allowing an indexed walk of the single mappings array for > a given component, therefore completing the IORT mapping API. > > Signed-off-by: Lorenzo Pieralisi > Reviewed-by: Tomasz Nowicki > Tested-by: Hanjun Guo > Tested-by: Tomasz Nowicki > Cc: Hanjun Guo > Cc: Tomasz Nowicki > Cc: "Rafael J. Wysocki" > --- > drivers/acpi/arm64/iort.c | 39 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 39 insertions(+) Acked-by: Hanjun Guo Thanks Hanjun