ia64/xen-unstable

view xen/include/xen/mm.h @ 6552:a9873d384da4

Merge.
author adsharma@los-vmm.sc.intel.com
date Thu Aug 25 12:24:48 2005 -0700 (2005-08-25)
parents 112d44270733 fa0754a9f64f
children dfaf788ab18c
line source
2 #ifndef __XEN_MM_H__
3 #define __XEN_MM_H__
5 #include <xen/config.h>
6 #include <xen/types.h>
7 #include <xen/list.h>
8 #include <xen/spinlock.h>
10 struct domain;
11 struct pfn_info;
13 /* Boot-time allocator. Turns into generic allocator after bootstrap. */
14 physaddr_t init_boot_allocator(physaddr_t bitmap_start);
15 void init_boot_pages(physaddr_t ps, physaddr_t pe);
16 unsigned long alloc_boot_pages(unsigned long nr_pfns, unsigned long pfn_align);
17 void end_boot_allocator(void);
19 /* Generic allocator. These functions are *not* interrupt-safe. */
20 void init_heap_pages(
21 unsigned int zone, struct pfn_info *pg, unsigned long nr_pages);
22 struct pfn_info *alloc_heap_pages(unsigned int zone, unsigned int order);
23 void free_heap_pages(
24 unsigned int zone, struct pfn_info *pg, unsigned int order);
25 void scrub_heap_pages(void);
27 /* Xen suballocator. These functions are interrupt-safe. */
28 void init_xenheap_pages(physaddr_t ps, physaddr_t pe);
29 void *alloc_xenheap_pages(unsigned int order);
30 void free_xenheap_pages(void *v, unsigned int order);
31 #define alloc_xenheap_page() (alloc_xenheap_pages(0))
32 #define free_xenheap_page(v) (free_xenheap_pages(v,0))
34 /* Domain suballocator. These functions are *not* interrupt-safe.*/
35 void init_domheap_pages(physaddr_t ps, physaddr_t pe);
36 struct pfn_info *alloc_domheap_pages(
37 struct domain *d, unsigned int order, unsigned int flags);
38 void free_domheap_pages(struct pfn_info *pg, unsigned int order);
39 unsigned long avail_domheap_pages(void);
40 #define alloc_domheap_page(d) (alloc_domheap_pages(d,0,0))
41 #define free_domheap_page(p) (free_domheap_pages(p,0))
43 #define ALLOC_DOM_DMA 1
45 /* Automatic page scrubbing for dead domains. */
46 extern struct list_head page_scrub_list;
47 #define page_scrub_schedule_work() \
48 do { \
49 if ( !list_empty(&page_scrub_list) ) \
50 raise_softirq(PAGE_SCRUB_SOFTIRQ); \
51 } while ( 0 )
53 #include <asm/mm.h>
55 #ifndef sync_pagetable_state
56 #define sync_pagetable_state(d) ((void)0)
57 #endif
59 #endif /* __XEN_MM_H__ */