diff options
| author | Dave Hansen <haveblue@us.ibm.com> | 2004-08-23 21:20:45 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-23 21:20:45 -0700 |
| commit | 01af8988b3a146015f5d188741c7d2a23f1d7e1a (patch) | |
| tree | fda92cbaf84305f8571873547a274462c2e986cd /include/linux/mm.h | |
| parent | 14297505ffdc628bd9dcf5801c16dbc5435e08b0 (diff) | |
[PATCH] don't pass mem_map into init functions
When using CONFIG_NONLINEAR, a zone's mem_map isn't contiguous, and isn't
allocated in the same place. This means that nonlinear doesn't really have
a mem_map[] to pass into free_area_init_node() or memmap_init_zone() which
makes any sense.
So, this patch removes the 'struct page *mem_map' argument to both of
those functions. All non-NUMA architectures just pass a NULL in there,
which is ignored. The solution on the NUMA arches is to pass the mem_map in
via the pgdat, which works just fine.
To replace the removed arguments, a call to pfn_to_page(node_start_pfn) is
made. This is valid because all of the pfn_to_page() implementations rely
only on the pgdats, which are already set up at this time. Plus, the
pfn_to_page() method should work for any future nonlinear-type code.
Finally, the patch creates a function: node_alloc_mem_map(), which I plan
to effectively #ifdef out for nonlinear at some future date.
Compile tested and booted on SMP x86, NUMAQ, and ppc64.
From: Jesse Barnes <jbarnes@engr.sgi.com>
Fix up ia64 specific memory map init function in light of Dave's
memmap_init cleanups.
Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
From: Dave Hansen <haveblue@us.ibm.com>
Looks like I missed a couple of architectures. This patch, on top of my
previous one and Jesse's should clean up the rest.
From: William Lee Irwin III <wli@holomorphy.com>
x86-64 wouldn't compile with NUMA support on, as node_alloc_mem_map()
references mem_map outside #ifdefs on CONFIG_NUMA/CONFIG_DISCONTIGMEM. This
patch wraps that reference in such an #ifdef.
From: William Lee Irwin III <wli@holomorphy.com>
Initializing NODE_DATA(nid)->node_mem_map prior to calling it should do.
From: Dave Hansen <haveblue@us.ibm.com>
Rick, I bet you didn't think your nerf weapons would be so effective in
getting that compile error fixed, did you?
Applying the attached patch and commenting out this line:
arch/i386/kernel/nmi.c: In function `proc_unknown_nmi_panic':
arch/i386/kernel/nmi.c:558: too few arguments to function `proc_dointvec'
will let it compile.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/mm.h')
| -rw-r--r-- | include/linux/mm.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 5849420e912e..88b3cace0def 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -605,11 +605,10 @@ static inline pmd_t *pmd_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long a } extern void free_area_init(unsigned long * zones_size); -extern void free_area_init_node(int nid, pg_data_t *pgdat, struct page *pmap, +extern void free_area_init_node(int nid, pg_data_t *pgdat, unsigned long * zones_size, unsigned long zone_start_pfn, unsigned long *zholes_size); -extern void memmap_init_zone(struct page *, unsigned long, int, - unsigned long, unsigned long); +extern void memmap_init_zone(unsigned long, int, unsigned long, unsigned long); extern void mem_init(void); extern void show_mem(void); extern void si_meminfo(struct sysinfo * val); |
