aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 20:37:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 20:37:43 -0400
commit5f56886521d6ddd3648777fae44d82382dd8c87f (patch)
treeaa0db6331cdb01c23f1884439840aadd31bbcca4 /arch/sparc
parentf1e9a236e5ddab6c349611ee86f54291916f226c (diff)
parente2a8b0a779787314eca1061308a8182e6c5bfabd (diff)
Merge branch 'akpm' (incoming from Andrew)
Merge third batch of fixes from Andrew Morton: "Most of the rest. I still have two large patchsets against AIO and IPC, but they're a bit stuck behind other trees and I'm about to vanish for six days. - random fixlets - inotify - more of the MM queue - show_stack() cleanups - DMI update - kthread/workqueue things - compat cleanups - epoll udpates - binfmt updates - nilfs2 - hfs - hfsplus - ptrace - kmod - coredump - kexec - rbtree - pids - pidns - pps - semaphore tweaks - some w1 patches - relay updates - core Kconfig changes - sysrq tweaks" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (109 commits) Documentation/sysrq: fix inconstistent help message of sysrq key ethernet/emac/sysrq: fix inconstistent help message of sysrq key sparc/sysrq: fix inconstistent help message of sysrq key powerpc/xmon/sysrq: fix inconstistent help message of sysrq key ARM/etm/sysrq: fix inconstistent help message of sysrq key power/sysrq: fix inconstistent help message of sysrq key kgdb/sysrq: fix inconstistent help message of sysrq key lib/decompress.c: fix initconst notifier-error-inject: fix module names in Kconfig kernel/sys.c: make prctl(PR_SET_MM) generally available UAPI: remove empty Kbuild files menuconfig: print more info for symbol without prompts init/Kconfig: re-order CONFIG_EXPERT options to fix menuconfig display kconfig menu: move Virtualization drivers near other virtualization options Kconfig: consolidate CONFIG_DEBUG_STRICT_USER_COPY_CHECKS relay: use macro PAGE_ALIGN instead of FIX_SIZE kernel/relay.c: move FIX_SIZE macro into relay.c kernel/relay.c: remove unused function argument actor drivers/w1/slaves/w1_ds2760.c: fix the error handling in w1_ds2760_add_slave() drivers/w1/slaves/w1_ds2781.c: fix the error handling in w1_ds2781_add_slave() ...
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/process_32.c23
-rw-r--r--arch/sparc/kernel/process_64.c6
-rw-r--r--arch/sparc/kernel/traps_64.c7
-rw-r--r--arch/sparc/lib/Makefile1
-rw-r--r--arch/sparc/lib/usercopy.c9
5 files changed, 12 insertions, 34 deletions
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c
index c85241006e32..fdd819dfdacf 100644
--- a/arch/sparc/kernel/process_32.c
+++ b/arch/sparc/kernel/process_32.c
@@ -112,6 +112,8 @@ void show_regs(struct pt_regs *r)
112{ 112{
113 struct reg_window32 *rw = (struct reg_window32 *) r->u_regs[14]; 113 struct reg_window32 *rw = (struct reg_window32 *) r->u_regs[14];
114 114
115 show_regs_print_info(KERN_DEFAULT);
116
115 printk("PSR: %08lx PC: %08lx NPC: %08lx Y: %08lx %s\n", 117 printk("PSR: %08lx PC: %08lx NPC: %08lx Y: %08lx %s\n",
116 r->psr, r->pc, r->npc, r->y, print_tainted()); 118 r->psr, r->pc, r->npc, r->y, print_tainted());
117 printk("PC: <%pS>\n", (void *) r->pc); 119 printk("PC: <%pS>\n", (void *) r->pc);
@@ -142,11 +144,13 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
142 struct reg_window32 *rw; 144 struct reg_window32 *rw;
143 int count = 0; 145 int count = 0;
144 146
145 if (tsk != NULL) 147 if (!tsk)
146 task_base = (unsigned long) task_stack_page(tsk); 148 tsk = current;
147 else 149
148 task_base = (unsigned long) current_thread_info(); 150 if (tsk == current && !_ksp)
151 __asm__ __volatile__("mov %%fp, %0" : "=r" (_ksp));
149 152
153 task_base = (unsigned long) task_stack_page(tsk);
150 fp = (unsigned long) _ksp; 154 fp = (unsigned long) _ksp;
151 do { 155 do {
152 /* Bogus frame pointer? */ 156 /* Bogus frame pointer? */
@@ -162,17 +166,6 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
162 printk("\n"); 166 printk("\n");
163} 167}
164 168
165void dump_stack(void)
166{
167 unsigned long *ksp;
168
169 __asm__ __volatile__("mov %%fp, %0"
170 : "=r" (ksp));
171 show_stack(current, ksp);
172}
173
174EXPORT_SYMBOL(dump_stack);
175
176/* 169/*
177 * Note: sparc64 has a pretty intricated thread_saved_pc, check it out. 170 * Note: sparc64 has a pretty intricated thread_saved_pc, check it out.
178 */ 171 */
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c
index 9fbf0d14a361..baebab215492 100644
--- a/arch/sparc/kernel/process_64.c
+++ b/arch/sparc/kernel/process_64.c
@@ -163,6 +163,8 @@ static void show_regwindow(struct pt_regs *regs)
163 163
164void show_regs(struct pt_regs *regs) 164void show_regs(struct pt_regs *regs)
165{ 165{
166 show_regs_print_info(KERN_DEFAULT);
167
166 printk("TSTATE: %016lx TPC: %016lx TNPC: %016lx Y: %08x %s\n", regs->tstate, 168 printk("TSTATE: %016lx TPC: %016lx TNPC: %016lx Y: %08x %s\n", regs->tstate,
167 regs->tpc, regs->tnpc, regs->y, print_tainted()); 169 regs->tpc, regs->tnpc, regs->y, print_tainted());
168 printk("TPC: <%pS>\n", (void *) regs->tpc); 170 printk("TPC: <%pS>\n", (void *) regs->tpc);
@@ -292,7 +294,7 @@ static void sysrq_handle_globreg(int key)
292 294
293static struct sysrq_key_op sparc_globalreg_op = { 295static struct sysrq_key_op sparc_globalreg_op = {
294 .handler = sysrq_handle_globreg, 296 .handler = sysrq_handle_globreg,
295 .help_msg = "global-regs(Y)", 297 .help_msg = "global-regs(y)",
296 .action_msg = "Show Global CPU Regs", 298 .action_msg = "Show Global CPU Regs",
297}; 299};
298 300
@@ -362,7 +364,7 @@ static void sysrq_handle_globpmu(int key)
362 364
363static struct sysrq_key_op sparc_globalpmu_op = { 365static struct sysrq_key_op sparc_globalpmu_op = {
364 .handler = sysrq_handle_globpmu, 366 .handler = sysrq_handle_globpmu,
365 .help_msg = "global-pmu(X)", 367 .help_msg = "global-pmu(x)",
366 .action_msg = "Show Global PMU Regs", 368 .action_msg = "Show Global PMU Regs",
367}; 369};
368 370
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c
index 8d38ca97aa23..b3f833ab90eb 100644
--- a/arch/sparc/kernel/traps_64.c
+++ b/arch/sparc/kernel/traps_64.c
@@ -2350,13 +2350,6 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
2350 } while (++count < 16); 2350 } while (++count < 16);
2351} 2351}
2352 2352
2353void dump_stack(void)
2354{
2355 show_stack(current, NULL);
2356}
2357
2358EXPORT_SYMBOL(dump_stack);
2359
2360static inline struct reg_window *kernel_stack_up(struct reg_window *rw) 2353static inline struct reg_window *kernel_stack_up(struct reg_window *rw)
2361{ 2354{
2362 unsigned long fp = rw->ins[6]; 2355 unsigned long fp = rw->ins[6];
diff --git a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile
index 8410065f2862..dbe119b63b48 100644
--- a/arch/sparc/lib/Makefile
+++ b/arch/sparc/lib/Makefile
@@ -45,4 +45,3 @@ obj-y += iomap.o
45obj-$(CONFIG_SPARC32) += atomic32.o ucmpdi2.o 45obj-$(CONFIG_SPARC32) += atomic32.o ucmpdi2.o
46obj-y += ksyms.o 46obj-y += ksyms.o
47obj-$(CONFIG_SPARC64) += PeeCeeI.o 47obj-$(CONFIG_SPARC64) += PeeCeeI.o
48obj-y += usercopy.o
diff --git a/arch/sparc/lib/usercopy.c b/arch/sparc/lib/usercopy.c
deleted file mode 100644
index 5c4284ce1c03..000000000000
--- a/arch/sparc/lib/usercopy.c
+++ /dev/null
@@ -1,9 +0,0 @@
1#include <linux/module.h>
2#include <linux/kernel.h>
3#include <linux/bug.h>
4
5void copy_from_user_overflow(void)
6{
7 WARN(1, "Buffer overflow detected!\n");
8}
9EXPORT_SYMBOL(copy_from_user_overflow);