diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/sparc/kernel/sclow.S |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/sparc/kernel/sclow.S')
-rw-r--r-- | arch/sparc/kernel/sclow.S | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/arch/sparc/kernel/sclow.S b/arch/sparc/kernel/sclow.S new file mode 100644 index 000000000000..3a867fc19927 --- /dev/null +++ b/arch/sparc/kernel/sclow.S | |||
@@ -0,0 +1,86 @@ | |||
1 | /* sclow.S: Low level special syscall handling. | ||
2 | * Basically these are cases where we can completely | ||
3 | * handle the system call without saving any state | ||
4 | * because we know that the process will not sleep. | ||
5 | * | ||
6 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | ||
7 | */ | ||
8 | |||
9 | #include <asm/ptrace.h> | ||
10 | #include <asm/asm_offsets.h> | ||
11 | #include <asm/errno.h> | ||
12 | #include <asm/winmacro.h> | ||
13 | #include <asm/thread_info.h> | ||
14 | #include <asm/psr.h> | ||
15 | #include <asm/page.h> | ||
16 | |||
17 | #define CC_AND_RETT \ | ||
18 | set PSR_C, %l4; \ | ||
19 | andn %l0, %l4, %l4; \ | ||
20 | wr %l4, 0x0, %psr; \ | ||
21 | nop; nop; nop; \ | ||
22 | jmp %l2; \ | ||
23 | rett %l2 + 4; | ||
24 | |||
25 | #define SC_AND_RETT \ | ||
26 | set PSR_C, %l4; \ | ||
27 | or %l0, %l4, %l4; \ | ||
28 | wr %l4, 0x0, %psr; \ | ||
29 | nop; nop; nop; \ | ||
30 | jmp %l2; \ | ||
31 | rett %l2 + 4; | ||
32 | |||
33 | #define LABEL(func) func##_low | ||
34 | |||
35 | .globl LABEL(sunosnop) | ||
36 | LABEL(sunosnop): | ||
37 | CC_AND_RETT | ||
38 | |||
39 | #if (ASIZ_task_uid == 2 && ASIZ_task_euid == 2) | ||
40 | .globl LABEL(sunosgetuid) | ||
41 | LABEL(sunosgetuid): | ||
42 | LOAD_CURRENT(l4, l5) | ||
43 | ld [%l4 + TI_TASK], %l4 | ||
44 | lduh [%l4 + AOFF_task_uid], %i0 | ||
45 | lduh [%l4 + AOFF_task_euid], %i1 | ||
46 | CC_AND_RETT | ||
47 | #endif | ||
48 | |||
49 | #if (ASIZ_task_gid == 2 && ASIZ_task_egid == 2) | ||
50 | .globl LABEL(sunosgetgid) | ||
51 | LABEL(sunosgetgid): | ||
52 | LOAD_CURRENT(l4, l5) | ||
53 | ld [%l4 + TI_TASK], %l4 | ||
54 | lduh [%l4 + AOFF_task_gid], %i0 | ||
55 | lduh [%l4 + AOFF_task_egid], %i1 | ||
56 | CC_AND_RETT | ||
57 | #endif | ||
58 | |||
59 | .globl LABEL(sunosmctl) | ||
60 | LABEL(sunosmctl): | ||
61 | mov 0, %i0 | ||
62 | CC_AND_RETT | ||
63 | |||
64 | .globl LABEL(sunosgdtsize) | ||
65 | LABEL(sunosgdtsize): | ||
66 | mov 256, %i0 | ||
67 | CC_AND_RETT | ||
68 | |||
69 | .globl LABEL(getpagesize) | ||
70 | LABEL(getpagesize): | ||
71 | set PAGE_SIZE, %i0 | ||
72 | CC_AND_RETT | ||
73 | |||
74 | /* XXX sys_nice() XXX */ | ||
75 | /* XXX sys_setpriority() XXX */ | ||
76 | /* XXX sys_getpriority() XXX */ | ||
77 | /* XXX sys_setregid() XXX */ | ||
78 | /* XXX sys_setgid() XXX */ | ||
79 | /* XXX sys_setreuid() XXX */ | ||
80 | /* XXX sys_setuid() XXX */ | ||
81 | /* XXX sys_setfsuid() XXX */ | ||
82 | /* XXX sys_setfsgid() XXX */ | ||
83 | /* XXX sys_setpgid() XXX */ | ||
84 | /* XXX sys_getpgid() XXX */ | ||
85 | /* XXX sys_setsid() XXX */ | ||
86 | /* XXX sys_getsid() XXX */ | ||