|
@@ -4,7 +4,7 @@
|
|
|
|
|
|
#define ARCH_SUPPORTS_FTRACE_OPS 1
|
|
#define ARCH_SUPPORTS_FTRACE_OPS 1
|
|
|
|
|
|
-#ifdef CC_USING_HOTPATCH
|
|
|
|
|
|
+#if defined(CC_USING_HOTPATCH) || defined(CC_USING_NOP_MCOUNT)
|
|
#define MCOUNT_INSN_SIZE 6
|
|
#define MCOUNT_INSN_SIZE 6
|
|
#else
|
|
#else
|
|
#define MCOUNT_INSN_SIZE 24
|
|
#define MCOUNT_INSN_SIZE 24
|
|
@@ -42,7 +42,7 @@ struct ftrace_insn {
|
|
static inline void ftrace_generate_nop_insn(struct ftrace_insn *insn)
|
|
static inline void ftrace_generate_nop_insn(struct ftrace_insn *insn)
|
|
{
|
|
{
|
|
#ifdef CONFIG_FUNCTION_TRACER
|
|
#ifdef CONFIG_FUNCTION_TRACER
|
|
-#ifdef CC_USING_HOTPATCH
|
|
|
|
|
|
+#if defined(CC_USING_HOTPATCH) || defined(CC_USING_NOP_MCOUNT)
|
|
/* brcl 0,0 */
|
|
/* brcl 0,0 */
|
|
insn->opc = 0xc004;
|
|
insn->opc = 0xc004;
|
|
insn->disp = 0;
|
|
insn->disp = 0;
|
|
@@ -57,7 +57,7 @@ static inline void ftrace_generate_nop_insn(struct ftrace_insn *insn)
|
|
static inline int is_ftrace_nop(struct ftrace_insn *insn)
|
|
static inline int is_ftrace_nop(struct ftrace_insn *insn)
|
|
{
|
|
{
|
|
#ifdef CONFIG_FUNCTION_TRACER
|
|
#ifdef CONFIG_FUNCTION_TRACER
|
|
-#ifdef CC_USING_HOTPATCH
|
|
|
|
|
|
+#if defined(CC_USING_HOTPATCH) || defined(CC_USING_NOP_MCOUNT)
|
|
if (insn->disp == 0)
|
|
if (insn->disp == 0)
|
|
return 1;
|
|
return 1;
|
|
#else
|
|
#else
|