Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756336AbZKIPdc (ORCPT ); Mon, 9 Nov 2009 10:33:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756216AbZKIPda (ORCPT ); Mon, 9 Nov 2009 10:33:30 -0500 Received: from mail-ew0-f207.google.com ([209.85.219.207]:39623 "EHLO mail-ew0-f207.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756326AbZKIPd0 (ORCPT ); Mon, 9 Nov 2009 10:33:26 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=mgdl9mE8w1cCE3a1x5VxAFFatohEV7XmweHKHPhgXvdCKC2c+FsNVURPgl71MrhN45 xb/FMnXvPHFEarG77tJkry5HoVLWlFBTfWwUmrZq1UUZuCKIrMjMm8q1QupqYXVEbsOt v8H29ZAaxtP2kjxUmfoXxs6g4lIkxAxSkhh18= From: Wu Zhangjin To: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Cc: zhangfx@lemote.com, zhouqg@gmail.com, Wu Zhangjin , Ralf Baechle , rostedt@goodmis.org, Frederic Weisbecker , Ingo Molnar , Nicholas Mc Guire , David Daney , Richard Sandiford , Patrik Kluba , Thomas Gleixner , Michal Simek Subject: [PATCH v7 14/17] tracing: make ftrace for MIPS work without -fno-omit-frame-pointer Date: Mon, 9 Nov 2009 23:31:31 +0800 Message-Id: <695747bff7cddb97d6f43c05c4cf05eb269e402d.1257779502.git.wuzhangjin@gmail.com> X-Mailer: git-send-email 1.6.2.1 In-Reply-To: <0c463e2af521e613fd15751a9f610c74cf887292.1257779502.git.wuzhangjin@gmail.com> References: <9dc81a7a9e5a292cccdf465c533a2b08d19d6021.1257779502.git.wuzhangjin@gmail.com> <8f579e2cece16cd22358a4ec143ef6a8c462639b.1257779502.git.wuzhangjin@gmail.com> <6199d7b3956b544fc65896af1062787a2e1283ce.1257779502.git.wuzhangjin@gmail.com> <58a7558730fbea6cd0417100c8fcd6f45668d1e3.1257779502.git.wuzhangjin@gmail.com> <3a9fc9ca02e8e6e9c3c28797a4c084c1f9d91f69.1257779502.git.wuzhangjin@gmail.com> <0cef783a71333ff96a78aaea8961e3b6b5392665.1257779502.git.wuzhangjin@gmail.com> <18e1d617ed824bb1c10f15216f2ed9ed3de78abd.1257779502.git.wuzhangjin@gmail.com> <3da916c1cb6e05445438826f98a91111f43ff6cd.1257779502.git.wuzhangjin@gmail.com> <451c55dead5d6afd871de6afd14dbbcf70a0f834.1257779502.git.wuzhangjin@gmail.com> <0c463e2af521e613fd15751a9f610c74cf887292.1257779502.git.wuzhangjin@gmail.com> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1085 Lines: 38 From: Wu Zhangjin When remove the -fno-omit-frame-pointer, gcc will not save the frame pointer for us, we need to save one ourselves. Signed-off-by: Wu Zhangjin --- arch/mips/kernel/mcount.S | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/mips/kernel/mcount.S b/arch/mips/kernel/mcount.S index 98d4690..bdfef2c 100644 --- a/arch/mips/kernel/mcount.S +++ b/arch/mips/kernel/mcount.S @@ -139,7 +139,15 @@ NESTED(ftrace_graph_caller, PT_SIZE, ra) #endif PTR_LA a0, PT_R1(sp) /* arg1: &AT -> a0 */ jal prepare_ftrace_return +#ifdef CONFIG_FRAME_POINTER move a2, fp /* arg3: frame pointer */ +#else +#ifdef CONFIG_64BIT + PTR_LA a2, PT_SIZE(sp) +#else + PTR_LA a2, (PT_SIZE+8)(sp) +#endif +#endif MCOUNT_RESTORE_REGS RETURN_BACK -- 1.6.2.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/