diff --git a/[refs] b/[refs] index ff63c442f510..85818928d284 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4e8fd22bd421d7aa279bcb76189505a1f96bb7bf +refs/heads/master: 4564203d76599973da9c5cbcd93057252414ac9e diff --git a/trunk/drivers/sbus/char/Kconfig b/trunk/drivers/sbus/char/Kconfig index 90d8ef1f0bcc..a41778a490d6 100644 --- a/trunk/drivers/sbus/char/Kconfig +++ b/trunk/drivers/sbus/char/Kconfig @@ -71,20 +71,6 @@ config SUN_JSFLASH # XXX Why don't we do "source drivers/char/Config.in" somewhere? # no shit -config APM_RTC_IS_GMT - bool - depends on EXPERIMENTAL && SPARC32 && PCI - default y - help - Say Y here if your RTC (Real Time Clock a.k.a. hardware clock) - stores the time in GMT (Greenwich Mean Time). Say N if your RTC - stores localtime. - - It is in fact recommended to store GMT in your RTC, because then you - don't have to worry about daylight savings time changes. The only - reason not to use GMT in your RTC is if you also run a broken OS - that doesn't understand GMT. - config RTC tristate "PC-style Real Time Clock Support" depends on PCI && EXPERIMENTAL && SPARC32 diff --git a/trunk/include/asm-arm/locks.h b/trunk/include/asm-arm/locks.h index 9cb33fcc06c1..c26298f3891f 100644 --- a/trunk/include/asm-arm/locks.h +++ b/trunk/include/asm-arm/locks.h @@ -61,7 +61,7 @@ " strex ip, lr, [%0]\n" \ " teq ip, #0\n" \ " bne 1b\n" \ -" cmp lr, #0\n" \ +" teq lr, #0\n" \ " movle ip, %0\n" \ " blle " #wake \ : \ @@ -100,7 +100,7 @@ __asm__ __volatile__( \ "@ up_op_read\n" \ "1: ldrex lr, [%0]\n" \ -" adds lr, lr, %1\n" \ +" add lr, lr, %1\n" \ " strex ip, lr, [%0]\n" \ " teq ip, #0\n" \ " bne 1b\n" \ diff --git a/trunk/include/asm-arm/spinlock.h b/trunk/include/asm-arm/spinlock.h index 9705d5eec94c..182323619caa 100644 --- a/trunk/include/asm-arm/spinlock.h +++ b/trunk/include/asm-arm/spinlock.h @@ -79,8 +79,7 @@ typedef struct { } rwlock_t; #define RW_LOCK_UNLOCKED (rwlock_t) { 0 } -#define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while (0) -#define rwlock_is_locked(x) (*((volatile unsigned int *)(x)) != 0) +#define rwlock_init(x) do { *(x) + RW_LOCK_UNLOCKED; } while (0) /* * Write locks are easy - we just set bit 31. When unlocking, we can @@ -101,21 +100,6 @@ static inline void _raw_write_lock(rwlock_t *rw) : "cc", "memory"); } -static inline int _raw_write_trylock(rwlock_t *rw) -{ - unsigned long tmp; - - __asm__ __volatile__( -"1: ldrex %0, [%1]\n" -" teq %0, #0\n" -" strexeq %0, %2, [%1]" - : "=&r" (tmp) - : "r" (&rw->lock), "r" (0x80000000) - : "cc", "memory"); - - return tmp == 0; -} - static inline void _raw_write_unlock(rwlock_t *rw) { __asm__ __volatile__( @@ -154,8 +138,6 @@ static inline void _raw_read_lock(rwlock_t *rw) static inline void _raw_read_unlock(rwlock_t *rw) { - unsigned long tmp, tmp2; - __asm__ __volatile__( "1: ldrex %0, [%2]\n" " sub %0, %0, #1\n" @@ -169,4 +151,19 @@ static inline void _raw_read_unlock(rwlock_t *rw) #define _raw_read_trylock(lock) generic_raw_read_trylock(lock) +static inline int _raw_write_trylock(rwlock_t *rw) +{ + unsigned long tmp; + + __asm__ __volatile__( +"1: ldrex %0, [%1]\n" +" teq %0, #0\n" +" strexeq %0, %2, [%1]" + : "=&r" (tmp) + : "r" (&rw->lock), "r" (0x80000000) + : "cc", "memory"); + + return tmp == 0; +} + #endif /* __ASM_SPINLOCK_H */