aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-11-09 17:33:22 -0500
committerSteve French <sfrench@us.ibm.com>2005-11-09 17:33:22 -0500
commite82b3aec8d508d2a925a4c766e97f16b7c4dfb1b (patch)
tree69d5685ef0c194f651a03e30bff14628b4d45400 /arch/parisc
parentec58ef03284f0bfa50a04982b74c8c2325a0758e (diff)
parentad8f76be48d817b48222411ae16a7dfe257bdb24 (diff)
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/asm-offsets.c1
-rw-r--r--arch/parisc/kernel/process.c4
-rw-r--r--arch/parisc/kernel/ptrace.c50
-rw-r--r--arch/parisc/kernel/smp.c1
4 files changed, 9 insertions, 47 deletions
diff --git a/arch/parisc/kernel/asm-offsets.c b/arch/parisc/kernel/asm-offsets.c
index 1ad44f92d6e4..e23c4e1e3a25 100644
--- a/arch/parisc/kernel/asm-offsets.c
+++ b/arch/parisc/kernel/asm-offsets.c
@@ -30,7 +30,6 @@
30#include <linux/types.h> 30#include <linux/types.h>
31#include <linux/sched.h> 31#include <linux/sched.h>
32#include <linux/thread_info.h> 32#include <linux/thread_info.h>
33#include <linux/version.h>
34#include <linux/ptrace.h> 33#include <linux/ptrace.h>
35#include <linux/hardirq.h> 34#include <linux/hardirq.h>
36 35
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index 7fdca87ef647..fee4f1f09adc 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -88,11 +88,15 @@ void default_idle(void)
88 */ 88 */
89void cpu_idle(void) 89void cpu_idle(void)
90{ 90{
91 set_thread_flag(TIF_POLLING_NRFLAG);
92
91 /* endless idle loop with no priority at all */ 93 /* endless idle loop with no priority at all */
92 while (1) { 94 while (1) {
93 while (!need_resched()) 95 while (!need_resched())
94 barrier(); 96 barrier();
97 preempt_enable_no_resched();
95 schedule(); 98 schedule();
99 preempt_disable();
96 check_pgt_cache(); 100 check_pgt_cache();
97 } 101 }
98} 102}
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c
index 18130c3748f3..b6fe202a620d 100644
--- a/arch/parisc/kernel/ptrace.c
+++ b/arch/parisc/kernel/ptrace.c
@@ -78,52 +78,13 @@ void ptrace_disable(struct task_struct *child)
78 pa_psw(child)->l = 0; 78 pa_psw(child)->l = 0;
79} 79}
80 80
81long sys_ptrace(long request, long pid, long addr, long data) 81long arch_ptrace(struct task_struct *child, long request, long addr, long data)
82{ 82{
83 struct task_struct *child;
84 long ret; 83 long ret;
85#ifdef DEBUG_PTRACE 84#ifdef DEBUG_PTRACE
86 long oaddr=addr, odata=data; 85 long oaddr=addr, odata=data;
87#endif 86#endif
88 87
89 lock_kernel();
90 ret = -EPERM;
91 if (request == PTRACE_TRACEME) {
92 /* are we already being traced? */
93 if (current->ptrace & PT_PTRACED)
94 goto out;
95
96 ret = security_ptrace(current->parent, current);
97 if (ret)
98 goto out;
99
100 /* set the ptrace bit in the process flags. */
101 current->ptrace |= PT_PTRACED;
102 ret = 0;
103 goto out;
104 }
105
106 ret = -ESRCH;
107 read_lock(&tasklist_lock);
108 child = find_task_by_pid(pid);
109 if (child)
110 get_task_struct(child);
111 read_unlock(&tasklist_lock);
112 if (!child)
113 goto out;
114 ret = -EPERM;
115 if (pid == 1) /* no messing around with init! */
116 goto out_tsk;
117
118 if (request == PTRACE_ATTACH) {
119 ret = ptrace_attach(child);
120 goto out_tsk;
121 }
122
123 ret = ptrace_check_attach(child, request == PTRACE_KILL);
124 if (ret < 0)
125 goto out_tsk;
126
127 switch (request) { 88 switch (request) {
128 case PTRACE_PEEKTEXT: /* read word at location addr. */ 89 case PTRACE_PEEKTEXT: /* read word at location addr. */
129 case PTRACE_PEEKDATA: { 90 case PTRACE_PEEKDATA: {
@@ -383,11 +344,11 @@ long sys_ptrace(long request, long pid, long addr, long data)
383 344
384 case PTRACE_GETEVENTMSG: 345 case PTRACE_GETEVENTMSG:
385 ret = put_user(child->ptrace_message, (unsigned int __user *) data); 346 ret = put_user(child->ptrace_message, (unsigned int __user *) data);
386 goto out_tsk; 347 goto out;
387 348
388 default: 349 default:
389 ret = ptrace_request(child, request, addr, data); 350 ret = ptrace_request(child, request, addr, data);
390 goto out_tsk; 351 goto out;
391 } 352 }
392 353
393out_wake_notrap: 354out_wake_notrap:
@@ -396,10 +357,7 @@ out_wake:
396 wake_up_process(child); 357 wake_up_process(child);
397 ret = 0; 358 ret = 0;
398out_tsk: 359out_tsk:
399 put_task_struct(child); 360 DBG("arch_ptrace(%ld, %d, %lx, %lx) returning %ld\n",
400out:
401 unlock_kernel();
402 DBG("sys_ptrace(%ld, %d, %lx, %lx) returning %ld\n",
403 request, pid, oaddr, odata, ret); 361 request, pid, oaddr, odata, ret);
404 return ret; 362 return ret;
405} 363}
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index 5db3be4e2704..a9ecf6465784 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -463,6 +463,7 @@ void __init smp_callin(void)
463#endif 463#endif
464 464
465 smp_cpu_init(slave_id); 465 smp_cpu_init(slave_id);
466 preempt_disable();
466 467
467#if 0 /* NOT WORKING YET - see entry.S */ 468#if 0 /* NOT WORKING YET - see entry.S */
468 istack = (void *)__get_free_pages(GFP_KERNEL,ISTACK_ORDER); 469 istack = (void *)__get_free_pages(GFP_KERNEL,ISTACK_ORDER);