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