Linux MIPS Architecture development
 help / color / mirror / Atom feed
* _stext is ill-defined / SysRq-T broken
@ 2002-07-24 18:17 Johannes Stezenbach
  2002-07-25 10:08 ` Maciej W. Rozycki
  0 siblings, 1 reply; 7+ messages in thread
From: Johannes Stezenbach @ 2002-07-24 18:17 UTC (permalink / raw)
  To: linux-mips

I use the following patch to enable SysRq on serial console
(via Ctrl-A-F == "Break" in minicom):


--- linux-oss-2.4.19-rc1-20020715.base/drivers/char/dummy_keyb.c	Fri Oct 19 03:24:11 2001
+++ linux-oss-2.4.19-rc1-20020715/drivers/char/dummy_keyb.c	Tue Jul 16 18:57:19 2002
@@ -23,9 +23,15 @@
  * CONFIG_VT.
  *
  */
+#include <linux/config.h>
 #include <linux/sched.h>
 #include <linux/errno.h>
 #include <linux/init.h>
+
+#if (!defined(CONFIG_PC_KEYB) && defined (CONFIG_MAGIC_SYSRQ))
+unsigned char kbd_sysrq_xlate[128];
+unsigned char kbd_sysrq_key = 0;
+#endif
 
 void kbd_leds(unsigned char leds)
 {



SysRq-T (showTasks) gives me the following output:
-----------------
SysRq : Show State

                         free                        sibling
  task             PC    stack   pid father child younger older
init          S 00000000     0     1      0   179               (NOTLB)

Call Trace:keventd       S 00000000     0     2      1             3       (L-TLB)

Call Trace:ksoftirqd_CPU S 00000000     0     3      1             4     2 (L-TLB)
[snip]
-----------------

Two problems:
a) there is no call trace, and 
b) there is bad formatting when the call trace is empty.


I found that the cause for this is that _stext (defined in head.S) is in
.text.init instead of .text, so it's past _etext.

I suggest the patch below to fix the bad formatting, but I'm
not shure about _stext. Should kernel_entry be placed into the .text
section, or should _stext = _ftext in ld.script?

Another nit (I don't have ejtag, so I don't care much):
  head.S: Assembler messages:
  head.S:102: Warning: Macro instruction expanded into multiple instructions in a branch delay slot
Maybe someone has spare nop to put there.


Johannes


--- linux-oss-2.4.19-rc1-20020715.base/arch/mips/kernel/traps.c	Mon Jul 15 15:42:06 2002
+++ linux-oss-2.4.19-rc1-20020715/arch/mips/kernel/traps.c	Wed Jul 24 20:08:05 2002
@@ -230,7 +230,7 @@ void show_trace(unsigned int *sp)
 	module_start = VMALLOC_START;
 	module_end = module_start + MODULE_RANGE;
 
-	printk("\nCall Trace:");
+	printk("Call Trace:");
 
 	while ((unsigned long) stack & (PAGE_SIZE -1)) {
 		unsigned long addr;
@@ -250,21 +250,20 @@ void show_trace(unsigned int *sp)
 		 */
 
 		if ((addr >= kernel_start && addr < kernel_end) ||
-		    (addr >= module_start && addr < module_end)) { 
+		    (addr >= module_start && addr < module_end)) {
 
-			printk(" [<%08lx>]", addr);
-			if (column++ == 5) {
-				printk("\n");
-				column = 0;
-			}
 			if (++i > 40) {
 				printk(" ...");
 				break;
 			}
+			if (column++ > 5) {
+				printk("\n           ");
+				column = 1;
+			}
+			printk(" [<%08lx>]", addr);
 		}
 	}
-	if (column != 0)
-		printk("\n");
+	printk("\n");
 }
 
 void show_trace_task(struct task_struct *tsk)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-07-29 16:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-24 18:17 _stext is ill-defined / SysRq-T broken Johannes Stezenbach
2002-07-25 10:08 ` Maciej W. Rozycki
2002-07-25 11:05   ` Johannes Stezenbach
2002-07-25 11:20     ` Maciej W. Rozycki
2002-07-25 11:47   ` Johannes Stezenbach
2002-07-29 13:25   ` [patch] Oops and magic SysRq stack dump clean-ups Maciej W. Rozycki
2002-07-29 16:02     ` Johannes Stezenbach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox