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
build bottree: 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
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(a)lists.01.org
PATCH 1/1 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 annotatation for the ingenic_tcu_get_clock() function.
--- drivers/clocksource/ingenic-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/ingenic-timer.c +1 -1
@@ -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;
Signature · 1 line
2.25.1
Re: [PATCH] clocksource/drivers/ingenic: Fix section mismatch
Hi Daniel,
Quoted 7 lines · Daniel Lezcano
The function
ingenic_tcu_get_clock()is annotated for the__initsection 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
__initannotatation for theingenic_tcu_get_clock()function.
One 'ta' too many ;)
Quoted 4 lines
Fixes f19d838d08fc (clocksource/drivers/ingenic: Add high resolution timer support for SMP/SMT)Reported-by kernel test robot <[email protected]>Signed-off-by Daniel Lezcano <[email protected]>
With the above fixed:
Cheers,
-Paul
Quoted 23 lines
--- drivers/clocksource/ingenic-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clocksource/ingenic-timer.c +1
-1@@ -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){
structof_phandle_argsargs;--
2.25.1
Re: [PATCH] clocksource/drivers/ingenic: Fix section mismatch
In reply to Daniel LezcanoHi Daniel,
Quoted 8 lines · Daniel Lezcano
The function
ingenic_tcu_get_clock()is annotated for the__initsection 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
__initannotatation for theingenic_tcu_get_clock()function.
Quoted 6 lines
Fixes f19d838d08fc (clocksource/drivers/ingenic: Add high resolution timer support for SMP/SMT)Reported-by kernel test robot <[email protected]>Signed-off-by Daniel Lezcano <[email protected]>--- drivers/clocksource/ingenic-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Works fine on JZ4780, X1000, and X1830.
Thanks and best regards!
Quoted 13 lines
drivers/clocksource/ingenic-timer.c +1
-1@@ -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;
[tip: timers/core] clocksource/drivers/ingenic: Fix section mismatch
In reply to Daniel LezcanoThe following commit has been merged into the timers/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 25 Nov 2020 11:23:45 +01:00 Committer: Daniel Lezcano <[email protected]> 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.
--- drivers/clocksource/ingenic-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/ingenic-timer.c +1 -1
@@ -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;