Jesper Nilsson | f32bb79 | 2008-01-28 16:29:21 +0100 | [diff] [blame] | 1 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * linux/arch/cris/kernel/process.c |
| 3 | * |
| 4 | * Copyright (C) 1995 Linus Torvalds |
| 5 | * Copyright (C) 2000-2002 Axis Communications AB |
| 6 | * |
| 7 | * Authors: Bjorn Wesen (bjornw@axis.com) |
| 8 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | /* |
| 12 | * This file handles the architecture-dependent parts of process handling.. |
| 13 | */ |
| 14 | |
Arun Sharma | 60063497 | 2011-07-26 16:09:06 -0700 | [diff] [blame] | 15 | #include <linux/atomic.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | #include <asm/pgtable.h> |
| 17 | #include <asm/uaccess.h> |
| 18 | #include <asm/irq.h> |
| 19 | #include <linux/module.h> |
| 20 | #include <linux/spinlock.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | #include <linux/init_task.h> |
| 22 | #include <linux/sched.h> |
| 23 | #include <linux/fs.h> |
| 24 | #include <linux/user.h> |
| 25 | #include <linux/elfcore.h> |
| 26 | #include <linux/mqueue.h> |
Eric W. Biederman | 16dcb4b | 2005-07-26 11:32:34 -0600 | [diff] [blame] | 27 | #include <linux/reboot.h> |
Frederic Weisbecker | c633f9e | 2012-08-22 17:27:34 +0200 | [diff] [blame] | 28 | #include <linux/rcupdate.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | |
| 30 | //#define DEBUG |
| 31 | |
Jesper Nilsson | 7b27552 | 2007-11-14 17:00:59 -0800 | [diff] [blame] | 32 | extern void default_idle(void); |
| 33 | |
| 34 | void (*pm_power_off)(void); |
| 35 | EXPORT_SYMBOL(pm_power_off); |
| 36 | |
Thomas Gleixner | 8dc7c5e | 2013-03-21 22:49:43 +0100 | [diff] [blame] | 37 | void arch_cpu_idle(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | { |
Thomas Gleixner | 8dc7c5e | 2013-03-21 22:49:43 +0100 | [diff] [blame] | 39 | default_idle(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | void hard_reset_now (void); |
| 43 | |
Eric W. Biederman | 16dcb4b | 2005-07-26 11:32:34 -0600 | [diff] [blame] | 44 | void machine_restart(char *cmd) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | { |
| 46 | hard_reset_now(); |
| 47 | } |
| 48 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | /* |
| 50 | * Similar to machine_power_off, but don't shut off power. Add code |
| 51 | * here to freeze the system for e.g. post-mortem debug purpose when |
| 52 | * possible. This halt has nothing to do with the idle halt. |
| 53 | */ |
| 54 | |
| 55 | void machine_halt(void) |
| 56 | { |
| 57 | } |
| 58 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | /* If or when software power-off is implemented, add code here. */ |
| 60 | |
| 61 | void machine_power_off(void) |
| 62 | { |
| 63 | } |
| 64 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 65 | /* |
| 66 | * When a process does an "exec", machine state like FPU and debug |
| 67 | * registers need to be reset. This is a hook function for that. |
| 68 | * Currently we don't have any such state to reset, so this is empty. |
| 69 | */ |
| 70 | |
| 71 | void flush_thread(void) |
| 72 | { |
| 73 | } |
| 74 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 75 | /* Fill in the fpu structure for a core dump. */ |
| 76 | int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu) |
| 77 | { |
| 78 | return 0; |
| 79 | } |