Skip to content

Commit 83ab851

Browse files
committed
trace,x86: Move creation of irq tracepoints from apic.c to irq.c
Compiling without CONFIG_X86_LOCAL_APIC set, apic.c will not be compiled, and the irq tracepoints will not be created via the CREATE_TRACE_POINTS macro. When CONFIG_X86_LOCAL_APIC is not set, we get the following build error: LD init/built-in.o arch/x86/built-in.o: In function `trace_x86_platform_ipi_entry': linux-test.git/arch/x86/include/asm/trace/irq_vectors.h:66: undefined reference to `__tracepoint_x86_platform_ipi_entry' arch/x86/built-in.o: In function `trace_x86_platform_ipi_exit': linux-test.git/arch/x86/include/asm/trace/irq_vectors.h:66: undefined reference to `__tracepoint_x86_platform_ipi_exit' arch/x86/built-in.o: In function `trace_irq_work_entry': linux-test.git/arch/x86/include/asm/trace/irq_vectors.h:72: undefined reference to `__tracepoint_irq_work_entry' arch/x86/built-in.o: In function `trace_irq_work_exit': linux-test.git/arch/x86/include/asm/trace/irq_vectors.h:72: undefined reference to `__tracepoint_irq_work_exit' arch/x86/built-in.o:(__jump_table+0x8): undefined reference to `__tracepoint_x86_platform_ipi_entry' arch/x86/built-in.o:(__jump_table+0x14): undefined reference to `__tracepoint_x86_platform_ipi_exit' arch/x86/built-in.o:(__jump_table+0x20): undefined reference to `__tracepoint_irq_work_entry' arch/x86/built-in.o:(__jump_table+0x2c): undefined reference to `__tracepoint_irq_work_exit' make[1]: *** [vmlinux] Error 1 make: *** [sub-make] Error 2 As irq.c is always compiled for x86, it is a more appropriate location to create the irq tracepoints. Cc: Seiji Aguchi <seiji.aguchi@hds.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
1 parent cf910e8 commit 83ab851

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎arch/x86/kernel/Makefile‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ CFLAGS_REMOVE_ftrace.o = -pg
1616
CFLAGS_REMOVE_early_printk.o = -pg
1717
endif
1818

19+
CFLAGS_irq.o := -I$(src)/../include/asm/trace
20+
1921
obj-y := process_$(BITS).o signal.o entry_$(BITS).o
2022
obj-y += traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
2123
obj-y += time.o ioport.o ldt.o dumpstack.o nmi.o

‎arch/x86/kernel/apic/Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Makefile for local APIC drivers and for the IO-APIC code
33
#
44

5-
CFLAGS_apic.o := -I$(src)/../../include/asm/trace
65
obj-$(CONFIG_X86_LOCAL_APIC) += apic.o apic_noop.o ipi.o
76
obj-y += hw_nmi.o
87

‎arch/x86/kernel/apic/apic.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include <linux/smp.h>
3636
#include <linux/mm.h>
3737

38+
#include <asm/trace/irq_vectors.h>
3839
#include <asm/irq_remapping.h>
3940
#include <asm/perf_event.h>
4041
#include <asm/x86_init.h>
@@ -55,9 +56,6 @@
5556
#include <asm/tsc.h>
5657
#include <asm/hypervisor.h>
5758

58-
#define CREATE_TRACE_POINTS
59-
#include <asm/trace/irq_vectors.h>
60-
6159
unsigned int num_processors;
6260

6361
unsigned disabled_cpus __cpuinitdata;

‎arch/x86/kernel/irq.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include <asm/idle.h>
1818
#include <asm/mce.h>
1919
#include <asm/hw_irq.h>
20+
21+
#define CREATE_TRACE_POINTS
2022
#include <asm/trace/irq_vectors.h>
2123

2224
atomic_t irq_err_count;

0 commit comments

Comments
 (0)