direct-io.hg

view linux-2.6-xen-sparse/include/xen/foreign_page.h @ 11509:2e6c10dc7c0b

[POWERPC][XEN] make sure put_domain() is called in case of allocate_rma() failuer

Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Tue Sep 12 10:53:46 2006 -0400 (2006-09-12)
parents 48c0f5489d44
children
line source
1 /******************************************************************************
2 * foreign_page.h
3 *
4 * Provide a "foreign" page type, that is owned by a foreign allocator and
5 * not the normal buddy allocator in page_alloc.c
6 *
7 * Copyright (c) 2004, K A Fraser
8 */
10 #ifndef __ASM_XEN_FOREIGN_PAGE_H__
11 #define __ASM_XEN_FOREIGN_PAGE_H__
13 #define PG_foreign PG_arch_1
15 #define PageForeign(page) test_bit(PG_foreign, &(page)->flags)
17 #define SetPageForeign(page, dtor) do { \
18 set_bit(PG_foreign, &(page)->flags); \
19 (page)->mapping = (void *)dtor; \
20 } while (0)
22 #define ClearPageForeign(page) do { \
23 clear_bit(PG_foreign, &(page)->flags); \
24 (page)->mapping = NULL; \
25 } while (0)
27 #define PageForeignDestructor(page) \
28 ( (void (*) (struct page *)) (page)->mapping )
30 #endif /* __ASM_XEN_FOREIGN_PAGE_H__ */