OSDN Git Service

csky: Fixup ftrace modify panic
authorGuo Ren <guoren@linux.alibaba.com>
Sun, 2 Feb 2020 01:58:42 +0000 (09:58 +0800)
committerGuo Ren <guoren@linux.alibaba.com>
Fri, 21 Feb 2020 07:43:24 +0000 (15:43 +0800)
During ftrace init, linux will replace all function prologues
(call_mcout) with nops, but it need flush_dcache and
invalidate_icache to make it work. So flush_cache functions
couldn't be nested called by ftrace framework.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
arch/csky/mm/Makefile

index 2c51918..6e7696e 100644 (file)
@@ -1,8 +1,10 @@
 # SPDX-License-Identifier: GPL-2.0-only
 ifeq ($(CONFIG_CPU_HAS_CACHEV2),y)
 obj-y +=                       cachev2.o
+CFLAGS_REMOVE_cachev2.o = $(CC_FLAGS_FTRACE)
 else
 obj-y +=                       cachev1.o
+CFLAGS_REMOVE_cachev1.o = $(CC_FLAGS_FTRACE)
 endif
 
 obj-y +=                       dma-mapping.o