mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	Arjan van de Ven <arjan@infradead.org>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: [patch] lockdep: special s390 print_symbol() version
Date: Wed, 28 Jun 2006 13:24:35 +0200	[thread overview]
Message-ID: <20060628112435.GD9452@osiris.boeblingen.de.ibm.com> (raw)

From: Heiko Carstens <heiko.carstens@de.ibm.com>

Have a special version of print_symbol() for s390 which clears the most
significant bit of addr before calling __print_symbol(). This seems to
be better than checking/changing each place in the kernel that saves an
instruction pointer.

Without this the output would look like:

hardirqs last  enabled at (30907): [<80018c6a>] 0x80018c6a
hardirqs last disabled at (30908): [<8001e48c>] 0x8001e48c
softirqs last  enabled at (30904): [<8001dc96>] 0x8001dc96
softirqs last disabled at (30897): [<8001dc50>] 0x8001dc50

instead of this:

hardirqs last  enabled at (19421): [<80018c72>] cpu_idle+0x176/0x1c4
hardirqs last disabled at (19422): [<8001e494>] io_no_vtime+0xa/0x1a
softirqs last  enabled at (19418): [<8001dc9e>] do_softirq+0xa6/0xe8
softirqs last disabled at (19411): [<8001dc58>] do_softirq+0x60/0xe8

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---

Patch is against 2.6.17-mm3.

 include/linux/kallsyms.h |    9 +++++++++
 1 file changed, 9 insertions(+)

Index: linux-2.6.17-mm3/include/linux/kallsyms.h
===================================================================
--- linux-2.6.17-mm3.orig/include/linux/kallsyms.h
+++ linux-2.6.17-mm3/include/linux/kallsyms.h
@@ -57,11 +57,20 @@ do {						\
 #define print_fn_descriptor_symbol(fmt, addr) print_symbol(fmt, addr)
 #endif
 
+/* need to clear the most significant bit on s390 31bit */
+#if defined(CONFIG_S390) && !defined(CONFIG_64BIT)
+#define print_symbol(fmt, addr)			\
+do {						\
+	__check_printsym_format(fmt, "");	\
+	__print_symbol(fmt, addr & 0x7fffffff);	\
+} while(0)
+#else
 #define print_symbol(fmt, addr)			\
 do {						\
 	__check_printsym_format(fmt, "");	\
 	__print_symbol(fmt, addr);		\
 } while(0)
+#endif
 
 #ifndef CONFIG_64BIT
 #define print_ip_sym(ip)		\

             reply	other threads:[~2006-06-28 11:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-28 11:24 Heiko Carstens [this message]
2006-06-28 12:06 ` Heiko Carstens
2006-06-28 12:11   ` Andrew Morton
2006-06-28 12:17     ` Martin Schwidefsky
2006-06-28 12:15   ` Ingo Molnar

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=20060628112435.GD9452@osiris.boeblingen.de.ibm.com \
    --to=heiko.carstens@de.ibm.com \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=schwidefsky@de.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®