All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Cc: robh+dt@kernel.org, hch@lst.de, ardb@kernel.org,
	linux-kernel@vger.kernel.org,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Hanjun Guo <guohanjun@huawei.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org,
	linux-rpi-kernel@lists.infradead.org, jeremy.linton@arm.com,
	iommu@lists.linux-foundation.org, devicetree@vger.kernel.org,
	will@kernel.org, Anshuman Khandual <anshuman.khandual@arm.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH v5 6/7] arm64: mm: Set ZONE_DMA size based on early IORT scan
Date: Fri, 30 Oct 2020 18:00:55 +0000	[thread overview]
Message-ID: <20201030180055.GD23196@gaia> (raw)
In-Reply-To: <20201029172550.3523-7-nsaenzjulienne@suse.de>

On Thu, Oct 29, 2020 at 06:25:49PM +0100, Nicolas Saenz Julienne wrote:
> diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
> index 9929ff50c0c0..05fe4a076bab 100644
> --- a/drivers/acpi/arm64/iort.c
> +++ b/drivers/acpi/arm64/iort.c
> @@ -1718,3 +1718,55 @@ void __init acpi_iort_init(void)
>  
>  	iort_init_platform_devices();
>  }
> +
> +#ifdef CONFIG_ZONE_DMA
> +/*
> + * Check the IORT whether any devices exist whose DMA mask is < 32 bits.
> + * If so, return the smallest value encountered, or 32 otherwise.
> + */
> +unsigned int __init acpi_iort_get_zone_dma_size(void)
> +{
> +	struct acpi_table_iort *iort;
> +	struct acpi_iort_node *node, *end;
> +	acpi_status status;
> +	u8 limit = 32;

Nitpick: can we not return PHYS_ADDR_MAX here, for consistency with
of_dma_get_max_cpu_address()? There wouldn't be any functional change.

-- 
Catalin

WARNING: multiple messages have this Message-ID (diff)
From: Catalin Marinas <catalin.marinas@arm.com>
To: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Cc: devicetree@vger.kernel.org,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	will@kernel.org, Sudeep Holla <sudeep.holla@arm.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-kernel@vger.kernel.org, jeremy.linton@arm.com,
	ardb@kernel.org, linux-acpi@vger.kernel.org,
	iommu@lists.linux-foundation.org, robh+dt@kernel.org,
	linux-rpi-kernel@lists.infradead.org,
	Hanjun Guo <guohanjun@huawei.com>,
	robin.murphy@arm.com, hch@lst.de,
	linux-arm-kernel@lists.infradead.org, Len Brown <lenb@kernel.org>
Subject: Re: [PATCH v5 6/7] arm64: mm: Set ZONE_DMA size based on early IORT scan
Date: Fri, 30 Oct 2020 18:00:55 +0000	[thread overview]
Message-ID: <20201030180055.GD23196@gaia> (raw)
In-Reply-To: <20201029172550.3523-7-nsaenzjulienne@suse.de>

On Thu, Oct 29, 2020 at 06:25:49PM +0100, Nicolas Saenz Julienne wrote:
> diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
> index 9929ff50c0c0..05fe4a076bab 100644
> --- a/drivers/acpi/arm64/iort.c
> +++ b/drivers/acpi/arm64/iort.c
> @@ -1718,3 +1718,55 @@ void __init acpi_iort_init(void)
>  
>  	iort_init_platform_devices();
>  }
> +
> +#ifdef CONFIG_ZONE_DMA
> +/*
> + * Check the IORT whether any devices exist whose DMA mask is < 32 bits.
> + * If so, return the smallest value encountered, or 32 otherwise.
> + */
> +unsigned int __init acpi_iort_get_zone_dma_size(void)
> +{
> +	struct acpi_table_iort *iort;
> +	struct acpi_iort_node *node, *end;
> +	acpi_status status;
> +	u8 limit = 32;

Nitpick: can we not return PHYS_ADDR_MAX here, for consistency with
of_dma_get_max_cpu_address()? There wouldn't be any functional change.

-- 
Catalin
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

WARNING: multiple messages have this Message-ID (diff)
From: Catalin Marinas <catalin.marinas@arm.com>
To: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Cc: devicetree@vger.kernel.org,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	will@kernel.org, Sudeep Holla <sudeep.holla@arm.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-kernel@vger.kernel.org, jeremy.linton@arm.com,
	ardb@kernel.org, linux-acpi@vger.kernel.org,
	iommu@lists.linux-foundation.org, robh+dt@kernel.org,
	linux-rpi-kernel@lists.infradead.org,
	Hanjun Guo <guohanjun@huawei.com>,
	robin.murphy@arm.com, hch@lst.de,
	linux-arm-kernel@lists.infradead.org, Len Brown <lenb@kernel.org>
Subject: Re: [PATCH v5 6/7] arm64: mm: Set ZONE_DMA size based on early IORT scan
Date: Fri, 30 Oct 2020 18:00:55 +0000	[thread overview]
Message-ID: <20201030180055.GD23196@gaia> (raw)
In-Reply-To: <20201029172550.3523-7-nsaenzjulienne@suse.de>

On Thu, Oct 29, 2020 at 06:25:49PM +0100, Nicolas Saenz Julienne wrote:
> diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
> index 9929ff50c0c0..05fe4a076bab 100644
> --- a/drivers/acpi/arm64/iort.c
> +++ b/drivers/acpi/arm64/iort.c
> @@ -1718,3 +1718,55 @@ void __init acpi_iort_init(void)
>  
>  	iort_init_platform_devices();
>  }
> +
> +#ifdef CONFIG_ZONE_DMA
> +/*
> + * Check the IORT whether any devices exist whose DMA mask is < 32 bits.
> + * If so, return the smallest value encountered, or 32 otherwise.
> + */
> +unsigned int __init acpi_iort_get_zone_dma_size(void)
> +{
> +	struct acpi_table_iort *iort;
> +	struct acpi_iort_node *node, *end;
> +	acpi_status status;
> +	u8 limit = 32;

Nitpick: can we not return PHYS_ADDR_MAX here, for consistency with
of_dma_get_max_cpu_address()? There wouldn't be any functional change.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-10-30 18:01 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29 17:25 [PATCH v5 0/7] arm64: Default to 32-bit wide ZONE_DMA Nicolas Saenz Julienne
2020-10-29 17:25 ` Nicolas Saenz Julienne
2020-10-29 17:25 ` Nicolas Saenz Julienne
2020-10-29 17:25 ` Nicolas Saenz Julienne
2020-10-29 17:25 ` [PATCH v5 1/7] arm64: mm: Move reserve_crashkernel() into mem_init() Nicolas Saenz Julienne
2020-10-29 17:25   ` Nicolas Saenz Julienne
2020-10-29 17:25   ` Nicolas Saenz Julienne
2020-10-29 17:25 ` [PATCH v5 2/7] arm64: mm: Move zone_dma_bits initialization into zone_sizes_init() Nicolas Saenz Julienne
2020-10-29 17:25   ` Nicolas Saenz Julienne
2020-10-29 17:25   ` Nicolas Saenz Julienne
2020-10-29 17:25 ` [PATCH v5 3/7] of/address: Introduce of_dma_get_max_cpu_address() Nicolas Saenz Julienne
2020-10-29 17:25   ` Nicolas Saenz Julienne
2020-10-29 17:25   ` Nicolas Saenz Julienne
2020-11-02 21:03   ` Rob Herring
2020-11-02 21:03     ` Rob Herring
2020-11-02 21:03     ` Rob Herring
2020-10-29 17:25 ` [PATCH v5 4/7] of: unittest: Add test for of_dma_get_max_cpu_address() Nicolas Saenz Julienne
2020-10-29 17:25   ` Nicolas Saenz Julienne
2020-10-29 17:25   ` Nicolas Saenz Julienne
2020-10-29 17:25 ` [PATCH v5 5/7] arm64: mm: Set ZONE_DMA size based on devicetree's dma-ranges Nicolas Saenz Julienne
2020-10-29 17:25   ` Nicolas Saenz Julienne
2020-10-29 17:25   ` Nicolas Saenz Julienne
2020-10-29 17:25 ` [PATCH v5 6/7] arm64: mm: Set ZONE_DMA size based on early IORT scan Nicolas Saenz Julienne
2020-10-29 17:25   ` Nicolas Saenz Julienne
2020-10-29 17:25   ` Nicolas Saenz Julienne
2020-10-30 18:00   ` Catalin Marinas [this message]
2020-10-30 18:00     ` Catalin Marinas
2020-10-30 18:00     ` Catalin Marinas
2020-10-29 17:25 ` [PATCH v5 7/7] mm: Remove examples from enum zone_type comment Nicolas Saenz Julienne
2020-10-29 17:25   ` Nicolas Saenz Julienne
2020-10-29 17:25   ` Nicolas Saenz Julienne
2020-10-29 17:25   ` Nicolas Saenz Julienne
2020-10-30 18:11 ` [PATCH v5 0/7] arm64: Default to 32-bit wide ZONE_DMA Catalin Marinas
2020-10-30 18:11   ` Catalin Marinas
2020-10-30 18:11   ` Catalin Marinas
2020-10-30 18:11   ` Catalin Marinas
2020-11-03 17:00   ` Nicolas Saenz Julienne
2020-11-03 17:00     ` Nicolas Saenz Julienne
2020-11-03 17:00     ` Nicolas Saenz Julienne
2020-11-03 17:00     ` Nicolas Saenz Julienne
2020-11-03 18:51     ` Catalin Marinas
2020-11-03 18:51       ` Catalin Marinas
2020-11-03 18:51       ` Catalin Marinas
2020-11-03 18:51       ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201030180055.GD23196@gaia \
    --to=catalin.marinas@arm.com \
    --cc=anshuman.khandual@arm.com \
    --cc=ardb@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=guohanjun@huawei.com \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jeremy.linton@arm.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=nsaenzjulienne@suse.de \
    --cc=rjw@rjwysocki.net \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=sudeep.holla@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.