Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

irq: Make the irqentry text section unconditional

Generate irqentry and softirqentry text sections without
any Kconfig dependencies. This will add extra sections, but
there should be no performace impact.

Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: David S . Miller <davem@davemloft.net>
Cc: Francis Deslauriers <francis.deslauriers@efficios.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: linux-arch@vger.kernel.org
Cc: linux-cris-kernel@axis.com
Cc: mathieu.desnoyers@efficios.com
Link: http://lkml.kernel.org/r/150172789110.27216.3955739126693102122.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Masami Hiramatsu and committed by
Ingo Molnar
229a7186 c2579fee

+7 -44
-7
arch/arm/include/asm/traps.h
··· 18 18 void register_undef_hook(struct undef_hook *hook); 19 19 void unregister_undef_hook(struct undef_hook *hook); 20 20 21 - #ifdef CONFIG_FUNCTION_GRAPH_TRACER 22 21 static inline int __in_irqentry_text(unsigned long ptr) 23 22 { 24 23 extern char __irqentry_text_start[]; ··· 26 27 return ptr >= (unsigned long)&__irqentry_text_start && 27 28 ptr < (unsigned long)&__irqentry_text_end; 28 29 } 29 - #else 30 - static inline int __in_irqentry_text(unsigned long ptr) 31 - { 32 - return 0; 33 - } 34 - #endif 35 30 36 31 static inline int in_exception_text(unsigned long ptr) 37 32 {
-7
arch/arm64/include/asm/traps.h
··· 37 37 38 38 void arm64_notify_segfault(struct pt_regs *regs, unsigned long addr); 39 39 40 - #ifdef CONFIG_FUNCTION_GRAPH_TRACER 41 40 static inline int __in_irqentry_text(unsigned long ptr) 42 41 { 43 42 return ptr >= (unsigned long)&__irqentry_text_start && 44 43 ptr < (unsigned long)&__irqentry_text_end; 45 44 } 46 - #else 47 - static inline int __in_irqentry_text(unsigned long ptr) 48 - { 49 - return 0; 50 - } 51 - #endif 52 45 53 46 static inline int in_exception_text(unsigned long ptr) 54 47 {
+2 -7
arch/x86/entry/entry_64.S
··· 675 675 #endif 676 676 677 677 /* Make sure APIC interrupt handlers end up in the irqentry section: */ 678 - #if defined(CONFIG_FUNCTION_GRAPH_TRACER) || defined(CONFIG_KASAN) 679 - # define PUSH_SECTION_IRQENTRY .pushsection .irqentry.text, "ax" 680 - # define POP_SECTION_IRQENTRY .popsection 681 - #else 682 - # define PUSH_SECTION_IRQENTRY 683 - # define POP_SECTION_IRQENTRY 684 - #endif 678 + #define PUSH_SECTION_IRQENTRY .pushsection .irqentry.text, "ax" 679 + #define POP_SECTION_IRQENTRY .popsection 685 680 686 681 .macro apicinterrupt num sym do_sym 687 682 PUSH_SECTION_IRQENTRY
-2
arch/x86/kernel/unwind_frame.c
··· 91 91 if (addr >= __entry_text_start && addr < __entry_text_end) 92 92 return true; 93 93 94 - #if defined(CONFIG_FUNCTION_GRAPH_TRACER) || defined(CONFIG_KASAN) 95 94 if (addr >= __irqentry_text_start && addr < __irqentry_text_end) 96 95 return true; 97 - #endif 98 96 99 97 return false; 100 98 }
+4
include/asm-generic/sections.h
··· 27 27 * __kprobes_text_start, __kprobes_text_end 28 28 * __entry_text_start, __entry_text_end 29 29 * __ctors_start, __ctors_end 30 + * __irqentry_text_start, __irqentry_text_end 31 + * __softirqentry_text_start, __softirqentry_text_end 30 32 */ 31 33 extern char _text[], _stext[], _etext[]; 32 34 extern char _data[], _sdata[], _edata[]; ··· 41 39 extern char __kprobes_text_start[], __kprobes_text_end[]; 42 40 extern char __entry_text_start[], __entry_text_end[]; 43 41 extern char __start_rodata[], __end_rodata[]; 42 + extern char __irqentry_text_start[], __irqentry_text_end[]; 43 + extern char __softirqentry_text_start[], __softirqentry_text_end[]; 44 44 45 45 /* Start and end of .ctors section - used for constructor calls. */ 46 46 extern char __ctors_start[], __ctors_end[];
-8
include/asm-generic/vmlinux.lds.h
··· 483 483 *(.entry.text) \ 484 484 VMLINUX_SYMBOL(__entry_text_end) = .; 485 485 486 - #if defined(CONFIG_FUNCTION_GRAPH_TRACER) || defined(CONFIG_KASAN) 487 486 #define IRQENTRY_TEXT \ 488 487 ALIGN_FUNCTION(); \ 489 488 VMLINUX_SYMBOL(__irqentry_text_start) = .; \ 490 489 *(.irqentry.text) \ 491 490 VMLINUX_SYMBOL(__irqentry_text_end) = .; 492 - #else 493 - #define IRQENTRY_TEXT 494 - #endif 495 491 496 - #if defined(CONFIG_FUNCTION_GRAPH_TRACER) || defined(CONFIG_KASAN) 497 492 #define SOFTIRQENTRY_TEXT \ 498 493 ALIGN_FUNCTION(); \ 499 494 VMLINUX_SYMBOL(__softirqentry_text_start) = .; \ 500 495 *(.softirqentry.text) \ 501 496 VMLINUX_SYMBOL(__softirqentry_text_end) = .; 502 - #else 503 - #define SOFTIRQENTRY_TEXT 504 - #endif 505 497 506 498 /* Section used for early init (in .S files) */ 507 499 #define HEAD_TEXT *(.head.text)
+1 -13
include/linux/interrupt.h
··· 18 18 #include <linux/atomic.h> 19 19 #include <asm/ptrace.h> 20 20 #include <asm/irq.h> 21 + #include <asm/sections.h> 21 22 22 23 /* 23 24 * These correspond to the IORESOURCE_IRQ_* defines in ··· 727 726 extern int arch_probe_nr_irqs(void); 728 727 extern int arch_early_irq_init(void); 729 728 730 - #if defined(CONFIG_FUNCTION_GRAPH_TRACER) || defined(CONFIG_KASAN) 731 729 /* 732 730 * We want to know which function is an entrypoint of a hardirq or a softirq. 733 731 */ 734 732 #define __irq_entry __attribute__((__section__(".irqentry.text"))) 735 733 #define __softirq_entry \ 736 734 __attribute__((__section__(".softirqentry.text"))) 737 - 738 - /* Limits of hardirq entrypoints */ 739 - extern char __irqentry_text_start[]; 740 - extern char __irqentry_text_end[]; 741 - /* Limits of softirq entrypoints */ 742 - extern char __softirqentry_text_start[]; 743 - extern char __softirqentry_text_end[]; 744 - 745 - #else 746 - #define __irq_entry 747 - #define __softirq_entry 748 - #endif 749 735 750 736 #endif