summaryrefslogtreecommitdiffstats
path: root/kernel/debug
diff options
context:
space:
mode:
authorVijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>2014-01-28 16:50:20 +0530
committerCatalin Marinas <catalin.marinas@arm.com>2014-02-26 11:16:25 +0000
commitd498d4b47fb3050f2f7840cc49251f87f04d1ca9 (patch)
tree86cc430b0c163bdda462219f93753dc1ce8cbdf9 /kernel/debug
parent44679a4f142b69ae0c68ed815a48bbd164827281 (diff)
KGDB: make kgdb_breakpoint() as noinline
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> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'kernel/debug')
-rw-r--r--kernel/debug/debug_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
index 334b3980ffc..99982a70dda 100644
--- a/kernel/debug/debug_core.c
+++ b/kernel/debug/debug_core.c
@@ -1035,7 +1035,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 */