ia64/xen-unstable

changeset 8011:d6034e0e95fc

Merged.
author emellor@leeni.uk.xensource.com
date Wed Nov 23 19:19:04 2005 +0000 (2005-11-23)
parents 8aabf8959595 ef449cd53cca
children 69dc687f0364
files
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/configs/xen_defconfig_x86_32	Wed Nov 23 19:16:54 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/configs/xen_defconfig_x86_32	Wed Nov 23 19:19:04 2005 +0000
     1.3 @@ -1,7 +1,7 @@
     1.4  #
     1.5  # Automatically generated make config: don't edit
     1.6  # Linux kernel version: 2.6.12.6-xen
     1.7 -# Mon Nov 21 10:35:31 2005
     1.8 +# Wed Nov 23 08:19:49 2005
     1.9  #
    1.10  CONFIG_XEN=y
    1.11  CONFIG_ARCH_XEN=y
    1.12 @@ -1611,7 +1611,7 @@ CONFIG_INPUT=y
    1.13  #
    1.14  # Userland interfaces
    1.15  #
    1.16 -CONFIG_INPUT_MOUSEDEV=m
    1.17 +CONFIG_INPUT_MOUSEDEV=y
    1.18  CONFIG_INPUT_MOUSEDEV_PSAUX=y
    1.19  CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
    1.20  CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
     2.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/devmem.c	Wed Nov 23 19:16:54 2005 +0000
     2.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/devmem.c	Wed Nov 23 19:19:04 2005 +0000
     2.3 @@ -45,7 +45,7 @@ static ssize_t read_mem(struct file * fi
     2.4  {
     2.5  	unsigned long i, p = *ppos;
     2.6  	ssize_t read = -EFAULT;
     2.7 -	void *v;
     2.8 +	void __iomem *v;
     2.9  
    2.10  	if ((v = ioremap(p, count)) == NULL) {
    2.11  		/*
    2.12 @@ -75,7 +75,7 @@ static ssize_t write_mem(struct file * f
    2.13  {
    2.14  	unsigned long p = *ppos;
    2.15  	ssize_t written = -EFAULT;
    2.16 -	void *v;
    2.17 +	void __iomem *v;
    2.18  
    2.19  	if ((v = ioremap(p, count)) == NULL)
    2.20  		return -EFAULT;
     3.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Wed Nov 23 19:16:54 2005 +0000
     3.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Wed Nov 23 19:19:04 2005 +0000
     3.3 @@ -441,7 +441,7 @@ int blkif_ioctl(struct inode *inode, str
     3.4  	case CDROMMULTISESSION:
     3.5  		DPRINTK("FIXME: support multisession CDs later\n");
     3.6  		for (i = 0; i < sizeof(struct cdrom_multisession); i++)
     3.7 -			if (put_user(0, (char *)(argument + i)))
     3.8 +			if (put_user(0, (char __user *)(argument + i)))
     3.9  				return -EFAULT;
    3.10  		return 0;
    3.11  
     4.1 --- a/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c	Wed Nov 23 19:16:54 2005 +0000
     4.2 +++ b/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c	Wed Nov 23 19:19:04 2005 +0000
     4.3 @@ -89,7 +89,7 @@ void evtchn_device_upcall(int port)
     4.4  	spin_unlock(&port_user_lock);
     4.5  }
     4.6  
     4.7 -static ssize_t evtchn_read(struct file *file, char *buf,
     4.8 +static ssize_t evtchn_read(struct file *file, char __user *buf,
     4.9                             size_t count, loff_t *ppos)
    4.10  {
    4.11  	int rc;
    4.12 @@ -168,7 +168,7 @@ static ssize_t evtchn_read(struct file *
    4.13  	return rc;
    4.14  }
    4.15  
    4.16 -static ssize_t evtchn_write(struct file *file, const char *buf,
    4.17 +static ssize_t evtchn_write(struct file *file, const char __user *buf,
    4.18                              size_t count, loff_t *ppos)
    4.19  {
    4.20  	int  rc, i;
    4.21 @@ -220,6 +220,7 @@ static int evtchn_ioctl(struct inode *in
    4.22  {
    4.23  	int rc;
    4.24  	struct per_user_data *u = file->private_data;
    4.25 +	void __user *uarg = (void __user *) arg;
    4.26  	evtchn_op_t op = { 0 };
    4.27  
    4.28  	switch (cmd) {
    4.29 @@ -227,7 +228,7 @@ static int evtchn_ioctl(struct inode *in
    4.30  		struct ioctl_evtchn_bind_virq bind;
    4.31  
    4.32  		rc = -EFAULT;
    4.33 -		if (copy_from_user(&bind, (void *)arg, sizeof(bind)))
    4.34 +		if (copy_from_user(&bind, uarg, sizeof(bind)))
    4.35  			break;
    4.36  
    4.37  		op.cmd = EVTCHNOP_bind_virq;
    4.38 @@ -246,7 +247,7 @@ static int evtchn_ioctl(struct inode *in
    4.39  		struct ioctl_evtchn_bind_interdomain bind;
    4.40  
    4.41  		rc = -EFAULT;
    4.42 -		if (copy_from_user(&bind, (void *)arg, sizeof(bind)))
    4.43 +		if (copy_from_user(&bind, uarg, sizeof(bind)))
    4.44  			break;
    4.45  
    4.46  		op.cmd = EVTCHNOP_bind_interdomain;
    4.47 @@ -265,7 +266,7 @@ static int evtchn_ioctl(struct inode *in
    4.48  		struct ioctl_evtchn_bind_unbound_port bind;
    4.49  
    4.50  		rc = -EFAULT;
    4.51 -		if (copy_from_user(&bind, (void *)arg, sizeof(bind)))
    4.52 +		if (copy_from_user(&bind, uarg, sizeof(bind)))
    4.53  			break;
    4.54  
    4.55  		op.cmd = EVTCHNOP_alloc_unbound;
    4.56 @@ -285,7 +286,7 @@ static int evtchn_ioctl(struct inode *in
    4.57  		int ret;
    4.58  
    4.59  		rc = -EFAULT;
    4.60 -		if (copy_from_user(&unbind, (void *)arg, sizeof(unbind)))
    4.61 +		if (copy_from_user(&unbind, uarg, sizeof(unbind)))
    4.62  			break;
    4.63  
    4.64  		rc = -EINVAL;
    4.65 @@ -318,7 +319,7 @@ static int evtchn_ioctl(struct inode *in
    4.66  		struct ioctl_evtchn_notify notify;
    4.67  
    4.68  		rc = -EFAULT;
    4.69 -		if (copy_from_user(&notify, (void *)arg, sizeof(notify)))
    4.70 +		if (copy_from_user(&notify, uarg, sizeof(notify)))
    4.71  			break;
    4.72  
    4.73  		if (notify.port >= NR_EVENT_CHANNELS) {
     5.1 --- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c	Wed Nov 23 19:16:54 2005 +0000
     5.2 +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c	Wed Nov 23 19:19:04 2005 +0000
     5.3 @@ -38,13 +38,13 @@ static int privcmd_ioctl(struct inode *i
     5.4                           unsigned int cmd, unsigned long data)
     5.5  {
     5.6  	int ret = -ENOSYS;
     5.7 +	void __user *udata = (void __user *) data;
     5.8  
     5.9  	switch (cmd) {
    5.10  	case IOCTL_PRIVCMD_HYPERCALL: {
    5.11  		privcmd_hypercall_t hypercall;
    5.12    
    5.13 -		if (copy_from_user(&hypercall, (void *)data,
    5.14 -				   sizeof(hypercall)))
    5.15 +		if (copy_from_user(&hypercall, udata, sizeof(hypercall)))
    5.16  			return -EFAULT;
    5.17  
    5.18  #if defined(__i386__)
    5.19 @@ -97,10 +97,11 @@ static int privcmd_ioctl(struct inode *i
    5.20  	case IOCTL_PRIVCMD_MMAP: {
    5.21  #define PRIVCMD_MMAP_SZ 32
    5.22  		privcmd_mmap_t mmapcmd;
    5.23 -		privcmd_mmap_entry_t msg[PRIVCMD_MMAP_SZ], *p;
    5.24 +		privcmd_mmap_entry_t msg[PRIVCMD_MMAP_SZ];
    5.25 +		privcmd_mmap_entry_t __user *p;
    5.26  		int i, rc;
    5.27  
    5.28 -		if (copy_from_user(&mmapcmd, (void *)data, sizeof(mmapcmd)))
    5.29 +		if (copy_from_user(&mmapcmd, udata, sizeof(mmapcmd)))
    5.30  			return -EFAULT;
    5.31  
    5.32  		p = mmapcmd.entry;
    5.33 @@ -146,12 +147,12 @@ static int privcmd_ioctl(struct inode *i
    5.34  		mmu_update_t u;
    5.35  		privcmd_mmapbatch_t m;
    5.36  		struct vm_area_struct *vma = NULL;
    5.37 -		unsigned long *p, addr;
    5.38 -		unsigned long mfn; 
    5.39 +		unsigned long __user *p;
    5.40 +		unsigned long addr, mfn; 
    5.41  		uint64_t ptep;
    5.42  		int i;
    5.43  
    5.44 -		if (copy_from_user(&m, (void *)data, sizeof(m))) {
    5.45 +		if (copy_from_user(&m, udata, sizeof(m))) {
    5.46  			ret = -EFAULT;
    5.47  			goto batch_err;
    5.48  		}
    5.49 @@ -219,7 +220,7 @@ static int privcmd_ioctl(struct inode *i
    5.50  		pmd_t *pmd; 
    5.51  		unsigned long m2pv, m2p_mfn; 	
    5.52  		privcmd_m2pmfns_t m; 
    5.53 -		unsigned long *p; 
    5.54 +		unsigned long __user *p;
    5.55  		int i; 
    5.56  
    5.57  #if defined (__x86_64__)
    5.58 @@ -233,7 +234,8 @@ static int privcmd_ioctl(struct inode *i
    5.59  		ret = -EINVAL; 
    5.60  		break; 
    5.61  #endif
    5.62 -		if (copy_from_user(&m, (void *)data, sizeof(m)))
    5.63 +
    5.64 +		if (copy_from_user(&m, udata, sizeof(m)))
    5.65  			return -EFAULT;
    5.66  
    5.67  		m2pv = (unsigned long)machine_to_phys_mapping;
     6.1 --- a/linux-2.6-xen-sparse/drivers/xen/util.c	Wed Nov 23 19:16:54 2005 +0000
     6.2 +++ b/linux-2.6-xen-sparse/drivers/xen/util.c	Wed Nov 23 19:19:04 2005 +0000
     6.3 @@ -56,7 +56,7 @@ void lock_vm_area(struct vm_struct *area
     6.4  	 * page-fault path will copy the page directory pointers from init_mm.
     6.5  	 */
     6.6  	for (i = 0; i < area->size; i += PAGE_SIZE)
     6.7 -		(void)__get_user(c, (char *)area->addr + i);
     6.8 +		(void)__get_user(c, (char __user *)area->addr + i);
     6.9  }
    6.10  
    6.11  void unlock_vm_area(struct vm_struct *area)
     7.1 --- a/linux-2.6-xen-sparse/include/asm-xen/linux-public/privcmd.h	Wed Nov 23 19:16:54 2005 +0000
     7.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/linux-public/privcmd.h	Wed Nov 23 19:19:04 2005 +0000
     7.3 @@ -30,6 +30,10 @@
     7.4  #ifndef __LINUX_PUBLIC_PRIVCMD_H__
     7.5  #define __LINUX_PUBLIC_PRIVCMD_H__
     7.6  
     7.7 +#ifndef __user
     7.8 +#define __user
     7.9 +#endif
    7.10 +
    7.11  typedef struct privcmd_hypercall
    7.12  {
    7.13  	unsigned long op;
    7.14 @@ -45,19 +49,19 @@ typedef struct privcmd_mmap_entry {
    7.15  typedef struct privcmd_mmap {
    7.16  	int num;
    7.17  	domid_t dom; /* target domain */
    7.18 -	privcmd_mmap_entry_t *entry;
    7.19 +	privcmd_mmap_entry_t __user *entry;
    7.20  } privcmd_mmap_t; 
    7.21  
    7.22  typedef struct privcmd_mmapbatch {
    7.23  	int num;     /* number of pages to populate */
    7.24  	domid_t dom; /* target domain */
    7.25  	unsigned long addr;  /* virtual address */
    7.26 -	unsigned long *arr; /* array of mfns - top nibble set on err */
    7.27 +	unsigned long __user *arr; /* array of mfns - top nibble set on err */
    7.28  } privcmd_mmapbatch_t; 
    7.29  
    7.30  typedef struct privcmd_m2pmfns { 
    7.31  	int num;    /* max number of mfns to return */
    7.32 -	unsigned long *arr; /* array of mfns */
    7.33 +	unsigned long __user *arr; /* array of mfns */
    7.34  } privcmd_m2pmfns_t; 
    7.35  
    7.36  typedef struct privcmd_blkmsg
     8.1 --- a/xen/include/asm-x86/apic.h	Wed Nov 23 19:16:54 2005 +0000
     8.2 +++ b/xen/include/asm-x86/apic.h	Wed Nov 23 19:19:04 2005 +0000
     8.3 @@ -43,7 +43,7 @@ static __inline void apic_write(unsigned
     8.4  
     8.5  static __inline void apic_write_atomic(unsigned long reg, u32 v)
     8.6  {
     8.7 -	xchg((volatile u32 *)(APIC_BASE+reg), v);
     8.8 +	(void)xchg((volatile u32 *)(APIC_BASE+reg), v);
     8.9  }
    8.10  
    8.11  static __inline u32 apic_read(unsigned long reg)