diff options
author | James Morris <jmorris@namei.org> | 2008-12-04 01:16:36 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-12-04 01:16:36 -0500 |
commit | ec98ce480ada787f2cfbd696980ff3564415505b (patch) | |
tree | 1a4d644b38f9f1e4b4e086fde0b195df4a92cf84 /arch/parisc | |
parent | 3496f92beb9aa99ef21fccc154a36c7698e9c538 (diff) | |
parent | feaf3848a813a106f163013af6fcf6c4bfec92d9 (diff) |
Merge branch 'master' into next
Conflicts:
fs/nfsd/nfs4recover.c
Manually fixed above to use new creds API functions, e.g.
nfs4_save_creds().
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/include/asm/parisc-device.h | 4 | ||||
-rw-r--r-- | arch/parisc/include/asm/posix_types.h | 3 | ||||
-rw-r--r-- | arch/parisc/include/asm/ptrace.h | 2 | ||||
-rw-r--r-- | arch/parisc/kernel/drivers.c | 6 | ||||
-rw-r--r-- | arch/parisc/kernel/ptrace.c | 10 | ||||
-rw-r--r-- | arch/parisc/kernel/traps.c | 43 |
6 files changed, 33 insertions, 35 deletions
diff --git a/arch/parisc/include/asm/parisc-device.h b/arch/parisc/include/asm/parisc-device.h index 7aa13f2add7..9afdad6c2ff 100644 --- a/arch/parisc/include/asm/parisc-device.h +++ b/arch/parisc/include/asm/parisc-device.h | |||
@@ -42,9 +42,9 @@ struct parisc_driver { | |||
42 | #define to_parisc_driver(d) container_of(d, struct parisc_driver, drv) | 42 | #define to_parisc_driver(d) container_of(d, struct parisc_driver, drv) |
43 | #define parisc_parent(d) to_parisc_device(d->dev.parent) | 43 | #define parisc_parent(d) to_parisc_device(d->dev.parent) |
44 | 44 | ||
45 | static inline char *parisc_pathname(struct parisc_device *d) | 45 | static inline const char *parisc_pathname(struct parisc_device *d) |
46 | { | 46 | { |
47 | return d->dev.bus_id; | 47 | return dev_name(&d->dev); |
48 | } | 48 | } |
49 | 49 | ||
50 | static inline void | 50 | static inline void |
diff --git a/arch/parisc/include/asm/posix_types.h b/arch/parisc/include/asm/posix_types.h index bb725a6630b..00da29a340b 100644 --- a/arch/parisc/include/asm/posix_types.h +++ b/arch/parisc/include/asm/posix_types.h | |||
@@ -24,13 +24,12 @@ typedef int __kernel_daddr_t; | |||
24 | typedef unsigned long __kernel_size_t; | 24 | typedef unsigned long __kernel_size_t; |
25 | typedef long __kernel_ssize_t; | 25 | typedef long __kernel_ssize_t; |
26 | typedef long __kernel_ptrdiff_t; | 26 | typedef long __kernel_ptrdiff_t; |
27 | typedef long __kernel_time_t; | ||
28 | #else | 27 | #else |
29 | typedef unsigned int __kernel_size_t; | 28 | typedef unsigned int __kernel_size_t; |
30 | typedef int __kernel_ssize_t; | 29 | typedef int __kernel_ssize_t; |
31 | typedef int __kernel_ptrdiff_t; | 30 | typedef int __kernel_ptrdiff_t; |
32 | typedef long __kernel_time_t; | ||
33 | #endif | 31 | #endif |
32 | typedef long __kernel_time_t; | ||
34 | typedef char * __kernel_caddr_t; | 33 | typedef char * __kernel_caddr_t; |
35 | 34 | ||
36 | typedef unsigned short __kernel_uid16_t; | 35 | typedef unsigned short __kernel_uid16_t; |
diff --git a/arch/parisc/include/asm/ptrace.h b/arch/parisc/include/asm/ptrace.h index afa5333187b..302f68dc889 100644 --- a/arch/parisc/include/asm/ptrace.h +++ b/arch/parisc/include/asm/ptrace.h | |||
@@ -47,8 +47,6 @@ struct pt_regs { | |||
47 | 47 | ||
48 | #define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS)) | 48 | #define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS)) |
49 | 49 | ||
50 | #define __ARCH_WANT_COMPAT_SYS_PTRACE | ||
51 | |||
52 | struct task_struct; | 50 | struct task_struct; |
53 | #define arch_has_single_step() 1 | 51 | #define arch_has_single_step() 1 |
54 | void user_disable_single_step(struct task_struct *task); | 52 | void user_disable_single_step(struct task_struct *task); |
diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c index 2ca654bd632..884b7ce16a3 100644 --- a/arch/parisc/kernel/drivers.c +++ b/arch/parisc/kernel/drivers.c | |||
@@ -43,7 +43,7 @@ struct hppa_dma_ops *hppa_dma_ops __read_mostly; | |||
43 | EXPORT_SYMBOL(hppa_dma_ops); | 43 | EXPORT_SYMBOL(hppa_dma_ops); |
44 | 44 | ||
45 | static struct device root = { | 45 | static struct device root = { |
46 | .bus_id = "parisc", | 46 | .init_name = "parisc", |
47 | }; | 47 | }; |
48 | 48 | ||
49 | static inline int check_dev(struct device *dev) | 49 | static inline int check_dev(struct device *dev) |
@@ -393,7 +393,8 @@ EXPORT_SYMBOL(print_pci_hwpath); | |||
393 | static void setup_bus_id(struct parisc_device *padev) | 393 | static void setup_bus_id(struct parisc_device *padev) |
394 | { | 394 | { |
395 | struct hardware_path path; | 395 | struct hardware_path path; |
396 | char *output = padev->dev.bus_id; | 396 | char name[20]; |
397 | char *output = name; | ||
397 | int i; | 398 | int i; |
398 | 399 | ||
399 | get_node_path(padev->dev.parent, &path); | 400 | get_node_path(padev->dev.parent, &path); |
@@ -404,6 +405,7 @@ static void setup_bus_id(struct parisc_device *padev) | |||
404 | output += sprintf(output, "%u:", (unsigned char) path.bc[i]); | 405 | output += sprintf(output, "%u:", (unsigned char) path.bc[i]); |
405 | } | 406 | } |
406 | sprintf(output, "%u", (unsigned char) padev->hw_path); | 407 | sprintf(output, "%u", (unsigned char) padev->hw_path); |
408 | dev_set_name(&padev->dev, name); | ||
407 | } | 409 | } |
408 | 410 | ||
409 | struct parisc_device * create_tree_node(char id, struct device *parent) | 411 | struct parisc_device * create_tree_node(char id, struct device *parent) |
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c index 90904f9dfc5..927db3668b6 100644 --- a/arch/parisc/kernel/ptrace.c +++ b/arch/parisc/kernel/ptrace.c | |||
@@ -183,10 +183,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
183 | * being 64 bit in both cases. | 183 | * being 64 bit in both cases. |
184 | */ | 184 | */ |
185 | 185 | ||
186 | static long translate_usr_offset(long offset) | 186 | static compat_ulong_t translate_usr_offset(compat_ulong_t offset) |
187 | { | 187 | { |
188 | if (offset < 0) | 188 | if (offset < 0) |
189 | return -1; | 189 | return sizeof(struct pt_regs); |
190 | else if (offset <= 32*4) /* gr[0..31] */ | 190 | else if (offset <= 32*4) /* gr[0..31] */ |
191 | return offset * 2 + 4; | 191 | return offset * 2 + 4; |
192 | else if (offset <= 32*4+32*8) /* gr[0..31] + fr[0..31] */ | 192 | else if (offset <= 32*4+32*8) /* gr[0..31] + fr[0..31] */ |
@@ -194,7 +194,7 @@ static long translate_usr_offset(long offset) | |||
194 | else if (offset < sizeof(struct pt_regs)/2 + 32*4) | 194 | else if (offset < sizeof(struct pt_regs)/2 + 32*4) |
195 | return offset * 2 + 4 - 32*8; | 195 | return offset * 2 + 4 - 32*8; |
196 | else | 196 | else |
197 | return -1; | 197 | return sizeof(struct pt_regs); |
198 | } | 198 | } |
199 | 199 | ||
200 | long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | 200 | long compat_arch_ptrace(struct task_struct *child, compat_long_t request, |
@@ -209,7 +209,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | |||
209 | if (addr & (sizeof(compat_uint_t)-1)) | 209 | if (addr & (sizeof(compat_uint_t)-1)) |
210 | break; | 210 | break; |
211 | addr = translate_usr_offset(addr); | 211 | addr = translate_usr_offset(addr); |
212 | if (addr < 0) | 212 | if (addr >= sizeof(struct pt_regs)) |
213 | break; | 213 | break; |
214 | 214 | ||
215 | tmp = *(compat_uint_t *) ((char *) task_regs(child) + addr); | 215 | tmp = *(compat_uint_t *) ((char *) task_regs(child) + addr); |
@@ -236,7 +236,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | |||
236 | if (addr & (sizeof(compat_uint_t)-1)) | 236 | if (addr & (sizeof(compat_uint_t)-1)) |
237 | break; | 237 | break; |
238 | addr = translate_usr_offset(addr); | 238 | addr = translate_usr_offset(addr); |
239 | if (addr < 0) | 239 | if (addr >= sizeof(struct pt_regs)) |
240 | break; | 240 | break; |
241 | if (addr >= PT_FR0 && addr <= PT_FR31 + 4) { | 241 | if (addr >= PT_FR0 && addr <= PT_FR31 + 4) { |
242 | /* Special case, fp regs are 64 bits anyway */ | 242 | /* Special case, fp regs are 64 bits anyway */ |
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 675f1d098f0..4c771cd580e 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/console.h> | 26 | #include <linux/console.h> |
27 | #include <linux/kallsyms.h> | ||
28 | #include <linux/bug.h> | 27 | #include <linux/bug.h> |
29 | 28 | ||
30 | #include <asm/assembly.h> | 29 | #include <asm/assembly.h> |
@@ -51,7 +50,7 @@ | |||
51 | DEFINE_SPINLOCK(pa_dbit_lock); | 50 | DEFINE_SPINLOCK(pa_dbit_lock); |
52 | #endif | 51 | #endif |
53 | 52 | ||
54 | void parisc_show_stack(struct task_struct *t, unsigned long *sp, | 53 | static void parisc_show_stack(struct task_struct *task, unsigned long *sp, |
55 | struct pt_regs *regs); | 54 | struct pt_regs *regs); |
56 | 55 | ||
57 | static int printbinary(char *buf, unsigned long x, int nbits) | 56 | static int printbinary(char *buf, unsigned long x, int nbits) |
@@ -121,18 +120,19 @@ static void print_fr(char *level, struct pt_regs *regs) | |||
121 | 120 | ||
122 | void show_regs(struct pt_regs *regs) | 121 | void show_regs(struct pt_regs *regs) |
123 | { | 122 | { |
124 | int i; | 123 | int i, user; |
125 | char *level; | 124 | char *level; |
126 | unsigned long cr30, cr31; | 125 | unsigned long cr30, cr31; |
127 | 126 | ||
128 | level = user_mode(regs) ? KERN_DEBUG : KERN_CRIT; | 127 | user = user_mode(regs); |
128 | level = user ? KERN_DEBUG : KERN_CRIT; | ||
129 | 129 | ||
130 | print_gr(level, regs); | 130 | print_gr(level, regs); |
131 | 131 | ||
132 | for (i = 0; i < 8; i += 4) | 132 | for (i = 0; i < 8; i += 4) |
133 | PRINTREGS(level, regs->sr, "sr", RFMT, i); | 133 | PRINTREGS(level, regs->sr, "sr", RFMT, i); |
134 | 134 | ||
135 | if (user_mode(regs)) | 135 | if (user) |
136 | print_fr(level, regs); | 136 | print_fr(level, regs); |
137 | 137 | ||
138 | cr30 = mfctl(30); | 138 | cr30 = mfctl(30); |
@@ -145,14 +145,18 @@ void show_regs(struct pt_regs *regs) | |||
145 | printk("%s CPU: %8d CR30: " RFMT " CR31: " RFMT "\n", | 145 | printk("%s CPU: %8d CR30: " RFMT " CR31: " RFMT "\n", |
146 | level, current_thread_info()->cpu, cr30, cr31); | 146 | level, current_thread_info()->cpu, cr30, cr31); |
147 | printk("%s ORIG_R28: " RFMT "\n", level, regs->orig_r28); | 147 | printk("%s ORIG_R28: " RFMT "\n", level, regs->orig_r28); |
148 | printk(level); | 148 | |
149 | print_symbol(" IAOQ[0]: %s\n", regs->iaoq[0]); | 149 | if (user) { |
150 | printk(level); | 150 | printk("%s IAOQ[0]: " RFMT "\n", level, regs->iaoq[0]); |
151 | print_symbol(" IAOQ[1]: %s\n", regs->iaoq[1]); | 151 | printk("%s IAOQ[1]: " RFMT "\n", level, regs->iaoq[1]); |
152 | printk(level); | 152 | printk("%s RP(r2): " RFMT "\n", level, regs->gr[2]); |
153 | print_symbol(" RP(r2): %s\n", regs->gr[2]); | 153 | } else { |
154 | 154 | printk("%s IAOQ[0]: %pS\n", level, (void *) regs->iaoq[0]); | |
155 | parisc_show_stack(current, NULL, regs); | 155 | printk("%s IAOQ[1]: %pS\n", level, (void *) regs->iaoq[1]); |
156 | printk("%s RP(r2): %pS\n", level, (void *) regs->gr[2]); | ||
157 | |||
158 | parisc_show_stack(current, NULL, regs); | ||
159 | } | ||
156 | } | 160 | } |
157 | 161 | ||
158 | 162 | ||
@@ -173,20 +177,15 @@ static void do_show_stack(struct unwind_frame_info *info) | |||
173 | break; | 177 | break; |
174 | 178 | ||
175 | if (__kernel_text_address(info->ip)) { | 179 | if (__kernel_text_address(info->ip)) { |
176 | printk("%s [<" RFMT ">] ", (i&0x3)==1 ? KERN_CRIT : "", info->ip); | 180 | printk(KERN_CRIT " [<" RFMT ">] %pS\n", |
177 | #ifdef CONFIG_KALLSYMS | 181 | info->ip, (void *) info->ip); |
178 | print_symbol("%s\n", info->ip); | ||
179 | #else | ||
180 | if ((i & 0x03) == 0) | ||
181 | printk("\n"); | ||
182 | #endif | ||
183 | i++; | 182 | i++; |
184 | } | 183 | } |
185 | } | 184 | } |
186 | printk("\n"); | 185 | printk(KERN_CRIT "\n"); |
187 | } | 186 | } |
188 | 187 | ||
189 | void parisc_show_stack(struct task_struct *task, unsigned long *sp, | 188 | static void parisc_show_stack(struct task_struct *task, unsigned long *sp, |
190 | struct pt_regs *regs) | 189 | struct pt_regs *regs) |
191 | { | 190 | { |
192 | struct unwind_frame_info info; | 191 | struct unwind_frame_info info; |