I wrote: > I'm attaching a patch which changes a semaphore in cpufreq into a > completion. With this patch, my system runs OK even with cpufreqd. > Although the patch worked for me, it was probably bogus. The real reason why cpufreq caused problems was that it does: init_MUTEX_LOCKED(&policy->lock); and later: up(&policy->lock); where policy->lock is declared as: struct semaphore lock; In PREEMPT_RT, the init_MUTEX_LOCKED is defined in include/linux/rt_lock.h : /* * No locked initialization for RT semaphores: */ #define init_MUTEX_LOCKED(sem) compat_init_MUTEX_LOCKED(sem) (BTW, I don't understand why we have init_MUTEX but no init_MUTEX_LOCKED for RT semaphores). Therefore we have an inconsistency - the up() gets translated into rt_up() because the lock is of type struct semaphore. However, compat_init_MUTEX_LOCKED assumes that it has a struct compat_semaphore. The compiler actually warns about incompatible pointers but I missed that warning at first. So the fix is to change the lock type into compat_semaphore. I'm attaching the patch. It works for me with 2.6.12-rc5-RT-V0.7.47-12. Regards Michal