diff options
author | Len Brown <len.brown@intel.com> | 2005-12-06 17:31:30 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-12-06 17:31:30 -0500 |
commit | 3d5271f9883cba7b54762bc4fe027d4172f06db7 (patch) | |
tree | ab8a881a14478598a0c8bda0d26c62cdccfffd6d /include/asm-m68k | |
parent | 378b2556f4e09fa6f87ff0cb5c4395ff28257d02 (diff) | |
parent | 9115a6c787596e687df03010d97fccc5e0762506 (diff) |
Pull release into acpica branch
Diffstat (limited to 'include/asm-m68k')
-rw-r--r-- | include/asm-m68k/atomic.h | 12 | ||||
-rw-r--r-- | include/asm-m68k/kbio.h | 1 | ||||
-rw-r--r-- | include/asm-m68k/processor.h | 14 | ||||
-rw-r--r-- | include/asm-m68k/semaphore.h | 3 | ||||
-rw-r--r-- | include/asm-m68k/sun3xflop.h | 2 | ||||
-rw-r--r-- | include/asm-m68k/thread_info.h | 91 | ||||
-rw-r--r-- | include/asm-m68k/unistd.h | 1 | ||||
-rw-r--r-- | include/asm-m68k/vuid_event.h | 4 |
8 files changed, 31 insertions, 97 deletions
diff --git a/include/asm-m68k/atomic.h b/include/asm-m68k/atomic.h index 38f3043e7fe1..e3c962eeabf3 100644 --- a/include/asm-m68k/atomic.h +++ b/include/asm-m68k/atomic.h | |||
@@ -139,6 +139,18 @@ static inline void atomic_set_mask(unsigned long mask, unsigned long *v) | |||
139 | __asm__ __volatile__("orl %1,%0" : "+m" (*v) : "id" (mask)); | 139 | __asm__ __volatile__("orl %1,%0" : "+m" (*v) : "id" (mask)); |
140 | } | 140 | } |
141 | 141 | ||
142 | #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n))) | ||
143 | |||
144 | #define atomic_add_unless(v, a, u) \ | ||
145 | ({ \ | ||
146 | int c, old; \ | ||
147 | c = atomic_read(v); \ | ||
148 | while (c != (u) && (old = atomic_cmpxchg((v), c, c + (a))) != c) \ | ||
149 | c = old; \ | ||
150 | c != (u); \ | ||
151 | }) | ||
152 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
153 | |||
142 | /* Atomic operations are already serializing */ | 154 | /* Atomic operations are already serializing */ |
143 | #define smp_mb__before_atomic_dec() barrier() | 155 | #define smp_mb__before_atomic_dec() barrier() |
144 | #define smp_mb__after_atomic_dec() barrier() | 156 | #define smp_mb__after_atomic_dec() barrier() |
diff --git a/include/asm-m68k/kbio.h b/include/asm-m68k/kbio.h deleted file mode 100644 index e1fbf8fba3e8..000000000000 --- a/include/asm-m68k/kbio.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-sparc/kbio.h> | ||
diff --git a/include/asm-m68k/processor.h b/include/asm-m68k/processor.h index df1575db32af..7982285e84ed 100644 --- a/include/asm-m68k/processor.h +++ b/include/asm-m68k/processor.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) | 14 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) |
15 | 15 | ||
16 | #include <linux/config.h> | 16 | #include <linux/config.h> |
17 | #include <linux/thread_info.h> | ||
17 | #include <asm/segment.h> | 18 | #include <asm/segment.h> |
18 | #include <asm/fpu.h> | 19 | #include <asm/fpu.h> |
19 | #include <asm/ptrace.h> | 20 | #include <asm/ptrace.h> |
@@ -55,17 +56,6 @@ static inline void wrusp(unsigned long usp) | |||
55 | #endif | 56 | #endif |
56 | #define TASK_UNMAPPED_ALIGN(addr, off) PAGE_ALIGN(addr) | 57 | #define TASK_UNMAPPED_ALIGN(addr, off) PAGE_ALIGN(addr) |
57 | 58 | ||
58 | struct task_work { | ||
59 | unsigned char sigpending; | ||
60 | unsigned char notify_resume; /* request for notification on | ||
61 | userspace execution resumption */ | ||
62 | char need_resched; | ||
63 | unsigned char delayed_trace; /* single step a syscall */ | ||
64 | unsigned char syscall_trace; /* count of syscall interceptors */ | ||
65 | unsigned char memdie; /* task was selected to be killed */ | ||
66 | unsigned char pad[2]; | ||
67 | }; | ||
68 | |||
69 | struct thread_struct { | 59 | struct thread_struct { |
70 | unsigned long ksp; /* kernel stack pointer */ | 60 | unsigned long ksp; /* kernel stack pointer */ |
71 | unsigned long usp; /* user stack pointer */ | 61 | unsigned long usp; /* user stack pointer */ |
@@ -78,7 +68,7 @@ struct thread_struct { | |||
78 | unsigned long fp[8*3]; | 68 | unsigned long fp[8*3]; |
79 | unsigned long fpcntl[3]; /* fp control regs */ | 69 | unsigned long fpcntl[3]; /* fp control regs */ |
80 | unsigned char fpstate[FPSTATESIZE]; /* floating point state */ | 70 | unsigned char fpstate[FPSTATESIZE]; /* floating point state */ |
81 | struct task_work work; | 71 | struct thread_info info; |
82 | }; | 72 | }; |
83 | 73 | ||
84 | #define INIT_THREAD { \ | 74 | #define INIT_THREAD { \ |
diff --git a/include/asm-m68k/semaphore.h b/include/asm-m68k/semaphore.h index ab94cf3ed447..fd4c7cc3d3be 100644 --- a/include/asm-m68k/semaphore.h +++ b/include/asm-m68k/semaphore.h | |||
@@ -36,9 +36,6 @@ struct semaphore { | |||
36 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | 36 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
37 | } | 37 | } |
38 | 38 | ||
39 | #define __MUTEX_INITIALIZER(name) \ | ||
40 | __SEMAPHORE_INITIALIZER(name,1) | ||
41 | |||
42 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 39 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
43 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 40 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
44 | 41 | ||
diff --git a/include/asm-m68k/sun3xflop.h b/include/asm-m68k/sun3xflop.h index 1ed3b787ee05..fda1eccf10aa 100644 --- a/include/asm-m68k/sun3xflop.h +++ b/include/asm-m68k/sun3xflop.h | |||
@@ -27,10 +27,8 @@ | |||
27 | 27 | ||
28 | /* We don't need no stinkin' I/O port allocation crap. */ | 28 | /* We don't need no stinkin' I/O port allocation crap. */ |
29 | #undef release_region | 29 | #undef release_region |
30 | #undef check_region | ||
31 | #undef request_region | 30 | #undef request_region |
32 | #define release_region(X, Y) do { } while(0) | 31 | #define release_region(X, Y) do { } while(0) |
33 | #define check_region(X, Y) (0) | ||
34 | #define request_region(X, Y, Z) (1) | 32 | #define request_region(X, Y, Z) (1) |
35 | 33 | ||
36 | struct sun3xflop_private { | 34 | struct sun3xflop_private { |
diff --git a/include/asm-m68k/thread_info.h b/include/asm-m68k/thread_info.h index 2aed24f6fd2e..9532ca3c45cb 100644 --- a/include/asm-m68k/thread_info.h +++ b/include/asm-m68k/thread_info.h | |||
@@ -2,17 +2,15 @@ | |||
2 | #define _ASM_M68K_THREAD_INFO_H | 2 | #define _ASM_M68K_THREAD_INFO_H |
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <asm/types.h> |
5 | #include <asm/processor.h> | ||
6 | #include <asm/page.h> | 5 | #include <asm/page.h> |
7 | 6 | ||
8 | struct thread_info { | 7 | struct thread_info { |
9 | struct task_struct *task; /* main task structure */ | 8 | struct task_struct *task; /* main task structure */ |
9 | unsigned long flags; | ||
10 | struct exec_domain *exec_domain; /* execution domain */ | 10 | struct exec_domain *exec_domain; /* execution domain */ |
11 | int preempt_count; /* 0 => preemptable, <0 => BUG */ | 11 | int preempt_count; /* 0 => preemptable, <0 => BUG */ |
12 | __u32 cpu; /* should always be 0 on m68k */ | 12 | __u32 cpu; /* should always be 0 on m68k */ |
13 | struct restart_block restart_block; | 13 | struct restart_block restart_block; |
14 | |||
15 | __u8 supervisor_stack[0]; | ||
16 | }; | 14 | }; |
17 | 15 | ||
18 | #define PREEMPT_ACTIVE 0x4000000 | 16 | #define PREEMPT_ACTIVE 0x4000000 |
@@ -35,84 +33,29 @@ struct thread_info { | |||
35 | #define free_thread_info(ti) free_pages((unsigned long)(ti),1) | 33 | #define free_thread_info(ti) free_pages((unsigned long)(ti),1) |
36 | #endif /* PAGE_SHIFT == 13 */ | 34 | #endif /* PAGE_SHIFT == 13 */ |
37 | 35 | ||
38 | //#define init_thread_info (init_task.thread.info) | 36 | #define init_thread_info (init_task.thread.info) |
39 | #define init_stack (init_thread_union.stack) | 37 | #define init_stack (init_thread_union.stack) |
40 | 38 | ||
41 | #define current_thread_info() (current->thread_info) | 39 | #define task_thread_info(tsk) (&(tsk)->thread.info) |
42 | 40 | #define current_thread_info() task_thread_info(current) | |
43 | 41 | ||
44 | #define __HAVE_THREAD_FUNCTIONS | 42 | #define __HAVE_THREAD_FUNCTIONS |
45 | 43 | ||
46 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 44 | #define setup_thread_stack(p, org) ({ \ |
47 | #define TIF_DELAYED_TRACE 1 /* single step a syscall */ | 45 | *(struct task_struct **)(p)->thread_info = (p); \ |
48 | #define TIF_NOTIFY_RESUME 2 /* resumption notification requested */ | 46 | task_thread_info(p)->task = (p); \ |
49 | #define TIF_SIGPENDING 3 /* signal pending */ | ||
50 | #define TIF_NEED_RESCHED 4 /* rescheduling necessary */ | ||
51 | #define TIF_MEMDIE 5 | ||
52 | |||
53 | extern int thread_flag_fixme(void); | ||
54 | |||
55 | /* | ||
56 | * flag set/clear/test wrappers | ||
57 | * - pass TIF_xxxx constants to these functions | ||
58 | */ | ||
59 | |||
60 | #define __set_tsk_thread_flag(tsk, flag, val) ({ \ | ||
61 | switch (flag) { \ | ||
62 | case TIF_SIGPENDING: \ | ||
63 | tsk->thread.work.sigpending = val; \ | ||
64 | break; \ | ||
65 | case TIF_NEED_RESCHED: \ | ||
66 | tsk->thread.work.need_resched = val; \ | ||
67 | break; \ | ||
68 | case TIF_SYSCALL_TRACE: \ | ||
69 | tsk->thread.work.syscall_trace = val; \ | ||
70 | break; \ | ||
71 | case TIF_MEMDIE: \ | ||
72 | tsk->thread.work.memdie = val; \ | ||
73 | break; \ | ||
74 | default: \ | ||
75 | thread_flag_fixme(); \ | ||
76 | } \ | ||
77 | }) | 47 | }) |
78 | 48 | ||
79 | #define __get_tsk_thread_flag(tsk, flag) ({ \ | 49 | #define end_of_stack(p) ((unsigned long *)(p)->thread_info + 1) |
80 | int ___res; \ | ||
81 | switch (flag) { \ | ||
82 | case TIF_SIGPENDING: \ | ||
83 | ___res = tsk->thread.work.sigpending; \ | ||
84 | break; \ | ||
85 | case TIF_NEED_RESCHED: \ | ||
86 | ___res = tsk->thread.work.need_resched; \ | ||
87 | break; \ | ||
88 | case TIF_SYSCALL_TRACE: \ | ||
89 | ___res = tsk->thread.work.syscall_trace;\ | ||
90 | break; \ | ||
91 | case TIF_MEMDIE: \ | ||
92 | ___res = tsk->thread.work.memdie;\ | ||
93 | break; \ | ||
94 | default: \ | ||
95 | ___res = thread_flag_fixme(); \ | ||
96 | } \ | ||
97 | ___res; \ | ||
98 | }) | ||
99 | |||
100 | #define __get_set_tsk_thread_flag(tsk, flag, val) ({ \ | ||
101 | int __res = __get_tsk_thread_flag(tsk, flag); \ | ||
102 | __set_tsk_thread_flag(tsk, flag, val); \ | ||
103 | __res; \ | ||
104 | }) | ||
105 | 50 | ||
106 | #define set_tsk_thread_flag(tsk, flag) __set_tsk_thread_flag(tsk, flag, ~0) | 51 | /* entry.S relies on these definitions! |
107 | #define clear_tsk_thread_flag(tsk, flag) __set_tsk_thread_flag(tsk, flag, 0) | 52 | * bits 0-7 are tested at every exception exit |
108 | #define test_and_set_tsk_thread_flag(tsk, flag) __get_set_tsk_thread_flag(tsk, flag, ~0) | 53 | * bits 8-15 are also tested at syscall exit |
109 | #define test_tsk_thread_flag(tsk, flag) __get_tsk_thread_flag(tsk, flag) | 54 | */ |
110 | 55 | #define TIF_SIGPENDING 6 /* signal pending */ | |
111 | #define set_thread_flag(flag) set_tsk_thread_flag(current, flag) | 56 | #define TIF_NEED_RESCHED 7 /* rescheduling necessary */ |
112 | #define clear_thread_flag(flag) clear_tsk_thread_flag(current, flag) | 57 | #define TIF_DELAYED_TRACE 14 /* single step a syscall */ |
113 | #define test_thread_flag(flag) test_tsk_thread_flag(current, flag) | 58 | #define TIF_SYSCALL_TRACE 15 /* syscall trace active */ |
114 | 59 | #define TIF_MEMDIE 16 | |
115 | #define set_need_resched() set_thread_flag(TIF_NEED_RESCHED) | ||
116 | #define clear_need_resched() clear_thread_flag(TIF_NEED_RESCHED) | ||
117 | 60 | ||
118 | #endif /* _ASM_M68K_THREAD_INFO_H */ | 61 | #endif /* _ASM_M68K_THREAD_INFO_H */ |
diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h index cbabde4f8a45..c2554bcd1747 100644 --- a/include/asm-m68k/unistd.h +++ b/include/asm-m68k/unistd.h | |||
@@ -444,7 +444,6 @@ asmlinkage long sys_mmap2( | |||
444 | unsigned long fd, unsigned long pgoff); | 444 | unsigned long fd, unsigned long pgoff); |
445 | asmlinkage int sys_execve(char *name, char **argv, char **envp); | 445 | asmlinkage int sys_execve(char *name, char **argv, char **envp); |
446 | asmlinkage int sys_pipe(unsigned long *fildes); | 446 | asmlinkage int sys_pipe(unsigned long *fildes); |
447 | asmlinkage int sys_ptrace(long request, long pid, long addr, long data); | ||
448 | struct pt_regs; | 447 | struct pt_regs; |
449 | struct sigaction; | 448 | struct sigaction; |
450 | asmlinkage long sys_rt_sigaction(int sig, | 449 | asmlinkage long sys_rt_sigaction(int sig, |
diff --git a/include/asm-m68k/vuid_event.h b/include/asm-m68k/vuid_event.h deleted file mode 100644 index 52ecb521a395..000000000000 --- a/include/asm-m68k/vuid_event.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #ifndef _M68K_VUID_EVENT_H | ||
2 | #define _M68K_VUID_EVENT_H | ||
3 | #include <asm-sparc/vuid_event.h> | ||
4 | #endif | ||