linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Leizhen (ThunderTown, Euler)" <thunder.leizhen@huawei.com>
To: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Russell King <linux@arm.linux.org.uk>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>
Cc: Huxinwei <huxinwei@huawei.com>,
	"Liujiang (Gerry)" <jiang.liu@huawei.com>,
	Lizefan <lizefan@huawei.com>
Subject: [BUG] ARM64: Create 4K page size mmu memory map at init time will trigger exception.
Date: Thu, 22 Aug 2013 03:35:29 +0000	[thread overview]
Message-ID: <BFAC7FA8F7636E45AB9ECBAC17346F3434557683@SZXEML508-MBS.china.huawei.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 968 bytes --]

This problem is on ARM64. When CONFIG_ARM64_64K_PAGES is not opened, the memory map size can be 2M(section) and 4K(PAGE). First, OS will create map for pgd(level 1 table) and level 2 table which in swapper_pg_dir. Then, OS register mem block into memblock.memory according to memory node in fdt, like memory@0, and create map in setup_arch-->paging_init. If all mem block start address and size is integral multiple of 2M, there is no problem, because we will create 2M section size map whose entries locate in level 2 table. But if it is not integral multiple of 2M, we should create level 3 table, which granule is 4K. Now, current implementtion is call early_alloc-->memblock_alloc to alloc memory for level 3 table. This function will find a 4K free memory which locate in memblock.memory tail(high address), but paging_init is create map from low address to high address, so new alloced memory is not mapped, write page talbe entry to it will trigger exception.

[-- Attachment #2: Type: text/html, Size: 2628 bytes --]

             reply	other threads:[~2013-08-22  3:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-22  3:35 Leizhen (ThunderTown, Euler) [this message]
2013-08-22 16:16 ` Catalin Marinas
2013-08-23 17:16   ` Catalin Marinas
2013-08-27 12:38     ` leizhen
2013-08-27 14:48       ` Catalin Marinas
2013-08-28  0:57         ` leizhen
2013-08-28  1:34           ` leizhen

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=BFAC7FA8F7636E45AB9ECBAC17346F3434557683@SZXEML508-MBS.china.huawei.com \
    --to=thunder.leizhen@huawei.com \
    --cc=catalin.marinas@arm.com \
    --cc=huxinwei@huawei.com \
    --cc=jiang.liu@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@arm.linux.org.uk \
    --cc=lizefan@huawei.com \
    --cc=will.deacon@arm.com \
    /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