3 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
4 * Rewritten by Cort Dougan (cort@fsmlabs.com) for PReP
5 * Copyright (C) 1996 Cort Dougan <cort@fsmlabs.com>
6 * Adapted for Power Macintosh by Paul Mackerras.
7 * Low-level exception handlers and MMU support
8 * rewritten by Paul Mackerras.
9 * Copyright (C) 1996 Paul Mackerras.
10 * MPC8xx modifications Copyright (C) 1997 Dan Malek (dmalek@jlc.net).
12 * This file contains the system call entry code, context switch
13 * code, and exception/interrupt return code for PowerPC.
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version
18 * 2 of the License, or (at your option) any later version.
22 #include <linux/errno.h>
23 #include <linux/sys.h>
24 #include <linux/threads.h>
28 #include <asm/cputable.h>
29 #include <asm/thread_info.h>
30 #include <asm/ppc_asm.h>
31 #include <asm/asm-offsets.h>
32 #include <asm/unistd.h>
33 #include <asm/ftrace.h>
36 #undef SHOW_SYSCALLS_TASK
39 * MSR_KERNEL is > 0x10000 on 4xx/Book-E since it include MSR_CE.
41 #if MSR_KERNEL >= 0x10000
42 #define LOAD_MSR_KERNEL(r, x) lis r,(x)@h; ori r,r,(x)@l
44 #define LOAD_MSR_KERNEL(r, x) li r,(x)
48 #include "head_booke.h"
49 #define TRANSFER_TO_HANDLER_EXC_LEVEL(exc_level) \
50 mtspr exc_level##_SPRG,r8; \
51 BOOKE_LOAD_EXC_LEVEL_STACK(exc_level); \
52 lwz r0,GPR10-INT_FRAME_SIZE(r8); \
54 lwz r0,GPR11-INT_FRAME_SIZE(r8); \
56 mfspr r8,exc_level##_SPRG
58 .globl mcheck_transfer_to_handler
59 mcheck_transfer_to_handler:
60 TRANSFER_TO_HANDLER_EXC_LEVEL(MCHECK)
61 b transfer_to_handler_full
63 .globl debug_transfer_to_handler
64 debug_transfer_to_handler:
65 TRANSFER_TO_HANDLER_EXC_LEVEL(DEBUG)
66 b transfer_to_handler_full
68 .globl crit_transfer_to_handler
69 crit_transfer_to_handler:
70 TRANSFER_TO_HANDLER_EXC_LEVEL(CRIT)
75 .globl crit_transfer_to_handler
76 crit_transfer_to_handler:
85 * This code finishes saving the registers to the exception frame
86 * and jumps to the appropriate handler for the exception, turning
87 * on address translation.
88 * Note that we rely on the caller having set cr0.eq iff the exception
89 * occurred in kernel mode (i.e. MSR:PR = 0).
91 .globl transfer_to_handler_full
92 transfer_to_handler_full:
96 .globl transfer_to_handler
108 tovirt(r2,r2) /* set r2 to current */
109 beq 2f /* if from user, fix up THREAD.regs */
110 addi r11,r1,STACK_FRAME_OVERHEAD
112 #if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
113 /* Check to see if the dbcr0 register is set up to debug. Use the
114 internal debug mode bit to do this. */
115 lwz r12,THREAD_DBCR0(r12)
116 andis. r12,r12,DBCR0_IDM@h
118 /* From user and task is ptraced - load up global dbcr0 */
119 li r12,-1 /* clear all pending debug events */
121 lis r11,global_dbcr0@ha
123 addi r11,r11,global_dbcr0@l
125 rlwinm r9,r1,0,0,(31-THREAD_SHIFT)
138 2: /* if from kernel, check interrupted DOZE/NAP mode and
139 * check for stack overflow
141 lwz r9,KSP_LIMIT(r12)
142 cmplw r1,r9 /* if r1 <= ksp_limit */
143 ble- stack_ovf /* then the kernel stack overflowed */
146 rlwinm r9,r1,0,0,31-THREAD_SHIFT
147 tophys(r9,r9) /* check local flags */
148 lwz r12,TI_LOCAL_FLAGS(r9)
150 bt- 31-TLF_NAPPING,4f
151 #endif /* CONFIG_6xx */
152 .globl transfer_to_handler_cont
153 transfer_to_handler_cont:
156 lwz r11,0(r9) /* virtual address of handler */
157 lwz r9,4(r9) /* where to go when done */
162 RFI /* jump to handler, enable MMU */
165 4: rlwinm r12,r12,0,~_TLF_NAPPING
166 stw r12,TI_LOCAL_FLAGS(r9)
167 b power_save_6xx_restore
171 * On kernel stack overflow, load up an initial stack pointer
172 * and call StackOverflow(regs), which should not return.
175 /* sometimes we use a statically-allocated stack, which is OK. */
179 ble 5b /* r1 <= &_end is OK */
181 addi r3,r1,STACK_FRAME_OVERHEAD
182 lis r1,init_thread_union@ha
183 addi r1,r1,init_thread_union@l
184 addi r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD
185 lis r9,StackOverflow@ha
186 addi r9,r9,StackOverflow@l
187 LOAD_MSR_KERNEL(r10,MSR_KERNEL)
195 * Handle a system call.
197 .stabs "arch/powerpc/kernel/",N_SO,0,0,0f
198 .stabs "entry_32.S",N_SO,0,0,0f
205 lwz r11,_CCR(r1) /* Clear SO bit in CR */
210 #endif /* SHOW_SYSCALLS */
211 rlwinm r10,r1,0,0,(31-THREAD_SHIFT) /* current_thread_info() */
212 lwz r11,TI_FLAGS(r10)
213 andi. r11,r11,_TIF_SYSCALL_T_OR_A
215 syscall_dotrace_cont:
216 cmplwi 0,r0,NR_syscalls
217 lis r10,sys_call_table@h
218 ori r10,r10,sys_call_table@l
221 lwzx r10,r10,r0 /* Fetch system call handler [ptr] */
223 addi r9,r1,STACK_FRAME_OVERHEAD
225 blrl /* Call handler */
226 .globl ret_from_syscall
229 bl do_show_syscall_exit
232 rlwinm r12,r1,0,0,(31-THREAD_SHIFT) /* current_thread_info() */
233 /* disable interrupts so current_thread_info()->flags can't change */
234 LOAD_MSR_KERNEL(r10,MSR_KERNEL) /* doesn't include MSR_EE */
239 andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK)
240 bne- syscall_exit_work
242 blt+ syscall_exit_cont
243 lwz r11,_CCR(r1) /* Load CR */
245 oris r11,r11,0x1000 /* Set SO bit in CR */
248 #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
249 /* If the process has its own DBCR0 value, load it up. The internal
250 debug mode bit tells us that dbcr0 should be loaded. */
251 lwz r0,THREAD+THREAD_DBCR0(r2)
252 andis. r10,r0,DBCR0_IDM@h
256 lis r4,icache_44x_need_flush@ha
257 lwz r5,icache_44x_need_flush@l(r4)
261 #endif /* CONFIG_44x */
264 END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRED_STWCX)
265 stwcx. r0,0,r1 /* to clear the reservation */
282 stw r7,icache_44x_need_flush@l(r4)
284 #endif /* CONFIG_44x */
296 /* Traced system call support */
301 addi r3,r1,STACK_FRAME_OVERHEAD
302 bl do_syscall_trace_enter
303 lwz r0,GPR0(r1) /* Restore original registers */
311 b syscall_dotrace_cont
314 andi. r0,r9,_TIF_RESTOREALL
320 andi. r0,r9,_TIF_NOERROR
322 lwz r11,_CCR(r1) /* Load CR */
324 oris r11,r11,0x1000 /* Set SO bit in CR */
327 1: stw r6,RESULT(r1) /* Save result */
328 stw r3,GPR3(r1) /* Update return value */
329 2: andi. r0,r9,(_TIF_PERSYSCALL_MASK)
332 /* Clear per-syscall TIF flags if any are set. */
334 li r11,_TIF_PERSYSCALL_MASK
335 addi r12,r12,TI_FLAGS
338 #ifdef CONFIG_IBM405_ERR77
343 subi r12,r12,TI_FLAGS
345 4: /* Anything which requires enabling interrupts? */
346 andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP)
349 /* Re-enable interrupts */
354 /* Save NVGPRS if they're not saved already */
362 addi r3,r1,STACK_FRAME_OVERHEAD
363 bl do_syscall_trace_leave
364 b ret_from_except_full
368 #ifdef SHOW_SYSCALLS_TASK
369 lis r11,show_syscalls_task@ha
370 lwz r11,show_syscalls_task@l(r11)
401 do_show_syscall_exit:
402 #ifdef SHOW_SYSCALLS_TASK
403 lis r11,show_syscalls_task@ha
404 lwz r11,show_syscalls_task@l(r11)
410 stw r3,RESULT(r1) /* Save result */
420 7: .string "syscall %d(%x, %x, %x, %x, %x, "
421 77: .string "%x), current=%p\n"
422 79: .string " -> %x\n"
425 #ifdef SHOW_SYSCALLS_TASK
427 .globl show_syscalls_task
432 #endif /* SHOW_SYSCALLS */
435 * The fork/clone functions need to copy the full register set into
436 * the child process. Therefore we need to save all the nonvolatile
437 * registers (r13 - r31) before calling the C code.
443 rlwinm r0,r0,0,0,30 /* clear LSB to indicate full */
444 stw r0,_TRAP(r1) /* register set saved */
451 rlwinm r0,r0,0,0,30 /* clear LSB to indicate full */
452 stw r0,_TRAP(r1) /* register set saved */
459 rlwinm r0,r0,0,0,30 /* clear LSB to indicate full */
460 stw r0,_TRAP(r1) /* register set saved */
463 .globl ppc_swapcontext
467 rlwinm r0,r0,0,0,30 /* clear LSB to indicate full */
468 stw r0,_TRAP(r1) /* register set saved */
472 * Top-level page fault handling.
473 * This is in assembler because if do_page_fault tells us that
474 * it is a bad kernel page fault, we want to save the non-volatile
475 * registers before calling bad_page_fault.
477 .globl handle_page_fault
480 addi r3,r1,STACK_FRAME_OVERHEAD
489 addi r3,r1,STACK_FRAME_OVERHEAD
492 b ret_from_except_full
495 * This routine switches between two different tasks. The process
496 * state of one is saved on its kernel stack. Then the state
497 * of the other is restored from its kernel stack. The memory
498 * management hardware is updated to the second process's state.
499 * Finally, we can return to the second process.
500 * On entry, r3 points to the THREAD for the current task, r4
501 * points to the THREAD for the new task.
503 * This routine is always called with interrupts disabled.
505 * Note: there are two ways to get to the "going out" portion
506 * of this code; either by coming in via the entry (_switch)
507 * or via "fork" which must set up an environment equivalent
508 * to the "_switch" path. If you change this , you'll have to
509 * change the fork code also.
511 * The code which creates the new task context is in 'copy_thread'
512 * in arch/ppc/kernel/process.c
515 stwu r1,-INT_FRAME_SIZE(r1)
517 stw r0,INT_FRAME_SIZE+4(r1)
518 /* r3-r12 are caller saved -- Cort */
520 stw r0,_NIP(r1) /* Return to switch caller */
522 li r0,MSR_FP /* Disable floating-point */
523 #ifdef CONFIG_ALTIVEC
525 oris r0,r0,MSR_VEC@h /* Disable altivec */
526 mfspr r12,SPRN_VRSAVE /* save vrsave register value */
527 stw r12,THREAD+THREAD_VRSAVE(r2)
528 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
529 #endif /* CONFIG_ALTIVEC */
532 oris r0,r0,MSR_SPE@h /* Disable SPE */
533 mfspr r12,SPRN_SPEFSCR /* save spefscr register value */
534 stw r12,THREAD+THREAD_SPEFSCR(r2)
535 END_FTR_SECTION_IFSET(CPU_FTR_SPE)
536 #endif /* CONFIG_SPE */
537 and. r0,r0,r11 /* FP or altivec or SPE enabled? */
545 stw r1,KSP(r3) /* Set old stack pointer */
548 /* We need a sync somewhere here to make sure that if the
549 * previous task gets rescheduled on another CPU, it sees all
550 * stores it has performed on this one.
553 #endif /* CONFIG_SMP */
557 mtspr SPRN_SPRG3,r0 /* Update current THREAD phys addr */
558 lwz r1,KSP(r4) /* Load new stack pointer */
560 /* save the old current 'last' for return value */
562 addi r2,r4,-THREAD /* Update current */
564 #ifdef CONFIG_ALTIVEC
566 lwz r0,THREAD+THREAD_VRSAVE(r2)
567 mtspr SPRN_VRSAVE,r0 /* if G4, restore VRSAVE reg */
568 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
569 #endif /* CONFIG_ALTIVEC */
572 lwz r0,THREAD+THREAD_SPEFSCR(r2)
573 mtspr SPRN_SPEFSCR,r0 /* restore SPEFSCR reg */
574 END_FTR_SECTION_IFSET(CPU_FTR_SPE)
575 #endif /* CONFIG_SPE */
579 /* r3-r12 are destroyed -- Cort */
582 lwz r4,_NIP(r1) /* Return to _switch caller in new task */
584 addi r1,r1,INT_FRAME_SIZE
587 .globl fast_exception_return
588 fast_exception_return:
589 #if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
590 andi. r10,r9,MSR_RI /* check for recoverable interrupt */
591 beq 1f /* if not, we've got problems */
594 2: REST_4GPRS(3, r11)
609 #if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
610 /* check if the exception happened in a restartable section */
611 1: lis r3,exc_exit_restart_end@ha
612 addi r3,r3,exc_exit_restart_end@l
615 lis r4,exc_exit_restart@ha
616 addi r4,r4,exc_exit_restart@l
619 lis r3,fee_restarts@ha
621 lwz r5,fee_restarts@l(r3)
623 stw r5,fee_restarts@l(r3)
624 mr r12,r4 /* restart at exc_exit_restart */
633 /* aargh, a nonrecoverable interrupt, panic */
634 /* aargh, we don't know which trap this is */
635 /* but the 601 doesn't implement the RI bit, so assume it's OK */
639 END_FTR_SECTION_IFSET(CPU_FTR_601)
642 addi r3,r1,STACK_FRAME_OVERHEAD
644 ori r10,r10,MSR_KERNEL@l
645 bl transfer_to_handler_full
646 .long nonrecoverable_exception
647 .long ret_from_except
650 .globl ret_from_except_full
651 ret_from_except_full:
655 .globl ret_from_except
657 /* Hard-disable interrupts so that current_thread_info()->flags
658 * can't change between when we test it and when we return
659 * from the interrupt. */
660 LOAD_MSR_KERNEL(r10,MSR_KERNEL)
661 SYNC /* Some chip revs have problems here... */
662 MTMSRD(r10) /* disable interrupts */
664 lwz r3,_MSR(r1) /* Returning to user mode? */
668 user_exc_return: /* r10 contains MSR_KERNEL here */
669 /* Check current_thread_info()->flags */
670 rlwinm r9,r1,0,0,(31-THREAD_SHIFT)
672 andi. r0,r9,(_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK|_TIF_NEED_RESCHED)
676 #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
677 /* Check whether this process has its own DBCR0 value. The internal
678 debug mode bit tells us that dbcr0 should be loaded. */
679 lwz r0,THREAD+THREAD_DBCR0(r2)
680 andis. r10,r0,DBCR0_IDM@h
684 #ifdef CONFIG_PREEMPT
687 /* N.B. the only way to get here is from the beq following ret_from_except. */
689 /* check current_thread_info->preempt_count */
690 rlwinm r9,r1,0,0,(31-THREAD_SHIFT)
691 lwz r0,TI_PREEMPT(r9)
692 cmpwi 0,r0,0 /* if non-zero, just restore regs and return */
695 andi. r0,r0,_TIF_NEED_RESCHED
697 andi. r0,r3,MSR_EE /* interrupts off? */
698 beq restore /* don't schedule if so */
699 1: bl preempt_schedule_irq
700 rlwinm r9,r1,0,0,(31-THREAD_SHIFT)
702 andi. r0,r3,_TIF_NEED_RESCHED
706 #endif /* CONFIG_PREEMPT */
708 /* interrupts are hard-disabled at this point */
711 lis r4,icache_44x_need_flush@ha
712 lwz r5,icache_44x_need_flush@l(r4)
717 stw r6,icache_44x_need_flush@l(r4)
719 #endif /* CONFIG_44x */
733 END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRED_STWCX)
734 stwcx. r0,0,r1 /* to clear the reservation */
736 #if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
738 andi. r10,r9,MSR_RI /* check if this exception occurred */
739 beql nonrecoverable /* at a bad place (MSR:RI = 0) */
747 * Once we put values in SRR0 and SRR1, we are in a state
748 * where exceptions are not recoverable, since taking an
749 * exception will trash SRR0 and SRR1. Therefore we clear the
750 * MSR:RI bit to indicate this. If we do take an exception,
751 * we can't return to the point of the exception but we
752 * can restart the exception exit path at the label
753 * exc_exit_restart below. -- paulus
755 LOAD_MSR_KERNEL(r10,MSR_KERNEL & ~MSR_RI)
757 MTMSRD(r10) /* clear the RI bit */
758 .globl exc_exit_restart
767 .globl exc_exit_restart_end
768 exc_exit_restart_end:
772 #else /* !(CONFIG_4xx || CONFIG_BOOKE) */
774 * This is a bit different on 4xx/Book-E because it doesn't have
775 * the RI bit in the MSR.
776 * The TLB miss handler checks if we have interrupted
777 * the exception exit path and restarts it if so
778 * (well maybe one day it will... :).
785 .globl exc_exit_restart
794 .globl exc_exit_restart_end
795 exc_exit_restart_end:
798 b . /* prevent prefetch past rfi */
801 * Returning from a critical interrupt in user mode doesn't need
802 * to be any different from a normal exception. For a critical
803 * interrupt in the kernel, we just return (without checking for
804 * preemption) since the interrupt may have happened at some crucial
805 * place (e.g. inside the TLB miss handler), and because we will be
806 * running with r1 pointing into critical_stack, not the current
807 * process's kernel stack (and therefore current_thread_info() will
808 * give the wrong answer).
809 * We have to restore various SPRs that may have been in use at the
810 * time of the critical interrupt.
814 #define PPC_40x_TURN_OFF_MSR_DR \
815 /* avoid any possible TLB misses here by turning off MSR.DR, we \
816 * assume the instructions here are mapped by a pinned TLB entry */ \
822 #define PPC_40x_TURN_OFF_MSR_DR
825 #define RET_FROM_EXC_LEVEL(exc_lvl_srr0, exc_lvl_srr1, exc_lvl_rfi) \
828 andi. r3,r3,MSR_PR; \
829 LOAD_MSR_KERNEL(r10,MSR_KERNEL); \
830 bne user_exc_return; \
837 mtspr SPRN_XER,r10; \
839 PPC405_ERR77(0,r1); \
840 stwcx. r0,0,r1; /* to clear the reservation */ \
845 PPC_40x_TURN_OFF_MSR_DR; \
848 mtspr SPRN_DEAR,r9; \
849 mtspr SPRN_ESR,r10; \
852 mtspr exc_lvl_srr0,r11; \
853 mtspr exc_lvl_srr1,r12; \
861 b .; /* prevent prefetch past exc_lvl_rfi */
863 .globl ret_from_crit_exc
865 RET_FROM_EXC_LEVEL(SPRN_CSRR0, SPRN_CSRR1, RFCI)
868 .globl ret_from_debug_exc
870 RET_FROM_EXC_LEVEL(SPRN_DSRR0, SPRN_DSRR1, RFDI)
872 .globl ret_from_mcheck_exc
874 RET_FROM_EXC_LEVEL(SPRN_MCSRR0, SPRN_MCSRR1, RFMCI)
875 #endif /* CONFIG_BOOKE */
878 * Load the DBCR0 value for a task that is being ptraced,
879 * having first saved away the global DBCR0. Note that r0
880 * has the dbcr0 value to set upon entry to this.
883 mfmsr r10 /* first disable debug exceptions */
884 rlwinm r10,r10,0,~MSR_DE
888 lis r11,global_dbcr0@ha
889 addi r11,r11,global_dbcr0@l
891 rlwinm r9,r1,0,0,(31-THREAD_SHIFT)
902 mtspr SPRN_DBSR,r11 /* clear all pending debug events */
910 #endif /* !(CONFIG_4xx || CONFIG_BOOKE) */
912 do_work: /* r10 contains MSR_KERNEL here */
913 andi. r0,r9,_TIF_NEED_RESCHED
916 do_resched: /* r10 contains MSR_KERNEL here */
919 MTMSRD(r10) /* hard-enable interrupts */
922 LOAD_MSR_KERNEL(r10,MSR_KERNEL)
924 MTMSRD(r10) /* disable interrupts */
925 rlwinm r9,r1,0,0,(31-THREAD_SHIFT)
927 andi. r0,r9,_TIF_NEED_RESCHED
929 andi. r0,r9,_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK
931 do_user_signal: /* r10 contains MSR_KERNEL here */
934 MTMSRD(r10) /* hard-enable interrupts */
935 /* save r13-r31 in the exception frame, if not already done */
943 addi r4,r1,STACK_FRAME_OVERHEAD
949 * We come here when we are at the end of handling an exception
950 * that occurred at a place where taking an exception will lose
951 * state information, such as the contents of SRR0 and SRR1.
954 lis r10,exc_exit_restart_end@ha
955 addi r10,r10,exc_exit_restart_end@l
958 lis r11,exc_exit_restart@ha
959 addi r11,r11,exc_exit_restart@l
962 lis r10,ee_restarts@ha
963 lwz r12,ee_restarts@l(r10)
965 stw r12,ee_restarts@l(r10)
966 mr r12,r11 /* restart at exc_exit_restart */
968 3: /* OK, we can't recover, kill this process */
969 /* but the 601 doesn't implement the RI bit, so assume it's OK */
972 END_FTR_SECTION_IFSET(CPU_FTR_601)
979 4: addi r3,r1,STACK_FRAME_OVERHEAD
980 bl nonrecoverable_exception
981 /* shouldn't return */
991 * PROM code for specific machines follows. Put it
992 * here so it's easy to add arch-specific sections later.
995 #ifdef CONFIG_PPC_RTAS
997 * On CHRP, the Run-Time Abstraction Services (RTAS) have to be
998 * called with the MMU off.
1001 stwu r1,-INT_FRAME_SIZE(r1)
1003 stw r0,INT_FRAME_SIZE+4(r1)
1004 LOAD_REG_ADDR(r4, rtas)
1005 lis r6,1f@ha /* physical return address for rtas */
1009 lwz r8,RTASENTRY(r4)
1013 LOAD_MSR_KERNEL(r0,MSR_KERNEL)
1014 SYNC /* disable interrupts so SRR0/1 */
1015 MTMSRD(r0) /* don't get trashed */
1016 li r9,MSR_KERNEL & ~(MSR_IR|MSR_DR)
1023 lwz r8,INT_FRAME_SIZE+4(r9) /* get return address */
1024 lwz r9,8(r9) /* original msr value */
1026 addi r1,r1,INT_FRAME_SIZE
1031 RFI /* return to caller */
1033 .globl machine_check_in_rtas
1034 machine_check_in_rtas:
1036 /* XXX load up BATs and panic */
1038 #endif /* CONFIG_PPC_RTAS */
1040 #ifdef CONFIG_FTRACE
1041 #ifdef CONFIG_DYNAMIC_FTRACE
1057 subi r3, r3, MCOUNT_INSN_SIZE
1079 _GLOBAL(ftrace_caller)
1080 /* Based off of objdump optput from glibc */
1095 subi r3, r3, MCOUNT_INSN_SIZE
1134 subi r3, r3, MCOUNT_INSN_SIZE
1135 LOAD_REG_ADDR(r5, ftrace_trace_function)
1161 _GLOBAL(ftrace_stub)
1164 #endif /* CONFIG_MCOUNT */