.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "FIND_PERNODE_SPACE" "9" "09 October 2005" "" ""
.SH NAME
find_pernode_space \- allocate memory for memory map and per-node structures
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int __init find_pernode_space (unsigned long \fIstart\fB, unsigned long \fIlen\fB, int \fInode\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIstart\fB\fR
physical start of range
.TP
\fB\fIlen\fB\fR
length of range
.TP
\fB\fInode\fB\fR
node where this range resides
.SH "DESCRIPTION"
.PP
This routine reserves space for the per-cpu data struct, the list of
pg_data_ts and the per-node data struct. Each node will have something like
the following in the first chunk of addr. space large enough to hold it.
.PP
________________________
| |
|~~~~~~~~~~~~~~~~~~~~~~~~| <-- NODEDATA_ALIGN(start, node) for the first
| PERCPU_PAGE_SIZE * | start and length big enough
| cpus_on_this_node | Node 0 will also have entries for all non-existent cpus.
|------------------------|
| local pg_data_t * |
|------------------------|
| local ia64_node_data |
|------------------------|
| ??? |
|________________________|
.PP
Once this space has been set aside, the bootmem maps are initialized. We
could probably move the allocation of the per-cpu and ia64_node_data space
outside of this function and use \fBalloc_bootmem_node\fR, but doing it here
is straightforward and we get the alignments we want so...