Changeset ec7f8b1 in mainline for kernel/arch/amd64/include/asm.h


Ignore:
Timestamp:
2011-08-21T15:35:03Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bb74dabe
Parents:
c4a8e4a (diff), 5935c079 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/include/asm.h

    rc4a8e4a rec7f8b1  
    4141#include <trace.h>
    4242
     43#define IO_SPACE_BOUNDARY       ((void *) (64 * 1024))
     44
    4345/** Return base address of current stack.
    4446 *
     
    7779}
    7880
    79 #define IO_SPACE_BOUNDARY       ((void *) (64 * 1024))
    80 
    8181/** Byte from port
    8282 *
     
    9191        if (port < (ioport8_t *) IO_SPACE_BOUNDARY) {
    9292                uint8_t val;
     93               
    9394                asm volatile (
    9495                        "inb %w[port], %b[val]\n"
     
    9697                        : [port] "d" (port)
    9798                );
     99               
    98100                return val;
    99         } else {
     101        } else
    100102                return (uint8_t) *port;
    101         }
    102103}
    103104
     
    114115        if (port < (ioport16_t *) IO_SPACE_BOUNDARY) {
    115116                uint16_t val;
     117               
    116118                asm volatile (
    117119                        "inw %w[port], %w[val]\n"
     
    119121                        : [port] "d" (port)
    120122                );
     123               
    121124                return val;
    122         } else {
     125        } else
    123126                return (uint16_t) *port;
    124         }
    125127}
    126128
     
    137139        if (port < (ioport32_t *) IO_SPACE_BOUNDARY) {
    138140                uint32_t val;
     141               
    139142                asm volatile (
    140143                        "inl %w[port], %[val]\n"
     
    142145                        : [port] "d" (port)
    143146                );
     147               
    144148                return val;
    145         } else {
     149        } else
    146150                return (uint32_t) *port;
    147         }
    148151}
    149152
     
    163166                        :: [val] "a" (val), [port] "d" (port)
    164167                );     
    165         } else {
     168        } else
    166169                *port = val;
    167         }
    168170}
    169171
     
    183185                        :: [val] "a" (val), [port] "d" (port)
    184186                );
    185         } else {
     187        } else
    186188                *port = val;
    187         }
    188189}
    189190
     
    203204                        :: [val] "a" (val), [port] "d" (port)
    204205                );
    205         } else {
     206        } else
    206207                *port = val;
    207         }
    208208}
    209209
Note: See TracChangeset for help on using the changeset viewer.