void
enable_kernel_altivec(void)
{
- WARN_ON(current_thread_info()->preempt_count == 0 && !irqs_disabled());
+ WARN_ON(preemptible());
#ifdef CONFIG_SMP
if (current->thread.regs && (current->thread.regs->msr & MSR_VEC))
void
enable_kernel_fp(void)
{
- WARN_ON(current_thread_info()->preempt_count == 0 && !irqs_disabled());
+ WARN_ON(preemptible());
#ifdef CONFIG_SMP
if (current->thread.regs && (current->thread.regs->msr & MSR_FP))
}
#endif
-/*
- * These bracket the sleeping functions..
- */
-#define first_sched ((unsigned long) scheduling_functions_start_here)
-#define last_sched ((unsigned long) scheduling_functions_end_here)
-
unsigned long get_wchan(struct task_struct *p)
{
unsigned long ip, sp;
return 0;
if (count > 0) {
ip = *(unsigned long *)(sp + 4);
- if (ip < first_sched || ip >= last_sched)
+ if (!in_sched_functions(ip))
return ip;
}
} while (count++ < 16);