Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9930fd2 authored by Sonic Zhang's avatar Sonic Zhang Committed by Mike Frysinger
Browse files

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: default avatarSonic Zhang <sonic.zhang@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent c91e09b6
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -38,6 +38,6 @@ obj-$(CONFIG_PERF_EVENTS) += perf_event.o


# the kgdb test puts code into L2 and without linker
# the kgdb test puts code into L2 and without linker
# relaxation, we need to force long calls to/from it
# 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
obj-$(CONFIG_DEBUG_MMRS)             += debug-mmrs.o
+1 −2
Original line number Original line Diff line number Diff line
@@ -50,8 +50,7 @@ void kgdb_l2_test(void)


#endif
#endif



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