* [PATCH] powerpc/irq: Fix undefined reference to irq_proc_emit_counts on CONFIG_PROC_FS=n
@ 2026-09-30 7:23 Shrikanth Hegde
0 siblings, 0 replies; only message in thread
From: Shrikanth Hegde @ 2026-09-30 7:23 UTC (permalink / raw)
To: maddy, linuxppc-dev, lkp
Cc: sshegde, christophe.leroy, tglx, linux-kernel, ritesh.list
kernel test robot reported a randconfig failure due to below error.
ld.lld: error: undefined symbol: irq_proc_emit_counts
referenced by irq.c:116 (arch/powerpc/kernel/irq.c:116)
arch/powerpc/kernel/irq.o:(arch_show_interrupts) in archive vmlinux.a
This happens when CONFIG_PROC_FS=n, since irq_proc_emit_counts is
defined only when it is true. Though it is a rare config, but it is a
possible one.
Fix it by gating against the config. arch_show_interrupts() is called only by
irq_seq_show() which is compiled when CONFIG_PROC_FS=y. So keeping the config
gating is sufficient.
Fixes: fbb22ceaaf8f ("powerpc/irq: Make irqstats array based")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202609271531.8kf2NTjK-lkp@intel.com/
Signed-off-by: Shrikanth Hegde <sshegde@linux.ibm.com>
---
arch/powerpc/kernel/irq.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index bce546931a13..9d23ae0fa076 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -122,6 +122,7 @@ void inc_irq_stat_and_enable(enum irq_stat_counts which)
set_bit(which, irq_stat_count_show);
}
+#ifdef CONFIG_PROC_FS
int arch_show_interrupts(struct seq_file *p, int prec)
{
const struct irq_stat_info *info = irq_stat_info;
@@ -155,6 +156,7 @@ int arch_show_interrupts(struct seq_file *p, int prec)
#endif
return 0;
}
+#endif
static int __init irq_init_stats(void)
{
--
2.52.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-30 7:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-30 7:23 [PATCH] powerpc/irq: Fix undefined reference to irq_proc_emit_counts on CONFIG_PROC_FS=n Shrikanth Hegde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®