Ticket #2238: ftrace3.patch

File ftrace3.patch, 5.0 KB (added by lindi, 10 years ago)

add the final missing no_instrument_function attributes, now ftrace works!

  • arch/arm/include/asm/fiq.h

    diff --git a/arch/arm/include/asm/fiq.h b/arch/arm/include/asm/fiq.h
    index a0cc0c0..2b04c68 100644
    a b struct fiq_handler { 
    2929extern int claim_fiq(struct fiq_handler *f); 
    3030extern void release_fiq(struct fiq_handler *f); 
    3131extern void set_fiq_handler(void *start, unsigned int length); 
    32 extern void __attribute__((naked)) set_fiq_regs(struct pt_regs *regs); 
    33 extern void __attribute__((naked)) get_fiq_regs(struct pt_regs *regs); 
     32extern void __attribute__((naked,no_instrument_function)) set_fiq_regs(struct pt_regs *regs); 
     33extern void __attribute__((naked,no_instrument_function)) get_fiq_regs(struct pt_regs *regs); 
    3434extern void enable_fiq(int fiq); 
    3535extern void disable_fiq(int fiq); 
    3636 
  • arch/arm/kernel/fiq.c

    diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c
    index 36f81d9..d63e7c9 100644
    a b void set_fiq_handler(void *start, unsigned int length) 
    8888 * disable irqs for the duration.  Note - these functions are almost 
    8989 * entirely coded in assembly. 
    9090 */ 
    91 void __attribute__((naked)) set_fiq_regs(struct pt_regs *regs) 
     91void __attribute__((naked,no_instrument_function)) set_fiq_regs(struct pt_regs *regs) 
    9292{ 
    9393        register unsigned long tmp; 
    9494        asm volatile ( 
    void __attribute__((naked)) set_fiq_regs(struct pt_regs *regs) 
    106106        : "r" (&regs->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE)); 
    107107} 
    108108 
    109 void __attribute__((naked)) get_fiq_regs(struct pt_regs *regs) 
     109void __attribute__((naked,no_instrument_function)) get_fiq_regs(struct pt_regs *regs) 
    110110{ 
    111111        register unsigned long tmp; 
    112112        asm volatile ( 
  • arch/arm/kernel/kprobes.c

    diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c
    index 3f9abe0..953ab63 100644
    a b int __kprobes kprobe_exceptions_notify(struct notifier_block *self, 
    277277 * for kretprobe handlers which should normally be interested in r0 only 
    278278 * anyway. 
    279279 */ 
    280 void __naked __kprobes kretprobe_trampoline(void) 
     280void __attribute__((naked,no_instrument_function)) __kprobes kretprobe_trampoline(void) 
    281281{ 
    282282        __asm__ __volatile__ ( 
    283283                "stmdb  sp!, {r0 - r11}         \n\t" 
  • arch/arm/mach-s3c2440/fiq_c_isr.c

    diff --git a/arch/arm/mach-s3c2440/fiq_c_isr.c b/arch/arm/mach-s3c2440/fiq_c_isr.c
    index 0decc35..b852a2e 100644
    a b u8 fiq_ready; 
    7979/* this function must live in the monolithic kernel somewhere!  A module is 
    8080 * NOT good enough! 
    8181 */ 
    82 extern void __attribute__ ((naked)) s3c2440_fiq_isr(void); 
     82extern void __attribute__ ((naked,no_instrument_function)) s3c2440_fiq_isr(void); 
    8383 
    8484static void fiq_set_vector_and_regs(void); 
    8585 
    8686 
    8787/* this is copied into the hard FIQ vector during init */ 
    8888 
    89 static void __attribute__ ((naked)) s3c2440_FIQ_Branch(void) 
     89static void __attribute__ ((naked,no_instrument_function)) s3c2440_FIQ_Branch(void) 
    9090{ 
    9191        asm __volatile__ ( 
    9292                "mov pc, r8 ; " 
  • arch/arm/mach-s3c2440/fiq_c_isr.h

    diff --git a/arch/arm/mach-s3c2440/fiq_c_isr.h b/arch/arm/mach-s3c2440/fiq_c_isr.h
    index e92b103..eb6851f 100644
    a b struct sc32440_fiq_platform_data { 
    2424 */ 
    2525 
    2626#define FIQ_HANDLER_START() \ 
    27 void __attribute__ ((naked)) s3c2440_fiq_isr(void) \ 
     27void __attribute__ ((naked,no_instrument_function)) s3c2440_fiq_isr(void) \ 
    2828{\ 
    2929        /*\ 
    3030         * you can declare local vars here, take care to set the frame size\ 
  • arch/arm/mm/copypage-v4mc.c

    diff --git a/arch/arm/mm/copypage-v4mc.c b/arch/arm/mm/copypage-v4mc.c
    index 8d33e25..0ce99ba 100644
    a b static DEFINE_SPINLOCK(minicache_lock); 
    4444 * instruction.  If your processor does not supply this, you have to write your 
    4545 * own copy_user_page that does the right thing. 
    4646 */ 
    47 static void __attribute__((naked)) 
     47static void __attribute__((naked,no_instrument_function)) 
    4848mc_copy_user_page(void *from, void *to) 
    4949{ 
    5050        asm volatile( 
    void v4_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr) 
    8888/* 
    8989 * ARMv4 optimised clear_user_page 
    9090 */ 
    91 void __attribute__((naked)) 
     91void __attribute__((naked,no_instrument_function)) 
    9292v4_mc_clear_user_page(void *kaddr, unsigned long vaddr) 
    9393{ 
    9494        asm volatile( 
  • arch/arm/mm/copypage-xscale.c

    diff --git a/arch/arm/mm/copypage-xscale.c b/arch/arm/mm/copypage-xscale.c
    index bad4933..4a8b216 100644
    a b static DEFINE_SPINLOCK(minicache_lock); 
    4242 * Dcache aliasing issue.  The writes will be forwarded to the write buffer, 
    4343 * and merged as appropriate. 
    4444 */ 
    45 static void __attribute__((naked)) 
     45static void __attribute__((naked,no_instrument_function)) 
    4646mc_copy_user_page(void *from, void *to) 
    4747{ 
    4848        /* 
    void xscale_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr) 
    110110/* 
    111111 * XScale optimised clear_user_page 
    112112 */ 
    113 void __attribute__((naked)) 
     113void __attribute__((naked,no_instrument_function)) 
    114114xscale_mc_clear_user_page(void *kaddr, unsigned long vaddr) 
    115115{ 
    116116        asm volatile(