From a9930fd234b64ac0fcdb3e6a626d9ba44fc250fb Mon Sep 17 00:00:00 2001 From: Sonic Zhang Date: Fri, 12 Aug 2011 17:57:57 +0800 Subject: [PATCH] Blackfin: kgdb_test: rework code to avoid -O0 usage __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 Signed-off-by: Mike Frysinger --- arch/blackfin/kernel/Makefile | 2 +- arch/blackfin/kernel/kgdb_test.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/blackfin/kernel/Makefile b/arch/blackfin/kernel/Makefile index b7bdc42fe1a3..1f88edd4572a 100644 --- a/arch/blackfin/kernel/Makefile +++ b/arch/blackfin/kernel/Makefile @@ -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 diff --git a/arch/blackfin/kernel/kgdb_test.c b/arch/blackfin/kernel/kgdb_test.c index 2a6e9dbb62a5..4a7dcfea98af 100644 --- a/arch/blackfin/kernel/kgdb_test.c +++ b/arch/blackfin/kernel/kgdb_test.c @@ -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; -- 2.20.1