linux-mips
[Top] [All Lists]

Re: [PATCH] ftrace porting of linux-2.6.29 for mips

To: Chris Dearman <chris@mips.com>
Subject: Re: [PATCH] ftrace porting of linux-2.6.29 for mips
From: Wu Zhangjin <wuzhangjin@gmail.com>
Date: Thu, 16 Apr 2009 09:40:15 +0800
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:reply-to:to:cc :in-reply-to:references:content-type:organization:date:message-id :mime-version:x-mailer:content-transfer-encoding; bh=Ots2vzT39BRfGlsn5D6sVUKoDSGtTd88gdsqJjAfsQw=; b=u8taylewXnpm3bWGBJFMMNPRO4R2R9NsODq5Wac9JpO4N/rzf93ESmH98n7kMlm30U uwjgczdS67PQalUhJUr8nQ5nPt0SqvVlhLKnVSzEvD9uS4PQerMMh4be5BXE3CqbfI+7 fHPmp2jnJxamDDZpNtQpvZSxDCMQT/z1eykrE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:reply-to:to:cc:in-reply-to:references:content-type :organization:date:message-id:mime-version:x-mailer :content-transfer-encoding; b=wpPCGNWSjG7k9zntIympnf/aSzsFtGTcsFY9WgL1igelwWfgGp1DaAmrirWT7v0Fu5 6dWqZR79/5iogAIDf6x/1mMe9Qt4bUk3NH3eC2ooYUz+hfR2ilNE1L0OIo0FcwIKUQ82 Ozcthm9YHjClcwkXU+7lFKkH/Ejzaiqv+O5w8=
In-reply-to: <49E61AC3.2050402@mips.com>
Organization: DSLab, Lanzhou University, China
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <b00321320904021847w5ab3acb6nd1cd554c251ef8f6@mail.gmail.com> <20090403113315.GC6629@adriano.hkcable.com.hk> <b00321320904030503w8fe0165t2aded6727f35e24c@mail.gmail.com> <b00321320904030551p774d295lce3581c23d9d8c26@mail.gmail.com> <20090403141158.GA27751@adriano.hkcable.com.hk> <b00321320904030753s2e10503fud4ba50b0fda13d8f@mail.gmail.com> <20090403160304.GB27751@adriano.hkcable.com.hk> <20090403180652.GC27751@adriano.hkcable.com.hk> <20090414124001.GB28950@adriano.hkcable.com.hk> <49E61AC3.2050402@mips.com>
Reply-to: wuzhangjin@gmail.com
Sender: linux-mips-bounce@linux-mips.org
On Wed, 2009-04-15 at 10:34 -0700, Chris Dearman wrote:
> Zhang Le wrote:
> > I got ftrace working on fuloong 2f box, finally.
> > 
> > The patch could be get here:
> > http://repo.or.cz/w/linux-2.6/linux-loongson.git?a=shortlog;h=refs/heads/linux-2.6.29-stable-ftrace-from-wu
> > 
> > It is the second last patch in the above git repo.
> 
> I pulled this patch into my local tree to try it out. The attached patch 
> removes spurious warnings about linking pic and non-pic object files.
> 
> It might be better to pass KBUILD_CFLAGS into the script to get the same 
> build options as the rest of the kernel. Was there a reason not to do this?
> 

This is a "history problem", for not modify the original source code of
scripts/recordmcount.pl a lot, I just added a line to pass 
the "endian" argument in from scripts/Makefile.build

ifdef CONFIG_FTRACE_MCOUNT_RECORD
cmd_record_mcount = perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
+     "$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \
     "$(if $(CONFIG_64BIT),64,32)" \
     "$(OBJDUMP)" "$(OBJCOPY)" "$(CC)" "$(LD)" "$(NM)" "$(RM)" "$(MV)"
"$(@)";
endif

but current method is not flexible, currently, the other compile/link
options are ignored or hard-coded there. so, a substitution of
implementation method should be considered. but pass KBUILD_CFLAGS seems
not enough for we need make up the options for cc, ld, objdump, objcopy
tools in scripts/recordmcount.pl. perhaps CFLAGS, LDFLAGS and something
else should be passed from scripts/Makefile.build to
scripts/recordmcount.pl respectively.  

thanks!
Wu Zhangjin


<Prev in Thread] Current Thread [Next in Thread>