diff options
Diffstat (limited to 'arch/avr32/kernel')
-rw-r--r-- | arch/avr32/kernel/init_task.c | 31 | ||||
-rw-r--r-- | arch/avr32/kernel/sys_avr32.c | 24 |
2 files changed, 55 insertions, 0 deletions
diff --git a/arch/avr32/kernel/init_task.c b/arch/avr32/kernel/init_task.c new file mode 100644 index 00000000000..6b2343e6fe3 --- /dev/null +++ b/arch/avr32/kernel/init_task.c | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004-2006 Atmel Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | #include <linux/module.h> | ||
9 | #include <linux/fs.h> | ||
10 | #include <linux/sched.h> | ||
11 | #include <linux/init_task.h> | ||
12 | #include <linux/mqueue.h> | ||
13 | |||
14 | #include <asm/pgtable.h> | ||
15 | |||
16 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | ||
17 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | ||
18 | /* | ||
19 | * Initial thread structure. Must be aligned on an 8192-byte boundary. | ||
20 | */ | ||
21 | union thread_union init_thread_union __init_task_data = | ||
22 | { INIT_THREAD_INFO(init_task) }; | ||
23 | |||
24 | /* | ||
25 | * Initial task structure. | ||
26 | * | ||
27 | * All other task structs will be allocated on slabs in fork.c | ||
28 | */ | ||
29 | struct task_struct init_task = INIT_TASK(init_task); | ||
30 | |||
31 | EXPORT_SYMBOL(init_task); | ||
diff --git a/arch/avr32/kernel/sys_avr32.c b/arch/avr32/kernel/sys_avr32.c new file mode 100644 index 00000000000..62635a09ae3 --- /dev/null +++ b/arch/avr32/kernel/sys_avr32.c | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004-2006 Atmel Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | #include <linux/unistd.h> | ||
9 | |||
10 | int kernel_execve(const char *file, | ||
11 | const char *const *argv, | ||
12 | const char *const *envp) | ||
13 | { | ||
14 | register long scno asm("r8") = __NR_execve; | ||
15 | register long sc1 asm("r12") = (long)file; | ||
16 | register long sc2 asm("r11") = (long)argv; | ||
17 | register long sc3 asm("r10") = (long)envp; | ||
18 | |||
19 | asm volatile("scall" | ||
20 | : "=r"(sc1) | ||
21 | : "r"(scno), "0"(sc1), "r"(sc2), "r"(sc3) | ||
22 | : "cc", "memory"); | ||
23 | return sc1; | ||
24 | } | ||