diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2009-01-02 22:32:59 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-02 22:32:59 -0500 |
commit | 4d7b92ad572b4bd4d92fc80911641bb6cba3b99c (patch) | |
tree | 6257d1b4bad63a296f03abee8940222a979d8d2a /arch | |
parent | ece93487c31607558f4b91f378fcee4b43956dbc (diff) |
sparc: add '32' suffix to reg_window, sigcontext, __siginfo_t
Renaming a few types to contain a 32 suffix makes the
type names compatible with sparc64 and thus makes sharing
between the two a lot easier.
Note: None of these definitions are expected part of the
stable ABI towards userspace.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/include/asm/processor_32.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/ptrace_32.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/sigcontext_32.h | 9 | ||||
-rw-r--r-- | arch/sparc/include/asm/thread_info_32.h | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/kgdb_32.c | 12 | ||||
-rw-r--r-- | arch/sparc/kernel/muldiv.c | 8 | ||||
-rw-r--r-- | arch/sparc/kernel/process_32.c | 16 | ||||
-rw-r--r-- | arch/sparc/kernel/signal_32.c | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/traps_32.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/unaligned_32.c | 12 | ||||
-rw-r--r-- | arch/sparc/kernel/windows.c | 6 |
11 files changed, 38 insertions, 41 deletions
diff --git a/arch/sparc/include/asm/processor_32.h b/arch/sparc/include/asm/processor_32.h index 2ae67a2e7f3a..09521c6a5edb 100644 --- a/arch/sparc/include/asm/processor_32.h +++ b/arch/sparc/include/asm/processor_32.h | |||
@@ -99,7 +99,7 @@ static inline void start_thread(struct pt_regs * regs, unsigned long pc, | |||
99 | "st\t%%g0, [%0 + %3 + 0x3c]" | 99 | "st\t%%g0, [%0 + %3 + 0x3c]" |
100 | : /* no outputs */ | 100 | : /* no outputs */ |
101 | : "r" (regs), | 101 | : "r" (regs), |
102 | "r" (sp - sizeof(struct reg_window)), | 102 | "r" (sp - sizeof(struct reg_window32)), |
103 | "r" (zero), | 103 | "r" (zero), |
104 | "i" ((const unsigned long)(&((struct pt_regs *)0)->u_regs[0])) | 104 | "i" ((const unsigned long)(&((struct pt_regs *)0)->u_regs[0])) |
105 | : "memory"); | 105 | : "memory"); |
diff --git a/arch/sparc/include/asm/ptrace_32.h b/arch/sparc/include/asm/ptrace_32.h index 4cef450167dd..acb2d89d93e3 100644 --- a/arch/sparc/include/asm/ptrace_32.h +++ b/arch/sparc/include/asm/ptrace_32.h | |||
@@ -41,7 +41,7 @@ struct pt_regs { | |||
41 | #define UREG_RETPC UREG_I7 | 41 | #define UREG_RETPC UREG_I7 |
42 | 42 | ||
43 | /* A register window */ | 43 | /* A register window */ |
44 | struct reg_window { | 44 | struct reg_window32 { |
45 | unsigned long locals[8]; | 45 | unsigned long locals[8]; |
46 | unsigned long ins[8]; | 46 | unsigned long ins[8]; |
47 | }; | 47 | }; |
diff --git a/arch/sparc/include/asm/sigcontext_32.h b/arch/sparc/include/asm/sigcontext_32.h index c5fb60dcbd75..756e996410b1 100644 --- a/arch/sparc/include/asm/sigcontext_32.h +++ b/arch/sparc/include/asm/sigcontext_32.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #define __SUNOS_MAXWIN 31 | 9 | #define __SUNOS_MAXWIN 31 |
10 | 10 | ||
11 | /* This is what SunOS does, so shall I. */ | 11 | /* This is what SunOS does, so shall I. */ |
12 | struct sigcontext { | 12 | struct sigcontext32 { |
13 | int sigc_onstack; /* state to restore */ | 13 | int sigc_onstack; /* state to restore */ |
14 | int sigc_mask; /* sigmask to restore */ | 14 | int sigc_mask; /* sigmask to restore */ |
15 | int sigc_sp; /* stack pointer */ | 15 | int sigc_sp; /* stack pointer */ |
@@ -28,10 +28,7 @@ struct sigcontext { | |||
28 | char *sigc_spbuf[__SUNOS_MAXWIN]; | 28 | char *sigc_spbuf[__SUNOS_MAXWIN]; |
29 | 29 | ||
30 | /* Windows to restore after signal */ | 30 | /* Windows to restore after signal */ |
31 | struct { | 31 | struct reg_window32 sigc_wbuf[__SUNOS_MAXWIN]; |
32 | unsigned long locals[8]; | ||
33 | unsigned long ins[8]; | ||
34 | } sigc_wbuf[__SUNOS_MAXWIN]; | ||
35 | }; | 32 | }; |
36 | 33 | ||
37 | typedef struct { | 34 | typedef struct { |
@@ -43,7 +40,7 @@ typedef struct { | |||
43 | unsigned long u_regs[16]; /* globals and ins */ | 40 | unsigned long u_regs[16]; /* globals and ins */ |
44 | } si_regs; | 41 | } si_regs; |
45 | int si_mask; | 42 | int si_mask; |
46 | } __siginfo_t; | 43 | } __siginfo32_t; |
47 | 44 | ||
48 | typedef struct { | 45 | typedef struct { |
49 | unsigned long si_float_regs [32]; | 46 | unsigned long si_float_regs [32]; |
diff --git a/arch/sparc/include/asm/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h index 80fe547c3f45..0f7b0e5fb1c7 100644 --- a/arch/sparc/include/asm/thread_info_32.h +++ b/arch/sparc/include/asm/thread_info_32.h | |||
@@ -45,7 +45,7 @@ struct thread_info { | |||
45 | /* A place to store user windows and stack pointers | 45 | /* A place to store user windows and stack pointers |
46 | * when the stack needs inspection. | 46 | * when the stack needs inspection. |
47 | */ | 47 | */ |
48 | struct reg_window reg_window[NSWINS]; /* align for ldd! */ | 48 | struct reg_window32 reg_window[NSWINS]; /* align for ldd! */ |
49 | unsigned long rwbuf_stkptrs[NSWINS]; | 49 | unsigned long rwbuf_stkptrs[NSWINS]; |
50 | unsigned long w_saved; | 50 | unsigned long w_saved; |
51 | 51 | ||
diff --git a/arch/sparc/kernel/kgdb_32.c b/arch/sparc/kernel/kgdb_32.c index 757805ce02ee..04df4edc0073 100644 --- a/arch/sparc/kernel/kgdb_32.c +++ b/arch/sparc/kernel/kgdb_32.c | |||
@@ -14,14 +14,14 @@ extern unsigned long trapbase; | |||
14 | 14 | ||
15 | void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) | 15 | void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) |
16 | { | 16 | { |
17 | struct reg_window *win; | 17 | struct reg_window32 *win; |
18 | int i; | 18 | int i; |
19 | 19 | ||
20 | gdb_regs[GDB_G0] = 0; | 20 | gdb_regs[GDB_G0] = 0; |
21 | for (i = 0; i < 15; i++) | 21 | for (i = 0; i < 15; i++) |
22 | gdb_regs[GDB_G1 + i] = regs->u_regs[UREG_G1 + i]; | 22 | gdb_regs[GDB_G1 + i] = regs->u_regs[UREG_G1 + i]; |
23 | 23 | ||
24 | win = (struct reg_window *) regs->u_regs[UREG_FP]; | 24 | win = (struct reg_window32 *) regs->u_regs[UREG_FP]; |
25 | for (i = 0; i < 8; i++) | 25 | for (i = 0; i < 8; i++) |
26 | gdb_regs[GDB_L0 + i] = win->locals[i]; | 26 | gdb_regs[GDB_L0 + i] = win->locals[i]; |
27 | for (i = 0; i < 8; i++) | 27 | for (i = 0; i < 8; i++) |
@@ -43,7 +43,7 @@ void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) | |||
43 | void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) | 43 | void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) |
44 | { | 44 | { |
45 | struct thread_info *t = task_thread_info(p); | 45 | struct thread_info *t = task_thread_info(p); |
46 | struct reg_window *win; | 46 | struct reg_window32 *win; |
47 | int i; | 47 | int i; |
48 | 48 | ||
49 | for (i = GDB_G0; i < GDB_G6; i++) | 49 | for (i = GDB_G0; i < GDB_G6; i++) |
@@ -55,7 +55,7 @@ void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) | |||
55 | gdb_regs[GDB_SP] = t->ksp; | 55 | gdb_regs[GDB_SP] = t->ksp; |
56 | gdb_regs[GDB_O7] = 0; | 56 | gdb_regs[GDB_O7] = 0; |
57 | 57 | ||
58 | win = (struct reg_window *) t->ksp; | 58 | win = (struct reg_window32 *) t->ksp; |
59 | for (i = 0; i < 8; i++) | 59 | for (i = 0; i < 8; i++) |
60 | gdb_regs[GDB_L0 + i] = win->locals[i]; | 60 | gdb_regs[GDB_L0 + i] = win->locals[i]; |
61 | for (i = 0; i < 8; i++) | 61 | for (i = 0; i < 8; i++) |
@@ -77,7 +77,7 @@ void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) | |||
77 | 77 | ||
78 | void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) | 78 | void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) |
79 | { | 79 | { |
80 | struct reg_window *win; | 80 | struct reg_window32 *win; |
81 | int i; | 81 | int i; |
82 | 82 | ||
83 | for (i = 0; i < 15; i++) | 83 | for (i = 0; i < 15; i++) |
@@ -96,7 +96,7 @@ void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) | |||
96 | regs->npc = gdb_regs[GDB_NPC]; | 96 | regs->npc = gdb_regs[GDB_NPC]; |
97 | regs->y = gdb_regs[GDB_Y]; | 97 | regs->y = gdb_regs[GDB_Y]; |
98 | 98 | ||
99 | win = (struct reg_window *) regs->u_regs[UREG_FP]; | 99 | win = (struct reg_window32 *) regs->u_regs[UREG_FP]; |
100 | for (i = 0; i < 8; i++) | 100 | for (i = 0; i < 8; i++) |
101 | win->locals[i] = gdb_regs[GDB_L0 + i]; | 101 | win->locals[i] = gdb_regs[GDB_L0 + i]; |
102 | for (i = 0; i < 8; i++) | 102 | for (i = 0; i < 8; i++) |
diff --git a/arch/sparc/kernel/muldiv.c b/arch/sparc/kernel/muldiv.c index ba960c02bb55..6ce1021d487c 100644 --- a/arch/sparc/kernel/muldiv.c +++ b/arch/sparc/kernel/muldiv.c | |||
@@ -60,7 +60,7 @@ static inline void maybe_flush_windows(unsigned int rs1, unsigned int rs2, | |||
60 | } | 60 | } |
61 | 61 | ||
62 | #define fetch_reg(reg, regs) ({ \ | 62 | #define fetch_reg(reg, regs) ({ \ |
63 | struct reg_window __user *win; \ | 63 | struct reg_window32 __user *win; \ |
64 | register unsigned long ret; \ | 64 | register unsigned long ret; \ |
65 | \ | 65 | \ |
66 | if (!(reg)) ret = 0; \ | 66 | if (!(reg)) ret = 0; \ |
@@ -68,7 +68,7 @@ static inline void maybe_flush_windows(unsigned int rs1, unsigned int rs2, | |||
68 | ret = regs->u_regs[(reg)]; \ | 68 | ret = regs->u_regs[(reg)]; \ |
69 | } else { \ | 69 | } else { \ |
70 | /* Ho hum, the slightly complicated case. */ \ | 70 | /* Ho hum, the slightly complicated case. */ \ |
71 | win = (struct reg_window __user *)regs->u_regs[UREG_FP];\ | 71 | win = (struct reg_window32 __user *)regs->u_regs[UREG_FP];\ |
72 | if (get_user (ret, &win->locals[(reg) - 16])) return -1;\ | 72 | if (get_user (ret, &win->locals[(reg) - 16])) return -1;\ |
73 | } \ | 73 | } \ |
74 | ret; \ | 74 | ret; \ |
@@ -77,7 +77,7 @@ static inline void maybe_flush_windows(unsigned int rs1, unsigned int rs2, | |||
77 | static inline int | 77 | static inline int |
78 | store_reg(unsigned int result, unsigned int reg, struct pt_regs *regs) | 78 | store_reg(unsigned int result, unsigned int reg, struct pt_regs *regs) |
79 | { | 79 | { |
80 | struct reg_window __user *win; | 80 | struct reg_window32 __user *win; |
81 | 81 | ||
82 | if (!reg) | 82 | if (!reg) |
83 | return 0; | 83 | return 0; |
@@ -86,7 +86,7 @@ store_reg(unsigned int result, unsigned int reg, struct pt_regs *regs) | |||
86 | return 0; | 86 | return 0; |
87 | } else { | 87 | } else { |
88 | /* need to use put_user() in this case: */ | 88 | /* need to use put_user() in this case: */ |
89 | win = (struct reg_window __user *) regs->u_regs[UREG_FP]; | 89 | win = (struct reg_window32 __user *) regs->u_regs[UREG_FP]; |
90 | return (put_user(result, &win->locals[reg - 16])); | 90 | return (put_user(result, &win->locals[reg - 16])); |
91 | } | 91 | } |
92 | } | 92 | } |
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c index 69d9315f4a93..5a8d8ced33da 100644 --- a/arch/sparc/kernel/process_32.c +++ b/arch/sparc/kernel/process_32.c | |||
@@ -180,13 +180,13 @@ static DEFINE_SPINLOCK(sparc_backtrace_lock); | |||
180 | 180 | ||
181 | void __show_backtrace(unsigned long fp) | 181 | void __show_backtrace(unsigned long fp) |
182 | { | 182 | { |
183 | struct reg_window *rw; | 183 | struct reg_window32 *rw; |
184 | unsigned long flags; | 184 | unsigned long flags; |
185 | int cpu = smp_processor_id(); | 185 | int cpu = smp_processor_id(); |
186 | 186 | ||
187 | spin_lock_irqsave(&sparc_backtrace_lock, flags); | 187 | spin_lock_irqsave(&sparc_backtrace_lock, flags); |
188 | 188 | ||
189 | rw = (struct reg_window *)fp; | 189 | rw = (struct reg_window32 *)fp; |
190 | while(rw && (((unsigned long) rw) >= PAGE_OFFSET) && | 190 | while(rw && (((unsigned long) rw) >= PAGE_OFFSET) && |
191 | !(((unsigned long) rw) & 0x7)) { | 191 | !(((unsigned long) rw) & 0x7)) { |
192 | printk("CPU[%d]: ARGS[%08lx,%08lx,%08lx,%08lx,%08lx,%08lx] " | 192 | printk("CPU[%d]: ARGS[%08lx,%08lx,%08lx,%08lx,%08lx,%08lx] " |
@@ -196,7 +196,7 @@ void __show_backtrace(unsigned long fp) | |||
196 | rw->ins[6], | 196 | rw->ins[6], |
197 | rw->ins[7]); | 197 | rw->ins[7]); |
198 | printk("%pS\n", (void *) rw->ins[7]); | 198 | printk("%pS\n", (void *) rw->ins[7]); |
199 | rw = (struct reg_window *) rw->ins[6]; | 199 | rw = (struct reg_window32 *) rw->ins[6]; |
200 | } | 200 | } |
201 | spin_unlock_irqrestore(&sparc_backtrace_lock, flags); | 201 | spin_unlock_irqrestore(&sparc_backtrace_lock, flags); |
202 | } | 202 | } |
@@ -258,7 +258,7 @@ void show_stackframe(struct sparc_stackf *sf) | |||
258 | 258 | ||
259 | void show_regs(struct pt_regs *r) | 259 | void show_regs(struct pt_regs *r) |
260 | { | 260 | { |
261 | struct reg_window *rw = (struct reg_window *) r->u_regs[14]; | 261 | struct reg_window32 *rw = (struct reg_window32 *) r->u_regs[14]; |
262 | 262 | ||
263 | printk("PSR: %08lx PC: %08lx NPC: %08lx Y: %08lx %s\n", | 263 | printk("PSR: %08lx PC: %08lx NPC: %08lx Y: %08lx %s\n", |
264 | r->psr, r->pc, r->npc, r->y, print_tainted()); | 264 | r->psr, r->pc, r->npc, r->y, print_tainted()); |
@@ -287,7 +287,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) | |||
287 | { | 287 | { |
288 | unsigned long pc, fp; | 288 | unsigned long pc, fp; |
289 | unsigned long task_base; | 289 | unsigned long task_base; |
290 | struct reg_window *rw; | 290 | struct reg_window32 *rw; |
291 | int count = 0; | 291 | int count = 0; |
292 | 292 | ||
293 | if (tsk != NULL) | 293 | if (tsk != NULL) |
@@ -301,7 +301,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) | |||
301 | if (fp < (task_base + sizeof(struct thread_info)) || | 301 | if (fp < (task_base + sizeof(struct thread_info)) || |
302 | fp >= (task_base + (PAGE_SIZE << 1))) | 302 | fp >= (task_base + (PAGE_SIZE << 1))) |
303 | break; | 303 | break; |
304 | rw = (struct reg_window *) fp; | 304 | rw = (struct reg_window32 *) fp; |
305 | pc = rw->ins[7]; | 305 | pc = rw->ins[7]; |
306 | printk("[%08lx : ", pc); | 306 | printk("[%08lx : ", pc); |
307 | printk("%pS ] ", (void *) pc); | 307 | printk("%pS ] ", (void *) pc); |
@@ -679,7 +679,7 @@ unsigned long get_wchan(struct task_struct *task) | |||
679 | unsigned long pc, fp, bias = 0; | 679 | unsigned long pc, fp, bias = 0; |
680 | unsigned long task_base = (unsigned long) task; | 680 | unsigned long task_base = (unsigned long) task; |
681 | unsigned long ret = 0; | 681 | unsigned long ret = 0; |
682 | struct reg_window *rw; | 682 | struct reg_window32 *rw; |
683 | int count = 0; | 683 | int count = 0; |
684 | 684 | ||
685 | if (!task || task == current || | 685 | if (!task || task == current || |
@@ -692,7 +692,7 @@ unsigned long get_wchan(struct task_struct *task) | |||
692 | if (fp < (task_base + sizeof(struct thread_info)) || | 692 | if (fp < (task_base + sizeof(struct thread_info)) || |
693 | fp >= (task_base + (2 * PAGE_SIZE))) | 693 | fp >= (task_base + (2 * PAGE_SIZE))) |
694 | break; | 694 | break; |
695 | rw = (struct reg_window *) fp; | 695 | rw = (struct reg_window32 *) fp; |
696 | pc = rw->ins[7]; | 696 | pc = rw->ins[7]; |
697 | if (!in_sched_functions(pc)) { | 697 | if (!in_sched_functions(pc)) { |
698 | ret = pc; | 698 | ret = pc; |
diff --git a/arch/sparc/kernel/signal_32.c b/arch/sparc/kernel/signal_32.c index c94f91c8b6e0..181d069a2d44 100644 --- a/arch/sparc/kernel/signal_32.c +++ b/arch/sparc/kernel/signal_32.c | |||
@@ -34,7 +34,7 @@ extern void fpload(unsigned long *fpregs, unsigned long *fsr); | |||
34 | 34 | ||
35 | struct signal_frame { | 35 | struct signal_frame { |
36 | struct sparc_stackf ss; | 36 | struct sparc_stackf ss; |
37 | __siginfo_t info; | 37 | __siginfo32_t info; |
38 | __siginfo_fpu_t __user *fpu_save; | 38 | __siginfo_fpu_t __user *fpu_save; |
39 | unsigned long insns[2] __attribute__ ((aligned (8))); | 39 | unsigned long insns[2] __attribute__ ((aligned (8))); |
40 | unsigned int extramask[_NSIG_WORDS - 1]; | 40 | unsigned int extramask[_NSIG_WORDS - 1]; |
@@ -351,7 +351,7 @@ static void setup_frame(struct k_sigaction *ka, struct pt_regs *regs, | |||
351 | err |= __copy_to_user(sf->extramask, &oldset->sig[1], | 351 | err |= __copy_to_user(sf->extramask, &oldset->sig[1], |
352 | (_NSIG_WORDS - 1) * sizeof(unsigned int)); | 352 | (_NSIG_WORDS - 1) * sizeof(unsigned int)); |
353 | err |= __copy_to_user(sf, (char *) regs->u_regs[UREG_FP], | 353 | err |= __copy_to_user(sf, (char *) regs->u_regs[UREG_FP], |
354 | sizeof(struct reg_window)); | 354 | sizeof(struct reg_window32)); |
355 | if (err) | 355 | if (err) |
356 | goto sigsegv; | 356 | goto sigsegv; |
357 | 357 | ||
@@ -433,7 +433,7 @@ static void setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs, | |||
433 | err |= __put_user(current->sas_ss_size, &sf->stack.ss_size); | 433 | err |= __put_user(current->sas_ss_size, &sf->stack.ss_size); |
434 | 434 | ||
435 | err |= __copy_to_user(sf, (char *) regs->u_regs[UREG_FP], | 435 | err |= __copy_to_user(sf, (char *) regs->u_regs[UREG_FP], |
436 | sizeof(struct reg_window)); | 436 | sizeof(struct reg_window32)); |
437 | 437 | ||
438 | err |= copy_siginfo_to_user(&sf->info, info); | 438 | err |= copy_siginfo_to_user(&sf->info, info); |
439 | 439 | ||
diff --git a/arch/sparc/kernel/traps_32.c b/arch/sparc/kernel/traps_32.c index 716f3946c494..213645be6e92 100644 --- a/arch/sparc/kernel/traps_32.c +++ b/arch/sparc/kernel/traps_32.c | |||
@@ -67,7 +67,7 @@ void die_if_kernel(char *str, struct pt_regs *regs) | |||
67 | __RESTORE; __RESTORE; __RESTORE; __RESTORE; | 67 | __RESTORE; __RESTORE; __RESTORE; __RESTORE; |
68 | 68 | ||
69 | { | 69 | { |
70 | struct reg_window *rw = (struct reg_window *)regs->u_regs[UREG_FP]; | 70 | struct reg_window32 *rw = (struct reg_window32 *)regs->u_regs[UREG_FP]; |
71 | 71 | ||
72 | /* Stop the back trace when we hit userland or we | 72 | /* Stop the back trace when we hit userland or we |
73 | * find some badly aligned kernel stack. Set an upper | 73 | * find some badly aligned kernel stack. Set an upper |
@@ -79,7 +79,7 @@ void die_if_kernel(char *str, struct pt_regs *regs) | |||
79 | !(((unsigned long) rw) & 0x7)) { | 79 | !(((unsigned long) rw) & 0x7)) { |
80 | printk("Caller[%08lx]: %pS\n", rw->ins[7], | 80 | printk("Caller[%08lx]: %pS\n", rw->ins[7], |
81 | (void *) rw->ins[7]); | 81 | (void *) rw->ins[7]); |
82 | rw = (struct reg_window *)rw->ins[6]; | 82 | rw = (struct reg_window32 *)rw->ins[6]; |
83 | } | 83 | } |
84 | } | 84 | } |
85 | printk("Instruction DUMP:"); | 85 | printk("Instruction DUMP:"); |
diff --git a/arch/sparc/kernel/unaligned_32.c b/arch/sparc/kernel/unaligned_32.c index c2a28c5ad650..6b1e6cde6fff 100644 --- a/arch/sparc/kernel/unaligned_32.c +++ b/arch/sparc/kernel/unaligned_32.c | |||
@@ -97,26 +97,26 @@ static inline int sign_extend_imm13(int imm) | |||
97 | 97 | ||
98 | static inline unsigned long fetch_reg(unsigned int reg, struct pt_regs *regs) | 98 | static inline unsigned long fetch_reg(unsigned int reg, struct pt_regs *regs) |
99 | { | 99 | { |
100 | struct reg_window *win; | 100 | struct reg_window32 *win; |
101 | 101 | ||
102 | if(reg < 16) | 102 | if(reg < 16) |
103 | return (!reg ? 0 : regs->u_regs[reg]); | 103 | return (!reg ? 0 : regs->u_regs[reg]); |
104 | 104 | ||
105 | /* Ho hum, the slightly complicated case. */ | 105 | /* Ho hum, the slightly complicated case. */ |
106 | win = (struct reg_window *) regs->u_regs[UREG_FP]; | 106 | win = (struct reg_window32 *) regs->u_regs[UREG_FP]; |
107 | return win->locals[reg - 16]; /* yes, I know what this does... */ | 107 | return win->locals[reg - 16]; /* yes, I know what this does... */ |
108 | } | 108 | } |
109 | 109 | ||
110 | static inline unsigned long safe_fetch_reg(unsigned int reg, struct pt_regs *regs) | 110 | static inline unsigned long safe_fetch_reg(unsigned int reg, struct pt_regs *regs) |
111 | { | 111 | { |
112 | struct reg_window __user *win; | 112 | struct reg_window32 __user *win; |
113 | unsigned long ret; | 113 | unsigned long ret; |
114 | 114 | ||
115 | if (reg < 16) | 115 | if (reg < 16) |
116 | return (!reg ? 0 : regs->u_regs[reg]); | 116 | return (!reg ? 0 : regs->u_regs[reg]); |
117 | 117 | ||
118 | /* Ho hum, the slightly complicated case. */ | 118 | /* Ho hum, the slightly complicated case. */ |
119 | win = (struct reg_window __user *) regs->u_regs[UREG_FP]; | 119 | win = (struct reg_window32 __user *) regs->u_regs[UREG_FP]; |
120 | 120 | ||
121 | if ((unsigned long)win & 3) | 121 | if ((unsigned long)win & 3) |
122 | return -1; | 122 | return -1; |
@@ -129,11 +129,11 @@ static inline unsigned long safe_fetch_reg(unsigned int reg, struct pt_regs *reg | |||
129 | 129 | ||
130 | static inline unsigned long *fetch_reg_addr(unsigned int reg, struct pt_regs *regs) | 130 | static inline unsigned long *fetch_reg_addr(unsigned int reg, struct pt_regs *regs) |
131 | { | 131 | { |
132 | struct reg_window *win; | 132 | struct reg_window32 *win; |
133 | 133 | ||
134 | if(reg < 16) | 134 | if(reg < 16) |
135 | return ®s->u_regs[reg]; | 135 | return ®s->u_regs[reg]; |
136 | win = (struct reg_window *) regs->u_regs[UREG_FP]; | 136 | win = (struct reg_window32 *) regs->u_regs[UREG_FP]; |
137 | return &win->locals[reg - 16]; | 137 | return &win->locals[reg - 16]; |
138 | } | 138 | } |
139 | 139 | ||
diff --git a/arch/sparc/kernel/windows.c b/arch/sparc/kernel/windows.c index 9cc93eaa4abf..f24d298bda29 100644 --- a/arch/sparc/kernel/windows.c +++ b/arch/sparc/kernel/windows.c | |||
@@ -42,7 +42,7 @@ static inline void shift_window_buffer(int first_win, int last_win, struct threa | |||
42 | 42 | ||
43 | for(i = first_win; i < last_win; i++) { | 43 | for(i = first_win; i < last_win; i++) { |
44 | tp->rwbuf_stkptrs[i] = tp->rwbuf_stkptrs[i+1]; | 44 | tp->rwbuf_stkptrs[i] = tp->rwbuf_stkptrs[i+1]; |
45 | memcpy(&tp->reg_window[i], &tp->reg_window[i+1], sizeof(struct reg_window)); | 45 | memcpy(&tp->reg_window[i], &tp->reg_window[i+1], sizeof(struct reg_window32)); |
46 | } | 46 | } |
47 | } | 47 | } |
48 | 48 | ||
@@ -70,7 +70,7 @@ void synchronize_user_stack(void) | |||
70 | 70 | ||
71 | /* Ok, let it rip. */ | 71 | /* Ok, let it rip. */ |
72 | if (copy_to_user((char __user *) sp, &tp->reg_window[window], | 72 | if (copy_to_user((char __user *) sp, &tp->reg_window[window], |
73 | sizeof(struct reg_window))) | 73 | sizeof(struct reg_window32))) |
74 | continue; | 74 | continue; |
75 | 75 | ||
76 | shift_window_buffer(window, tp->w_saved - 1, tp); | 76 | shift_window_buffer(window, tp->w_saved - 1, tp); |
@@ -119,7 +119,7 @@ void try_to_clear_window_buffer(struct pt_regs *regs, int who) | |||
119 | 119 | ||
120 | if ((sp & 7) || | 120 | if ((sp & 7) || |
121 | copy_to_user((char __user *) sp, &tp->reg_window[window], | 121 | copy_to_user((char __user *) sp, &tp->reg_window[window], |
122 | sizeof(struct reg_window))) | 122 | sizeof(struct reg_window32))) |
123 | do_exit(SIGILL); | 123 | do_exit(SIGILL); |
124 | } | 124 | } |
125 | tp->w_saved = 0; | 125 | tp->w_saved = 0; |