History

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

Vijaya Kumar K committed 12 years ago

Commit d498d4b1 parent 44679a41 file · +1 −1Browse files

Unified · Split

kernel/debug/debug_core.c+1−1
@@ -1035,7 +1035,7 @@ int dbg_io_get_char(void) · 1034 unmodified lines
10351035 * otherwise as a quick means to stop program execution and "break" into
10361036 * the debugger.
10371037 */
1038−void kgdb_breakpoint(void)
1038+noinline void kgdb_breakpoint(void)
10391039 {
10401040 atomic_inc(&kgdb_setting_breakpoint);
10411041 wmb(); /* Sync point before breakpoint */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t