Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46256
b: refs/heads/master
c: 139b830
h: refs/heads/master
v: v3
  • Loading branch information
Bob Picco authored and Tony Luck committed Feb 5, 2007
1 parent c957c7f commit bf95e22
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d1598e05faa11d9f04e0a226122dd57674fb1dab
refs/heads/master: 139b830477ccdca21b68c40f9a83ec327e65eb56
4 changes: 3 additions & 1 deletion trunk/arch/ia64/mm/discontig.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,9 @@ void __init find_memory(void)
node_clear(node, memory_less_mask);
mem_data[node].min_pfn = ~0UL;
}

efi_memmap_walk(register_active_ranges, NULL);

/*
* Initialize the boot memory maps in reverse order since that's
* what the bootmem allocator expects
Expand Down Expand Up @@ -660,7 +663,6 @@ static __init int count_node_pages(unsigned long start, unsigned long len, int n
{
unsigned long end = start + len;

add_active_range(node, start >> PAGE_SHIFT, end >> PAGE_SHIFT);
mem_data[node].num_physpages += len >> PAGE_SHIFT;
if (start <= __pa(MAX_DMA_ADDRESS))
mem_data[node].num_dma_physpages +=
Expand Down
19 changes: 17 additions & 2 deletions trunk/arch/ia64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/swap.h>
#include <linux/proc_fs.h>
#include <linux/bitops.h>
#include <linux/kexec.h>

#include <asm/a.out.h>
#include <asm/dma.h>
Expand Down Expand Up @@ -595,13 +596,27 @@ find_largest_hole (u64 start, u64 end, void *arg)
return 0;
}

#endif /* CONFIG_VIRTUAL_MEM_MAP */

int __init
register_active_ranges(u64 start, u64 end, void *arg)
{
add_active_range(0, __pa(start) >> PAGE_SHIFT, __pa(end) >> PAGE_SHIFT);
int nid = paddr_to_nid(__pa(start));

if (nid < 0)
nid = 0;
#ifdef CONFIG_KEXEC
if (start > crashk_res.start && start < crashk_res.end)
start = crashk_res.end;
if (end > crashk_res.start && end < crashk_res.end)
end = crashk_res.start;
#endif

if (start < end)
add_active_range(nid, __pa(start) >> PAGE_SHIFT,
__pa(end) >> PAGE_SHIFT);
return 0;
}
#endif /* CONFIG_VIRTUAL_MEM_MAP */

static int __init
count_reserved_pages (u64 start, u64 end, void *arg)
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/asm-ia64/meminit.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ extern void efi_memmap_init(unsigned long *, unsigned long *);

#define IGNORE_PFN0 1 /* XXX fix me: ignore pfn 0 until TLB miss handler is updated... */

extern int register_active_ranges(u64 start, u64 end, void *arg);

#ifdef CONFIG_VIRTUAL_MEM_MAP
# define LARGE_GAP 0x40000000 /* Use virtual mem map if hole is > than this */
extern unsigned long vmalloc_end;
extern struct page *vmem_map;
extern int find_largest_hole (u64 start, u64 end, void *arg);
extern int register_active_ranges (u64 start, u64 end, void *arg);
extern int create_mem_map_page_table (u64 start, u64 end, void *arg);
extern int vmemmap_find_next_valid_pfn(int, int);
#else
Expand Down

0 comments on commit bf95e22

Please sign in to comment.