All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Stezenbach <js@convergence.de>
To: linux-mips@oss.sgi.com
Subject: _stext is ill-defined / SysRq-T broken
Date: Wed, 24 Jul 2002 20:17:08 +0200	[thread overview]
Message-ID: <20020724181708.GA5399@convergence.de> (raw)

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)

             reply	other threads:[~2002-07-24 18:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-24 18:17 Johannes Stezenbach [this message]
2002-07-25 10:08 ` _stext is ill-defined / SysRq-T broken 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020724181708.GA5399@convergence.de \
    --to=js@convergence.de \
    --cc=linux-mips@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.