X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-i386%2Fmach-xen%2Fasm%2Fio.h;h=9681338e9a4e34f287358c49d8c76c8fe2e1d0b9;hb=refs%2Fheads%2Fvserver;hp=a27f56b68e0419da8a2f495d4915fefc27c8e00a;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/include/asm-i386/mach-xen/asm/io.h b/include/asm-i386/mach-xen/asm/io.h index a27f56b68..9681338e9 100644 --- a/include/asm-i386/mach-xen/asm/io.h +++ b/include/asm-i386/mach-xen/asm/io.h @@ -153,7 +153,11 @@ extern void bt_iounmap(void *addr, unsigned long size); */ #define isa_virt_to_bus(_x) isa_virt_to_bus_is_UNSUPPORTED->x #define isa_page_to_bus(_x) isa_page_to_bus_is_UNSUPPORTED->x -#define isa_bus_to_virt(_x) (void *)(__fix_to_virt(FIX_ISAMAP_BEGIN) + (_x)) + +static inline void *isa_bus_to_virt(unsigned long address) +{ + return (void *)(__fix_to_virt(FIX_ISAMAP_BEGIN) + address); +} /* * However PCI ones are not necessarily 1:1 and therefore these interfaces @@ -237,33 +241,6 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void __force *)(b),(c),(d)) -/** - * check_signature - find BIOS signatures - * @io_addr: mmio address to check - * @signature: signature block - * @length: length of signature - * - * Perform a signature comparison with the mmio address io_addr. This - * address should have been obtained by ioremap. - * Returns 1 on a match. - */ - -static inline int check_signature(volatile void __iomem * io_addr, - const unsigned char *signature, int length) -{ - int retval = 0; - do { - if (readb(io_addr) != *signature) - goto out; - io_addr++; - signature++; - length--; - } while (length); - retval = 1; -out: - return retval; -} - /* * Cache management * @@ -296,11 +273,11 @@ static inline void flush_write_buffers(void) #endif /* __KERNEL__ */ -#ifdef SLOW_IO_BY_JUMPING -#define __SLOW_DOWN_IO "jmp 1f; 1: jmp 1f; 1:" +#if defined(CONFIG_PARAVIRT) +#include #else + #define __SLOW_DOWN_IO "outb %%al,$0x80;" -#endif static inline void slow_down_io(void) { __asm__ __volatile__( @@ -311,6 +288,8 @@ static inline void slow_down_io(void) { : : ); } +#endif + #ifdef CONFIG_X86_NUMAQ extern void *xquad_portio; /* Where the IO area was mapped */ #define XQUAD_PORT_ADDR(port, quad) (xquad_portio + (XQUAD_PORTIO_QUAD*quad) + port)