ia64/xen-unstable

view linux-2.6-xen-sparse/include/asm-xen/balloon.h @ 8534:da7873110bbb

Tiny bootstrap cleanup.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Jan 09 19:46:46 2006 +0100 (2006-01-09)
parents 61b3b357d827
children
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
39 balloon_update_driver_allowance(
40 long delta);
42 /* Allocate an empty low-memory page range. */
43 extern struct page *
44 balloon_alloc_empty_page_range(
45 unsigned long nr_pages);
47 /* Deallocate an empty page range, adding to the balloon. */
48 extern void
49 balloon_dealloc_empty_page_range(
50 struct page *page, unsigned long nr_pages);
52 /*
53 * Prevent the balloon driver from changing the memory reservation during
54 * a driver critical region.
55 */
56 extern spinlock_t balloon_lock;
57 #define balloon_lock(__flags) spin_lock_irqsave(&balloon_lock, __flags)
58 #define balloon_unlock(__flags) spin_unlock_irqrestore(&balloon_lock, __flags)
60 #endif /* __ASM_BALLOON_H__ */
62 /*
63 * Local variables:
64 * c-file-style: "linux"
65 * indent-tabs-mode: t
66 * c-indent-level: 8
67 * c-basic-offset: 8
68 * tab-width: 8
69 * End:
70 */