Commit 24494040 authored by Paul Mackerras's avatar Paul Mackerras

PPC32: fix test_bit (take out bogus __const__).

The bogus __const__ was causing the compiler to generate a branch
to self in pte_chain_lock.
parent d04508bf
......@@ -26,10 +26,6 @@
#define SMP_MB
#endif /* CONFIG_SMP */
/*
* These used to be if'd out here because using : "cc" as a constraint
* resulted in errors from egcs. Things appear to be OK with gcc-2.95.
*/
static __inline__ void set_bit(int nr, volatile unsigned long * addr)
{
unsigned long old;
......@@ -224,9 +220,7 @@ static __inline__ int __test_and_change_bit(int nr, volatile unsigned long *addr
static __inline__ int test_bit(int nr, __const__ volatile unsigned long *addr)
{
__const__ unsigned int *p = (__const__ unsigned int *) addr;
return ((p[nr >> 5] >> (nr & 0x1f)) & 1) != 0;
return ((addr[nr >> 5] >> (nr & 0x1f)) & 1) != 0;
}
/* Return the bit position of the most significant 1 bit in a word */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment