Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1700814

Re: [PATCH v2 5/5] ACPI/IORT: Add IORT named component memory address limits

From Hanjun Guo <hanjun.guo@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 5/5] ACPI/IORT: Add IORT named component memory address limits
Date 2017-08-01 12:30 +0200
Message-ID <u9CB3-2At-15@gated-at.bofh.it> (permalink)
References <u9kNP-7Wi-1@gated-at.bofh.it> <u9kNQ-7Wi-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Lorenzo,

On 2017/7/31 23:23, Lorenzo Pieralisi wrote:
> IORT named components provide firmware configuration describing
> how many address bits a given device is capable of generating
> to address memory.
> 
> Add code to the kernel to retrieve memory address limits
> configuration for IORT named components and configure DMA masks
> accordingly.
> 
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Robin Murphy <robin.murphy@arm.com>
> Cc: Nate Watterson <nwatters@codeaurora.org>
> ---
>   drivers/acpi/arm64/iort.c | 40 ++++++++++++++++++++++++++++++----------
>   1 file changed, 30 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
> index 67b85ae..b85d19f 100644
> --- a/drivers/acpi/arm64/iort.c
> +++ b/drivers/acpi/arm64/iort.c
> @@ -680,6 +680,24 @@ static const struct iommu_ops *iort_iommu_xlate(struct device *dev,
>   	return ret ? NULL : ops;
>   }
>   
> +static int nc_dma_get_range(struct device *dev, u64 *size)
> +{
> +	struct acpi_iort_node *node;
> +	struct acpi_iort_named_component *ncomp;
> +
> +	node = iort_scan_node(ACPI_IORT_NODE_NAMED_COMPONENT,
> +			      iort_match_node_callback, dev);
> +	if (!node)
> +		return -ENODEV;
> +
> +	ncomp = (struct acpi_iort_named_component *)node->node_data;
> +
> +	*size = ncomp->memory_address_limit >= 64 ? ~0ULL :
> +			1ULL<<ncomp->memory_address_limit;

Just a question here, if the IORT table didn't configure this
value properly, will the device working properly? I'm asking this
because in the table of IORT of D05, this value is set to 0 so far
(SAS and network), but I can boot D05 OK with your patch set, not
sure if any further issues.

Thanks
Hanjun

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/5] ACPI: DMA ranges management Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-07-31 17:30 +0200
  [PATCH v2 4/5] ACPI: Make acpi_dma_configure() DMA regions aware Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-07-31 17:30 +0200
  [PATCH v2 1/5] ACPICA: resource_mgr: Allow _DMA method in walk resources Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-07-31 17:30 +0200
  [PATCH v2 3/5] ACPI: Introduce DMA ranges parsing Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-07-31 17:30 +0200
  [PATCH v2 5/5] ACPI/IORT: Add IORT named component memory address limits Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-07-31 17:30 +0200
    Re: [PATCH v2 5/5] ACPI/IORT: Add IORT named component memory address  limits Hanjun Guo <hanjun.guo@linaro.org> - 2017-08-01 12:30 +0200
      Re: [PATCH v2 5/5] ACPI/IORT: Add IORT named component memory  address limits Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-08-01 13:20 +0200
        Re: [PATCH v2 5/5] ACPI/IORT: Add IORT named component memory address  limits Hanjun Guo <hanjun.guo@linaro.org> - 2017-08-01 15:00 +0200
    Re: [PATCH v2 5/5] ACPI/IORT: Add IORT named component memory address  limits Nate Watterson <nwatters@codeaurora.org> - 2017-08-02 19:40 +0200
      Re: [PATCH v2 5/5] ACPI/IORT: Add IORT named component memory  address limits Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-08-02 20:10 +0200
  [PATCH v2 2/5] ACPI: Make acpi_dev_get_resources() method agnostic Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-07-31 17:30 +0200
  Re: [PATCH v2 0/5] ACPI: DMA ranges management "Rafael J. Wysocki" <rafael@kernel.org> - 2017-07-31 21:00 +0200
    Re: [PATCH v2 0/5] ACPI: DMA ranges management Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-08-02 19:00 +0200
  Re: [PATCH v2 0/5] ACPI: DMA ranges management Feng Kan <fkan@apm.com> - 2017-08-01 00:20 +0200

csiph-web