I'm having exact same problem with Ubuntu 10.04 with rt-kernel (2.6.31-11). I tried to patch the psb_drv.c as suggested, but changing the line:
dev_priv->irqmask_lock = SPIN_LOCK_UNLOCKED;
Did not solve anything. I still get the same error as before. I looked from spinlock_types.h for the __SPIN_LOCK_UNLOCKED - definition and I cannot see what's the problem.
Has someone been able to compile psb-driver to rt-kernel with spin_locks?