* [PATCH] RCU: export rcu_idle_enter/_exit for loadable modules
@ 2020-09-22 21:43 Randy Dunlap
2020-09-22 21:56 ` Paul E. McKenney
0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2020-09-22 21:43 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, kernel test robot, Rafael J . Wysocki, linux-acpi,
Peter Zijlstra, Tony Luck, Fenghua Yu, linux-ia64,
Paul E. McKenney, Josh Triplett, rcu
drivers/acpi/processor.ko uses rcu_idle_enter()/_exit() but
they are not exported. This causes build errors on IA64,
so export those 2 functions.
ERROR: modpost: "rcu_idle_enter" [drivers/acpi/processor.ko] undefined!
ERROR: modpost: "rcu_idle_exit" [drivers/acpi/processor.ko] undefined!
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: linux-acpi@vger.kernel.org
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: linux-ia64@vger.kernel.org
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: rcu@vger.kernel.org
---
Is there a problem with exporting these functions for use by
loadable modules? If so, this driver should be modified not
to use rcu_idle_enter/exit.
kernel/rcu/tree.c | 2 ++
1 file changed, 2 insertions(+)
--- lnx-59-rc6.orig/kernel/rcu/tree.c
+++ lnx-59-rc6/kernel/rcu/tree.c
@@ -673,6 +673,7 @@ void rcu_idle_enter(void)
lockdep_assert_irqs_disabled();
rcu_eqs_enter(false);
}
+EXPORT_SYMBOL_GPL(rcu_idle_enter);
#ifdef CONFIG_NO_HZ_FULL
/**
@@ -886,6 +887,7 @@ void rcu_idle_exit(void)
rcu_eqs_exit(false);
local_irq_restore(flags);
}
+EXPORT_SYMBOL_GPL(rcu_idle_exit);
#ifdef CONFIG_NO_HZ_FULL
/**
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] RCU: export rcu_idle_enter/_exit for loadable modules
2020-09-22 21:43 [PATCH] RCU: export rcu_idle_enter/_exit for loadable modules Randy Dunlap
@ 2020-09-22 21:56 ` Paul E. McKenney
0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2020-09-22 21:56 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, kernel test robot, Rafael J . Wysocki, linux-acpi,
Peter Zijlstra, Tony Luck, Fenghua Yu, linux-ia64, Josh Triplett,
rcu
On Tue, Sep 22, 2020 at 02:43:30PM -0700, Randy Dunlap wrote:
> drivers/acpi/processor.ko uses rcu_idle_enter()/_exit() but
> they are not exported. This causes build errors on IA64,
> so export those 2 functions.
>
> ERROR: modpost: "rcu_idle_enter" [drivers/acpi/processor.ko] undefined!
> ERROR: modpost: "rcu_idle_exit" [drivers/acpi/processor.ko] undefined!
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
> Cc: linux-acpi@vger.kernel.org
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Tony Luck <tony.luck@intel.com>
> Cc: Fenghua Yu <fenghua.yu@intel.com>
> Cc: linux-ia64@vger.kernel.org
> Cc: "Paul E. McKenney" <paulmck@kernel.org>
> Cc: Josh Triplett <josh@joshtriplett.org>
> Cc: rcu@vger.kernel.org
> ---
> Is there a problem with exporting these functions for use by
> loadable modules? If so, this driver should be modified not
> to use rcu_idle_enter/exit.
Good catch, but Borislav Petkov beat you to it:
https://lore.kernel.org/lkml/20200921103741.GC5901@zn.tnic/
Rafael has applied Borislav's patch to his cpuidle tree for v5.9-rc7.
Thanx, Paul
> kernel/rcu/tree.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- lnx-59-rc6.orig/kernel/rcu/tree.c
> +++ lnx-59-rc6/kernel/rcu/tree.c
> @@ -673,6 +673,7 @@ void rcu_idle_enter(void)
> lockdep_assert_irqs_disabled();
> rcu_eqs_enter(false);
> }
> +EXPORT_SYMBOL_GPL(rcu_idle_enter);
>
> #ifdef CONFIG_NO_HZ_FULL
> /**
> @@ -886,6 +887,7 @@ void rcu_idle_exit(void)
> rcu_eqs_exit(false);
> local_irq_restore(flags);
> }
> +EXPORT_SYMBOL_GPL(rcu_idle_exit);
>
> #ifdef CONFIG_NO_HZ_FULL
> /**
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-22 21:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22 21:43 [PATCH] RCU: export rcu_idle_enter/_exit for loadable modules Randy Dunlap
2020-09-22 21:56 ` Paul E. McKenney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).