summaryrefslogtreecommitdiffstats
path: root/arch/mips/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* MIPS: Kconfig and Makefile update for Netlogic XLR/XLSJayachandran C2011-05-191-0/+12
| | | | | | | | | | Add NLM_XLR_BOARD, CPU_XLR and other config options Makefile updates, mostly based on r4k Signed-off-by: Jayachandran C <jayachandranc@netlogicmicro.com> To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2334/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Fix common misspellingsLucas De Marchi2011-03-311-2/+2
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* mips: change to new flag variablematt mooney2011-03-171-2/+2
| | | | | | | | Replace EXTRA_CFLAGS with ccflags-y. Signed-off-by: matt mooney <mfm@muteddisk.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* MIPS: Octeon: Apply CN63XXP1 errata workarounds.David Daney2010-10-291-0/+1
| | | | | | | | | | | | | | | The CN63XXP1 needs a couple of workarounds to ensure memory is not written in unexpected ways. All PREF with hints in the range 0-4,6-24 are replaced with PREF 28. We pass a flag to the assembler to cover compiler generated code, and patch uasm for the dynamically generated code. The write buffer threshold is reduced to 4. Signed-off-by: David Daney <ddaney@caviumnetworks.com> Patchwork: http://patchwork.linux-mips.org/patch/1672/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: Get rid of branches to .subsections.Ralf Baechle2010-10-291-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | It was a nice optimization - on paper at least. In practice it results in branches that may exceed the maximum legal range for a branch. We can fight that problem with -ffunction-sections but -ffunction-sections again is incompatible with -pg used by the function tracer. By rewriting the loop around all simple LL/SC blocks to C we reduce the amount of inline assembler and at the same time allow GCC to often fill the branch delay slots with something sensible or whatever else clever optimization it may have up in its sleeve. With this optimization gone we also no longer need -ffunction-sections, so drop it. This optimization was originally introduced in 2.6.21, commit 5999eca25c1fd4b9b9aca7833b04d10fe4bc877d (linux-mips.org) rsp. f65e4fa8e0c6022ad58dc88d1b11b12589ed7f9f (kernel.org). Original fix for the issues which caused me to pull this optimization by Paul Gortmaker <paul.gortmaker@windriver.com>. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Merge branch 'kbuild' of ↵Linus Torvalds2010-08-051-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: modpost: support objects with more than 64k sections trivial: fix a typo in a filename frv: clean up arch/frv/Makefile kbuild: allow assignment to {A,C}FLAGS_KERNEL on the command line kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line Kbuild: Add option to set -femit-struct-debug-baseonly Makefile: "make kernelrelease" should show the correct full kernel version Makefile.build: make KBUILD_SYMTYPES work again
| * Merge commit 'v2.6.35' into kbuild/kbuildMichal Marek2010-08-041-5/+27
| |\ | | | | | | | | | | | | Conflicts: arch/powerpc/Makefile
| * | kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command lineSam Ravnborg2010-08-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is now possible to assign options to AS, CC and LD on the command line - which is only used when building modules. {A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile in the arch makefiles, thus users had no way to specify additional options to AS, CC, LD when building modules without overriding the original value. Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE that is used by arch specific files and free up {A,C,LD}FLAGS_MODULE so they can be assigned on the command line. All arch Makefiles that used the old variables has been updated. Note: Previously we had a MODFLAGS variable for both AS and CC. But in favour of consistency this was dropped. So in some cases arch Makefile has one assignmnet replaced by two assignmnets. Note2: MODFLAGS was not documented and is dropped without any notice. I do not expect much/any breakage from this. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Denys Vlasenko <vda.linux@googlemail.com> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Chen Liqin <liqin.chen@sunplusct.com> Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin] Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32] Signed-off-by: Michal Marek <mmarek@suse.cz>
* | | MIPS: kprobe: Add support.David Daney2010-08-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is based on previous work by Sony and Himanshu Chauhan. I have done some cleanup and implemented JProbes and KRETPROBES. The KRETPROBES part is pretty much copied verbatim from powerpc. A possible future enhance might be to factor out the common code. Signed-off-by: David Daney <ddaney@caviumnetworks.com> Cc: Himanshu Chauhan <hschauhan@nulltrace.org> To: linux-mips@linux-mips.org To: ananth@in.ibm.com, To: anil.s.keshavamurthy@intel.com To: davem@davemloft.net To: masami.hiramatsu.pt@hitachi.com Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/1525/ Patchwork: https://patchwork.linux-mips.org/patch/1530/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: Clean up arch/mips/MakefileSam Ravnborg2010-08-051-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Drop CLEAN_FILES assignments that is no longer required - Add $(Q) in a few rules Signed-off-by: Sam Ravnborg <sam@ravnborg.org> To: linux-mips <linux-mips@linux-mips.org> To: Wu Zhangjin <wuzhangjin@gmail.com> Patchwork: https://patchwork.linux-mips.org/patch/1305/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: Refactor arch/mips/boot/compressed/MakefileSam Ravnborg2010-08-051-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - use hostprogs-y for the elf2ecoff - list all *.o file in targets - renamed obj-y to vmlinuzobjs-y (it was confusing to re-use a kbuild variable) - fix all uses of if_changed/cmd - use kbuild rules to beautify output - update clean-file to clean vmlinuz.* in top-level directory - simplied logic in arch/mips/Makefile for compressed targets The net result is a more kbuild conformant Makefile but readability did not increase. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> To: linux-mips <linux-mips@linux-mips.org> To: Wu Zhangjin <wuzhangjin@gmail.com> Patchwork: https://patchwork.linux-mips.org/patch/1304/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: Refactor arch/mips/boot/MakefileSam Ravnborg2010-08-051-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - remove stuff that is not needed VMLINUX assignment, all: rule - use hostprogs-y for the host program - use kbuild rules for the three targets - to beautify output - drop clean-files - it is no longer needed - simplify arch/mips/Makefile when calling targets in boot/Makefile Signed-off-by: Sam Ravnborg <sam@ravnborg.org> To: linux-mips <linux-mips@linux-mips.org> To: Wu Zhangjin <wuzhangjin@gmail.com> Patchwork: https://patchwork.linux-mips.org/patch/1303/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: PNX8550: Migrate to new platform makefile style.Ralf Baechle2010-08-051-18/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: PNX833x: Migrate to new platform makefile style.Ralf Baechle2010-08-051-8/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: STB8550: Move boards over to obj-yRalf Baechle2010-08-051-2/+2
| | | | | | | | | | | | | | | | | | | | | Preparatory cleanup for moving Alchemy over to new MIPS Platform build system support. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: STB22x: Move boards over to obj-yRalf Baechle2010-08-051-2/+2
| | | | | | | | | | | | | | | | | | | | | Preparatory cleanup for moving Alchemy over to new MIPS Platform build system support. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: PNX8550: Move code one directory level up.Ralf Baechle2010-08-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | It was sharing the nxp directory but no code with pnx833x and will fit better into the new platform makefile scheme, if moved. Also after the pnx833x code has been moved up, the pnx8550 Code was the last users of the nxp dir. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: PNX833x: Move code one directory level up.Ralf Baechle2010-08-051-3/+3
| | | | | | | | | | | | | | | | | | | | | It was sharing the nxp directory but no code with pnx8550 and will fit better into the new platform makefile scheme, if moved. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: EMMA: Migrate to new platform makefile style.Ralf Baechle2010-08-051-12/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: TXx9: Migrate to new platform makefile style.Ralf Baechle2010-08-051-22/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: Sibyte: Migrate to new platform makefile style.Ralf Baechle2010-08-051-50/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: Octeon: Migrate to new platform makefile style.Ralf Baechle2010-08-051-12/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: BCM63xx: Migrate to new platform makefile style.Ralf Baechle2010-08-051-7/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: BCM47xx: Migrate to new platform makefile style.Ralf Baechle2010-08-051-7/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: Lasat: Migrate to new platform makefile style.Ralf Baechle2010-08-051-7/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: PowerTV: Migrate to new platform makefile style.Ralf Baechle2010-08-051-7/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: WRPPMC: Migrate to new platform makefile style.Ralf Baechle2010-08-051-7/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: WRPPMC: Move code one directory level up.Ralf Baechle2010-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | It was the last platform under gt64120 and will fit better into the new platform makefile scheme, if moved. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: RB532: Migrate to new platform makefile style.Ralf Baechle2010-08-051-7/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: IP32: Migrate to new platform makefile style.Ralf Baechle2010-08-051-12/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: Malta: Migrate to new platform makefile style.Ralf Baechle2010-08-051-8/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: IP22, IP28: Migrate to new platform makefile style.Ralf Baechle2010-08-051-35/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: SNI: Migrate to new platform makefile style.Ralf Baechle2010-08-051-12/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: DECstation: Migrate to new platform makefile style.Ralf Baechle2010-08-051-8/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: Jazz: Migrate to new platform makefile style.Ralf Baechle2010-08-051-7/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: PMC-Sierra: Move board Makefile parts to their own Platform fileShane McDonald2010-08-051-15/+0
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Shane McDonald <mcdonald.shane@gmail.com> To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/1354/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: Move VR41xx Makefile parts to their own Platform fileYoichi Yuasa2010-08-051-33/+0
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org> Cc: linux-mips <linux-mips@linux-mips.org> Patchwork: https://patchwork.linux-mips.org/patch/1322/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: Move Cobalt Makefile parts to their own Platform fileYoichi Yuasa2010-08-051-7/+0
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org> Cc: linux-mips <linux-mips@linux-mips.org> Patchwork: https://patchwork.linux-mips.org/patch/1321/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: IP27: Migrate to new Platform fileRalf Baechle2010-08-051-20/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: Move Alchemy Makefile parts to their own Platform file.Manuel Lauss2010-08-051-105/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Ralf: Remove a forgotten -Werror in Pb1200 Makefile.] Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> To: Linux-MIPS <linux-mips@linux-mips.org> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Manuel Lauss <manuel.lauss@googlemail.com> Patchwork: https://patchwork.linux-mips.org/patch/1319/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: Alchemy: move boards over to obj-yManuel Lauss2010-08-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Preparatory step for moving Alchemy over to new MIPS Platform build system support. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> To: Linux-MIPS <linux-mips@linux-mips.org> Patchwork: https://patchwork.linux-mips.org/patch/1318/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: MIPSsim: Migrate to new Platform fileRalf Baechle2010-08-051-7/+0
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: Loongson: Migrate makefile to new Platform fileWu Zhangjin2010-08-051-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> To: linux-mips <linux-mips@linux-mips.org> Cc: Alexander Clouter <alex@digriz.org.uk> Cc: Manuel Lauss <manuel.lauss@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org>, Patchwork: https://patchwork.linux-mips.org/patch/1313/ Patchwork: https://patchwork.linux-mips.org/patch/1326/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: Introduce support for Platform definitionsSam Ravnborg2010-08-051-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move platform specific definitions to the platfrom directories. Each platform shall do the following: 1) include an entry in arch/mips/Kbuild.platforms 2) add relevant definitions to arch/mips/<platform>/Platform This commits changes ar7 to the new scheme as an example. Introducing a platform speecific Platfrom file has following advantages: 1) decentralization of platfrom definitions 2) simplification af arch/mips/Makefile 3) force all platfrom to build with -Werror (done in arch/mips/Kbuild) [Ralf: Remove forgotten -Werror from AR7 Makefile] Signed-off-by: Sam Ravnborg <sam@ravnborg.org> To: linux-mips <linux-mips@linux-mips.org> To: Wu Zhangjin <wuzhangjin@gmail.com> Patchwork: https://patchwork.linux-mips.org/patch/1302/ Patchwork: http://patchwork.linux-mips.org/patch/1308/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | MIPS: Introduce arch/mips/KbuildSam Ravnborg2010-08-051-1/+2
| |/ |/| | | | | | | | | | | | | Signed-off-by: Sam Ravnborg <sam@ravnborg.org> To: linux-mips <linux-mips@linux-mips.org> To: Wu Zhangjin <wuzhangjin@gmail.com> Patchwork: https://patchwork.linux-mips.org/patch/1300/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | MIPS: Loongson 2F: Enable fixups of the latest binutilsWu Zhangjin2010-04-301-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the "Fixups of Loongson2F" patch [1] having been applied to binutils for binutils 2.20.1 we now can use it's time to enable the options provided by the patch to compile the kernel. Without these fixups, the system may hang if the erratum is triggered. For more information on these fixups please refer to the following references. [1] "Fixups of Loongson2F" patch for binutils(actually for gas) http://sourceware.org/ml/binutils/2009-11/msg00387.html [2] Chapter 15 of "Loongson2F User Manual"(Chinese Version) http://www.loongson.cn/uploadfile/file/200808211 [3] Chapter 15 of the English version Loongson 2F User Manual http://groups.google.com.hk/group/loongson-dev/msg/e0d2e220958f10a6?dmode=source Signed-off-by: Zhang Le <r0bertz@gentoo.org> Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> Cc: Zhang Le <r0bertz@gentoo.org> Cc: linux-mips <linux-mips@linux-mips.org> Patchwork: http://patchwork.linux-mips.org/patch/1106/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | MIPS: Loongson: arch/mips/Makefile: Add missing whitespaceWu Zhangjin2010-02-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch add missing whitespace after every "+=" in the loongson related part of arch/mips/Makefile. Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> Cc: linux-mips@linux-mips.org Cc: yanh@lemote.com Cc: huhb@lemote.com Cc: zhangfx@lemote.com Patchwork: http://patchwork.linux-mips.org/patch/827/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | MIPS: Fix build error for uncompressed non-plain vmlinux kernelsRalf Baechle2010-02-271-2/+11
|/ | | | | | | | | | | | | | Seen on rm200_defconfig for example: CC arch/mips/boot/compressed/decompress.o /home/ralf/src/linux/upstream-linus/arch/mips/boot/compressed/decompress.c: In function ‘decompress_kernel’: /home/ralf/src/linux/upstream-linus/arch/mips/boot/compressed/decompress.c:116: error: implicit declaration of function ‘decompress’ make[3]: *** [arch/mips/boot/compressed/decompress.o] Error 1 make[2]: *** [vmlinuz.ecoff] Error 2 make[1]: *** [sub-make] Error 2 make: *** [all] Error 2 Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: eXcite: Remove platform.Ralf Baechle2009-12-171-7/+0
| | | | | | | | | | | | | The platform has never been fully merged Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Cc: Thomas Koeller <thomas.koeller@baslerweb.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: linux-kernel@vger.kernel.org Cc: linux-mtd@lists.infradead.org Acked-by: David Woodhouse <David.Woodhouse@intel.com> Acked-by: Wim Van Sebroeck <wim@iguana.be>
* MIPS: Tracing: Make function graph tracer work with -mmcount-ra-addressWu Zhangjin2009-12-171-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That thread "MIPS: Add option to pass return address location to _mcount" from "David Daney <ddaney@caviumnetworks.com>" have added a new option -mmcount-ra-address to gcc(4.5) for MIPS to transfer the location of the return address to _mcount. Benefit from this new feature, function graph tracer on MIPS will be easier and safer to hijack the return address of the kernel function, which will save some overhead and make the whole thing more reliable. In this patch, at first, try to enable the option -mmcount-ra-address in arch/mips/Makefile with cc-option, if gcc support it, it will be enabled, otherwise, no side effect. and then, we need to support this new option of gcc 4.5 and also support the old gcc versions. with _mcount in the old gcc versions, it's not easy to get the location of return address(tracing: add function graph tracer support for MIPS), so, we do it in a C function: ftrace_get_parent_addr(ftrace.c), but with -mmcount-ra-address, only several instructions need to get what we want, so, I put into asm(mcount.S). and also, as the $12(t0) is used by -mmcount-ra-address for transferring the localtion of return address to _mcount, we need to save it into the stack and restore it when enabled dynamic function tracer, 'Cause we have called "ftrace_call" before "ftrace_graph_caller", which may destroy $12(t0). (Thanks to David for providing that -mcount-ra-address and giving the idea of KBUILD_MCOUNT_RA_ADDRESS, both of them have made the whole thing more beautiful!) Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Nicholas Mc Guire <der.herr@hofr.at> Cc: zhangfx@lemote.com Cc: Wu Zhangjin <wuzhangjin@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/681/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>