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