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


Ignore:
Timestamp:
2008-08-31T09:08:53Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
43b7b35
Parents:
42a0607
Message:

Add the missing preemption_disable() call to sparc64 atomic_lock_arch().
Thanks to Pavel Rimsky for noticing this.

File:
1 edited

Legend:

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

    r42a0607 rbf29fe5  
    3838#include <arch/barrier.h>
    3939#include <arch/types.h>
     40#include <preemption.h>
    4041
    4142/** Atomic add operation.
     
    5758                a = *((uint64_t *) x);
    5859                b = a + i;
    59                 asm volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *)x)), "+r" (b) : "r" (a));
     60                asm volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *)x)),
     61                    "+r" (b) : "r" (a));
    6062        } while (a != b);
    6163
     
    98100        volatile uintptr_t x = (uint64_t) &val->count;
    99101
    100         asm volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *) x)), "+r" (v) : "r" (0));
     102        asm volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *) x)),
     103            "+r" (v) : "r" (0));
    101104
    102105        return v;
     
    109112
    110113        volatile uintptr_t x = (uint64_t) &val->count;
     114
     115        preemption_disable();
    111116
    112117        asm volatile (
Note: See TracChangeset for help on using the changeset viewer.