Commit f61bc5fb authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://are.twiddle.net/axp-2.6/

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents 7d31ee9b 620f7a5a
......@@ -145,12 +145,12 @@ titan_end_irq(unsigned int irq)
}
static void
titan_cpu_set_irq_affinity(unsigned int irq, unsigned long affinity)
titan_cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity)
{
int cpu;
for (cpu = 0; cpu < 4; cpu++) {
if (affinity & (1UL << cpu))
if (cpu_isset(cpu, affinity))
titan_cpu_irq_affinity[cpu] |= 1UL << irq;
else
titan_cpu_irq_affinity[cpu] &= ~(1UL << irq);
......@@ -159,7 +159,7 @@ titan_cpu_set_irq_affinity(unsigned int irq, unsigned long affinity)
}
static void
titan_set_irq_affinity(unsigned int irq, unsigned long affinity)
titan_set_irq_affinity(unsigned int irq, cpumask_t affinity)
{
spin_lock(&titan_irq_lock);
titan_cpu_set_irq_affinity(irq - 16, affinity);
......
......@@ -148,6 +148,29 @@ static inline void _raw_read_lock(rwlock_t * lock)
}
#endif /* CONFIG_DEBUG_RWLOCK */
static inline int _raw_write_trylock(rwlock_t * lock)
{
long regx;
int success;
__asm__ __volatile__(
"1: ldl_l %1,%0\n"
" lda %2,0\n"
" bne %1,2f\n"
" or $31,1,%1\n"
" stl_c %1,%0\n"
" beq %1,6f\n"
" lda %2,1\n"
"2: mb\n"
".subsection 2\n"
"6: br 1b\n"
".previous"
: "=m" (*lock), "=&r" (regx), "=&r" (success)
: "m" (*lock) : "memory");
return success;
}
static inline void _raw_write_unlock(rwlock_t * lock)
{
mb();
......
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