~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/sparc/kernel/process_32.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <linux/pm.h>
25
25
#include <linux/init.h>
26
26
#include <linux/slab.h>
27
 
#include <trace/sched.h>
28
27
 
29
28
#include <asm/auxio.h>
30
29
#include <asm/oplib.h>
40
39
#include <asm/prom.h>
41
40
#include <asm/unistd.h>
42
41
 
43
 
DEFINE_TRACE(sched_kthread_create);
44
 
 
45
42
/* 
46
43
 * Power management idle function 
47
44
 * Set in pm platform drivers (apc.c and pmc.c)
131
128
        set_thread_flag(TIF_POLLING_NRFLAG);
132
129
        /* endless idle loop with no priority at all */
133
130
        while(1) {
134
 
                while (!need_resched())
135
 
                        cpu_relax();
 
131
#ifdef CONFIG_SPARC_LEON
 
132
                if (pm_idle) {
 
133
                        while (!need_resched())
 
134
                                (*pm_idle)();
 
135
                } else
 
136
#endif
 
137
                {
 
138
                        while (!need_resched())
 
139
                                cpu_relax();
 
140
                }
136
141
                preempt_enable_no_resched();
137
142
                schedule();
138
143
                preempt_disable();
677
682
                             "i" (__NR_clone), "r" (flags | CLONE_VM | CLONE_UNTRACED),
678
683
                             "i" (__NR_exit),  "r" (fn), "r" (arg) :
679
684
                             "g1", "g2", "g3", "o0", "o1", "memory", "cc");
680
 
        trace_sched_kthread_create(fn, retval);
681
685
        return retval;
682
686
}
683
687
EXPORT_SYMBOL(kernel_thread);