linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Will Deacon <will@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	John Stultz <john.stultz@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	Christoph Hellwig <hch@lst.de>,
	Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Subject: Re: [PATCH] arm64: mm: Fix initialisation of DMA zones on non-NUMA systems
Date: Wed, 4 Dec 2019 11:26:00 +0000	[thread overview]
Message-ID: <20191204112600.GE13081@arrakis.emea.arm.com> (raw)
In-Reply-To: <20191203121013.9280-1-will@kernel.org>

On Tue, Dec 03, 2019 at 12:10:13PM +0000, Will Deacon wrote:
> John reports that the recently merged commit 1a8e1cef7603 ("arm64: use
> both ZONE_DMA and ZONE_DMA32") breaks the boot on his DB845C board:
> 
>   | Booting Linux on physical CPU 0x0000000000 [0x517f803c]
>   | Linux version 5.4.0-mainline-10675-g957a03b9e38f
>   | Machine model: Thundercomm Dragonboard 845c
>   | [...]
>   | Built 1 zonelists, mobility grouping on.  Total pages: -188245
>   | Kernel command line: earlycon
>   | firmware_class.path=/vendor/firmware/ androidboot.hardware=db845c
>   | init=/init androidboot.boot_devices=soc/1d84000.ufshc
>   | printk.devkmsg=on buildvariant=userdebug root=/dev/sda2
>   | androidboot.bootdevice=1d84000.ufshc androidboot.serialno=c4e1189c
>   | androidboot.baseband=sda
>   | msm_drm.dsi_display0=dsi_lt9611_1080_video_display:
>   | androidboot.slot_suffix=_a skip_initramfs rootwait ro init=/init
>   |
>   | <hangs indefinitely here>
> 
> This is because, when CONFIG_NUMA=n, zone_sizes_init() fails to handle
> memblocks that fall entirely within the ZONE_DMA region and erroneously ends up
> trying to add a negatively-sized region into the following ZONE_DMA32, which is
> later interpreted as a large unsigned region by the core MM code.
> 
> Rework the non-NUMA implementation of zone_sizes_init() so that the start
> address of the memblock being processed is adjusted according to the end of the
> previous zone, which is then range-checked before updating the hole information
> of subsequent zones.
> 
> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Link: https://lore.kernel.org/lkml/CALAqxLVVcsmFrDKLRGRq7GewcW405yTOxG=KR3csVzQ6bXutkA@mail.gmail.com
> Fixes: 1a8e1cef7603 ("arm64: use both ZONE_DMA and ZONE_DMA32")
> Reported-by: John Stultz <john.stultz@linaro.org>
> Signed-off-by: Will Deacon <will@kernel.org>

Queued for 5.5-rc1. Thanks.

-- 
Catalin

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

      parent reply	other threads:[~2019-12-04 11:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03 12:10 [PATCH] arm64: mm: Fix initialisation of DMA zones on non-NUMA systems Will Deacon
2019-12-03 18:47 ` John Stultz
2019-12-03 18:52   ` John Stultz
2019-12-04 11:26 ` Catalin Marinas [this message]

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=20191204112600.GE13081@arrakis.emea.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=hch@lst.de \
    --cc=john.stultz@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nsaenzjulienne@suse.de \
    --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).