ia64/xen-unstable

changeset 8940:57af6b1cfa3a

Fix I/O port address for first floppy controller on x86_64.
As a consequence, some of the i386 changes over native code need to also be
added to x86-64.

From: Jan Beulich <JBeulich@novell.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Mon Feb 20 17:59:41 2006 +0000 (2006-02-20)
parents 0e9a0a469c6b
children 834e209cec9f
files linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/floppy.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/floppy.h	Mon Feb 20 17:34:21 2006 +0000
     1.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/floppy.h	Mon Feb 20 17:59:41 2006 +0000
     1.3 @@ -14,7 +14,6 @@
     1.4  
     1.5  #include <linux/vmalloc.h>
     1.6  
     1.7 -
     1.8  /*
     1.9   * The DMA channel used by the floppy controller cannot access data at
    1.10   * addresses >= 16MB
    1.11 @@ -26,8 +25,6 @@
    1.12  #define _CROSS_64KB(a,s,vdma) \
    1.13  (!(vdma) && ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64))
    1.14  
    1.15 -#include <linux/vmalloc.h>
    1.16 -
    1.17  /* XEN: Hit DMA paths on the head. This trick from asm-m68k/floppy.h. */
    1.18  #include <asm/dma.h>
    1.19  #undef MAX_DMA_ADDRESS
    1.20 @@ -43,8 +40,12 @@
    1.21  #define fd_disable_irq()        disable_irq(FLOPPY_IRQ)
    1.22  #define fd_free_irq()		free_irq(FLOPPY_IRQ, NULL)
    1.23  #define fd_get_dma_residue()    vdma_get_dma_residue(FLOPPY_DMA)
    1.24 -#define fd_dma_mem_alloc(size)	vdma_mem_alloc(size)
    1.25 -#define fd_dma_mem_free(addr, size) vdma_mem_free(addr, size) 
    1.26 +/*
    1.27 + * Do not use vmalloc/vfree: floppy_release_irq_and_dma() gets called from
    1.28 + * softirq context via motor_off_callback. A generic bug we happen to trigger.
    1.29 + */
    1.30 +#define fd_dma_mem_alloc(size)	__get_free_pages(GFP_KERNEL, get_order(size))
    1.31 +#define fd_dma_mem_free(addr, size) free_pages(addr, get_order(size))
    1.32  #define fd_dma_setup(addr, size, mode, io) vdma_dma_setup(addr, size, mode, io)
    1.33  
    1.34  static int virtual_dma_count;
    1.35 @@ -137,7 +138,7 @@ static int fd_request_irq(void)
    1.36  					   "floppy", NULL);
    1.37  }
    1.38  
    1.39 -
    1.40 +#if 0
    1.41  static unsigned long vdma_mem_alloc(unsigned long size)
    1.42  {
    1.43  	return (unsigned long) vmalloc(size);
    1.44 @@ -148,6 +149,7 @@ static void vdma_mem_free(unsigned long 
    1.45  {
    1.46  	vfree((void *)addr);
    1.47  }
    1.48 +#endif
    1.49  
    1.50  static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io)
    1.51  {
    1.52 @@ -168,7 +170,7 @@ static int xen_floppy_init(void)
    1.53  {
    1.54  	use_virtual_dma = 1;
    1.55  	can_use_virtual_dma = 1;
    1.56 -	return 0x340;
    1.57 +	return 0x3f0;
    1.58  }
    1.59  
    1.60  /*