WE REALLY SHOULDN'T DO THIS. Looks like the binary ati driver makes all sorts of mistakes and it's easy to trip them on bfs. Let's do some sanity checking of calls to smp_processor_id and conditional resched. This might help a bit... Index: linux-2.6.31-bfs/include/linux/smp.h =================================================================== --- linux-2.6.31-bfs.orig/include/linux/smp.h 2009-09-20 14:59:27.602489650 +1000 +++ linux-2.6.31-bfs/include/linux/smp.h 2009-09-20 15:11:04.271492692 +1000 @@ -172,7 +172,7 @@ static inline void init_call_single_data extern unsigned int debug_smp_processor_id(void); # define smp_processor_id() debug_smp_processor_id() #else -# define smp_processor_id() raw_smp_processor_id() +# define smp_processor_id() dodgy_smp_processor_id() #endif #define get_cpu() ({ preempt_disable(); smp_processor_id(); }) Index: linux-2.6.31-bfs/kernel/sched_bfs.c =================================================================== --- linux-2.6.31-bfs.orig/kernel/sched_bfs.c 2009-09-20 14:59:27.620489951 +1000 +++ linux-2.6.31-bfs/kernel/sched_bfs.c 2009-09-20 15:57:28.197240123 +1000 @@ -3538,6 +3538,9 @@ static void __cond_resched(void) { #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP __might_sleep(__FILE__, __LINE__); +#else /* WE SHOULDN'T DO THIS BUT IT MAKES SOME DODGY DRIVERS WORK FOR NOW */ + if ((in_atomic() || irqs_disabled()) && !oops_in_progress) + return; #endif /* * The BKS might be reacquired before we have dropped Index: linux-2.6.31-bfs/lib/smp_processor_id.c =================================================================== --- linux-2.6.31-bfs.orig/lib/smp_processor_id.c 2009-09-20 15:03:41.263489882 +1000 +++ linux-2.6.31-bfs/lib/smp_processor_id.c 2009-09-20 15:45:59.437241968 +1000 @@ -53,3 +53,28 @@ out: EXPORT_SYMBOL(debug_smp_processor_id); +/* WE SHOULDN'T DO THIS BUT IT MAKES SOME DODGY DRIVERS WORK FOR NOW */ +notrace unsigned int dodgy_smp_processor_id(void) +{ + unsigned long preempt_count = preempt_count(); + int this_cpu; + + if (likely(preempt_count)) + return raw_smp_processor_id(); + + if (irqs_disabled()) + return raw_smp_processor_id(); + + /* + * Avoid recursion: + */ + preempt_disable_notrace(); + + this_cpu = raw_smp_processor_id(); + + preempt_enable_no_resched_notrace(); + + return this_cpu; +} + +EXPORT_SYMBOL(dodgy_smp_processor_id);