Changeset a9ac978 in mainline for kernel/arch/sparc64/include/atomic.h


Ignore:
Timestamp:
2006-09-27T20:11:34Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
00b38a3
Parents:
86b31ba9
Message:

SMP stuff for sparc64.
Almost complete except for IPIs.
The absence of IPI support deadlocks
the kernel when more CPUs are configured.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/atomic.h

    r86b31ba9 ra9ac978  
    9797{
    9898        uint64_t v = 1;
     99        volatile uintptr_t x = (uint64_t) &val->count;
    99100
    100         __asm__ volatile ("casx %0, %2, %1\n" : "+m" (*val), "+r" (v) : "r" (0));
     101        __asm__ volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *) x)), "+r" (v) : "r" (0));
    101102
    102103        return v;
     
    107108        uint64_t tmp1 = 1;
    108109        uint64_t tmp2;
     110
     111        volatile uintptr_t x = (uint64_t) &val->count;
    109112
    110113        __asm__ volatile (
     
    120123                "nop\n"
    121124        "2:\n"
    122                 : "+m" (*val), "+r" (tmp1), "+r" (tmp2) : "r" (0)
     125                : "+m" (*((uint64_t *) x)), "+r" (tmp1), "+r" (tmp2) : "r" (0)
    123126        );
    124127       
Note: See TracChangeset for help on using the changeset viewer.