linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [BUG] ARM64: Create 4K page size mmu memory map at init time will trigger exception.
@ 2013-08-22  3:35 Leizhen (ThunderTown, Euler)
  2013-08-22 16:16 ` Catalin Marinas
  0 siblings, 1 reply; 7+ messages in thread
From: Leizhen (ThunderTown, Euler) @ 2013-08-22  3:35 UTC (permalink / raw)
  To: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, Russell King,
	Catalin Marinas, Will Deacon
  Cc: Huxinwei, Liujiang (Gerry), Lizefan

[-- 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 --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-08-28  1:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-22  3:35 [BUG] ARM64: Create 4K page size mmu memory map at init time will trigger exception Leizhen (ThunderTown, Euler)
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

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).