Index: kernel/generic/include/synch/condvar.h
===================================================================
--- kernel/generic/include/synch/condvar.h	(revision c8fccf5b75e9757a8b5d17f388f8c4e32b8d1a07)
+++ kernel/generic/include/synch/condvar.h	(revision cc106e483d059603a58bf1afab2123168615a299)
@@ -51,4 +51,12 @@
 	_condvar_wait_timeout((cv), (mtx), (usec), SYNCH_FLAGS_NONE)
 
+#ifdef CONFIG_SMP
+#define _condvar_wait_timeout_spinlock(cv, lock, usec, flags) \
+	_condvar_wait_timeout_spinlock_impl((cv), (lock), (usec), (flags))
+#else
+#define _condvar_wait_timeout_spinlock(cv, lock, usec, flags) \
+	_condvar_wait_timeout_spinlock_impl((cv), NULL, (usec), (flags))
+#endif
+
 extern void condvar_initialize(condvar_t *cv);
 extern void condvar_signal(condvar_t *cv);
@@ -56,5 +64,5 @@
 extern int _condvar_wait_timeout(condvar_t *cv, mutex_t *mtx, uint32_t usec,
     int flags);
-extern int _condvar_wait_timeout_spinlock(condvar_t *cv, spinlock_t *lock, 
+extern int _condvar_wait_timeout_spinlock_impl(condvar_t *cv, spinlock_t *lock, 
 	uint32_t usec, int flags);
 extern int _condvar_wait_timeout_irq_spinlock(condvar_t *cv, 
Index: kernel/generic/include/synch/spinlock.h
===================================================================
--- kernel/generic/include/synch/spinlock.h	(revision c8fccf5b75e9757a8b5d17f388f8c4e32b8d1a07)
+++ kernel/generic/include/synch/spinlock.h	(revision cc106e483d059603a58bf1afab2123168615a299)
@@ -45,5 +45,5 @@
 #ifdef CONFIG_SMP
 
-typedef struct {
+typedef struct spinlock {
 	atomic_t val;
 	
@@ -162,4 +162,7 @@
 /* On UP systems, spinlocks are effectively left out. */
 
+/* Allow the use of spinlock_t as an incomplete type. */
+typedef struct spinlock spinlock_t;
+
 #define SPINLOCK_DECLARE(name)
 #define SPINLOCK_EXTERN(name)
@@ -176,5 +179,5 @@
 
 #define spinlock_lock(lock)     preemption_disable()
-#define spinlock_trylock(lock)  (preemption_disable(), 1)
+#define spinlock_trylock(lock)  ({ preemption_disable(); 1; })
 #define spinlock_unlock(lock)   preemption_enable()
 #define spinlock_locked(lock)	1
Index: kernel/generic/src/smp/smp_call.c
===================================================================
--- kernel/generic/src/smp/smp_call.c	(revision c8fccf5b75e9757a8b5d17f388f8c4e32b8d1a07)
+++ kernel/generic/src/smp/smp_call.c	(revision cc106e483d059603a58bf1afab2123168615a299)
@@ -131,5 +131,5 @@
 		/*
 		 * If a platform supports SMP it must implement arch_smp_call_ipi().
-		 * It should issue an IPI an cpu_id and invoke smp_call_ipi_recv()
+		 * It should issue an IPI on cpu_id and invoke smp_call_ipi_recv()
 		 * on cpu_id in turn. 
 		 * 
Index: kernel/generic/src/synch/condvar.c
===================================================================
--- kernel/generic/src/synch/condvar.c	(revision c8fccf5b75e9757a8b5d17f388f8c4e32b8d1a07)
+++ kernel/generic/src/synch/condvar.c	(revision cc106e483d059603a58bf1afab2123168615a299)
@@ -120,5 +120,5 @@
  * @return See comment for waitq_sleep_timeout().
  */
-int _condvar_wait_timeout_spinlock(condvar_t *cv, spinlock_t *lock, 
+int _condvar_wait_timeout_spinlock_impl(condvar_t *cv, spinlock_t *lock, 
 	uint32_t usec, int flags)
 {
Index: kernel/generic/src/synch/rcu.c
===================================================================
--- kernel/generic/src/synch/rcu.c	(revision c8fccf5b75e9757a8b5d17f388f8c4e32b8d1a07)
+++ kernel/generic/src/synch/rcu.c	(revision cc106e483d059603a58bf1afab2123168615a299)
@@ -861,6 +861,6 @@
 			
 			/* Wait for the GP to complete. */
-			int ret = _condvar_wait_timeout_spinlock(&rcu.gp_ended, 
-				&rcu.gp_lock, SYNCH_NO_TIMEOUT, SYNCH_FLAGS_INTERRUPTIBLE);
+			int ret = _condvar_wait_timeout_spinlock(&rcu.gp_ended, &rcu.gp_lock, 
+				SYNCH_NO_TIMEOUT, SYNCH_FLAGS_INTERRUPTIBLE);
 			
 			if (ret == ESYNCH_INTERRUPTED) {
