linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: vijay.kilari@gmail.com (vijay.kilari at gmail.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v9 4/6] KGDB: make kgdb_breakpoint() as noinline
Date: Tue, 28 Jan 2014 16:50:20 +0530	[thread overview]
Message-ID: <1390908022-10287-5-git-send-email-vijay.kilari@gmail.com> (raw)
In-Reply-To: <1390908022-10287-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>
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Jason Wessel <jason.wessel@windriver.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 7d2f35e..cf04798 100644
--- a/kernel/debug/debug_core.c
+++ b/kernel/debug/debug_core.c
@@ -1034,7 +1034,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

  parent reply	other threads:[~2014-01-28 11:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-28 11:20 [PATCH v9 0/6] arm64: KGDB Support vijay.kilari at gmail.com
2014-01-28 11:20 ` [PATCH v9 1/6] arm64: Add macros to manage processor debug state vijay.kilari at gmail.com
2014-01-29 10:55   ` Will Deacon
2014-02-17 12:21     ` Vijay Kilari
2014-02-17 13:01       ` Catalin Marinas
2014-02-18 11:29         ` Vijay Kilari
2014-02-18 12:02           ` Catalin Marinas
2014-02-19  4:44             ` Vijay Kilari
2014-02-19 11:31               ` Catalin Marinas
2014-02-19 16:03                 ` Catalin Marinas
2014-02-19 16:12                   ` Will Deacon
2014-02-20  6:58                     ` Vijay Kilari
2014-02-20 11:42                       ` Will Deacon
2014-02-20 12:22                         ` Vijay Kilari
2014-02-20 15:56                           ` Will Deacon
2014-02-20 16:27                             ` Catalin Marinas
2014-02-21  5:19                               ` Vijay Kilari
2014-02-20 11:52                       ` Catalin Marinas
2014-01-28 11:20 ` [PATCH v9 2/6] arm64: KGDB: Add Basic KGDB support vijay.kilari at gmail.com
2014-01-28 11:20 ` [PATCH v9 3/6] arm64: KGDB: Add step debugging support vijay.kilari at gmail.com
2014-01-28 11:20 ` vijay.kilari at gmail.com [this message]
2014-01-28 11:20 ` [PATCH v9 5/6] misc: debug: remove compilation warnings vijay.kilari at gmail.com
2014-01-28 11:20 ` [PATCH v9 6/6] arm64: KGDB: Add KGDB config vijay.kilari at gmail.com

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=1390908022-10287-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).