Thread (12 messages) 12 messages, 2 authors, 2016-03-01

[PATCH v2 5/9] arm64: mm: move vmemmap region right below the linear region

From: catalin.marinas@arm.com (Catalin Marinas)
Date: 2016-03-01 15:40:09
Also in: linux-mm

On Mon, Feb 29, 2016 at 03:44:40PM +0100, Ard Biesheuvel wrote:
quoted hunk ↗ jump to hunk
@@ -404,6 +404,12 @@ void __init mem_init(void)
 	BUILD_BUG_ON(TASK_SIZE_32			> TASK_SIZE_64);
 #endif
 
+	/*
+	 * Make sure we chose the upper bound of sizeof(struct page)
+	 * correctly.
+	 */
+	BUILD_BUG_ON(sizeof(struct page) > (1 << STRUCT_PAGE_MAX_SHIFT));
Since with the vmemmap fix you already assume that PAGE_OFFSET is half
of the VA space, we should add another check on PAGE_OFFSET !=
UL(0xffffffffffffffff) << (VA_BITS - 1), just in case someone thinks
they could map a bit of extra RAM without going for a larger VA.

-- 
Catalin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help