From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Dave Martin <dave.martin@linaro.org>
Cc: Simon Glass <sjg@chromium.org>,
Nicolas Pitre <nicolas.pitre@linaro.org>,
Phil Carmody <ext-phil.2.carmody@nokia.com>,
Tony Lindgren <tony@atomide.com>,
Catalin Marinas <catalin.marinas@arm.com>,
linux-kernel@vger.kernel.org, Rabin Vincent <rabin@rab.in>,
Alexander Shishkin <virtuoso@slind.org>,
Mikael Pettersson <mikpe@it.uu.se>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Joe Perches <joe@perches.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH] ARM: Use generic BUG() handler
Date: Thu, 3 Mar 2011 14:11:13 +0000 [thread overview]
Message-ID: <20110303141113.GF25891@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20110302105930.GA2363@arm.com>
On Wed, Mar 02, 2011 at 10:59:50AM +0000, Dave Martin wrote:
> + asm volatile("1:\t" __bug_instr "\n" q \
> + ".pushsection .rodata.str, \"a\"\n" \
> + "2:\t.asciz \"" #__file "\"\n" \
> + ".popsection\n" \
Doesn't this mean we end up with multiple file names?
> + ".pushsection __bug_table,\"a\"\n" \
> + "3:\t.word 1b, 2b\n" \
> + "\t.hword " #__line ", 0\n" \
> + ".popsection" \
> + unreachable(); \
> +} while (0)
Second problem is that the above produces this:
1: .word 0xec000000
.pushsection .rodata.str, "a"
2: .asciz "__FILE__"
.popsection
.pushsection __bug_table,"a"
3: .word 1b, 2b
.hword __LINE__, 0
.popsection
which is clearly not what we want. Adding another level of indirection
starts to get closer to what we desire:
1: .word 0xec000000
.pushsection .rodata.str, "a"
2: .asciz ""t.c""
.popsection
.pushsection __bug_table,"a"
3: .word 1b, 2b
.hword 19, 0
.popsection
but we're still ending up with multiple strings containing the filename,
which is going to excessively bloat the kernel no end.
next prev parent reply other threads:[~2011-03-03 14:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-01 0:27 Simon Glass
2011-03-01 8:49 ` Russell King - ARM Linux
2011-03-01 8:59 ` Russell King - ARM Linux
2011-03-01 9:12 ` Mikael Pettersson
2011-03-01 10:03 ` Russell King - ARM Linux
2011-03-01 16:34 ` Simon Glass
2011-03-01 20:28 ` Russell King - ARM Linux
2011-03-02 10:59 ` Dave Martin
2011-03-03 14:11 ` Russell King - ARM Linux [this message]
2011-03-03 14:44 ` Dave Martin
2011-03-01 17:48 ` Dave Martin
2011-03-01 20:32 ` Russell King - ARM Linux
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=20110303141113.GF25891@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=catalin.marinas@arm.com \
--cc=dave.martin@linaro.org \
--cc=ext-phil.2.carmody@nokia.com \
--cc=joe@perches.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@it.uu.se \
--cc=nicolas.pitre@linaro.org \
--cc=rabin@rab.in \
--cc=sjg@chromium.org \
--cc=tony@atomide.com \
--cc=virtuoso@slind.org \
/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®