ia64/xen-unstable

changeset 3249:2dfba7f4548c

bitkeeper revision 1.1159.170.57 (41b4b344W3zPVx6PTLPQLdqX4FCv_w)

Merge arcadians.cl.cam.ac.uk:/auto/anfs/scratch/labyrinth/iap10/xeno-clone/xen-2.6.10-rc2.bk
into arcadians.cl.cam.ac.uk:/local/scratch-2/cl349/xen-2.0-linux.bk
author cl349@arcadians.cl.cam.ac.uk
date Mon Dec 06 19:30:12 2004 +0000 (2004-12-06)
parents e9ae5958b2be 93b5b19706c0
children 63bb7af323c9
files linux-2.6.10-rc2-xen-sparse/drivers/char/mem.c linux-2.6.10-rc2-xen-sparse/kernel/irq/manage.c
line diff
     1.1 --- a/linux-2.6.10-rc2-xen-sparse/drivers/char/mem.c	Mon Dec 06 19:16:45 2004 +0000
     1.2 +++ b/linux-2.6.10-rc2-xen-sparse/drivers/char/mem.c	Mon Dec 06 19:30:12 2004 +0000
     1.3 @@ -42,12 +42,7 @@ extern void tapechar_init(void);
     1.4   */
     1.5  static inline int uncached_access(struct file *file, unsigned long addr)
     1.6  {
     1.7 -#ifdef CONFIG_XEN
     1.8 -	if (file->f_flags & O_SYNC)
     1.9 -		return 1;
    1.10 -	/* Xen sets correct MTRR type on non-RAM for us. */
    1.11 -	return 0;
    1.12 -#elif defined(__i386__)
    1.13 +#if defined(__i386__)
    1.14  	/*
    1.15  	 * On the PPro and successors, the MTRRs are used to set
    1.16  	 * memory types for physical addresses outside main memory,
    1.17 @@ -206,21 +201,20 @@ static int mmap_mem(struct file * file, 
    1.18  		vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
    1.19  #endif
    1.20  
    1.21 -#if defined(CONFIG_XEN)
    1.22 +#if defined(__sparc__)
    1.23 +	if (io_remap_page_range(vma,
    1.24 +				vma->vm_start,
    1.25 +				vma->vm_pgoff << PAGE_SHIFT,
    1.26 +				vma->vm_end-vma->vm_start,
    1.27 +				vma->vm_page_prot, 0))
    1.28 +		return -EAGAIN;
    1.29 +#else
    1.30  	if (io_remap_page_range(vma,
    1.31  				vma->vm_start,
    1.32  				vma->vm_pgoff << PAGE_SHIFT,
    1.33  				vma->vm_end-vma->vm_start,
    1.34  				vma->vm_page_prot))
    1.35  		return -EAGAIN;
    1.36 -#else
    1.37 -	/* Remap-pfn-range will mark the range VM_IO and VM_RESERVED */
    1.38 -	if (remap_pfn_range(vma,
    1.39 -			    vma->vm_start,
    1.40 -			    vma->vm_pgoff,
    1.41 -			    vma->vm_end-vma->vm_start,
    1.42 -			    vma->vm_page_prot))
    1.43 -		return -EAGAIN;
    1.44  #endif
    1.45  	return 0;
    1.46  }
     2.1 --- a/linux-2.6.10-rc2-xen-sparse/kernel/irq/manage.c	Mon Dec 06 19:16:45 2004 +0000
     2.2 +++ b/linux-2.6.10-rc2-xen-sparse/kernel/irq/manage.c	Mon Dec 06 19:30:12 2004 +0000
     2.3 @@ -144,9 +144,14 @@ int can_request_irq(unsigned int irq, un
     2.4  	return !action;
     2.5  }
     2.6  
     2.7 -/*
     2.8 - * Internal function to register an irqaction - typically used to
     2.9 - * allocate special interrupts that are part of the architecture.
    2.10 +/**
    2.11 + *	setup_irq - register an irqaction structure
    2.12 + *	@irq: Interrupt to register
    2.13 + *	@irqaction: The irqaction structure to be registered
    2.14 + *
    2.15 + *	Normally called by request_irq, this function can be used
    2.16 + *	directly to allocate special interrupts that are part of the
    2.17 + *	architecture.
    2.18   */
    2.19  int setup_irq(unsigned int irq, struct irqaction * new)
    2.20  {
    2.21 @@ -216,8 +221,17 @@ int setup_irq(unsigned int irq, struct i
    2.22  }
    2.23  
    2.24  /*
    2.25 - * Internal function to unregister an irqaction - typically used to
    2.26 - * deallocate special interrupts that are part of the architecture.
    2.27 + *	teardown_irq - unregister an irqaction
    2.28 + *	@irq: Interrupt line being freed
    2.29 + *	@old: Pointer to the irqaction that is to be unregistered
    2.30 + *
    2.31 + *	This function is called by free_irq and does the actual
    2.32 + *	business of unregistering the handler. It exists as a 
    2.33 + *	seperate function to enable handlers to be unregistered 
    2.34 + *	for irqactions that have been allocated statically at 
    2.35 + *	boot time.
    2.36 + *
    2.37 + *	This function must not be called from interrupt context.
    2.38   */
    2.39  int teardown_irq(unsigned int irq, struct irqaction * old)
    2.40  {