linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: catalin.marinas@arm.com, hch@lst.de, wahrenst@gmx.net,
	marc.zyngier@arm.com,  robh+dt@kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org,
	 linux-riscv@lists.infradead.org, Will Deacon <will@kernel.org>
Cc: f.fainelli@gmail.com, linux-kernel@vger.kernel.org,
	mbrugger@suse.com, linux-rpi-kernel@lists.infradead.org,
	phill@raspberrypi.org, robin.murphy@arm.com,
	m.szyprowski@samsung.com
Subject: Re: [PATCH v5 3/4] arm64: use both ZONE_DMA and ZONE_DMA32
Date: Wed, 11 Sep 2019 12:54:38 +0200	[thread overview]
Message-ID: <b0b824bebb9ef13ce746f9914de83126b0386e23.camel@suse.de> (raw)
In-Reply-To: <20190909095807.18709-4-nsaenzjulienne@suse.de>


[-- Attachment #1.1: Type: text/plain, Size: 1180 bytes --]

On Mon, 2019-09-09 at 11:58 +0200, Nicolas Saenz Julienne wrote:
> +
>  /*
> - * Return the maximum physical address for ZONE_DMA32 (DMA_BIT_MASK(32)). It
> - * currently assumes that for memory starting above 4G, 32-bit devices will
> - * use a DMA offset.
> + * Return the maximum physical address for a zone with a given address size
> + * limit. It currently assumes that for memory starting above 4G, 32-bit
> + * devices will use a DMA offset.
>   */
> -static phys_addr_t __init max_zone_dma32_phys(void)
> +static phys_addr_t __init max_zone_phys(unsigned int zone_bits)
>  {
>         phys_addr_t offset = memblock_start_of_DRAM() & GENMASK_ULL(63, 32);
> -       return min(offset + (1ULL << 32), memblock_end_of_DRAM());
> +       return min(offset + (1ULL << zone_bits), memblock_end_of_DRAM());
>  }

Hi all,
while testing other code on top of this series on odd arm64 machines I found an
issue: when memblock_start_of_DRAM() != 0, max_zone_phys() isn't taking into
account the offset to the beginning of memory. This doesn't matter with
zone_bits == 32 but it does when zone_bits == 30.

I'll send a follow-up series.

Regards,
Nicolas


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

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

  reply	other threads:[~2019-09-11 10:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-09  9:58 [PATCH v5 0/4] Raspberry Pi 4 DMA addressing support Nicolas Saenz Julienne
2019-09-09  9:58 ` [PATCH v5 1/4] arm64: mm: use arm64_dma_phys_limit instead of calling max_zone_dma_phys() Nicolas Saenz Julienne
2019-09-09  9:58 ` [PATCH v5 2/4] arm64: rename variables used to calculate ZONE_DMA32's size Nicolas Saenz Julienne
2019-09-09  9:58 ` [PATCH v5 3/4] arm64: use both ZONE_DMA and ZONE_DMA32 Nicolas Saenz Julienne
2019-09-11 10:54   ` Nicolas Saenz Julienne [this message]
2019-09-11 14:35     ` Catalin Marinas
2019-09-11 15:00       ` Nicolas Saenz Julienne
2019-09-09  9:58 ` [PATCH v5 4/4] mm: refresh ZONE_DMA and ZONE_DMA32 comments in 'enum zone_type' Nicolas Saenz Julienne
2019-09-09 19:33 ` [PATCH v5 0/4] Raspberry Pi 4 DMA addressing support Stefan Wahren
2019-09-09 19:50   ` Nicolas Saenz Julienne
2019-09-10  9:27   ` Matthias Brugger
2019-09-12 17:18     ` Matthias Brugger
2019-09-12 17:27       ` Florian Fainelli
2019-09-12 19:32       ` Stefan Wahren
2019-09-13  7:15         ` Matthias Brugger
2019-09-13  8:09         ` Matthias Brugger
2019-09-13  8:50           ` Stefan Wahren
2019-09-13  9:25             ` Matthias Brugger
2019-09-13 10:08               ` Stefan Wahren
2019-09-13 10:39                 ` Matthias Brugger
2019-09-16 19:19                   ` Stefan Wahren
2019-09-17  9:04                     ` Matthias Brugger
2019-09-17 18:03                       ` Stefan Wahren
2019-09-27 16:44                         ` Stefan Wahren

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=b0b824bebb9ef13ce746f9914de83126b0386e23.camel@suse.de \
    --to=nsaenzjulienne@suse.de \
    --cc=catalin.marinas@arm.com \
    --cc=f.fainelli@gmail.com \
    --cc=hch@lst.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=m.szyprowski@samsung.com \
    --cc=marc.zyngier@arm.com \
    --cc=mbrugger@suse.com \
    --cc=phill@raspberrypi.org \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=wahrenst@gmx.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).