aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze')
-rw-r--r--arch/microblaze/boot/linked_dtb.S3
-rw-r--r--arch/microblaze/include/asm/auxvec.h1
-rw-r--r--arch/microblaze/include/asm/bitsperlong.h1
-rw-r--r--arch/microblaze/include/asm/byteorder.h10
-rw-r--r--arch/microblaze/include/asm/clinkage.h1
-rw-r--r--arch/microblaze/include/asm/errno.h1
-rw-r--r--arch/microblaze/include/asm/fcntl.h1
-rw-r--r--arch/microblaze/include/asm/ioctl.h1
-rw-r--r--arch/microblaze/include/asm/ioctls.h1
-rw-r--r--arch/microblaze/include/asm/ipcbuf.h1
-rw-r--r--arch/microblaze/include/asm/memblock.h14
-rw-r--r--arch/microblaze/include/asm/mman.h1
-rw-r--r--arch/microblaze/include/asm/msgbuf.h1
-rw-r--r--arch/microblaze/include/asm/namei.h22
-rw-r--r--arch/microblaze/include/asm/param.h1
-rw-r--r--arch/microblaze/include/asm/poll.h1
-rw-r--r--arch/microblaze/include/asm/posix_types.h9
-rw-r--r--arch/microblaze/include/asm/resource.h1
-rw-r--r--arch/microblaze/include/asm/sembuf.h1
-rw-r--r--arch/microblaze/include/asm/shmbuf.h1
-rw-r--r--arch/microblaze/include/asm/sigcontext.h20
-rw-r--r--arch/microblaze/include/asm/siginfo.h1
-rw-r--r--arch/microblaze/include/asm/signal.h1
-rw-r--r--arch/microblaze/include/asm/socket.h1
-rw-r--r--arch/microblaze/include/asm/sockios.h1
-rw-r--r--arch/microblaze/include/asm/stat.h1
-rw-r--r--arch/microblaze/include/asm/statfs.h1
-rw-r--r--arch/microblaze/include/asm/swab.h1
-rw-r--r--arch/microblaze/include/asm/syscalls.h16
-rw-r--r--arch/microblaze/include/asm/system.h106
-rw-r--r--arch/microblaze/include/asm/termbits.h1
-rw-r--r--arch/microblaze/include/asm/termios.h1
-rw-r--r--arch/microblaze/include/asm/types.h1
-rw-r--r--arch/microblaze/kernel/init_task.c26
34 files changed, 251 insertions, 0 deletions
diff --git a/arch/microblaze/boot/linked_dtb.S b/arch/microblaze/boot/linked_dtb.S
new file mode 100644
index 00000000000..cb2b537aebe
--- /dev/null
+++ b/arch/microblaze/boot/linked_dtb.S
@@ -0,0 +1,3 @@
1.section __fdt_blob,"a"
2.incbin "arch/microblaze/boot/system.dtb"
3
diff --git a/arch/microblaze/include/asm/auxvec.h b/arch/microblaze/include/asm/auxvec.h
new file mode 100644
index 00000000000..8b137891791
--- /dev/null
+++ b/arch/microblaze/include/asm/auxvec.h
@@ -0,0 +1 @@
diff --git a/arch/microblaze/include/asm/bitsperlong.h b/arch/microblaze/include/asm/bitsperlong.h
new file mode 100644
index 00000000000..6dc0bb0c13b
--- /dev/null
+++ b/arch/microblaze/include/asm/bitsperlong.h
@@ -0,0 +1 @@
#include <asm-generic/bitsperlong.h>
diff --git a/arch/microblaze/include/asm/byteorder.h b/arch/microblaze/include/asm/byteorder.h
new file mode 100644
index 00000000000..31902762a42
--- /dev/null
+++ b/arch/microblaze/include/asm/byteorder.h
@@ -0,0 +1,10 @@
1#ifndef _ASM_MICROBLAZE_BYTEORDER_H
2#define _ASM_MICROBLAZE_BYTEORDER_H
3
4#ifdef __MICROBLAZEEL__
5#include <linux/byteorder/little_endian.h>
6#else
7#include <linux/byteorder/big_endian.h>
8#endif
9
10#endif /* _ASM_MICROBLAZE_BYTEORDER_H */
diff --git a/arch/microblaze/include/asm/clinkage.h b/arch/microblaze/include/asm/clinkage.h
new file mode 100644
index 00000000000..9e218435a55
--- /dev/null
+++ b/arch/microblaze/include/asm/clinkage.h
@@ -0,0 +1 @@
#include <linux/linkage.h>
diff --git a/arch/microblaze/include/asm/errno.h b/arch/microblaze/include/asm/errno.h
new file mode 100644
index 00000000000..4c82b503d92
--- /dev/null
+++ b/arch/microblaze/include/asm/errno.h
@@ -0,0 +1 @@
#include <asm-generic/errno.h>
diff --git a/arch/microblaze/include/asm/fcntl.h b/arch/microblaze/include/asm/fcntl.h
new file mode 100644
index 00000000000..46ab12db573
--- /dev/null
+++ b/arch/microblaze/include/asm/fcntl.h
@@ -0,0 +1 @@
#include <asm-generic/fcntl.h>
diff --git a/arch/microblaze/include/asm/ioctl.h b/arch/microblaze/include/asm/ioctl.h
new file mode 100644
index 00000000000..b279fe06dfe
--- /dev/null
+++ b/arch/microblaze/include/asm/ioctl.h
@@ -0,0 +1 @@
#include <asm-generic/ioctl.h>
diff --git a/arch/microblaze/include/asm/ioctls.h b/arch/microblaze/include/asm/ioctls.h
new file mode 100644
index 00000000000..ec34c760665
--- /dev/null
+++ b/arch/microblaze/include/asm/ioctls.h
@@ -0,0 +1 @@
#include <asm-generic/ioctls.h>
diff --git a/arch/microblaze/include/asm/ipcbuf.h b/arch/microblaze/include/asm/ipcbuf.h
new file mode 100644
index 00000000000..84c7e51cb6d
--- /dev/null
+++ b/arch/microblaze/include/asm/ipcbuf.h
@@ -0,0 +1 @@
#include <asm-generic/ipcbuf.h>
diff --git a/arch/microblaze/include/asm/memblock.h b/arch/microblaze/include/asm/memblock.h
new file mode 100644
index 00000000000..20a8e257c77
--- /dev/null
+++ b/arch/microblaze/include/asm/memblock.h
@@ -0,0 +1,14 @@
1/*
2 * Copyright (C) 2008 Michal Simek <monstr@monstr.eu>
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 */
8
9#ifndef _ASM_MICROBLAZE_MEMBLOCK_H
10#define _ASM_MICROBLAZE_MEMBLOCK_H
11
12#endif /* _ASM_MICROBLAZE_MEMBLOCK_H */
13
14
diff --git a/arch/microblaze/include/asm/mman.h b/arch/microblaze/include/asm/mman.h
new file mode 100644
index 00000000000..8eebf89f5ab
--- /dev/null
+++ b/arch/microblaze/include/asm/mman.h
@@ -0,0 +1 @@
#include <asm-generic/mman.h>
diff --git a/arch/microblaze/include/asm/msgbuf.h b/arch/microblaze/include/asm/msgbuf.h
new file mode 100644
index 00000000000..809134c644a
--- /dev/null
+++ b/arch/microblaze/include/asm/msgbuf.h
@@ -0,0 +1 @@
#include <asm-generic/msgbuf.h>
diff --git a/arch/microblaze/include/asm/namei.h b/arch/microblaze/include/asm/namei.h
new file mode 100644
index 00000000000..61d60b8a07d
--- /dev/null
+++ b/arch/microblaze/include/asm/namei.h
@@ -0,0 +1,22 @@
1/*
2 * Copyright (C) 2006 Atmark Techno, Inc.
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 */
8
9#ifndef _ASM_MICROBLAZE_NAMEI_H
10#define _ASM_MICROBLAZE_NAMEI_H
11
12#ifdef __KERNEL__
13
14/* This dummy routine maybe changed to something useful
15 * for /usr/gnemul/ emulation stuff.
16 * Look at asm-sparc/namei.h for details.
17 */
18#define __emul_prefix() NULL
19
20#endif /* __KERNEL__ */
21
22#endif /* _ASM_MICROBLAZE_NAMEI_H */
diff --git a/arch/microblaze/include/asm/param.h b/arch/microblaze/include/asm/param.h
new file mode 100644
index 00000000000..965d4542797
--- /dev/null
+++ b/arch/microblaze/include/asm/param.h
@@ -0,0 +1 @@
#include <asm-generic/param.h>
diff --git a/arch/microblaze/include/asm/poll.h b/arch/microblaze/include/asm/poll.h
new file mode 100644
index 00000000000..c98509d3149
--- /dev/null
+++ b/arch/microblaze/include/asm/poll.h
@@ -0,0 +1 @@
#include <asm-generic/poll.h>
diff --git a/arch/microblaze/include/asm/posix_types.h b/arch/microblaze/include/asm/posix_types.h
new file mode 100644
index 00000000000..0e15039673e
--- /dev/null
+++ b/arch/microblaze/include/asm/posix_types.h
@@ -0,0 +1,9 @@
1#ifndef _ASM_MICROBLAZE_POSIX_TYPES_H
2#define _ASM_MICROBLAZE_POSIX_TYPES_H
3
4typedef unsigned short __kernel_mode_t;
5#define __kernel_mode_t __kernel_mode_t
6
7#include <asm-generic/posix_types.h>
8
9#endif /* _ASM_MICROBLAZE_POSIX_TYPES_H */
diff --git a/arch/microblaze/include/asm/resource.h b/arch/microblaze/include/asm/resource.h
new file mode 100644
index 00000000000..04bc4db8921
--- /dev/null
+++ b/arch/microblaze/include/asm/resource.h
@@ -0,0 +1 @@
#include <asm-generic/resource.h>
diff --git a/arch/microblaze/include/asm/sembuf.h b/arch/microblaze/include/asm/sembuf.h
new file mode 100644
index 00000000000..7673b83cfef
--- /dev/null
+++ b/arch/microblaze/include/asm/sembuf.h
@@ -0,0 +1 @@
#include <asm-generic/sembuf.h>
diff --git a/arch/microblaze/include/asm/shmbuf.h b/arch/microblaze/include/asm/shmbuf.h
new file mode 100644
index 00000000000..83c05fc2de3
--- /dev/null
+++ b/arch/microblaze/include/asm/shmbuf.h
@@ -0,0 +1 @@
#include <asm-generic/shmbuf.h>
diff --git a/arch/microblaze/include/asm/sigcontext.h b/arch/microblaze/include/asm/sigcontext.h
new file mode 100644
index 00000000000..55873c80c91
--- /dev/null
+++ b/arch/microblaze/include/asm/sigcontext.h
@@ -0,0 +1,20 @@
1/*
2 * Copyright (C) 2006 Atmark Techno, Inc.
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 */
8
9#ifndef _ASM_MICROBLAZE_SIGCONTEXT_H
10#define _ASM_MICROBLAZE_SIGCONTEXT_H
11
12/* FIXME should be linux/ptrace.h */
13#include <asm/ptrace.h>
14
15struct sigcontext {
16 struct pt_regs regs;
17 unsigned long oldmask;
18};
19
20#endif /* _ASM_MICROBLAZE_SIGCONTEXT_H */
diff --git a/arch/microblaze/include/asm/siginfo.h b/arch/microblaze/include/asm/siginfo.h
new file mode 100644
index 00000000000..0815d29d82e
--- /dev/null
+++ b/arch/microblaze/include/asm/siginfo.h
@@ -0,0 +1 @@
#include <asm-generic/siginfo.h>
diff --git a/arch/microblaze/include/asm/signal.h b/arch/microblaze/include/asm/signal.h
new file mode 100644
index 00000000000..7b1573ce19d
--- /dev/null
+++ b/arch/microblaze/include/asm/signal.h
@@ -0,0 +1 @@
#include <asm-generic/signal.h>
diff --git a/arch/microblaze/include/asm/socket.h b/arch/microblaze/include/asm/socket.h
new file mode 100644
index 00000000000..6b71384b9d8
--- /dev/null
+++ b/arch/microblaze/include/asm/socket.h
@@ -0,0 +1 @@
#include <asm-generic/socket.h>
diff --git a/arch/microblaze/include/asm/sockios.h b/arch/microblaze/include/asm/sockios.h
new file mode 100644
index 00000000000..def6d4746ee
--- /dev/null
+++ b/arch/microblaze/include/asm/sockios.h
@@ -0,0 +1 @@
#include <asm-generic/sockios.h>
diff --git a/arch/microblaze/include/asm/stat.h b/arch/microblaze/include/asm/stat.h
new file mode 100644
index 00000000000..3dc90fa92c7
--- /dev/null
+++ b/arch/microblaze/include/asm/stat.h
@@ -0,0 +1 @@
#include <asm-generic/stat.h>
diff --git a/arch/microblaze/include/asm/statfs.h b/arch/microblaze/include/asm/statfs.h
new file mode 100644
index 00000000000..0b91fe198c2
--- /dev/null
+++ b/arch/microblaze/include/asm/statfs.h
@@ -0,0 +1 @@
#include <asm-generic/statfs.h>
diff --git a/arch/microblaze/include/asm/swab.h b/arch/microblaze/include/asm/swab.h
new file mode 100644
index 00000000000..7847e563ab6
--- /dev/null
+++ b/arch/microblaze/include/asm/swab.h
@@ -0,0 +1 @@
#include <asm-generic/swab.h>
diff --git a/arch/microblaze/include/asm/syscalls.h b/arch/microblaze/include/asm/syscalls.h
new file mode 100644
index 00000000000..27f2f4c0f39
--- /dev/null
+++ b/arch/microblaze/include/asm/syscalls.h
@@ -0,0 +1,16 @@
1#ifndef __ASM_MICROBLAZE_SYSCALLS_H
2
3asmlinkage long microblaze_vfork(struct pt_regs *regs);
4asmlinkage long microblaze_clone(int flags, unsigned long stack,
5 struct pt_regs *regs);
6asmlinkage long microblaze_execve(const char __user *filenamei,
7 const char __user *const __user *argv,
8 const char __user *const __user *envp,
9 struct pt_regs *regs);
10
11asmlinkage long sys_clone(int flags, unsigned long stack, struct pt_regs *regs);
12#define sys_clone sys_clone
13
14#include <asm-generic/syscalls.h>
15
16#endif /* __ASM_MICROBLAZE_SYSCALLS_H */
diff --git a/arch/microblaze/include/asm/system.h b/arch/microblaze/include/asm/system.h
new file mode 100644
index 00000000000..e6a2284571d
--- /dev/null
+++ b/arch/microblaze/include/asm/system.h
@@ -0,0 +1,106 @@
1/*
2 * Copyright (C) 2006 Atmark Techno, Inc.
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 */
8
9#ifndef _ASM_MICROBLAZE_SYSTEM_H
10#define _ASM_MICROBLAZE_SYSTEM_H
11
12#include <asm/registers.h>
13#include <asm/setup.h>
14#include <asm/irqflags.h>
15#include <asm/cache.h>
16
17#include <asm-generic/cmpxchg.h>
18#include <asm-generic/cmpxchg-local.h>
19
20#define __ARCH_WANT_INTERRUPTS_ON_CTXSW
21
22struct task_struct;
23struct thread_info;
24
25extern struct task_struct *_switch_to(struct thread_info *prev,
26 struct thread_info *next);
27
28#define switch_to(prev, next, last) \
29 do { \
30 (last) = _switch_to(task_thread_info(prev), \
31 task_thread_info(next)); \
32 } while (0)
33
34#define smp_read_barrier_depends() do {} while (0)
35#define read_barrier_depends() do {} while (0)
36
37#define nop() asm volatile ("nop")
38#define mb() barrier()
39#define rmb() mb()
40#define wmb() mb()
41#define set_mb(var, value) do { var = value; mb(); } while (0)
42#define set_wmb(var, value) do { var = value; wmb(); } while (0)
43
44#define smp_mb() mb()
45#define smp_rmb() rmb()
46#define smp_wmb() wmb()
47
48void __bad_xchg(volatile void *ptr, int size);
49
50static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
51 int size)
52{
53 unsigned long ret;
54 unsigned long flags;
55
56 switch (size) {
57 case 1:
58 local_irq_save(flags);
59 ret = *(volatile unsigned char *)ptr;
60 *(volatile unsigned char *)ptr = x;
61 local_irq_restore(flags);
62 break;
63
64 case 4:
65 local_irq_save(flags);
66 ret = *(volatile unsigned long *)ptr;
67 *(volatile unsigned long *)ptr = x;
68 local_irq_restore(flags);
69 break;
70 default:
71 __bad_xchg(ptr, size), ret = 0;
72 break;
73 }
74
75 return ret;
76}
77
78void disable_hlt(void);
79void enable_hlt(void);
80void default_idle(void);
81
82#define xchg(ptr, x) \
83 ((__typeof__(*(ptr))) __xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))
84
85void free_init_pages(char *what, unsigned long begin, unsigned long end);
86void free_initmem(void);
87extern char *klimit;
88extern void ret_from_fork(void);
89
90extern void *alloc_maybe_bootmem(size_t size, gfp_t mask);
91extern void *zalloc_maybe_bootmem(size_t size, gfp_t mask);
92
93#ifdef CONFIG_DEBUG_FS
94extern struct dentry *of_debugfs_root;
95#endif
96
97#define arch_align_stack(x) (x)
98
99/*
100 * MicroBlaze doesn't handle unaligned accesses in hardware.
101 *
102 * Based on this we force the IP header alignment in network drivers.
103 */
104#define NET_IP_ALIGN 2
105
106#endif /* _ASM_MICROBLAZE_SYSTEM_H */
diff --git a/arch/microblaze/include/asm/termbits.h b/arch/microblaze/include/asm/termbits.h
new file mode 100644
index 00000000000..3935b106de7
--- /dev/null
+++ b/arch/microblaze/include/asm/termbits.h
@@ -0,0 +1 @@
#include <asm-generic/termbits.h>
diff --git a/arch/microblaze/include/asm/termios.h b/arch/microblaze/include/asm/termios.h
new file mode 100644
index 00000000000..280d78a9d96
--- /dev/null
+++ b/arch/microblaze/include/asm/termios.h
@@ -0,0 +1 @@
#include <asm-generic/termios.h>
diff --git a/arch/microblaze/include/asm/types.h b/arch/microblaze/include/asm/types.h
new file mode 100644
index 00000000000..b9e79bc580d
--- /dev/null
+++ b/arch/microblaze/include/asm/types.h
@@ -0,0 +1 @@
#include <asm-generic/types.h>
diff --git a/arch/microblaze/kernel/init_task.c b/arch/microblaze/kernel/init_task.c
new file mode 100644
index 00000000000..b5d711f94ff
--- /dev/null
+++ b/arch/microblaze/kernel/init_task.c
@@ -0,0 +1,26 @@
1/*
2 * Copyright (C) 2009 Michal Simek <monstr@monstr.eu>
3 * Copyright (C) 2009 PetaLogix
4 * Copyright (C) 2006 Atmark Techno, Inc.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/module.h>
12#include <linux/sched.h>
13#include <linux/init_task.h>
14#include <linux/fs.h>
15#include <linux/mqueue.h>
16
17#include <asm/pgtable.h>
18
19static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
20static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
21
22union thread_union init_thread_union __init_task_data =
23 { INIT_THREAD_INFO(init_task) };
24
25struct task_struct init_task = INIT_TASK(init_task);
26EXPORT_SYMBOL(init_task);