ff0634424d657a76730e2cc5698ae235273c4f16
[openwrt.git] / target / linux / ubicom32 / files / arch / ubicom32 / kernel / init_task.c
1 /*
2  * arch/ubicom32/kernel/init_task.c
3  *   Ubicom32 architecture task initialization implementation.
4  *
5  * (C) Copyright 2009, Ubicom, Inc.
6  *
7  * This file is part of the Ubicom32 Linux Kernel Port.
8  *
9  * The Ubicom32 Linux Kernel Port is free software: you can redistribute
10  * it and/or modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation, either version 2 of the
12  * License, or (at your option) any later version.
13  *
14  * The Ubicom32 Linux Kernel Port is distributed in the hope that it
15  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
16  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
17  * the GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with the Ubicom32 Linux Kernel Port.  If not,
21  * see <http://www.gnu.org/licenses/>.
22  *
23  * Ubicom32 implementation derived from (with many thanks):
24  *   arch/m68knommu
25  *   arch/blackfin
26  *   arch/parisc
27  */
28 #include <linux/mm.h>
29 #include <linux/module.h>
30 #include <linux/sched.h>
31 #include <linux/init.h>
32 #include <linux/init_task.h>
33 #include <linux/fs.h>
34 #include <linux/mqueue.h>
35 #include <linux/uaccess.h>
36 #include <asm/pgtable.h>
37
38 ///static struct fs_struct init_fs = INIT_FS;
39 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
40 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
41 struct mm_struct init_mm = INIT_MM(init_mm);
42 EXPORT_SYMBOL(init_mm);
43
44 /*
45  * Initial task structure.
46  *
47  * All other task structs will be allocated on slabs in fork.c
48  */
49 struct task_struct init_task = INIT_TASK(init_task);
50
51 EXPORT_SYMBOL(init_task);
52
53 /*
54  * Initial thread structure.
55  *
56  * We need to make sure that this is 8192-byte aligned due to the
57  * way process stacks are handled. This is done by having a special
58  * "init_task" linker map entry..
59  */
60 union thread_union init_thread_union
61         __attribute__((__section__(".data.init_task"))) =
62                 { INIT_THREAD_INFO(init_task) };