lkml.org 
[lkml]   [2013]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 29/76] ARC: Boot #1: low-level, setup_arch(), /proc/cpuinfo, mem init
Date
On Friday 18 January 2013, Vineet Gupta wrote:
> + /* setup bootmem allocator */
> + bootmap_sz = init_bootmem_node(NODE_DATA(0),
> + first_free_pfn,/* bitmap start */
> + min_low_pfn, /* First pg to track */
> + max_low_pfn); /* Last pg to track */
> +
> + /*
> + * init_bootmem above marks all tracked Page-frames as inuse "allocated"
> + * This includes pages occupied by kernel's elf segments.
> + * Beyond that, excluding bootmem bitmap itself, mark the rest of
> + * free-mem as "allocatable"
> + */
> + alloc_start = kernel_img_end + bootmap_sz;
> + free_bootmem(alloc_start, end_mem - alloc_start);
> +
> + memset(zones_size, 0, sizeof(zones_size));
> + zones_size[ZONE_NORMAL] = num_physpages;
> +

IIRC, the bootmem allocator is no longer recommended for new architecture.
You should use the "memblock" interface instead, as arm64 and tile do.

I just saw that this is still listed as TODO for openrisc, sorry if I
put you on the wrong track there by recommending to copy from openrisc.

Arnd


\
 
 \ /
  Last update: 2013-01-18 16:21    [W:0.622 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site