aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lmb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/lmb.h')
-rw-r--r--include/linux/lmb.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/include/linux/lmb.h b/include/linux/lmb.h
index 8b93f63407e9..632717c6a2ba 100644
--- a/include/linux/lmb.h
+++ b/include/linux/lmb.h
@@ -19,19 +19,19 @@
19#define MAX_LMB_REGIONS 128 19#define MAX_LMB_REGIONS 128
20 20
21struct lmb_property { 21struct lmb_property {
22 unsigned long base; 22 u64 base;
23 unsigned long size; 23 u64 size;
24}; 24};
25 25
26struct lmb_region { 26struct lmb_region {
27 unsigned long cnt; 27 unsigned long cnt;
28 unsigned long size; 28 u64 size;
29 struct lmb_property region[MAX_LMB_REGIONS+1]; 29 struct lmb_property region[MAX_LMB_REGIONS+1];
30}; 30};
31 31
32struct lmb { 32struct lmb {
33 unsigned long debug; 33 unsigned long debug;
34 unsigned long rmo_size; 34 u64 rmo_size;
35 struct lmb_region memory; 35 struct lmb_region memory;
36 struct lmb_region reserved; 36 struct lmb_region reserved;
37}; 37};
@@ -40,36 +40,36 @@ extern struct lmb lmb;
40 40
41extern void __init lmb_init(void); 41extern void __init lmb_init(void);
42extern void __init lmb_analyze(void); 42extern void __init lmb_analyze(void);
43extern long __init lmb_add(unsigned long base, unsigned long size); 43extern long __init lmb_add(u64 base, u64 size);
44extern long __init lmb_reserve(unsigned long base, unsigned long size); 44extern long __init lmb_reserve(u64 base, u64 size);
45extern unsigned long __init lmb_alloc(unsigned long size, unsigned long align); 45extern u64 __init lmb_alloc(u64 size, u64 align);
46extern unsigned long __init lmb_alloc_base(unsigned long size, 46extern u64 __init lmb_alloc_base(u64 size,
47 unsigned long align, unsigned long max_addr); 47 u64, u64 max_addr);
48extern unsigned long __init __lmb_alloc_base(unsigned long size, 48extern u64 __init __lmb_alloc_base(u64 size,
49 unsigned long align, unsigned long max_addr); 49 u64 align, u64 max_addr);
50extern unsigned long __init lmb_phys_mem_size(void); 50extern u64 __init lmb_phys_mem_size(void);
51extern unsigned long __init lmb_end_of_DRAM(void); 51extern u64 __init lmb_end_of_DRAM(void);
52extern void __init lmb_enforce_memory_limit(unsigned long memory_limit); 52extern void __init lmb_enforce_memory_limit(u64 memory_limit);
53extern int __init lmb_is_reserved(unsigned long addr); 53extern int __init lmb_is_reserved(u64 addr);
54 54
55extern void lmb_dump_all(void); 55extern void lmb_dump_all(void);
56 56
57static inline unsigned long 57static inline u64
58lmb_size_bytes(struct lmb_region *type, unsigned long region_nr) 58lmb_size_bytes(struct lmb_region *type, unsigned long region_nr)
59{ 59{
60 return type->region[region_nr].size; 60 return type->region[region_nr].size;
61} 61}
62static inline unsigned long 62static inline u64
63lmb_size_pages(struct lmb_region *type, unsigned long region_nr) 63lmb_size_pages(struct lmb_region *type, unsigned long region_nr)
64{ 64{
65 return lmb_size_bytes(type, region_nr) >> PAGE_SHIFT; 65 return lmb_size_bytes(type, region_nr) >> PAGE_SHIFT;
66} 66}
67static inline unsigned long 67static inline u64
68lmb_start_pfn(struct lmb_region *type, unsigned long region_nr) 68lmb_start_pfn(struct lmb_region *type, unsigned long region_nr)
69{ 69{
70 return type->region[region_nr].base >> PAGE_SHIFT; 70 return type->region[region_nr].base >> PAGE_SHIFT;
71} 71}
72static inline unsigned long 72static inline u64
73lmb_end_pfn(struct lmb_region *type, unsigned long region_nr) 73lmb_end_pfn(struct lmb_region *type, unsigned long region_nr)
74{ 74{
75 return lmb_start_pfn(type, region_nr) + 75 return lmb_start_pfn(type, region_nr) +