ia64/xen-unstable

changeset 3255:cb4e23337578

bitkeeper revision 1.1159.170.61 (41b601c2hqYXs_GyXCoioNz7m4Q_Cg)

mem.c:
cleanup after sync.
balloon.h:
Rename: linux-2.6.9-xen-sparse/include/asm-xen/balloon.h -> linux-2.6.10-rc2-xen-sparse/include/asm-xen/balloon.h
devmem.c:
Rename: linux-2.6.9-xen-sparse/arch/xen/kernel/devmem.c -> linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/devmem.c
author cl349@arcadians.cl.cam.ac.uk
date Tue Dec 07 19:17:22 2004 +0000 (2004-12-07)
parents d455acded006
children 054fad40be91
files .rootkeys linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/devmem.c linux-2.6.10-rc2-xen-sparse/drivers/char/mem.c linux-2.6.10-rc2-xen-sparse/include/asm-xen/balloon.h linux-2.6.9-xen-sparse/arch/xen/kernel/devmem.c linux-2.6.9-xen-sparse/include/asm-xen/balloon.h
line diff
     1.1 --- a/.rootkeys	Tue Dec 07 18:31:20 2004 +0000
     1.2 +++ b/.rootkeys	Tue Dec 07 19:17:22 2004 +0000
     1.3 @@ -169,6 +169,7 @@ 4107adf1WcCgkhsdLTRGX52cOG1vJg linux-2.6
     1.4  4107adf1s5u6249DNPUViX1YNagbUQ linux-2.6.10-rc2-xen-sparse/arch/xen/i386/pci/irq.c
     1.5  40f56239zOksGg_H4XD4ye6iZNtoZA linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/Makefile
     1.6  40f56239bvOjuuuViZ0XMlNiREFC0A linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/ctrl_if.c
     1.7 +41ab6fa06JdF7jxUsuDcjN3UhuIAxg linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/devmem.c
     1.8  40f56238xFQe9T7M_U_FItM-bZIpLw linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/evtchn.c
     1.9  4110f478aeQWllIN7J4kouAHiAqrPw linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/fixup.c
    1.10  412dfae9eA3_6e6bCGUtg1mj8b56fQ linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/gnttab.c
    1.11 @@ -234,6 +235,7 @@ 40f5623bVdKP7Dt7qm8twu3NcnGNbA linux-2.6
    1.12  40f5623bc8LKPRO09wY5dGDnY_YCpw linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/tlbflush.h
    1.13  41062ab7uFxnCq-KtPeAm-aV8CicgA linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/vga.h
    1.14  40f5623bxUbeGjkRrjDguCy_Gm8RLw linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/xor.h
    1.15 +41af4017PDMuSmMWtSRU5UC9Vylw5g linux-2.6.10-rc2-xen-sparse/include/asm-xen/balloon.h
    1.16  40f5623bYNP7tHE2zX6YQxp9Zq2utQ linux-2.6.10-rc2-xen-sparse/include/asm-xen/ctrl_if.h
    1.17  40f5623b3Eqs8pAc5WpPX8_jTzV2qw linux-2.6.10-rc2-xen-sparse/include/asm-xen/evtchn.h
    1.18  419b4e9367PjTEvdjwavWN12BeBBXg linux-2.6.10-rc2-xen-sparse/include/asm-xen/foreign_page.h
    1.19 @@ -253,8 +255,6 @@ 412f46c0LJuKAgSPGoC0Z1DEkLfuLA linux-2.6
    1.20  410a94a4KT6I6X0LVc7djB39tRDp4g linux-2.6.10-rc2-xen-sparse/mm/page_alloc.c
    1.21  41505c572m-s9ATiO1LiD1GPznTTIg linux-2.6.10-rc2-xen-sparse/net/core/skbuff.c
    1.22  4149ec79wMpIHdvbntxqVGLRZZjPxw linux-2.6.10-rc2-xen-sparse/net/ipv4/raw.c
    1.23 -41ab6fa06JdF7jxUsuDcjN3UhuIAxg linux-2.6.9-xen-sparse/arch/xen/kernel/devmem.c
    1.24 -41af4017PDMuSmMWtSRU5UC9Vylw5g linux-2.6.9-xen-sparse/include/asm-xen/balloon.h
    1.25  413cb1e4zst25MDYjg63Y-NGC5_pLg netbsd-2.0-xen-sparse/Makefile
    1.26  413cb1e5c_Mkxf_X0zimEhTKI_l4DA netbsd-2.0-xen-sparse/mkbuildtree
    1.27  413cb1e5kY_Zil7-b0kI6hvCIxBEYg netbsd-2.0-xen-sparse/nbconfig-xen
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/devmem.c	Tue Dec 07 19:17:22 2004 +0000
     2.3 @@ -0,0 +1,158 @@
     2.4 +/*
     2.5 + *  Originally from linux/drivers/char/mem.c
     2.6 + *
     2.7 + *  Copyright (C) 1991, 1992  Linus Torvalds
     2.8 + *
     2.9 + *  Added devfs support. 
    2.10 + *    Jan-11-1998, C. Scott Ananian <cananian@alumni.princeton.edu>
    2.11 + *  Shared /dev/zero mmaping support, Feb 2000, Kanoj Sarcar <kanoj@sgi.com>
    2.12 + */
    2.13 +
    2.14 +#include <linux/config.h>
    2.15 +#include <linux/mm.h>
    2.16 +#include <linux/miscdevice.h>
    2.17 +#include <linux/slab.h>
    2.18 +#include <linux/vmalloc.h>
    2.19 +#include <linux/mman.h>
    2.20 +#include <linux/random.h>
    2.21 +#include <linux/init.h>
    2.22 +#include <linux/raw.h>
    2.23 +#include <linux/tty.h>
    2.24 +#include <linux/capability.h>
    2.25 +#include <linux/smp_lock.h>
    2.26 +#include <linux/devfs_fs_kernel.h>
    2.27 +#include <linux/ptrace.h>
    2.28 +#include <linux/device.h>
    2.29 +#include <asm/pgalloc.h>
    2.30 +#include <asm/uaccess.h>
    2.31 +#include <asm/io.h>
    2.32 +
    2.33 +static inline int uncached_access(struct file *file, unsigned long addr)
    2.34 +{
    2.35 +        if (file->f_flags & O_SYNC)
    2.36 +                return 1;
    2.37 +        /* Xen sets correct MTRR type on non-RAM for us. */
    2.38 +        return 0;
    2.39 +}
    2.40 +
    2.41 +/*
    2.42 + * This funcion reads the *physical* memory. The f_pos points directly to the 
    2.43 + * memory location. 
    2.44 + */
    2.45 +static ssize_t read_mem(struct file * file, char __user * buf,
    2.46 +			size_t count, loff_t *ppos)
    2.47 +{
    2.48 +	unsigned long i, p = *ppos;
    2.49 +	ssize_t read = 0;
    2.50 +	void *v;
    2.51 +
    2.52 +	if ((v = ioremap(p, count)) == NULL) {
    2.53 +		/*
    2.54 +		 * Some programs (e.g., dmidecode) groove off into weird RAM
    2.55 +		 * areas where no table scan possibly exist (because Xen will
    2.56 +		 * have stomped on them!). These programs get rather upset if
    2.57 +                 * we let them know that Xen failed their access, so we fake
    2.58 +                 * out a read of all zeroes. :-)
    2.59 +		 */
    2.60 +		for (i = 0; i < count; i++)
    2.61 +			if (put_user(0, buf+i))
    2.62 +				return -EFAULT;
    2.63 +		return count;
    2.64 +	}
    2.65 +	if (copy_to_user(buf, v, count))
    2.66 +		return -EFAULT;
    2.67 +	iounmap(v);
    2.68 +
    2.69 +	read += count;
    2.70 +	*ppos += read;
    2.71 +
    2.72 +	return read;
    2.73 +}
    2.74 +
    2.75 +static ssize_t write_mem(struct file * file, const char __user * buf, 
    2.76 +			 size_t count, loff_t *ppos)
    2.77 +{
    2.78 +	unsigned long p = *ppos;
    2.79 +	ssize_t written = 0;
    2.80 +	void *v;
    2.81 +
    2.82 +	if ((v = ioremap(p, count)) == NULL)
    2.83 +		return -EFAULT;
    2.84 +	if (copy_to_user(v, buf, count))
    2.85 +		return -EFAULT;
    2.86 +	iounmap(v);
    2.87 +
    2.88 +	written += count;
    2.89 +	*ppos += written;
    2.90 +
    2.91 +	return written;
    2.92 +}
    2.93 +
    2.94 +static int mmap_mem(struct file * file, struct vm_area_struct * vma)
    2.95 +{
    2.96 +	unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
    2.97 +	int uncached;
    2.98 +
    2.99 +	uncached = uncached_access(file, offset);
   2.100 +	if (uncached)
   2.101 +		vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
   2.102 +
   2.103 +	/* Don't try to swap out physical pages.. */
   2.104 +	vma->vm_flags |= VM_RESERVED;
   2.105 +
   2.106 +	/*
   2.107 +	 * Don't dump addresses that are not real memory to a core file.
   2.108 +	 */
   2.109 +	if (uncached)
   2.110 +		vma->vm_flags |= VM_IO;
   2.111 +
   2.112 +	if (io_remap_page_range(vma, vma->vm_start, offset, 
   2.113 +				vma->vm_end-vma->vm_start, vma->vm_page_prot))
   2.114 +		return -EAGAIN;
   2.115 +
   2.116 +	return 0;
   2.117 +}
   2.118 +
   2.119 +/*
   2.120 + * The memory devices use the full 32/64 bits of the offset, and so we cannot
   2.121 + * check against negative addresses: they are ok. The return value is weird,
   2.122 + * though, in that case (0).
   2.123 + *
   2.124 + * also note that seeking relative to the "end of file" isn't supported:
   2.125 + * it has no meaning, so it returns -EINVAL.
   2.126 + */
   2.127 +static loff_t memory_lseek(struct file * file, loff_t offset, int orig)
   2.128 +{
   2.129 +	loff_t ret;
   2.130 +
   2.131 +	down(&file->f_dentry->d_inode->i_sem);
   2.132 +	switch (orig) {
   2.133 +		case 0:
   2.134 +			file->f_pos = offset;
   2.135 +			ret = file->f_pos;
   2.136 +			force_successful_syscall_return();
   2.137 +			break;
   2.138 +		case 1:
   2.139 +			file->f_pos += offset;
   2.140 +			ret = file->f_pos;
   2.141 +			force_successful_syscall_return();
   2.142 +			break;
   2.143 +		default:
   2.144 +			ret = -EINVAL;
   2.145 +	}
   2.146 +	up(&file->f_dentry->d_inode->i_sem);
   2.147 +	return ret;
   2.148 +}
   2.149 +
   2.150 +static int open_mem(struct inode * inode, struct file * filp)
   2.151 +{
   2.152 +	return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
   2.153 +}
   2.154 +
   2.155 +struct file_operations mem_fops = {
   2.156 +	.llseek		= memory_lseek,
   2.157 +	.read		= read_mem,
   2.158 +	.write		= write_mem,
   2.159 +	.mmap		= mmap_mem,
   2.160 +	.open		= open_mem,
   2.161 +};
     3.1 --- a/linux-2.6.10-rc2-xen-sparse/drivers/char/mem.c	Tue Dec 07 18:31:20 2004 +0000
     3.2 +++ b/linux-2.6.10-rc2-xen-sparse/drivers/char/mem.c	Tue Dec 07 19:17:22 2004 +0000
     3.3 @@ -202,17 +202,12 @@ static int mmap_kmem(struct file * file,
     3.4  		vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
     3.5  #endif
     3.6  
     3.7 -	/* Don't try to swap out physical pages.. */
     3.8 -	vma->vm_flags |= VM_RESERVED;
     3.9 -
    3.10 -	/*
    3.11 -	 * Don't dump addresses that are not real memory to a core file.
    3.12 -	 */
    3.13 -	if (uncached)
    3.14 -		vma->vm_flags |= VM_IO;
    3.15 -
    3.16 -	if (remap_page_range(vma, vma->vm_start, offset, vma->vm_end-vma->vm_start,
    3.17 -			     vma->vm_page_prot))
    3.18 +	/* Remap-pfn-range will mark the range VM_IO and VM_RESERVED */
    3.19 +	if (remap_pfn_range(vma,
    3.20 +			    vma->vm_start,
    3.21 +			    vma->vm_pgoff,
    3.22 +			    vma->vm_end-vma->vm_start,
    3.23 +			    vma->vm_page_prot))
    3.24  		return -EAGAIN;
    3.25  	return 0;
    3.26  }
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/linux-2.6.10-rc2-xen-sparse/include/asm-xen/balloon.h	Tue Dec 07 19:17:22 2004 +0000
     4.3 @@ -0,0 +1,51 @@
     4.4 +/******************************************************************************
     4.5 + * balloon.h
     4.6 + *
     4.7 + * Xen balloon driver - enables returning/claiming memory to/from Xen.
     4.8 + *
     4.9 + * Copyright (c) 2003, B Dragovic
    4.10 + * Copyright (c) 2003-2004, M Williamson, K Fraser
    4.11 + * 
    4.12 + * This file may be distributed separately from the Linux kernel, or
    4.13 + * incorporated into other software packages, subject to the following license:
    4.14 + * 
    4.15 + * Permission is hereby granted, free of charge, to any person obtaining a copy
    4.16 + * of this source file (the "Software"), to deal in the Software without
    4.17 + * restriction, including without limitation the rights to use, copy, modify,
    4.18 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
    4.19 + * and to permit persons to whom the Software is furnished to do so, subject to
    4.20 + * the following conditions:
    4.21 + * 
    4.22 + * The above copyright notice and this permission notice shall be included in
    4.23 + * all copies or substantial portions of the Software.
    4.24 + * 
    4.25 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    4.26 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    4.27 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    4.28 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    4.29 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    4.30 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    4.31 + * IN THE SOFTWARE.
    4.32 + */
    4.33 +
    4.34 +#ifndef __ASM_BALLOON_H__
    4.35 +#define __ASM_BALLOON_H__
    4.36 +
    4.37 +/*
    4.38 + * Inform the balloon driver that it should allow some slop for device-driver
    4.39 + * memory activities.
    4.40 + */
    4.41 +extern void balloon_update_driver_allowance(long delta);
    4.42 +
    4.43 +/* Give up unmapped pages to the balloon driver. */
    4.44 +extern void balloon_put_pages(unsigned long *mfn_list, unsigned long nr_mfns);
    4.45 +
    4.46 +/*
    4.47 + * Prevent the balloon driver from changing the memory reservation during
    4.48 + * a driver critical region.
    4.49 + */
    4.50 +extern spinlock_t balloon_lock;
    4.51 +#define balloon_lock(__flags)   spin_lock_irqsave(&balloon_lock, __flags)
    4.52 +#define balloon_unlock(__flags) spin_unlock_irqrestore(&balloon_lock, __flags)
    4.53 +
    4.54 +#endif /* __ASM_BALLOON_H__ */
     5.1 --- a/linux-2.6.9-xen-sparse/arch/xen/kernel/devmem.c	Tue Dec 07 18:31:20 2004 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,158 +0,0 @@
     5.4 -/*
     5.5 - *  Originally from linux/drivers/char/mem.c
     5.6 - *
     5.7 - *  Copyright (C) 1991, 1992  Linus Torvalds
     5.8 - *
     5.9 - *  Added devfs support. 
    5.10 - *    Jan-11-1998, C. Scott Ananian <cananian@alumni.princeton.edu>
    5.11 - *  Shared /dev/zero mmaping support, Feb 2000, Kanoj Sarcar <kanoj@sgi.com>
    5.12 - */
    5.13 -
    5.14 -#include <linux/config.h>
    5.15 -#include <linux/mm.h>
    5.16 -#include <linux/miscdevice.h>
    5.17 -#include <linux/slab.h>
    5.18 -#include <linux/vmalloc.h>
    5.19 -#include <linux/mman.h>
    5.20 -#include <linux/random.h>
    5.21 -#include <linux/init.h>
    5.22 -#include <linux/raw.h>
    5.23 -#include <linux/tty.h>
    5.24 -#include <linux/capability.h>
    5.25 -#include <linux/smp_lock.h>
    5.26 -#include <linux/devfs_fs_kernel.h>
    5.27 -#include <linux/ptrace.h>
    5.28 -#include <linux/device.h>
    5.29 -#include <asm/pgalloc.h>
    5.30 -#include <asm/uaccess.h>
    5.31 -#include <asm/io.h>
    5.32 -
    5.33 -static inline int uncached_access(struct file *file, unsigned long addr)
    5.34 -{
    5.35 -        if (file->f_flags & O_SYNC)
    5.36 -                return 1;
    5.37 -        /* Xen sets correct MTRR type on non-RAM for us. */
    5.38 -        return 0;
    5.39 -}
    5.40 -
    5.41 -/*
    5.42 - * This funcion reads the *physical* memory. The f_pos points directly to the 
    5.43 - * memory location. 
    5.44 - */
    5.45 -static ssize_t read_mem(struct file * file, char __user * buf,
    5.46 -			size_t count, loff_t *ppos)
    5.47 -{
    5.48 -	unsigned long i, p = *ppos;
    5.49 -	ssize_t read = 0;
    5.50 -	void *v;
    5.51 -
    5.52 -	if ((v = ioremap(p, count)) == NULL) {
    5.53 -		/*
    5.54 -		 * Some programs (e.g., dmidecode) groove off into weird RAM
    5.55 -		 * areas where no table scan possibly exist (because Xen will
    5.56 -		 * have stomped on them!). These programs get rather upset if
    5.57 -                 * we let them know that Xen failed their access, so we fake
    5.58 -                 * out a read of all zeroes. :-)
    5.59 -		 */
    5.60 -		for (i = 0; i < count; i++)
    5.61 -			if (put_user(0, buf+i))
    5.62 -				return -EFAULT;
    5.63 -		return count;
    5.64 -	}
    5.65 -	if (copy_to_user(buf, v, count))
    5.66 -		return -EFAULT;
    5.67 -	iounmap(v);
    5.68 -
    5.69 -	read += count;
    5.70 -	*ppos += read;
    5.71 -
    5.72 -	return read;
    5.73 -}
    5.74 -
    5.75 -static ssize_t write_mem(struct file * file, const char __user * buf, 
    5.76 -			 size_t count, loff_t *ppos)
    5.77 -{
    5.78 -	unsigned long p = *ppos;
    5.79 -	ssize_t written = 0;
    5.80 -	void *v;
    5.81 -
    5.82 -	if ((v = ioremap(p, count)) == NULL)
    5.83 -		return -EFAULT;
    5.84 -	if (copy_to_user(v, buf, count))
    5.85 -		return -EFAULT;
    5.86 -	iounmap(v);
    5.87 -
    5.88 -	written += count;
    5.89 -	*ppos += written;
    5.90 -
    5.91 -	return written;
    5.92 -}
    5.93 -
    5.94 -static int mmap_mem(struct file * file, struct vm_area_struct * vma)
    5.95 -{
    5.96 -	unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
    5.97 -	int uncached;
    5.98 -
    5.99 -	uncached = uncached_access(file, offset);
   5.100 -	if (uncached)
   5.101 -		vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
   5.102 -
   5.103 -	/* Don't try to swap out physical pages.. */
   5.104 -	vma->vm_flags |= VM_RESERVED;
   5.105 -
   5.106 -	/*
   5.107 -	 * Don't dump addresses that are not real memory to a core file.
   5.108 -	 */
   5.109 -	if (uncached)
   5.110 -		vma->vm_flags |= VM_IO;
   5.111 -
   5.112 -	if (io_remap_page_range(vma, vma->vm_start, offset, 
   5.113 -				vma->vm_end-vma->vm_start, vma->vm_page_prot))
   5.114 -		return -EAGAIN;
   5.115 -
   5.116 -	return 0;
   5.117 -}
   5.118 -
   5.119 -/*
   5.120 - * The memory devices use the full 32/64 bits of the offset, and so we cannot
   5.121 - * check against negative addresses: they are ok. The return value is weird,
   5.122 - * though, in that case (0).
   5.123 - *
   5.124 - * also note that seeking relative to the "end of file" isn't supported:
   5.125 - * it has no meaning, so it returns -EINVAL.
   5.126 - */
   5.127 -static loff_t memory_lseek(struct file * file, loff_t offset, int orig)
   5.128 -{
   5.129 -	loff_t ret;
   5.130 -
   5.131 -	down(&file->f_dentry->d_inode->i_sem);
   5.132 -	switch (orig) {
   5.133 -		case 0:
   5.134 -			file->f_pos = offset;
   5.135 -			ret = file->f_pos;
   5.136 -			force_successful_syscall_return();
   5.137 -			break;
   5.138 -		case 1:
   5.139 -			file->f_pos += offset;
   5.140 -			ret = file->f_pos;
   5.141 -			force_successful_syscall_return();
   5.142 -			break;
   5.143 -		default:
   5.144 -			ret = -EINVAL;
   5.145 -	}
   5.146 -	up(&file->f_dentry->d_inode->i_sem);
   5.147 -	return ret;
   5.148 -}
   5.149 -
   5.150 -static int open_mem(struct inode * inode, struct file * filp)
   5.151 -{
   5.152 -	return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
   5.153 -}
   5.154 -
   5.155 -struct file_operations mem_fops = {
   5.156 -	.llseek		= memory_lseek,
   5.157 -	.read		= read_mem,
   5.158 -	.write		= write_mem,
   5.159 -	.mmap		= mmap_mem,
   5.160 -	.open		= open_mem,
   5.161 -};
     6.1 --- a/linux-2.6.9-xen-sparse/include/asm-xen/balloon.h	Tue Dec 07 18:31:20 2004 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,51 +0,0 @@
     6.4 -/******************************************************************************
     6.5 - * balloon.h
     6.6 - *
     6.7 - * Xen balloon driver - enables returning/claiming memory to/from Xen.
     6.8 - *
     6.9 - * Copyright (c) 2003, B Dragovic
    6.10 - * Copyright (c) 2003-2004, M Williamson, K Fraser
    6.11 - * 
    6.12 - * This file may be distributed separately from the Linux kernel, or
    6.13 - * incorporated into other software packages, subject to the following license:
    6.14 - * 
    6.15 - * Permission is hereby granted, free of charge, to any person obtaining a copy
    6.16 - * of this source file (the "Software"), to deal in the Software without
    6.17 - * restriction, including without limitation the rights to use, copy, modify,
    6.18 - * merge, publish, distribute, sublicense, and/or sell copies of the Software,
    6.19 - * and to permit persons to whom the Software is furnished to do so, subject to
    6.20 - * the following conditions:
    6.21 - * 
    6.22 - * The above copyright notice and this permission notice shall be included in
    6.23 - * all copies or substantial portions of the Software.
    6.24 - * 
    6.25 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    6.26 - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    6.27 - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    6.28 - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    6.29 - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    6.30 - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    6.31 - * IN THE SOFTWARE.
    6.32 - */
    6.33 -
    6.34 -#ifndef __ASM_BALLOON_H__
    6.35 -#define __ASM_BALLOON_H__
    6.36 -
    6.37 -/*
    6.38 - * Inform the balloon driver that it should allow some slop for device-driver
    6.39 - * memory activities.
    6.40 - */
    6.41 -extern void balloon_update_driver_allowance(long delta);
    6.42 -
    6.43 -/* Give up unmapped pages to the balloon driver. */
    6.44 -extern void balloon_put_pages(unsigned long *mfn_list, unsigned long nr_mfns);
    6.45 -
    6.46 -/*
    6.47 - * Prevent the balloon driver from changing the memory reservation during
    6.48 - * a driver critical region.
    6.49 - */
    6.50 -extern spinlock_t balloon_lock;
    6.51 -#define balloon_lock(__flags)   spin_lock_irqsave(&balloon_lock, __flags)
    6.52 -#define balloon_unlock(__flags) spin_unlock_irqrestore(&balloon_lock, __flags)
    6.53 -
    6.54 -#endif /* __ASM_BALLOON_H__ */