| 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 | #include <linux/version.h> |
| 38 | |
| 39 | ///static struct fs_struct init_fs = INIT_FS; |
| 40 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
| 41 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
| 42 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) |
| 43 | struct mm_struct init_mm = INIT_MM(init_mm); |
| 44 | EXPORT_SYMBOL(init_mm); |
| 45 | #endif |
| 46 | |
| 47 | /* |
| 48 | * Initial task structure. |
| 49 | * |
| 50 | * All other task structs will be allocated on slabs in fork.c |
| 51 | */ |
| 52 | struct task_struct init_task = INIT_TASK(init_task); |
| 53 | |
| 54 | EXPORT_SYMBOL(init_task); |
| 55 | |
| 56 | /* |
| 57 | * Initial thread structure. |
| 58 | * |
| 59 | * We need to make sure that this is 8192-byte aligned due to the |
| 60 | * way process stacks are handled. This is done by having a special |
| 61 | * "init_task" linker map entry.. |
| 62 | */ |
| 63 | union thread_union init_thread_union |
| 64 | __attribute__((__section__(".data.init_task"))) = |
| 65 | { INIT_THREAD_INFO(init_task) }; |
| 66 | |