debuggers.hg

view linux-2.6.9-xen-sparse/include/asm-xen/balloon.h @ 3289:a169836882cb

bitkeeper revision 1.1159.170.59 (41b4c2fdJ2gj_BWy27Vj3ptayZp_yg)

sync w/ head.
author cl349@arcadians.cl.cam.ac.uk
date Mon Dec 06 20:37:17 2004 +0000 (2004-12-06)
parents fdd2c0ba9164
children fd0d4d8e6193
line source
1 /******************************************************************************
2 * balloon.h
3 *
4 * Xen balloon driver - enables returning/claiming memory to/from Xen.
5 *
6 * Copyright (c) 2003, B Dragovic
7 * Copyright (c) 2003-2004, M Williamson, K Fraser
8 *
9 * This file may be distributed separately from the Linux kernel, or
10 * incorporated into other software packages, subject to the following license:
11 *
12 * Permission is hereby granted, free of charge, to any person obtaining a copy
13 * of this source file (the "Software"), to deal in the Software without
14 * restriction, including without limitation the rights to use, copy, modify,
15 * merge, publish, distribute, sublicense, and/or sell copies of the Software,
16 * and to permit persons to whom the Software is furnished to do so, subject to
17 * the following conditions:
18 *
19 * The above copyright notice and this permission notice shall be included in
20 * all copies or substantial portions of the Software.
21 *
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
28 * IN THE SOFTWARE.
29 */
31 #ifndef __ASM_BALLOON_H__
32 #define __ASM_BALLOON_H__
34 /*
35 * Inform the balloon driver that it should allow some slop for device-driver
36 * memory activities.
37 */
38 extern void balloon_update_driver_allowance(long delta);
40 /* Give up unmapped pages to the balloon driver. */
41 extern void balloon_put_pages(unsigned long *mfn_list, unsigned long nr_mfns);
43 /*
44 * Prevent the balloon driver from changing the memory reservation during
45 * a driver critical region.
46 */
47 extern spinlock_t balloon_lock;
48 #define balloon_lock(__flags) spin_lock_irqsave(&balloon_lock, __flags)
49 #define balloon_unlock(__flags) spin_unlock_irqrestore(&balloon_lock, __flags)
51 #endif /* __ASM_BALLOON_H__ */