ia64/xen-unstable

annotate xen/include/xen/mm.h @ 5929:51094fae410e

Attached patch adds a DMA zone to xen, also modifies xen_contig_memory()
to ask for DMA pages.
Signed-off-by: srparish@us.ibm.com
author kaf24@firebug.cl.cam.ac.uk
date Fri Jul 29 10:31:22 2005 +0000 (2005-07-29)
parents 849b58da37b7
children b53a65034532 1efe6f4163ee e173a853dc46 d4fd332df775 04dfb5158f3a f294acb25858
rev   line source
kaf24@1210 1
kaf24@1211 2 #ifndef __XEN_MM_H__
kaf24@1211 3 #define __XEN_MM_H__
kaf24@1210 4
kaf24@4267 5 #include <xen/config.h>
kaf24@5398 6 #include <xen/types.h>
kaf24@4267 7 #include <xen/list.h>
kaf24@4267 8 #include <xen/spinlock.h>
kaf24@4267 9
kaf24@1941 10 struct domain;
kaf24@1941 11 struct pfn_info;
kaf24@1936 12
kaf24@3354 13 /* Boot-time allocator. Turns into generic allocator after bootstrap. */
kaf24@5398 14 physaddr_t init_boot_allocator(physaddr_t bitmap_start);
kaf24@5398 15 void init_boot_pages(physaddr_t ps, physaddr_t pe);
kaf24@5398 16 unsigned long alloc_boot_pages(unsigned long nr_pfns, unsigned long pfn_align);
kaf24@3354 17 void end_boot_allocator(void);
kaf24@3354 18
kaf24@2806 19 /* Generic allocator. These functions are *not* interrupt-safe. */
kaf24@3461 20 void init_heap_pages(
kaf24@3461 21 unsigned int zone, struct pfn_info *pg, unsigned long nr_pages);
kaf24@3461 22 struct pfn_info *alloc_heap_pages(unsigned int zone, unsigned int order);
kaf24@3461 23 void free_heap_pages(
kaf24@3461 24 unsigned int zone, struct pfn_info *pg, unsigned int order);
kaf24@2772 25 void scrub_heap_pages(void);
kaf24@1936 26
kaf24@2806 27 /* Xen suballocator. These functions are interrupt-safe. */
kaf24@5398 28 void init_xenheap_pages(physaddr_t ps, physaddr_t pe);
kaf24@5398 29 void *alloc_xenheap_pages(unsigned int order);
kaf24@5398 30 void free_xenheap_pages(void *v, unsigned int order);
kaf24@1920 31 #define alloc_xenheap_page() (alloc_xenheap_pages(0))
kaf24@5398 32 #define free_xenheap_page(v) (free_xenheap_pages(v,0))
kaf24@1749 33
kaf24@2806 34 /* Domain suballocator. These functions are *not* interrupt-safe.*/
kaf24@5398 35 void init_domheap_pages(physaddr_t ps, physaddr_t pe);
kaf24@5929 36 struct pfn_info *alloc_domheap_pages(
kaf24@5929 37 struct domain *d, unsigned int order, unsigned int flags);
kaf24@3461 38 void free_domheap_pages(struct pfn_info *pg, unsigned int order);
kaf24@1936 39 unsigned long avail_domheap_pages(void);
kaf24@5929 40 #define alloc_domheap_page(d) (alloc_domheap_pages(d,0,0))
kaf24@5398 41 #define free_domheap_page(p) (free_domheap_pages(p,0))
kaf24@1210 42
kaf24@5929 43 #define ALLOC_DOM_DMA 1
kaf24@5929 44
kaf24@4267 45 /* Automatic page scrubbing for dead domains. */
kaf24@4267 46 extern struct list_head page_scrub_list;
kaf24@4267 47 #define page_scrub_schedule_work() \
kaf24@4267 48 do { \
kaf24@4267 49 if ( !list_empty(&page_scrub_list) ) \
kaf24@4267 50 raise_softirq(PAGE_SCRUB_SOFTIRQ); \
kaf24@4267 51 } while ( 0 )
kaf24@4267 52
kaf24@1941 53 #include <asm/mm.h>
kaf24@1941 54
kaf24@5256 55 #ifndef sync_pagetable_state
kaf24@5256 56 #define sync_pagetable_state(d) ((void)0)
kaf24@5256 57 #endif
kaf24@5256 58
kaf24@1211 59 #endif /* __XEN_MM_H__ */