Changeset 8b4d6cb in mainline for kernel/arch/ia64/include/asm.h


Ignore:
Timestamp:
2009-01-03T15:33:55Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2b70a6e
Parents:
fb69f39
Message:

More of ia64 cleanup.

File:
1 edited

Legend:

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

    rfb69f39 r8b4d6cb  
    4444#define IA64_IOSPACE_ADDRESS 0xE001000000000000ULL
    4545
    46 static inline void  outb(ioport_t port,uint8_t v)
    47 {
    48         *((uint8_t *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 )))) = v;
    49 
    50         asm volatile ("mf\n" ::: "memory");
    51 }
    52 
    53 static inline void  outw(ioport_t port,uint16_t v)
    54 {
    55         *((uint16_t *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 )))) = v;
    56 
    57         asm volatile ("mf\n" ::: "memory");
    58 }
    59 
    60 static inline void  outl(ioport_t port,uint32_t v)
    61 {
    62         *((uint32_t *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 )))) = v;
    63 
    64         asm volatile ("mf\n" ::: "memory");
    65 }
    66 
    67 
     46static inline void  outb(ioport_t port, uint8_t v)
     47{
     48        *((uint8_t *)(IA64_IOSPACE_ADDRESS +
     49            ((port & 0xfff) | ((port >> 2) << 12)))) = v;
     50
     51        asm volatile ("mf\n" ::: "memory");
     52}
     53
     54static inline void  outw(ioport_t port, uint16_t v)
     55{
     56        *((uint16_t *)(IA64_IOSPACE_ADDRESS +
     57            ((port & 0xfff) | ((port >> 2) << 12)))) = v;
     58
     59        asm volatile ("mf\n" ::: "memory");
     60}
     61
     62static inline void  outl(ioport_t port, uint32_t v)
     63{
     64        *((uint32_t *)(IA64_IOSPACE_ADDRESS +
     65            ((port & 0xfff) | ((port >> 2) << 12)))) = v;
     66
     67        asm volatile ("mf\n" ::: "memory");
     68}
    6869
    6970static inline uint8_t inb(ioport_t port)
     
    7172        asm volatile ("mf\n" ::: "memory");
    7273
    73         return *((uint8_t *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 ))));
     74        return *((uint8_t *)(IA64_IOSPACE_ADDRESS +
     75            ((port & 0xfff) | ((port >> 2) << 12))));
    7476}
    7577
     
    7880        asm volatile ("mf\n" ::: "memory");
    7981
    80         return *((uint16_t *)(IA64_IOSPACE_ADDRESS + ( (port & 0xffE) | ( (port >> 2) << 12 ))));
     82        return *((uint16_t *)(IA64_IOSPACE_ADDRESS +
     83            ((port & 0xffE) | ((port >> 2) << 12))));
    8184}
    8285
     
    8588        asm volatile ("mf\n" ::: "memory");
    8689
    87         return *((uint32_t *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 ))));
    88 }
    89 
    90 
     90        return *((uint32_t *)(IA64_IOSPACE_ADDRESS +
     91            ((port & 0xfff) | ((port >> 2) << 12))));
     92}
    9193
    9294/** Return base address of current stack
     
    343345extern void asm_delay_loop(uint32_t t);
    344346
    345 extern void switch_to_userspace(uintptr_t entry, uintptr_t sp, uintptr_t bsp, uintptr_t uspace_uarg, uint64_t ipsr, uint64_t rsc);
     347extern void switch_to_userspace(uintptr_t, uintptr_t, uintptr_t, uintptr_t,
     348    uint64_t, uint64_t);
    346349
    347350#endif
Note: See TracChangeset for help on using the changeset viewer.