diff options
author | David S. Miller <davem@davemloft.net> | 2008-12-28 23:19:47 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-28 23:19:47 -0500 |
commit | e3c6d4ee545e427b55882d97d3b663c6411645fe (patch) | |
tree | 294326663fb757739a98083c2ddd570d1eaf7337 /arch/sparc/include | |
parent | 5bc053089376217943187ed5153d0d1e5c5085b6 (diff) | |
parent | 3c92ec8ae91ecf59d88c798301833d7cf83f2179 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
arch/sparc64/kernel/idprom.c
Diffstat (limited to 'arch/sparc/include')
-rw-r--r-- | arch/sparc/include/asm/device.h | 12 | ||||
-rw-r--r-- | arch/sparc/include/asm/ptrace_32.h | 10 | ||||
-rw-r--r-- | arch/sparc/include/asm/ptrace_64.h | 9 |
3 files changed, 31 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/device.h b/arch/sparc/include/asm/device.h index 19790eb99cc6..3702e087df2c 100644 --- a/arch/sparc/include/asm/device.h +++ b/arch/sparc/include/asm/device.h | |||
@@ -20,4 +20,16 @@ struct dev_archdata { | |||
20 | int numa_node; | 20 | int numa_node; |
21 | }; | 21 | }; |
22 | 22 | ||
23 | static inline void dev_archdata_set_node(struct dev_archdata *ad, | ||
24 | struct device_node *np) | ||
25 | { | ||
26 | ad->prom_node = np; | ||
27 | } | ||
28 | |||
29 | static inline struct device_node * | ||
30 | dev_archdata_get_node(const struct dev_archdata *ad) | ||
31 | { | ||
32 | return ad->prom_node; | ||
33 | } | ||
34 | |||
23 | #endif /* _ASM_SPARC_DEVICE_H */ | 35 | #endif /* _ASM_SPARC_DEVICE_H */ |
diff --git a/arch/sparc/include/asm/ptrace_32.h b/arch/sparc/include/asm/ptrace_32.h index d409c4f21a5c..4cef450167dd 100644 --- a/arch/sparc/include/asm/ptrace_32.h +++ b/arch/sparc/include/asm/ptrace_32.h | |||
@@ -62,6 +62,8 @@ struct sparc_stackf { | |||
62 | 62 | ||
63 | #ifdef __KERNEL__ | 63 | #ifdef __KERNEL__ |
64 | 64 | ||
65 | #include <asm/system.h> | ||
66 | |||
65 | static inline bool pt_regs_is_syscall(struct pt_regs *regs) | 67 | static inline bool pt_regs_is_syscall(struct pt_regs *regs) |
66 | { | 68 | { |
67 | return (regs->psr & PSR_SYSCALL); | 69 | return (regs->psr & PSR_SYSCALL); |
@@ -72,6 +74,14 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs) | |||
72 | return (regs->psr &= ~PSR_SYSCALL); | 74 | return (regs->psr &= ~PSR_SYSCALL); |
73 | } | 75 | } |
74 | 76 | ||
77 | #define arch_ptrace_stop_needed(exit_code, info) \ | ||
78 | ({ flush_user_windows(); \ | ||
79 | current_thread_info()->w_saved != 0; \ | ||
80 | }) | ||
81 | |||
82 | #define arch_ptrace_stop(exit_code, info) \ | ||
83 | synchronize_user_stack() | ||
84 | |||
75 | #define user_mode(regs) (!((regs)->psr & PSR_PS)) | 85 | #define user_mode(regs) (!((regs)->psr & PSR_PS)) |
76 | #define instruction_pointer(regs) ((regs)->pc) | 86 | #define instruction_pointer(regs) ((regs)->pc) |
77 | #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP]) | 87 | #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP]) |
diff --git a/arch/sparc/include/asm/ptrace_64.h b/arch/sparc/include/asm/ptrace_64.h index 84e969f06afe..cd6fbfc20435 100644 --- a/arch/sparc/include/asm/ptrace_64.h +++ b/arch/sparc/include/asm/ptrace_64.h | |||
@@ -114,6 +114,7 @@ struct sparc_trapf { | |||
114 | #ifdef __KERNEL__ | 114 | #ifdef __KERNEL__ |
115 | 115 | ||
116 | #include <linux/threads.h> | 116 | #include <linux/threads.h> |
117 | #include <asm/system.h> | ||
117 | 118 | ||
118 | static inline int pt_regs_trap_type(struct pt_regs *regs) | 119 | static inline int pt_regs_trap_type(struct pt_regs *regs) |
119 | { | 120 | { |
@@ -130,6 +131,14 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs) | |||
130 | return (regs->tstate &= ~TSTATE_SYSCALL); | 131 | return (regs->tstate &= ~TSTATE_SYSCALL); |
131 | } | 132 | } |
132 | 133 | ||
134 | #define arch_ptrace_stop_needed(exit_code, info) \ | ||
135 | ({ flush_user_windows(); \ | ||
136 | get_thread_wsaved() != 0; \ | ||
137 | }) | ||
138 | |||
139 | #define arch_ptrace_stop(exit_code, info) \ | ||
140 | synchronize_user_stack() | ||
141 | |||
133 | struct global_reg_snapshot { | 142 | struct global_reg_snapshot { |
134 | unsigned long tstate; | 143 | unsigned long tstate; |
135 | unsigned long tpc; | 144 | unsigned long tpc; |