diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-03-21 22:49:34 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-04-08 17:39:23 +0200 |
commit | a1a04ec3c7c27a682473fd9beb2c996316a64649 (patch) | |
tree | 9075a4b4c001f81283b2a7d5c1668dee134ec81d /kernel | |
parent | 3a98f871ecaf44806e188184332c3fec27c8f08c (diff) | |
download | linux-a1a04ec3c7c27a682473fd9beb2c996316a64649.tar.bz2 |
idle: Provide a generic entry point for the idle code
For now this calls cpu_idle(), but in the long run we want to move the
cpu bringup code to the core and therefor we add a state argument.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Reviewed-by: Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Link: http://lkml.kernel.org/r/20130321215233.583190032@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/Makefile | 1 | ||||
-rw-r--r-- | kernel/cpu/Makefile | 1 | ||||
-rw-r--r-- | kernel/cpu/idle.c | 10 |
3 files changed, 12 insertions, 0 deletions
diff --git a/kernel/Makefile b/kernel/Makefile index bbde5f1a4486..d1574d47cf27 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -24,6 +24,7 @@ endif obj-y += sched/ obj-y += power/ +obj-y += cpu/ obj-$(CONFIG_CHECKPOINT_RESTORE) += kcmp.o obj-$(CONFIG_FREEZER) += freezer.o diff --git a/kernel/cpu/Makefile b/kernel/cpu/Makefile new file mode 100644 index 000000000000..59ab052ef7a0 --- /dev/null +++ b/kernel/cpu/Makefile @@ -0,0 +1 @@ +obj-y = idle.o diff --git a/kernel/cpu/idle.c b/kernel/cpu/idle.c new file mode 100644 index 000000000000..1908f00e0e98 --- /dev/null +++ b/kernel/cpu/idle.c @@ -0,0 +1,10 @@ +/* + * Generic entry point for the idle threads + */ +#include <linux/sched.h> +#include <linux/cpu.h> + +void cpu_startup_entry(enum cpuhp_state state) +{ + cpu_idle(); +} |