diff options
Diffstat (limited to 'arch/sh/kernel')
| -rw-r--r-- | arch/sh/kernel/dwarf.c | 22 | ||||
| -rw-r--r-- | arch/sh/kernel/irq.c | 3 | ||||
| -rw-r--r-- | arch/sh/kernel/sh_ksyms_32.c | 14 |
3 files changed, 38 insertions, 1 deletions
diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c index 03b3616c80a5..2d07084e4882 100644 --- a/arch/sh/kernel/dwarf.c +++ b/arch/sh/kernel/dwarf.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/list.h> | 20 | #include <linux/list.h> |
| 21 | #include <linux/mempool.h> | 21 | #include <linux/mempool.h> |
| 22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
| 23 | #include <linux/ftrace.h> | ||
| 23 | #include <asm/dwarf.h> | 24 | #include <asm/dwarf.h> |
| 24 | #include <asm/unwinder.h> | 25 | #include <asm/unwinder.h> |
| 25 | #include <asm/sections.h> | 26 | #include <asm/sections.h> |
| @@ -557,6 +558,27 @@ struct dwarf_frame * dwarf_unwind_stack(unsigned long pc, | |||
| 557 | if (!pc && !prev) | 558 | if (!pc && !prev) |
| 558 | pc = (unsigned long)current_text_addr(); | 559 | pc = (unsigned long)current_text_addr(); |
| 559 | 560 | ||
| 561 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | ||
| 562 | /* | ||
| 563 | * If our stack has been patched by the function graph tracer | ||
| 564 | * then we might see the address of return_to_handler() where we | ||
| 565 | * expected to find the real return address. | ||
| 566 | */ | ||
| 567 | if (pc == (unsigned long)&return_to_handler) { | ||
| 568 | int index = current->curr_ret_stack; | ||
| 569 | |||
| 570 | /* | ||
| 571 | * We currently have no way of tracking how many | ||
| 572 | * return_to_handler()'s we've seen. If there is more | ||
| 573 | * than one patched return address on our stack, | ||
| 574 | * complain loudly. | ||
| 575 | */ | ||
| 576 | WARN_ON(index > 0); | ||
| 577 | |||
| 578 | pc = current->ret_stack[index].ret; | ||
| 579 | } | ||
| 580 | #endif | ||
| 581 | |||
| 560 | frame = mempool_alloc(dwarf_frame_pool, GFP_ATOMIC); | 582 | frame = mempool_alloc(dwarf_frame_pool, GFP_ATOMIC); |
| 561 | if (!frame) { | 583 | if (!frame) { |
| 562 | printk(KERN_ERR "Unable to allocate a dwarf frame\n"); | 584 | printk(KERN_ERR "Unable to allocate a dwarf frame\n"); |
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index 7cb933ba4957..eac7da772fc2 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
| 12 | #include <linux/kernel_stat.h> | 12 | #include <linux/kernel_stat.h> |
| 13 | #include <linux/seq_file.h> | 13 | #include <linux/seq_file.h> |
| 14 | #include <linux/ftrace.h> | ||
| 14 | #include <asm/processor.h> | 15 | #include <asm/processor.h> |
| 15 | #include <asm/machvec.h> | 16 | #include <asm/machvec.h> |
| 16 | #include <asm/uaccess.h> | 17 | #include <asm/uaccess.h> |
| @@ -106,7 +107,7 @@ static union irq_ctx *hardirq_ctx[NR_CPUS] __read_mostly; | |||
| 106 | static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly; | 107 | static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly; |
| 107 | #endif | 108 | #endif |
| 108 | 109 | ||
| 109 | asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs) | 110 | asmlinkage __irq_entry int do_IRQ(unsigned int irq, struct pt_regs *regs) |
| 110 | { | 111 | { |
| 111 | struct pt_regs *old_regs = set_irq_regs(regs); | 112 | struct pt_regs *old_regs = set_irq_regs(regs); |
| 112 | #ifdef CONFIG_IRQSTACKS | 113 | #ifdef CONFIG_IRQSTACKS |
diff --git a/arch/sh/kernel/sh_ksyms_32.c b/arch/sh/kernel/sh_ksyms_32.c index 86c270428357..444cce3ae921 100644 --- a/arch/sh/kernel/sh_ksyms_32.c +++ b/arch/sh/kernel/sh_ksyms_32.c | |||
| @@ -85,6 +85,20 @@ DECLARE_EXPORT(__movstr_i4_even); | |||
| 85 | DECLARE_EXPORT(__movstr_i4_odd); | 85 | DECLARE_EXPORT(__movstr_i4_odd); |
| 86 | DECLARE_EXPORT(__movstrSI12_i4); | 86 | DECLARE_EXPORT(__movstrSI12_i4); |
| 87 | DECLARE_EXPORT(__movmem); | 87 | DECLARE_EXPORT(__movmem); |
| 88 | DECLARE_EXPORT(__movmemSI8); | ||
| 89 | DECLARE_EXPORT(__movmemSI12); | ||
| 90 | DECLARE_EXPORT(__movmemSI16); | ||
| 91 | DECLARE_EXPORT(__movmemSI20); | ||
| 92 | DECLARE_EXPORT(__movmemSI24); | ||
| 93 | DECLARE_EXPORT(__movmemSI28); | ||
| 94 | DECLARE_EXPORT(__movmemSI32); | ||
| 95 | DECLARE_EXPORT(__movmemSI36); | ||
| 96 | DECLARE_EXPORT(__movmemSI40); | ||
| 97 | DECLARE_EXPORT(__movmemSI44); | ||
| 98 | DECLARE_EXPORT(__movmemSI48); | ||
| 99 | DECLARE_EXPORT(__movmemSI52); | ||
| 100 | DECLARE_EXPORT(__movmemSI56); | ||
| 101 | DECLARE_EXPORT(__movmemSI60); | ||
| 88 | DECLARE_EXPORT(__movmem_i4_even); | 102 | DECLARE_EXPORT(__movmem_i4_even); |
| 89 | DECLARE_EXPORT(__movmem_i4_odd); | 103 | DECLARE_EXPORT(__movmem_i4_odd); |
| 90 | DECLARE_EXPORT(__movmemSI12_i4); | 104 | DECLARE_EXPORT(__movmemSI12_i4); |
