aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-m32r/system.h
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>2008-02-07 03:16:18 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-07 11:42:32 -0500
commitf94d1d3a1df125461a16b2888eca46d64f113e3a (patch)
tree35991d4f2f00dd9f3df1fe5d0ca53b5e01545f67 /include/asm-m32r/system.h
parent7b631c2de63b4475351258197409983c8189ed04 (diff)
Fix m32r __xchg
the #endif /* CONFIG_SMP */ should cover the default condition, or it may cause bad parameter to be silently missed. To make it work correctly, we have to remove the ifdef CONFIG SMP surrounding __xchg_called_with_bad_pointer declaration. Thanks to Adrian Bunk for detecting this. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Acked-by: Hirokazu Takata <takata@linux-m32r.org> Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-m32r/system.h')
-rw-r--r--include/asm-m32r/system.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h
index 7e7eb3703d85..70a57c8c002b 100644
--- a/include/asm-m32r/system.h
+++ b/include/asm-m32r/system.h
@@ -127,9 +127,7 @@ static inline void local_irq_disable(void)
127 ((__typeof__(*(ptr)))__xchg_local((unsigned long)(x), (ptr), \ 127 ((__typeof__(*(ptr)))__xchg_local((unsigned long)(x), (ptr), \
128 sizeof(*(ptr)))) 128 sizeof(*(ptr))))
129 129
130#ifdef CONFIG_SMP
131extern void __xchg_called_with_bad_pointer(void); 130extern void __xchg_called_with_bad_pointer(void);
132#endif
133 131
134#ifdef CONFIG_CHIP_M32700_TS1 132#ifdef CONFIG_CHIP_M32700_TS1
135#define DCACHE_CLEAR(reg0, reg1, addr) \ 133#define DCACHE_CLEAR(reg0, reg1, addr) \
@@ -189,9 +187,9 @@ __xchg(unsigned long x, volatile void *ptr, int size)
189#endif /* CONFIG_CHIP_M32700_TS1 */ 187#endif /* CONFIG_CHIP_M32700_TS1 */
190 ); 188 );
191 break; 189 break;
190#endif /* CONFIG_SMP */
192 default: 191 default:
193 __xchg_called_with_bad_pointer(); 192 __xchg_called_with_bad_pointer();
194#endif /* CONFIG_SMP */
195 } 193 }
196 194
197 local_irq_restore(flags); 195 local_irq_restore(flags);