]> git.baikalelectronics.ru Git - kernel.git/commit
KGDB: make kgdb_breakpoint() as noinline
authorVijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
Tue, 28 Jan 2014 11:20:20 +0000 (16:50 +0530)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 26 Feb 2014 11:16:25 +0000 (11:16 +0000)
commitc7c240d14b894152bc04bd95fc6d231e618da68a
tree86cc430b0c163bdda462219f93753dc1ce8cbdf9
parent48911cff8d69c6ea04783603ca42d6da83db5a60
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>
kernel/debug/debug_core.c