Lines Matching +full:idle +full:- +full:halt
1 // SPDX-License-Identifier: GPL-2.0-or-later
11 * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
13 * This file handles the architecture-dependent parts of process handling...
49 * Used at user space -> kernel transitions.
62 /* Whoops - the platform was unable to reboot. Tell the user! */ in machine_restart()
63 pr_emerg("Reboot failed -- System halted\n"); in machine_restart()
79 * here to freeze the system for e.g. post-mortem debug purpose when
80 * possible. This halt has nothing to do with the idle halt.
84 printk(KERN_INFO "*** MACHINE HALT ***\n"); in machine_halt()
88 /* If or when software power-off is implemented, add code here. */
130 * Copy the thread-specific (arch specific) info from the current
169 unsigned long clone_flags = args->flags; in copy_thread()
170 unsigned long usp = args->stack; in copy_thread()
171 unsigned long tls = args->tls; in copy_thread()
180 sp -= STACK_FRAME_OVERHEAD; /* redzone */ in copy_thread()
181 sp -= sizeof(struct pt_regs); in copy_thread()
185 sp -= STACK_FRAME_OVERHEAD; /* redzone */ in copy_thread()
186 sp -= sizeof(struct pt_regs); in copy_thread()
189 if (unlikely(args->fn)) { in copy_thread()
191 kregs->gpr[20] = (unsigned long)args->fn; in copy_thread()
192 kregs->gpr[22] = (unsigned long)args->fn_arg; in copy_thread()
197 userregs->sp = usp; in copy_thread()
203 userregs->gpr[10] = tls; in copy_thread()
205 userregs->gpr[11] = 0; /* Result from fork() */ in copy_thread()
207 kregs->gpr[20] = 0; /* Userspace thread */ in copy_thread()
211 * _switch wants the kernel stack page in pt_regs->sp so that it in copy_thread()
212 * can restore it to thread_info->ksp... see _switch for details. in copy_thread()
214 kregs->sp = top_of_kernel_stack; in copy_thread()
215 kregs->gpr[9] = (unsigned long)ret_from_fork; in copy_thread()
217 task_thread_info(p)->ksp = (unsigned long)kregs; in copy_thread()
231 regs->pc = pc; in start_thread()
232 regs->sr = sr; in start_thread()
233 regs->sp = sp; in start_thread()
250 * (one for each cpu). we need them at user->kernel transition, in __switch_to()
251 * while we save them at kernel->user transition in __switch_to()
253 new_ti = new->stack; in __switch_to()
254 old_ti = old->stack; in __switch_to()
259 last = (_switch(old_ti, new_ti))->task; in __switch_to()
273 memcpy(dest+1, regs->gpr+1, 31*sizeof(unsigned long)); in dump_elf_thread()
274 dest[32] = regs->pc; in dump_elf_thread()
275 dest[33] = regs->sr; in dump_elf_thread()