Commit 45d88866 authored by Miles Bader's avatar Miles Bader Committed by Linus Torvalds

[PATCH] Give a compile-time error on the v850 if MAX_ORDER is too large

Give a compile-time error on the v850 if MAX_ORDER is too large
parent d4b1dfa6
...@@ -270,6 +270,16 @@ init_mem_alloc (unsigned long ram_start, unsigned long ram_len) ...@@ -270,6 +270,16 @@ init_mem_alloc (unsigned long ram_start, unsigned long ram_len)
zones_size[ZONE_DMA] zones_size[ZONE_DMA]
= ADDR_TO_PAGE (ram_len + (ram_start - PAGE_OFFSET)); = ADDR_TO_PAGE (ram_len + (ram_start - PAGE_OFFSET));
/* The allocator is very picky about the address of the first
allocatable page -- it must be at least as aligned as the
maximum allocation -- so try to detect cases where it will get
confused and signal them at compile time (this is a common
problem when porting to a new platform with ). There is a
similar runtime check in free_area_init_core. */
#if ((PAGE_OFFSET >> PAGE_SHIFT) & ((1UL << (MAX_ORDER - 1)) - 1))
#error MAX_ORDER is too large for given PAGE_OFFSET (use CONFIG_FORCE_MAX_ZONEORDER to change it)
#endif
free_area_init_node (0, NODE_DATA(0), 0, zones_size, free_area_init_node (0, NODE_DATA(0), 0, zones_size,
ADDR_TO_PAGE (PAGE_OFFSET), 0); ADDR_TO_PAGE (PAGE_OFFSET), 0);
mem_map = NODE_DATA(0)->node_mem_map; mem_map = NODE_DATA(0)->node_mem_map;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment