aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-01-30 19:25:51 -0500
committerPaul Mackerras <paulus@samba.org>2008-01-30 19:25:51 -0500
commitbd45ac0c5daae35e7c71138172e63df5cf644cf6 (patch)
tree5eb5a599bf6a9d7a8a34e802db932aa9e9555de4 /arch/powerpc/kernel
parent4eece4ccf997c0e6d8fdad3d842e37b16b8d705f (diff)
parent5bdeae46be6dfe9efa44a548bd622af325f4bdb4 (diff)
Merge branch 'linux-2.6'
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/ptrace.c52
-rw-r--r--arch/powerpc/kernel/sysfs.c2
-rw-r--r--arch/powerpc/kernel/vio.c13
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S10
4 files changed, 14 insertions, 63 deletions
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 3e17d154d0d4..8b056d2295cc 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -256,7 +256,7 @@ static int set_evrregs(struct task_struct *task, unsigned long *data)
256#endif /* CONFIG_SPE */ 256#endif /* CONFIG_SPE */
257 257
258 258
259static void set_single_step(struct task_struct *task) 259void user_enable_single_step(struct task_struct *task)
260{ 260{
261 struct pt_regs *regs = task->thread.regs; 261 struct pt_regs *regs = task->thread.regs;
262 262
@@ -271,7 +271,7 @@ static void set_single_step(struct task_struct *task)
271 set_tsk_thread_flag(task, TIF_SINGLESTEP); 271 set_tsk_thread_flag(task, TIF_SINGLESTEP);
272} 272}
273 273
274static void clear_single_step(struct task_struct *task) 274void user_disable_single_step(struct task_struct *task)
275{ 275{
276 struct pt_regs *regs = task->thread.regs; 276 struct pt_regs *regs = task->thread.regs;
277 277
@@ -313,7 +313,7 @@ static int ptrace_set_debugreg(struct task_struct *task, unsigned long addr,
313void ptrace_disable(struct task_struct *child) 313void ptrace_disable(struct task_struct *child)
314{ 314{
315 /* make sure the single step bit is not set. */ 315 /* make sure the single step bit is not set. */
316 clear_single_step(child); 316 user_disable_single_step(child);
317} 317}
318 318
319/* 319/*
@@ -445,52 +445,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
445 break; 445 break;
446 } 446 }
447 447
448 case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */
449 case PTRACE_CONT: { /* restart after signal. */
450 ret = -EIO;
451 if (!valid_signal(data))
452 break;
453 if (request == PTRACE_SYSCALL)
454 set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
455 else
456 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
457 child->exit_code = data;
458 /* make sure the single step bit is not set. */
459 clear_single_step(child);
460 wake_up_process(child);
461 ret = 0;
462 break;
463 }
464
465/*
466 * make the child exit. Best I can do is send it a sigkill.
467 * perhaps it should be put in the status that it wants to
468 * exit.
469 */
470 case PTRACE_KILL: {
471 ret = 0;
472 if (child->exit_state == EXIT_ZOMBIE) /* already dead */
473 break;
474 child->exit_code = SIGKILL;
475 /* make sure the single step bit is not set. */
476 clear_single_step(child);
477 wake_up_process(child);
478 break;
479 }
480
481 case PTRACE_SINGLESTEP: { /* set the trap flag. */
482 ret = -EIO;
483 if (!valid_signal(data))
484 break;
485 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
486 set_single_step(child);
487 child->exit_code = data;
488 /* give it a chance to run. */
489 wake_up_process(child);
490 ret = 0;
491 break;
492 }
493
494 case PTRACE_GET_DEBUGREG: { 448 case PTRACE_GET_DEBUGREG: {
495 ret = -EINVAL; 449 ret = -EINVAL;
496 /* We only support one DABR and no IABRS at the moment */ 450 /* We only support one DABR and no IABRS at the moment */
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index 25d9a96484dd..c8127f832df0 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -158,7 +158,7 @@ static ssize_t show_##NAME(struct sys_device *dev, char *buf) \
158 unsigned long val = run_on_cpu(cpu->sysdev.id, read_##NAME, 0); \ 158 unsigned long val = run_on_cpu(cpu->sysdev.id, read_##NAME, 0); \
159 return sprintf(buf, "%lx\n", val); \ 159 return sprintf(buf, "%lx\n", val); \
160} \ 160} \
161static ssize_t __attribute_used__ \ 161static ssize_t __used \
162 store_##NAME(struct sys_device *dev, const char *buf, size_t count) \ 162 store_##NAME(struct sys_device *dev, const char *buf, size_t count) \
163{ \ 163{ \
164 struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ 164 struct cpu *cpu = container_of(dev, struct cpu, sysdev); \
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index 19a5656001c0..f0bad7070fb5 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -37,8 +37,6 @@
37#include <asm/iseries/hv_call_xm.h> 37#include <asm/iseries/hv_call_xm.h>
38#include <asm/iseries/iommu.h> 38#include <asm/iseries/iommu.h>
39 39
40extern struct kset devices_subsys; /* needed for vio_find_name() */
41
42static struct bus_type vio_bus_type; 40static struct bus_type vio_bus_type;
43 41
44static struct vio_dev vio_bus_device = { /* fake "parent" device */ 42static struct vio_dev vio_bus_device = { /* fake "parent" device */
@@ -361,19 +359,16 @@ EXPORT_SYMBOL(vio_get_attribute);
361#ifdef CONFIG_PPC_PSERIES 359#ifdef CONFIG_PPC_PSERIES
362/* vio_find_name() - internal because only vio.c knows how we formatted the 360/* vio_find_name() - internal because only vio.c knows how we formatted the
363 * kobject name 361 * kobject name
364 * XXX once vio_bus_type.devices is actually used as a kset in
365 * drivers/base/bus.c, this function should be removed in favor of
366 * "device_find(kobj_name, &vio_bus_type)"
367 */ 362 */
368static struct vio_dev *vio_find_name(const char *kobj_name) 363static struct vio_dev *vio_find_name(const char *name)
369{ 364{
370 struct kobject *found; 365 struct device *found;
371 366
372 found = kset_find_obj(&devices_subsys, kobj_name); 367 found = bus_find_device_by_name(&vio_bus_type, NULL, name);
373 if (!found) 368 if (!found)
374 return NULL; 369 return NULL;
375 370
376 return to_vio_dev(container_of(found, struct device, kobj)); 371 return to_vio_dev(found);
377} 372}
378 373
379/** 374/**
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index f66fa5d966b0..0afb9e31d2a0 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -23,7 +23,7 @@ SECTIONS
23 /* Sections to be discarded. */ 23 /* Sections to be discarded. */
24 /DISCARD/ : { 24 /DISCARD/ : {
25 *(.exitcall.exit) 25 *(.exitcall.exit)
26 *(.exit.data) 26 EXIT_DATA
27 } 27 }
28 28
29 . = KERNELBASE; 29 . = KERNELBASE;
@@ -76,17 +76,19 @@ SECTIONS
76 76
77 .init.text : { 77 .init.text : {
78 _sinittext = .; 78 _sinittext = .;
79 *(.init.text) 79 INIT_TEXT
80 _einittext = .; 80 _einittext = .;
81 } 81 }
82 82
83 /* .exit.text is discarded at runtime, not link time, 83 /* .exit.text is discarded at runtime, not link time,
84 * to deal with references from __bug_table 84 * to deal with references from __bug_table
85 */ 85 */
86 .exit.text : { *(.exit.text) } 86 .exit.text : {
87 EXIT_TEXT
88 }
87 89
88 .init.data : { 90 .init.data : {
89 *(.init.data); 91 INIT_DATA
90 __vtop_table_begin = .; 92 __vtop_table_begin = .;
91 *(.vtop_fixup); 93 *(.vtop_fixup);
92 __vtop_table_end = .; 94 __vtop_table_end = .;