* WARNING: modpost: vmlinux.o(.text.unlikely+0x1d0d8): Section mismatch in reference from the function ingenic_tcu_setup_cevt() to the function .init.text:ingenic_tcu_get_clock()
@ 2020-11-25 6:21 kernel test robot
2020-11-25 10:23 ` [PATCH] clocksource/drivers/ingenic: Fix section mismatch Daniel Lezcano
0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2020-11-25 6:21 UTC (permalink / raw)
To: Daniel Lezcano; +Cc: kbuild-all, linux-kernel, Thomas Gleixner
[-- Attachment #1: Type: text/plain, Size: 1725 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 127c501a03d5db8b833e953728d3bcf53c8832a9
commit: 1b7efaa6154960396f414551841f1886d99b6872 Merge tag 'timers-v5.9' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core
date: 4 months ago
config: mips-randconfig-r032-20201125 (attached as .config)
compiler: mips64el-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1b7efaa6154960396f414551841f1886d99b6872
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 1b7efaa6154960396f414551841f1886d99b6872
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> WARNING: modpost: vmlinux.o(.text.unlikely+0x1d0d8): Section mismatch in reference from the function ingenic_tcu_setup_cevt() to the function .init.text:ingenic_tcu_get_clock()
The function ingenic_tcu_setup_cevt() references
the function __init ingenic_tcu_get_clock().
This is often because ingenic_tcu_setup_cevt lacks a __init
annotation or the annotation of ingenic_tcu_get_clock is wrong.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28200 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] clocksource/drivers/ingenic: Fix section mismatch
2020-11-25 6:21 WARNING: modpost: vmlinux.o(.text.unlikely+0x1d0d8): Section mismatch in reference from the function ingenic_tcu_setup_cevt() to the function .init.text:ingenic_tcu_get_clock() kernel test robot
@ 2020-11-25 10:23 ` Daniel Lezcano
2020-11-25 10:45 ` Paul Cercueil
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Daniel Lezcano @ 2020-11-25 10:23 UTC (permalink / raw)
To: daniel.lezcano, tglx
Cc: linux-kernel, zhouyanjie, paul, paul, hns, kernel test robot
The function ingenic_tcu_get_clock() is annotated for the __init
section but it is actually called from the online cpu callback.
That will lead to a crash if a CPU is hotplugged after boot time.
Remove the __init annotatation for the ingenic_tcu_get_clock()
function.
Fixes: f19d838d08fc (clocksource/drivers/ingenic: Add high resolution timer support for SMP/SMT)
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/clocksource/ingenic-timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/ingenic-timer.c b/drivers/clocksource/ingenic-timer.c
index 58fd9189fab7..905fd6b163a8 100644
--- a/drivers/clocksource/ingenic-timer.c
+++ b/drivers/clocksource/ingenic-timer.c
@@ -127,7 +127,7 @@ static irqreturn_t ingenic_tcu_cevt_cb(int irq, void *dev_id)
return IRQ_HANDLED;
}
-static struct clk * __init ingenic_tcu_get_clock(struct device_node *np, int id)
+static struct clk *ingenic_tcu_get_clock(struct device_node *np, int id)
{
struct of_phandle_args args;
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] clocksource/drivers/ingenic: Fix section mismatch
2020-11-25 10:23 ` [PATCH] clocksource/drivers/ingenic: Fix section mismatch Daniel Lezcano
@ 2020-11-25 10:45 ` Paul Cercueil
2020-11-25 17:34 ` Zhou Yanjie
2020-12-03 23:47 ` [tip: timers/core] " tip-bot2 for Daniel Lezcano
2 siblings, 0 replies; 5+ messages in thread
From: Paul Cercueil @ 2020-11-25 10:45 UTC (permalink / raw)
To: Daniel Lezcano
Cc: tglx, linux-kernel, zhouyanjie, paul, hns, kernel test robot
Hi Daniel,
Le mer. 25 nov. 2020 à 11:23, Daniel Lezcano
<daniel.lezcano@linaro.org> a écrit :
> The function ingenic_tcu_get_clock() is annotated for the __init
> section but it is actually called from the online cpu callback.
>
> That will lead to a crash if a CPU is hotplugged after boot time.
>
> Remove the __init annotatation for the ingenic_tcu_get_clock()
> function.
One 'ta' too many ;)
>
> Fixes: f19d838d08fc (clocksource/drivers/ingenic: Add high resolution
> timer support for SMP/SMT)
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
With the above fixed:
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Cheers,
-Paul
> ---
> drivers/clocksource/ingenic-timer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clocksource/ingenic-timer.c
> b/drivers/clocksource/ingenic-timer.c
> index 58fd9189fab7..905fd6b163a8 100644
> --- a/drivers/clocksource/ingenic-timer.c
> +++ b/drivers/clocksource/ingenic-timer.c
> @@ -127,7 +127,7 @@ static irqreturn_t ingenic_tcu_cevt_cb(int irq,
> void *dev_id)
> return IRQ_HANDLED;
> }
>
> -static struct clk * __init ingenic_tcu_get_clock(struct device_node
> *np, int id)
> +static struct clk *ingenic_tcu_get_clock(struct device_node *np, int
> id)
> {
> struct of_phandle_args args;
>
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] clocksource/drivers/ingenic: Fix section mismatch
2020-11-25 10:23 ` [PATCH] clocksource/drivers/ingenic: Fix section mismatch Daniel Lezcano
2020-11-25 10:45 ` Paul Cercueil
@ 2020-11-25 17:34 ` Zhou Yanjie
2020-12-03 23:47 ` [tip: timers/core] " tip-bot2 for Daniel Lezcano
2 siblings, 0 replies; 5+ messages in thread
From: Zhou Yanjie @ 2020-11-25 17:34 UTC (permalink / raw)
To: Daniel Lezcano, tglx; +Cc: linux-kernel, paul, paul, hns, kernel test robot
Hi Daniel,
在 2020/11/25 下午6:23, Daniel Lezcano 写道:
> The function ingenic_tcu_get_clock() is annotated for the __init
> section but it is actually called from the online cpu callback.
>
> That will lead to a crash if a CPU is hotplugged after boot time.
>
> Remove the __init annotatation for the ingenic_tcu_get_clock()
> function.
>
> Fixes: f19d838d08fc (clocksource/drivers/ingenic: Add high resolution timer support for SMP/SMT)
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
> drivers/clocksource/ingenic-timer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Works fine on JZ4780, X1000, and X1830.
Tested-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
Thanks and best regards!
> diff --git a/drivers/clocksource/ingenic-timer.c b/drivers/clocksource/ingenic-timer.c
> index 58fd9189fab7..905fd6b163a8 100644
> --- a/drivers/clocksource/ingenic-timer.c
> +++ b/drivers/clocksource/ingenic-timer.c
> @@ -127,7 +127,7 @@ static irqreturn_t ingenic_tcu_cevt_cb(int irq, void *dev_id)
> return IRQ_HANDLED;
> }
>
> -static struct clk * __init ingenic_tcu_get_clock(struct device_node *np, int id)
> +static struct clk *ingenic_tcu_get_clock(struct device_node *np, int id)
> {
> struct of_phandle_args args;
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip: timers/core] clocksource/drivers/ingenic: Fix section mismatch
2020-11-25 10:23 ` [PATCH] clocksource/drivers/ingenic: Fix section mismatch Daniel Lezcano
2020-11-25 10:45 ` Paul Cercueil
2020-11-25 17:34 ` Zhou Yanjie
@ 2020-12-03 23:47 ` tip-bot2 for Daniel Lezcano
2 siblings, 0 replies; 5+ messages in thread
From: tip-bot2 for Daniel Lezcano @ 2020-12-03 23:47 UTC (permalink / raw)
To: linux-tip-commits
Cc: kernel test robot, Daniel Lezcano, Paul Cercueil, zhouyanjie,
x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 5bd7cb29eceb52e4b108917786fdbf2a2c2048ef
Gitweb: https://git.kernel.org/tip/5bd7cb29eceb52e4b108917786fdbf2a2c2048ef
Author: Daniel Lezcano <daniel.lezcano@linaro.org>
AuthorDate: Wed, 25 Nov 2020 11:23:45 +01:00
Committer: Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Thu, 03 Dec 2020 19:16:26 +01:00
clocksource/drivers/ingenic: Fix section mismatch
The function ingenic_tcu_get_clock() is annotated for the __init
section but it is actually called from the online cpu callback.
That will lead to a crash if a CPU is hotplugged after boot time.
Remove the __init annotation for the ingenic_tcu_get_clock()
function.
Fixes: f19d838d08fc (clocksource/drivers/ingenic: Add high resolution timer support for SMP/SMT)
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Tested-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
Link: https://lore.kernel.org/r/20201125102346.1816310-1-daniel.lezcano@linaro.org
---
drivers/clocksource/ingenic-timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/ingenic-timer.c b/drivers/clocksource/ingenic-timer.c
index 58fd918..905fd6b 100644
--- a/drivers/clocksource/ingenic-timer.c
+++ b/drivers/clocksource/ingenic-timer.c
@@ -127,7 +127,7 @@ static irqreturn_t ingenic_tcu_cevt_cb(int irq, void *dev_id)
return IRQ_HANDLED;
}
-static struct clk * __init ingenic_tcu_get_clock(struct device_node *np, int id)
+static struct clk *ingenic_tcu_get_clock(struct device_node *np, int id)
{
struct of_phandle_args args;
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-12-03 23:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 6:21 WARNING: modpost: vmlinux.o(.text.unlikely+0x1d0d8): Section mismatch in reference from the function ingenic_tcu_setup_cevt() to the function .init.text:ingenic_tcu_get_clock() kernel test robot
2020-11-25 10:23 ` [PATCH] clocksource/drivers/ingenic: Fix section mismatch Daniel Lezcano
2020-11-25 10:45 ` Paul Cercueil
2020-11-25 17:34 ` Zhou Yanjie
2020-12-03 23:47 ` [tip: timers/core] " tip-bot2 for Daniel Lezcano
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).