X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-frv%2Fsystem.h;h=9f5663ba19f8eaad3ee4680d81894b18b1748ba0;hb=64c911a3f7c9864a4bbddbb77b722d5553ddcd32;hp=be303b3eef4096e06be42497583fec69ea097e94;hpb=ba7cc09c9c9e29a57045dc5bbf843ac1cfad3283;p=linux-2.6 diff --git a/include/asm-frv/system.h b/include/asm-frv/system.h index be303b3eef..9f5663ba19 100644 --- a/include/asm-frv/system.h +++ b/include/asm-frv/system.h @@ -12,6 +12,7 @@ #ifndef _ASM_SYSTEM_H #define _ASM_SYSTEM_H +#include #include struct thread_struct; @@ -252,7 +253,10 @@ extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new); __typeof__(*(ptr)) __xg_new = (new); \ \ switch (sizeof(__xg_orig)) { \ - case 4: __xg_orig = __cmpxchg_32(__xg_ptr, __xg_test, __xg_new); break; \ + case 4: __xg_orig = (__force __typeof__(*ptr)) \ + __cmpxchg_32((__force uint32_t *)__xg_ptr, \ + (__force uint32_t)__xg_test, \ + (__force uint32_t)__xg_new); break; \ default: \ __xg_orig = 0; \ asm volatile("break"); \