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 <[email protected]>
Closes:
https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Shrikanth Hegde <[email protected]>
---
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