|
From: Dave A. <ai...@us...> - 2003-06-10 01:14:50
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/sparc/kernel
In directory sc8-pr-cvs1:/tmp/cvs-serv7538/arch/sparc/kernel
Modified Files:
process.c smp.c
Log Message:
DA: sync with Marcelo 2.4.17
Index: process.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc/kernel/process.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- process.c 10 Apr 2002 15:17:42 -0000 1.2
+++ process.c 10 Jun 2003 01:13:17 -0000 1.3
@@ -285,37 +285,29 @@
show_regwindow((struct reg_window *)regs->u_regs[14]);
}
-#if NOTUSED
-void show_thread(struct thread_struct *thread)
+void show_trace_task(struct task_struct *tsk)
{
- int i;
+ unsigned long pc, fp;
+ unsigned long task_base = (unsigned long) tsk;
+ struct reg_window *rw;
+ int count = 0;
- printk("uwinmask: 0x%08lx kregs: 0x%08lx\n", thread->uwinmask, (unsigned long)thread->kregs);
- show_regs(thread->kregs);
- printk("ksp: 0x%08lx kpc: 0x%08lx\n", thread->ksp, thread->kpc);
- printk("kpsr: 0x%08lx kwim: 0x%08lx\n", thread->kpsr, thread->kwim);
- printk("fork_kpsr: 0x%08lx fork_kwim: 0x%08lx\n", thread->fork_kpsr, thread->fork_kwim);
+ if (!tsk)
+ return;
- for (i = 0; i < NSWINS; i++) {
- if (!thread->rwbuf_stkptrs[i])
- continue;
- printk("reg_window[%d]:\n", i);
- printk("stack ptr: 0x%08lx\n", thread->rwbuf_stkptrs[i]);
- show_regwindow(&thread->reg_window[i]);
- }
- printk("w_saved: 0x%08lx\n", thread->w_saved);
-
- /* XXX missing: float_regs */
- printk("fsr: 0x%08lx fpqdepth: 0x%08lx\n", thread->fsr, thread->fpqdepth);
- /* XXX missing: fpqueue */
-
- printk("flags: 0x%08lx current_ds: 0x%08lx\n", thread->flags, thread->current_ds.seg);
-
- show_regwindow((struct reg_window *)thread->ksp);
-
- /* XXX missing: core_exec */
+ fp = tsk->thread.ksp;
+ do {
+ /* Bogus frame pointer? */
+ if (fp < (task_base + sizeof(struct task_struct)) ||
+ fp >= (task_base + (PAGE_SIZE << 1)))
+ break;
+ rw = (struct reg_window *) fp;
+ pc = rw->ins[7];
+ printk("[%08lx] ", pc);
+ fp = rw->ins[6];
+ } while (++count < 16);
+ printk("\n");
}
-#endif
/*
* Free current thread data structures etc..
Index: smp.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc/kernel/smp.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- smp.c 10 Apr 2002 15:17:42 -0000 1.2
+++ smp.c 10 Jun 2003 01:13:17 -0000 1.3
@@ -18,6 +18,7 @@
#include <linux/mm.h>
#include <linux/fs.h>
#include <linux/seq_file.h>
+#include <linux/cache.h>
#include <asm/ptrace.h>
#include <asm/atomic.h>
@@ -66,7 +67,7 @@
*/
/* Kernel spinlock */
-spinlock_t kernel_flag = SPIN_LOCK_UNLOCKED;
+spinlock_t kernel_flag __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
/* Used to make bitops atomic */
unsigned char bitops_spinlock = 0;
|