From: Anders Roxell <anders.roxell@linaro.org>
To: song.bao.hua@hisilicon.com
Cc: akpm@linux-foundation.org, guro@fb.com,
linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org,
linuxarm@huawei.com, mike.kravetz@oracle.com,
sfr@canb.auug.org.au, will@kernel.org,
Anders Roxell <anders.roxell@linaro.org>
Subject: [PATCH] arm64: mm: move dma_contiguous_reserve() to be after paging_init()
Date: Wed, 16 Sep 2020 17:12:37 +0200 [thread overview]
Message-ID: <20200916151237.3745922-1-anders.roxell@linaro.org> (raw)
In-Reply-To: <20200916085933.25220-1-song.bao.hua@hisilicon.com>
> Recent CMA change "cma: make number of CMA areas dynamic, remove
> CONFIG_CMA_AREAS" breaks the boot of arm64 kernel in linux-next.
> Knic is like:
>
> Unable to handle kernel paging request at virtual address ffff0000438fff70
> Mem abort info:
> ESR = 0x96000044
> EC = 0x25: DABT (current EL), IL = 32 bits
> SET = 0, FnV = 0
> EA = 0, S1PTW = 0
> Data abort info:
> ISV = 0, ISS = 0x00000044
> CM = 0, WnR = 1
> swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000041f61000
> [ffff0000438fff70] pgd=0000000000000000, p4d=0000000000000000
> Internal error: Oops: 96000044 [#1] PREEMPT SMP
> Modules linked in:
> CPU: 0 PID: 0 Comm: swapper Not tainted 5.9.0-rc3-00020-ge1bce3d64c48 #2
> Hardware name: linux,dummy-virt (DT)
> pstate: 20000085 (nzCv daIf -PAN -UAO BTYPE=--)
> pc : __memset+0x148/0x188
> lr : memblock_alloc_try_nid+0xbc/0xd4
> sp : ffff800011ab3d10
> x29: ffff800011ab3d10 x28: 0000000041710018
> x27: 0000000040000000 x26: ffff8000115d1000
> x25: 0000000000000000 x24: ffff800011300428
> x23: ffff800011d1bd60 x22: 0000000000000000
> x21: 00000000ffffffff x20: ffff0000438fff70
> x19: 0000000000000090 x18: 0000000000000010
> x17: 0000000000001400 x16: 0000000000001c00
> x15: ffff800011ac3530 x14: ffff800011ac3530
> x13: fffffdfffe600000 x12: ffff800011ab3e44
> x11: 0000000000000004 x10: 0000000000000018
> x9 : 0000000000000000 x8 : ffff0000438fff70
> x7 : 0000000000000000 x6 : 000000000000003f
> x5 : 0000000000000040 x4 : 0000000000000010
> x3 : 0000000000000080 x2 : 0000000000000080
> x1 : 0000000000000000 x0 : ffff0000438fff70
> Call trace:
> __memset+0x148/0x188
> cma_init_reserved_mem+0x94/0x154
> cma_declare_contiguous_nid+0x240/0x2bc
> dma_contiguous_reserve_area+0x48/0x78
> dma_contiguous_reserve+0x78/0x88
> arm64_memblock_init+0x424/0x45c
> setup_arch+0x270/0x5f0
> start_kernel+0x84/0x4dc
> Code: f101007f fa45a068 54fffc0b aa0303e2 (a9001d07)
> random: get_random_bytes called from print_oops_end_marker+0x2c/0x68 with crng_init=0
> ---[ end trace 0000000000000000 ]---
> Kernel panic - not syncing: Attempted to kill the idle task!
> ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]---
>
> The virtual address returned from memblock_alloc() is not ready till
> paging_init() is done.
>
> Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
> Cc: Roman Gushchin <guro@fb.com>
> Cc: Mike Kravetz <mike.kravetz@oracle.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Will Deacon <will@kernel.org>
> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Cheers,
Anders
next prev parent reply other threads:[~2020-09-16 15:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-16 8:59 Barry Song
2020-09-16 15:12 ` Anders Roxell [this message]
2020-09-17 0:19 ` Nick Desaulniers
2020-09-17 0:27 ` Mike Kravetz
2020-09-17 1:35 ` Song Bao Hua (Barry Song)
2020-09-17 9:02 ` Will Deacon
2020-09-17 9:13 ` Stephen Rothwell
2020-09-17 9:36 ` Will Deacon
2020-09-17 0:57 ` Song Bao Hua (Barry Song)
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=20200916151237.3745922-1-anders.roxell@linaro.org \
--to=anders.roxell@linaro.org \
--cc=akpm@linux-foundation.org \
--cc=guro@fb.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=linuxarm@huawei.com \
--cc=mike.kravetz@oracle.com \
--cc=sfr@canb.auug.org.au \
--cc=song.bao.hua@hisilicon.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox