Skip to content

Commit

Permalink
Blackfin: kgdb_test: rework code to avoid -O0 usage
Browse files Browse the repository at this point in the history
__kfree_rcu() in rcupdate.h bugs when parameter offset is not a constant
at compile time.  Since we build the kgdb_test module with -O0 and it
includes this header file, we hit the bug.  So drop the -O0 and mark the
one func we need for the test as noinline (so we can set a breakpoint on
it and have it be hit).

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
  • Loading branch information
Sonic Zhang authored and Mike Frysinger committed Oct 25, 2011
1 parent c91e09b commit a9930fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/blackfin/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ obj-$(CONFIG_PERF_EVENTS) += perf_event.o

# the kgdb test puts code into L2 and without linker
# relaxation, we need to force long calls to/from it
CFLAGS_kgdb_test.o := -mlong-calls -O0
CFLAGS_kgdb_test.o := -mlong-calls

obj-$(CONFIG_DEBUG_MMRS) += debug-mmrs.o
3 changes: 1 addition & 2 deletions arch/blackfin/kernel/kgdb_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ void kgdb_l2_test(void)

#endif


int kgdb_test(char *name, int len, int count, int z)
noinline int kgdb_test(char *name, int len, int count, int z)
{
pr_alert("kgdb name(%d): %s, %d, %d\n", len, name, count, z);
count = z;
Expand Down

0 comments on commit a9930fd

Please sign in to comment.