aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-05-15 03:34:44 -0400
committerDavid S. Miller <davem@davemloft.net>2008-05-15 03:34:44 -0400
commit63fe46da9c380b3f2bbdf3765044649517cc717c (patch)
tree9478c1aca1d692b408955aea20c9cd9a37e589c0 /include/asm-sparc64
parent99dd1a2b8347ac2ae802300b7862f6f7bcf17139 (diff)
parent066b2118976e6e7cc50eed39e2747c75343a23c4 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/wireless/iwlwifi/iwl-4965-rs.c drivers/net/wireless/rt2x00/rt61pci.c
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r--include/asm-sparc64/mman.h5
-rw-r--r--include/asm-sparc64/psrcompat.h2
-rw-r--r--include/asm-sparc64/pstate.h1
-rw-r--r--include/asm-sparc64/ptrace.h11
-rw-r--r--include/asm-sparc64/signal.h8
-rw-r--r--include/asm-sparc64/thread_info.h28
-rw-r--r--include/asm-sparc64/ttable.h7
7 files changed, 39 insertions, 23 deletions
diff --git a/include/asm-sparc64/mman.h b/include/asm-sparc64/mman.h
index e584563b56eb..625be4d61baf 100644
--- a/include/asm-sparc64/mman.h
+++ b/include/asm-sparc64/mman.h
@@ -24,9 +24,8 @@
24 24
25#ifdef __KERNEL__ 25#ifdef __KERNEL__
26#ifndef __ASSEMBLY__ 26#ifndef __ASSEMBLY__
27#define arch_mmap_check sparc64_mmap_check 27#define arch_mmap_check(addr,len,flags) sparc64_mmap_check(addr,len)
28int sparc64_mmap_check(unsigned long addr, unsigned long len, 28int sparc64_mmap_check(unsigned long addr, unsigned long len);
29 unsigned long flags);
30#endif 29#endif
31#endif 30#endif
32 31
diff --git a/include/asm-sparc64/psrcompat.h b/include/asm-sparc64/psrcompat.h
index 5590ce6bd076..3614ca04753f 100644
--- a/include/asm-sparc64/psrcompat.h
+++ b/include/asm-sparc64/psrcompat.h
@@ -12,6 +12,7 @@
12#define PSR_PIL 0x00000f00 /* processor interrupt level */ 12#define PSR_PIL 0x00000f00 /* processor interrupt level */
13#define PSR_EF 0x00001000 /* enable floating point */ 13#define PSR_EF 0x00001000 /* enable floating point */
14#define PSR_EC 0x00002000 /* enable co-processor */ 14#define PSR_EC 0x00002000 /* enable co-processor */
15#define PSR_SYSCALL 0x00004000 /* inside of a syscall */
15#define PSR_LE 0x00008000 /* SuperSparcII little-endian */ 16#define PSR_LE 0x00008000 /* SuperSparcII little-endian */
16#define PSR_ICC 0x00f00000 /* integer condition codes */ 17#define PSR_ICC 0x00f00000 /* integer condition codes */
17#define PSR_C 0x00100000 /* carry bit */ 18#define PSR_C 0x00100000 /* carry bit */
@@ -30,6 +31,7 @@ static inline unsigned int tstate_to_psr(unsigned long tstate)
30 PSR_S | 31 PSR_S |
31 ((tstate & TSTATE_ICC) >> 12) | 32 ((tstate & TSTATE_ICC) >> 12) |
32 ((tstate & TSTATE_XCC) >> 20) | 33 ((tstate & TSTATE_XCC) >> 20) |
34 ((tstate & TSTATE_SYSCALL) ? PSR_SYSCALL : 0) |
33 PSR_V8PLUS); 35 PSR_V8PLUS);
34} 36}
35 37
diff --git a/include/asm-sparc64/pstate.h b/include/asm-sparc64/pstate.h
index f3c45484c636..949aebaf991d 100644
--- a/include/asm-sparc64/pstate.h
+++ b/include/asm-sparc64/pstate.h
@@ -62,6 +62,7 @@
62#define TSTATE_PRIV _AC(0x0000000000000400,UL) /* Privilege. */ 62#define TSTATE_PRIV _AC(0x0000000000000400,UL) /* Privilege. */
63#define TSTATE_IE _AC(0x0000000000000200,UL) /* Interrupt Enable. */ 63#define TSTATE_IE _AC(0x0000000000000200,UL) /* Interrupt Enable. */
64#define TSTATE_AG _AC(0x0000000000000100,UL) /* Alternate Globals.*/ 64#define TSTATE_AG _AC(0x0000000000000100,UL) /* Alternate Globals.*/
65#define TSTATE_SYSCALL _AC(0x0000000000000020,UL) /* in syscall trap */
65#define TSTATE_CWP _AC(0x000000000000001f,UL) /* Curr Win-Pointer. */ 66#define TSTATE_CWP _AC(0x000000000000001f,UL) /* Curr Win-Pointer. */
66 67
67/* Floating-Point Registers State Register. 68/* Floating-Point Registers State Register.
diff --git a/include/asm-sparc64/ptrace.h b/include/asm-sparc64/ptrace.h
index 714b81956f32..90972a5ada59 100644
--- a/include/asm-sparc64/ptrace.h
+++ b/include/asm-sparc64/ptrace.h
@@ -42,16 +42,14 @@ static inline int pt_regs_trap_type(struct pt_regs *regs)
42 return regs->magic & 0x1ff; 42 return regs->magic & 0x1ff;
43} 43}
44 44
45static inline int pt_regs_clear_trap_type(struct pt_regs *regs) 45static inline bool pt_regs_is_syscall(struct pt_regs *regs)
46{ 46{
47 return regs->magic &= ~0x1ff; 47 return (regs->tstate & TSTATE_SYSCALL);
48} 48}
49 49
50static inline bool pt_regs_is_syscall(struct pt_regs *regs) 50static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
51{ 51{
52 int tt = pt_regs_trap_type(regs); 52 return (regs->tstate &= ~TSTATE_SYSCALL);
53
54 return (tt == 0x110 || tt == 0x111 || tt == 0x16d);
55} 53}
56 54
57struct pt_regs32 { 55struct pt_regs32 {
@@ -298,6 +296,7 @@ extern void __show_regs(struct pt_regs *);
298#define SF_XXARG 0x5c 296#define SF_XXARG 0x5c
299 297
300/* Stuff for the ptrace system call */ 298/* Stuff for the ptrace system call */
299#define PTRACE_SPARC_DETACH 11
301#define PTRACE_GETREGS 12 300#define PTRACE_GETREGS 12
302#define PTRACE_SETREGS 13 301#define PTRACE_SETREGS 13
303#define PTRACE_GETFPREGS 14 302#define PTRACE_GETFPREGS 14
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h
index fa6f467389db..c49f32d38707 100644
--- a/include/asm-sparc64/signal.h
+++ b/include/asm-sparc64/signal.h
@@ -186,13 +186,7 @@ struct k_sigaction {
186 void __user *ka_restorer; 186 void __user *ka_restorer;
187}; 187};
188 188
189struct signal_deliver_cookie { 189#define ptrace_signal_deliver(regs, cookie) do { } while (0)
190 int restart_syscall;
191 unsigned long orig_i0;
192};
193
194struct pt_regs;
195extern void ptrace_signal_deliver(struct pt_regs *regs, void *cookie);
196 190
197#endif /* !(__KERNEL__) */ 191#endif /* !(__KERNEL__) */
198 192
diff --git a/include/asm-sparc64/thread_info.h b/include/asm-sparc64/thread_info.h
index 71e42d1a80d9..e5873e385306 100644
--- a/include/asm-sparc64/thread_info.h
+++ b/include/asm-sparc64/thread_info.h
@@ -38,7 +38,7 @@ struct thread_info {
38 struct task_struct *task; 38 struct task_struct *task;
39 unsigned long flags; 39 unsigned long flags;
40 __u8 fpsaved[7]; 40 __u8 fpsaved[7];
41 __u8 pad; 41 __u8 status;
42 unsigned long ksp; 42 unsigned long ksp;
43 43
44 /* D$ line 2 */ 44 /* D$ line 2 */
@@ -217,7 +217,7 @@ register struct thread_info *current_thread_info_reg asm("g6");
217 * nop 217 * nop
218 */ 218 */
219#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 219#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
220#define TIF_RESTORE_SIGMASK 1 /* restore signal mask in do_signal() */ 220/* flags bit 1 is available */
221#define TIF_SIGPENDING 2 /* signal pending */ 221#define TIF_SIGPENDING 2 /* signal pending */
222#define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 222#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
223#define TIF_PERFCTR 4 /* performance counters active */ 223#define TIF_PERFCTR 4 /* performance counters active */
@@ -244,14 +244,34 @@ register struct thread_info *current_thread_info_reg asm("g6");
244#define _TIF_32BIT (1<<TIF_32BIT) 244#define _TIF_32BIT (1<<TIF_32BIT)
245#define _TIF_SECCOMP (1<<TIF_SECCOMP) 245#define _TIF_SECCOMP (1<<TIF_SECCOMP)
246#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) 246#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
247#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
248#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) 247#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
249#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 248#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
250 249
251#define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \ 250#define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \
252 (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | \ 251 (_TIF_SIGPENDING | \
253 _TIF_NEED_RESCHED | _TIF_PERFCTR)) 252 _TIF_NEED_RESCHED | _TIF_PERFCTR))
254 253
254/*
255 * Thread-synchronous status.
256 *
257 * This is different from the flags in that nobody else
258 * ever touches our thread-synchronous status, so we don't
259 * have to worry about atomic accesses.
260 *
261 * Note that there are only 8 bits available.
262 */
263#define TS_RESTORE_SIGMASK 0x0001 /* restore signal mask in do_signal() */
264
265#ifndef __ASSEMBLY__
266#define HAVE_SET_RESTORE_SIGMASK 1
267static inline void set_restore_sigmask(void)
268{
269 struct thread_info *ti = current_thread_info();
270 ti->status |= TS_RESTORE_SIGMASK;
271 set_bit(TIF_SIGPENDING, &ti->flags);
272}
273#endif /* !__ASSEMBLY__ */
274
255#endif /* __KERNEL__ */ 275#endif /* __KERNEL__ */
256 276
257#endif /* _ASM_THREAD_INFO_H */ 277#endif /* _ASM_THREAD_INFO_H */
diff --git a/include/asm-sparc64/ttable.h b/include/asm-sparc64/ttable.h
index 1b55538b944f..52d67d394107 100644
--- a/include/asm-sparc64/ttable.h
+++ b/include/asm-sparc64/ttable.h
@@ -91,13 +91,14 @@
91 nop; 91 nop;
92 92
93#define SYSCALL_TRAP(routine, systbl) \ 93#define SYSCALL_TRAP(routine, systbl) \
94 rdpr %pil, %g2; \
95 mov TSTATE_SYSCALL, %g3; \
94 sethi %hi(109f), %g7; \ 96 sethi %hi(109f), %g7; \
95 ba,pt %xcc, etrap; \ 97 ba,pt %xcc, etrap_syscall; \
96109: or %g7, %lo(109b), %g7; \ 98109: or %g7, %lo(109b), %g7; \
97 sethi %hi(systbl), %l7; \ 99 sethi %hi(systbl), %l7; \
98 ba,pt %xcc, routine; \ 100 ba,pt %xcc, routine; \
99 or %l7, %lo(systbl), %l7; \ 101 or %l7, %lo(systbl), %l7;
100 nop; nop;
101 102
102#define TRAP_UTRAP(handler,lvl) \ 103#define TRAP_UTRAP(handler,lvl) \
103 mov handler, %g3; \ 104 mov handler, %g3; \