ia64/xen-unstable

view xen/include/xen/mm.h @ 4391:f89c43228c36

bitkeeper revision 1.1159.258.79 (424bac81b97CaB37wVXoKpui_TVPxw)

Merge firebug.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-2.0-testing.bk
into firebug.cl.cam.ac.uk:/local/scratch/kaf24/xen-2.0-testing.bk
author kaf24@firebug.cl.cam.ac.uk
date Thu Mar 31 07:53:37 2005 +0000 (2005-03-31)
parents ac7313eb3788 52c3b00d09bb
children 8b2f70175ca1 0dc3b8b8c298
line source
2 #ifndef __XEN_MM_H__
3 #define __XEN_MM_H__
5 #include <xen/config.h>
6 #include <xen/list.h>
7 #include <xen/spinlock.h>
9 struct domain;
10 struct pfn_info;
12 /* Boot-time allocator. Turns into generic allocator after bootstrap. */
13 unsigned long init_boot_allocator(unsigned long bitmap_start);
14 void init_boot_pages(unsigned long ps, unsigned long pe);
15 unsigned long alloc_boot_pages(unsigned long size, unsigned long align);
16 void end_boot_allocator(void);
18 /* Generic allocator. These functions are *not* interrupt-safe. */
19 void init_heap_pages(
20 unsigned int zone, struct pfn_info *pg, unsigned long nr_pages);
21 struct pfn_info *alloc_heap_pages(unsigned int zone, unsigned int order);
22 void free_heap_pages(
23 unsigned int zone, struct pfn_info *pg, unsigned int order);
24 void scrub_heap_pages(void);
26 /* Xen suballocator. These functions are interrupt-safe. */
27 void init_xenheap_pages(unsigned long ps, unsigned long pe);
28 unsigned long alloc_xenheap_pages(unsigned int order);
29 void free_xenheap_pages(unsigned long p, unsigned int order);
30 #define alloc_xenheap_page() (alloc_xenheap_pages(0))
31 #define free_xenheap_page(_p) (free_xenheap_pages(_p,0))
33 /* Domain suballocator. These functions are *not* interrupt-safe.*/
34 void init_domheap_pages(unsigned long ps, unsigned long pe);
35 struct pfn_info *alloc_domheap_pages(struct domain *d, unsigned int order);
36 void free_domheap_pages(struct pfn_info *pg, unsigned int order);
37 unsigned long avail_domheap_pages(void);
38 #define alloc_domheap_page(_d) (alloc_domheap_pages(_d,0))
39 #define free_domheap_page(_p) (free_domheap_pages(_p,0))
41 /* Automatic page scrubbing for dead domains. */
42 extern struct list_head page_scrub_list;
43 #define page_scrub_schedule_work() \
44 do { \
45 if ( !list_empty(&page_scrub_list) ) \
46 raise_softirq(PAGE_SCRUB_SOFTIRQ); \
47 } while ( 0 )
49 #include <asm/mm.h>
51 #endif /* __XEN_MM_H__ */