Annotation of linux/include/asm/io.h, revision 1.1.1.7

1.1.1.4   root        1: #ifndef _ASM_IO_H
                      2: #define _ASM_IO_H
                      3: 
1.1.1.5   root        4: /*
                      5:  * Thanks to James van Artsdalen for a better timing-fix than
                      6:  * the two short jumps: using outb's to a nonexistent port seems
                      7:  * to guarantee better timings even on fast machines.
                      8:  *
                      9:  *             Linus
                     10:  */
                     11: 
1.1.1.4   root       12: extern void inline outb(char value, unsigned short port)
1.1.1.2   root       13: {
1.1.1.7 ! root       14: __asm__ __volatile__ ("outb %0,%1"
1.1.1.3   root       15:                ::"a" ((char) value),"d" ((unsigned short) port));
1.1.1.2   root       16: }
1.1       root       17: 
1.1.1.4   root       18: extern void inline outb_p(char value, unsigned short port)
1.1.1.2   root       19: {
1.1.1.7 ! root       20: __asm__ __volatile__ ("outb %0,%1\n\t"
1.1.1.6   root       21: #ifdef REALLY_SLOW_IO
1.1.1.5   root       22:                  "outb %0,$0x80\n\t"
                     23:                  "outb %0,$0x80\n\t"
                     24:                  "outb %0,$0x80\n\t"
1.1.1.6   root       25: #endif
1.1.1.5   root       26:                  "outb %0,$0x80"
1.1.1.3   root       27:                ::"a" ((char) value),"d" ((unsigned short) port));
1.1.1.2   root       28: }
1.1       root       29: 
1.1.1.4   root       30: extern unsigned char inline inb(unsigned short port)
1.1.1.2   root       31: {
                     32:        unsigned char _v;
1.1.1.7 ! root       33: __asm__ __volatile__ ("inb %1,%0"
1.1.1.3   root       34:                :"=a" (_v):"d" ((unsigned short) port));
1.1.1.2   root       35:        return _v;
                     36: }
1.1       root       37: 
1.1.1.4   root       38: extern unsigned char inline inb_p(unsigned short port)
1.1.1.2   root       39: {
                     40:        unsigned char _v;
1.1.1.7 ! root       41: __asm__ __volatile__ ("inb %1,%0\n\t"
1.1.1.6   root       42: #ifdef REALLY_SLOW_IO
1.1.1.5   root       43:                  "outb %0,$0x80\n\t"
                     44:                  "outb %0,$0x80\n\t"
                     45:                  "outb %0,$0x80\n\t"
1.1.1.6   root       46: #endif
1.1.1.5   root       47:                  "outb %0,$0x80"
1.1.1.3   root       48:                :"=a" (_v):"d" ((unsigned short) port));
1.1.1.2   root       49:        return _v;
                     50: }
1.1.1.4   root       51: 
                     52: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.