ia64/xen-unstable

view linux-2.6.9-xen-sparse/include/asm-xen/foreign_page.h @ 3031:c4c8868de7cf

bitkeeper revision 1.1159.178.2 (419c79cdpE_zerZG3GhrXcQcFyPFXA)

Merge scramble.cl.cam.ac.uk:/local/scratch/kaf24/xen-2.0-testing.bk
into scramble.cl.cam.ac.uk:/local/scratch/kaf24/xen-unstable.bk
author kaf24@scramble.cl.cam.ac.uk
date Thu Nov 18 10:30:37 2004 +0000 (2004-11-18)
parents 15c78c720203 d7517f43cfda
children 032a1cbbba37 1f69171df585
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__ */