All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] s390/idle: Add missing EXPORT_SYMBOL()
@ 2026-06-17 14:53 Heiko Carstens
  2026-06-17 15:00 ` sashiko-bot
  2026-06-17 16:25 ` Uwe Kleine-König
  0 siblings, 2 replies; 3+ messages in thread
From: Heiko Carstens @ 2026-06-17 14:53 UTC (permalink / raw)
  To: Alexander Gordeev
  Cc: Sven Schnelle, Vasily Gorbik, Christian Borntraeger,
	Uwe Kleine-König, linux-s390

Uwe Kleine-König reported this build breakage caused by a recent commit
which provides arch specific kcpustat_field_idle()/kcpustat_field_iowait()
functions:

ERROR: modpost: "arch_kcpustat_field_idle" [drivers/leds/trigger/ledtrig-activity.ko] undefined!
ERROR: modpost: "arch_kcpustat_field_iowait" [drivers/leds/trigger/ledtrig-activity.ko] undefined!

Fix this by adding the missing EXPORT_SYMBOL().

Fixes: 670e057744e0 ("s390/idle: Provide arch specific kcpustat_field_idle()/kcpustat_field_iowait()")
Reported-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Closes: https://lore.kernel.org/r/ajKsG0JP6qTssQBX@monoceros
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
---
 arch/s390/kernel/idle.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/s390/kernel/idle.c b/arch/s390/kernel/idle.c
index 7f7851c001e0..6da8ee22a1d5 100644
--- a/arch/s390/kernel/idle.c
+++ b/arch/s390/kernel/idle.c
@@ -14,6 +14,7 @@
 #include <linux/init.h>
 #include <linux/cpu.h>
 #include <trace/events/power.h>
+#include <linux/export.h>
 #include <asm/cpu_mf.h>
 #include <asm/cputime.h>
 #include <asm/idle.h>
@@ -83,11 +84,13 @@ u64 arch_kcpustat_field_idle(int cpu)
 {
 	return arch_cpu_idle_time(cpu, CPUTIME_IDLE, !nr_iowait_cpu(cpu));
 }
+EXPORT_SYMBOL(arch_kcpustat_field_idle);
 
 u64 arch_kcpustat_field_iowait(int cpu)
 {
 	return arch_cpu_idle_time(cpu, CPUTIME_IOWAIT, nr_iowait_cpu(cpu));
 }
+EXPORT_SYMBOL(arch_kcpustat_field_iowait);
 
 void account_idle_time_irq(void)
 {
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] s390/idle: Add missing EXPORT_SYMBOL()
  2026-06-17 14:53 [PATCH -next] s390/idle: Add missing EXPORT_SYMBOL() Heiko Carstens
@ 2026-06-17 15:00 ` sashiko-bot
  2026-06-17 16:25 ` Uwe Kleine-König
  1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-06-17 15:00 UTC (permalink / raw)
  To: Heiko Carstens; +Cc: linux-s390, Alexander Gordeev, Vasily Gorbik

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Export License Discrepancy: arch_kcpustat_field_idle and arch_kcpustat_field_iowait are exported via EXPORT_SYMBOL instead of EXPORT_SYMBOL_GPL.
--

commit 53dd63a70164da468386d3191eb1e7e24af1b440
Author: Heiko Carstens <hca@linux.ibm.com>

s390/idle: Add missing EXPORT_SYMBOL()
    
This commit fixes a build breakage for the ledtrig-activity module by
exporting the newly introduced arch_kcpustat_field_idle and
arch_kcpustat_field_iowait functions.

Closes: https://lore.kernel.org/r/ajKsG0JP6qTssQBX@monoceros

> diff --git a/arch/s390/kernel/idle.c b/arch/s390/kernel/idle.c
> index 7f7851c001e0a..6da8ee22a1d53 100644
> --- a/arch/s390/kernel/idle.c
> +++ b/arch/s390/kernel/idle.c

[ ... ]

> @@ -83,11 +84,13 @@ u64 arch_kcpustat_field_idle(int cpu)
>  {
>  	return arch_cpu_idle_time(cpu, CPUTIME_IDLE, !nr_iowait_cpu(cpu));
>  }
> +EXPORT_SYMBOL(arch_kcpustat_field_idle);

[Severity: Low]
Should this use EXPORT_SYMBOL_GPL() instead? The generic implementations of 
kcpustat_field_idle() in kernel/sched/cputime.c are exported as GPL-only.
Using a standard export here circumvents the GPL symbol restriction imposed
by the core scheduler.

>  
>  u64 arch_kcpustat_field_iowait(int cpu)
>  {
>  	return arch_cpu_idle_time(cpu, CPUTIME_IOWAIT, nr_iowait_cpu(cpu));
>  }
> +EXPORT_SYMBOL(arch_kcpustat_field_iowait);

[Severity: Low]
Similarly, does this need to be EXPORT_SYMBOL_GPL() to match the generic
kcpustat_field_iowait() counterpart?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260617145313.3910957-1-hca@linux.ibm.com?part=1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] s390/idle: Add missing EXPORT_SYMBOL()
  2026-06-17 14:53 [PATCH -next] s390/idle: Add missing EXPORT_SYMBOL() Heiko Carstens
  2026-06-17 15:00 ` sashiko-bot
@ 2026-06-17 16:25 ` Uwe Kleine-König
  1 sibling, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2026-06-17 16:25 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: Alexander Gordeev, Sven Schnelle, Vasily Gorbik,
	Christian Borntraeger, linux-s390

[-- Attachment #1: Type: text/plain, Size: 2039 bytes --]

On Wed, Jun 17, 2026 at 04:53:13PM +0200, Heiko Carstens wrote:
> Uwe Kleine-König reported this build breakage caused by a recent commit
> which provides arch specific kcpustat_field_idle()/kcpustat_field_iowait()
> functions:
> 
> ERROR: modpost: "arch_kcpustat_field_idle" [drivers/leds/trigger/ledtrig-activity.ko] undefined!
> ERROR: modpost: "arch_kcpustat_field_iowait" [drivers/leds/trigger/ledtrig-activity.ko] undefined!
> 
> Fix this by adding the missing EXPORT_SYMBOL().

Did you consider EXPORT_SYMBOL_GPL() which AFAIK is prefered over the
non-GPL one?

> Fixes: 670e057744e0 ("s390/idle: Provide arch specific kcpustat_field_idle()/kcpustat_field_iowait()")
> Reported-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> Closes: https://lore.kernel.org/r/ajKsG0JP6qTssQBX@monoceros
> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
> ---
>  arch/s390/kernel/idle.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/s390/kernel/idle.c b/arch/s390/kernel/idle.c
> index 7f7851c001e0..6da8ee22a1d5 100644
> --- a/arch/s390/kernel/idle.c
> +++ b/arch/s390/kernel/idle.c
> @@ -14,6 +14,7 @@
>  #include <linux/init.h>
>  #include <linux/cpu.h>
>  #include <trace/events/power.h>
> +#include <linux/export.h>
>  #include <asm/cpu_mf.h>
>  #include <asm/cputime.h>
>  #include <asm/idle.h>

When I fixed up the reported issue in my local tree, I didn't add that
include, so it seems to be included already implicitly. But I guess
adding that explicitly is a good idea.

> @@ -83,11 +84,13 @@ u64 arch_kcpustat_field_idle(int cpu)
>  {
>  	return arch_cpu_idle_time(cpu, CPUTIME_IDLE, !nr_iowait_cpu(cpu));
>  }
> +EXPORT_SYMBOL(arch_kcpustat_field_idle);
>  
>  u64 arch_kcpustat_field_iowait(int cpu)
>  {
>  	return arch_cpu_idle_time(cpu, CPUTIME_IOWAIT, nr_iowait_cpu(cpu));
>  }
> +EXPORT_SYMBOL(arch_kcpustat_field_iowait);
>  
>  void account_idle_time_irq(void)
>  {

Tested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-17 16:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-17 14:53 [PATCH -next] s390/idle: Add missing EXPORT_SYMBOL() Heiko Carstens
2026-06-17 15:00 ` sashiko-bot
2026-06-17 16:25 ` Uwe Kleine-König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.