From: Shrikanth Hegde <sshegde@linux.ibm.com>
To: maddy@linux.ibm.com, linuxppc-dev@lists.ozlabs.org, lkp@intel.com
Cc: sshegde@linux.ibm.com, christophe.leroy@csgroup.eu,
tglx@kernel.org, linux-kernel@vger.kernel.org,
ritesh.list@gmail.com
Subject: [PATCH] powerpc/irq: Fix undefined reference to irq_proc_emit_counts on CONFIG_PROC_FS=n
Date: Wed, 30 Sep 2026 12:53:29 +0530 [thread overview]
Message-ID: <20260930072329.1110379-1-sshegde@linux.ibm.com> (raw)
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
reply other threads:[~2026-09-30 7:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260930072329.1110379-1-sshegde@linux.ibm.com \
--to=sshegde@linux.ibm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lkp@intel.com \
--cc=maddy@linux.ibm.com \
--cc=ritesh.list@gmail.com \
--cc=tglx@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®