From: vijay.kilari@gmail.com (vijay.kilari at gmail.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 4/4] KGDB: make kgdb_breakpoint() as noinline
Date: Tue, 5 Nov 2013 14:15:46 +0530 [thread overview]
Message-ID: <1383641146-27274-5-git-send-email-vijay.kilari@gmail.com> (raw)
In-Reply-To: <1383641146-27274-1-git-send-email-vijay.kilari@gmail.com>
From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
The function kgdb_breakpoint() sets up break point at
compile time by calling arch_kgdb_breakpoint();
Though this call is surrounded by wmb() barrier,
the compile can still re-order the break point,
because this scheduling barrier is not a code motion
barrier in gcc.
Making kgdb_breakpoint() as noinline solves this problem
of code reording around break point instruction and also
avoids problem of being called as inline function from
other places
More details about discussion on this can be found here
http://comments.gmane.org/gmane.linux.ports.arm.kernel/269732
Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
---
kernel/debug/debug_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
index 0506d44..359ce6a 100644
--- a/kernel/debug/debug_core.c
+++ b/kernel/debug/debug_core.c
@@ -1006,7 +1006,7 @@ int dbg_io_get_char(void)
* otherwise as a quick means to stop program execution and "break" into
* the debugger.
*/
-void kgdb_breakpoint(void)
+noinline void kgdb_breakpoint(void)
{
atomic_inc(&kgdb_setting_breakpoint);
wmb(); /* Sync point before breakpoint */
--
1.7.9.5
next prev parent reply other threads:[~2013-11-05 8:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-05 8:45 [PATCH v4 0/4] AArch64: KGDB support vijay.kilari at gmail.com
2013-11-05 8:45 ` [PATCH v4 1/4] arm64: support single-step and breakpoint handler hooks vijay.kilari at gmail.com
2013-11-05 8:45 ` [PATCH v4 2/4] AArch64: KGDB: Add Basic KGDB support vijay.kilari at gmail.com
2013-11-08 14:14 ` Will Deacon
2013-11-05 8:45 ` [PATCH v4 3/4] AArch64: KGDB: Add step debugging support vijay.kilari at gmail.com
2013-11-08 14:18 ` Will Deacon
2013-11-11 11:09 ` Vijay Kilari
2013-11-11 15:00 ` Will Deacon
2013-11-13 8:56 ` Vijay Kilari
2013-11-05 8:45 ` vijay.kilari at gmail.com [this message]
2013-11-08 13:47 ` [PATCH v4 4/4] KGDB: make kgdb_breakpoint() as noinline Will Deacon
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=1383641146-27274-5-git-send-email-vijay.kilari@gmail.com \
--to=vijay.kilari@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).