X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=arch%2Favr32%2Fkernel%2Fprocess.c;h=6cf9df1762743a29813db51b5d82d5ba8f6acedf;hb=6d72b7952fa7d7c61d021398970c29afde6a4443;hp=eaaa69bbdc38d5546b395311f29896a6a2c357db;hpb=b7e23d913aafc93fc5f119e1be17620073cc3811;p=cascardo%2Flinux.git diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c index eaaa69bbdc38..6cf9df176274 100644 --- a/arch/avr32/kernel/process.c +++ b/arch/avr32/kernel/process.c @@ -11,17 +11,18 @@ #include #include #include +#include #include #include #include #include +#include + void (*pm_power_off)(void) = NULL; EXPORT_SYMBOL(pm_power_off); -extern void cpu_idle_sleep(void); - /* * This file handles the architecture-dependent parts of process handling.. */ @@ -30,8 +31,10 @@ void cpu_idle(void) { /* endless idle loop with no priority at all */ while (1) { + tick_nohz_stop_sched_tick(); while (!need_resched()) cpu_idle_sleep(); + tick_nohz_restart_sched_tick(); preempt_enable_no_resched(); schedule(); preempt_disable(); @@ -51,6 +54,8 @@ void machine_halt(void) void machine_power_off(void) { + if (pm_power_off) + pm_power_off(); } void machine_restart(char *cmd) @@ -345,6 +350,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, p->thread.cpu_context.ksp = (unsigned long)childregs; p->thread.cpu_context.pc = (unsigned long)ret_from_fork; + clear_tsk_thread_flag(p, TIF_DEBUG); if ((clone_flags & CLONE_PTRACE) && test_thread_flag(TIF_DEBUG)) ocd_enable(p);