]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 14 Mar 2011 22:20:39 +0000 (15:20 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 14 Mar 2011 22:20:39 +0000 (15:20 -0700)
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-mn10300:
  MN10300: atomic_read() should ensure it emits a load
  MN10300: The SMP_ICACHE_INV_FLUSH_RANGE IPI command does not exist
  MN10300: Proper use of macros get_user() in the case of incremented pointers

arch/mn10300/include/asm/atomic.h
arch/mn10300/include/asm/uaccess.h
arch/mn10300/mm/cache-inv-icache.c

index 92d2f9298e3832155b14bf21d1eb964e015b87f5..9d773a639513abd3a35311a117a563912d52b236 100644 (file)
@@ -139,7 +139,7 @@ static inline unsigned long __cmpxchg(volatile unsigned long *m,
  * Atomically reads the value of @v.  Note that the guaranteed
  * useful range of an atomic_t is only 24 bits.
  */
-#define atomic_read(v) ((v)->counter)
+#define atomic_read(v) (ACCESS_ONCE((v)->counter))
 
 /**
  * atomic_set - set atomic variable
index 679dee0bbd089dddabdbe230abf3874cebb174aa..3d6e60dad9d98a2b99a44029658638c48f300d50 100644 (file)
@@ -160,9 +160,10 @@ struct __large_struct { unsigned long buf[100]; };
 
 #define __get_user_check(x, ptr, size)                                 \
 ({                                                                     \
+       const __typeof__(ptr) __guc_ptr = (ptr);                        \
        int _e;                                                         \
-       if (likely(__access_ok((unsigned long) (ptr), (size))))         \
-               _e = __get_user_nocheck((x), (ptr), (size));            \
+       if (likely(__access_ok((unsigned long) __guc_ptr, (size))))     \
+               _e = __get_user_nocheck((x), __guc_ptr, (size));        \
        else {                                                          \
                _e = -EFAULT;                                           \
                (x) = (__typeof__(x))0;                                 \
index a8933a60b2d44956e4518931e6f7395839b784d2..a6b63dde603d50ebcd42e0da51cd7efbb983d6de 100644 (file)
@@ -69,7 +69,7 @@ static void flush_icache_page_range(unsigned long start, unsigned long end)
 
        /* invalidate the icache coverage on that region */
        mn10300_local_icache_inv_range2(addr + off, size);
-       smp_cache_call(SMP_ICACHE_INV_FLUSH_RANGE, start, end);
+       smp_cache_call(SMP_ICACHE_INV_RANGE, start, end);
 }
 
 /**
@@ -101,7 +101,7 @@ void flush_icache_range(unsigned long start, unsigned long end)
                 * directly */
                start_page = (start >= 0x80000000UL) ? start : 0x80000000UL;
                mn10300_icache_inv_range(start_page, end);
-               smp_cache_call(SMP_ICACHE_INV_FLUSH_RANGE, start, end);
+               smp_cache_call(SMP_ICACHE_INV_RANGE, start, end);
                if (start_page == start)
                        goto done;
                end = start_page;