Skip to content

Commit 9de7695

Browse files
arndbIngo Molnar
authored andcommitted
x86/irq: Define trace events conditionally
When both of X86_LOCAL_APIC and X86_THERMAL_VECTOR are disabled, the irq tracing produces a W=1 build warning for the tracing definitions: In file included from include/trace/trace_events.h:27, from include/trace/define_trace.h:113, from arch/x86/include/asm/trace/irq_vectors.h:383, from arch/x86/kernel/irq.c:29: include/trace/stages/init.h:2:23: error: 'str__irq_vectors__trace_system_name' defined but not used [-Werror=unused-const-variable=] Make the tracepoints conditional on the same symbosl that guard their usage. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20250225213236.3141752-1-arnd@kernel.org
1 parent bebe35b commit 9de7695

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/x86/kernel/irq.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
#include <asm/posted_intr.h>
2626
#include <asm/irq_remapping.h>
2727

28+
#if defined(CONFIG_X86_LOCAL_APIC) || defined(CONFIG_X86_THERMAL_VECTOR)
2829
#define CREATE_TRACE_POINTS
2930
#include <asm/trace/irq_vectors.h>
31+
#endif
3032

3133
DEFINE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
3234
EXPORT_PER_CPU_SYMBOL(irq_stat);

0 commit comments

Comments
 (0)