1#ifndef meminit_h
2#define meminit_h
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25#define IA64_MAX_RSVD_REGIONS 9
26
27struct rsvd_region {
28 u64 start;
29 u64 end;
30};
31
32extern struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1];
33extern int num_rsvd_regions;
34
35extern void find_memory (void);
36extern void reserve_memory (void);
37extern void find_initrd (void);
38extern int filter_rsvd_memory (u64 start, u64 end, void *arg);
39extern int filter_memory (u64 start, u64 end, void *arg);
40extern unsigned long efi_memmap_init(u64 *s, u64 *e);
41extern int find_max_min_low_pfn (u64, u64, void *);
42
43extern unsigned long vmcore_find_descriptor_size(unsigned long address);
44extern int reserve_elfcorehdr(u64 *start, u64 *end);
45
46
47
48
49#define GRANULEROUNDDOWN(n) ((n) & ~(IA64_GRANULE_SIZE-1))
50#define GRANULEROUNDUP(n) (((n)+IA64_GRANULE_SIZE-1) & ~(IA64_GRANULE_SIZE-1))
51
52#ifdef CONFIG_NUMA
53 extern void call_pernode_memory (unsigned long start, unsigned long len, void *func);
54#else
55# define call_pernode_memory(start, len, func) (*func)(start, len, 0)
56#endif
57
58#define IGNORE_PFN0 1
59
60extern int register_active_ranges(u64 start, u64 len, int nid);
61
62#ifdef CONFIG_VIRTUAL_MEM_MAP
63# define LARGE_GAP 0x40000000
64 extern unsigned long VMALLOC_END;
65 extern struct page *vmem_map;
66 extern int find_largest_hole(u64 start, u64 end, void *arg);
67 extern int create_mem_map_page_table(u64 start, u64 end, void *arg);
68 extern int vmemmap_find_next_valid_pfn(int, int);
69#else
70static inline int vmemmap_find_next_valid_pfn(int node, int i)
71{
72 return i + 1;
73}
74#endif
75#endif
76