Skip to contentSkip to conversation

WARNING: vmlinux.o(.text.unlikely+0x42409): Section mismatch in reference from the function pmc_setup_dev.isra.4() to the variable .init.rodata:critclk_systems

PATCH In review kbuild test robot 3 participants 4 messages Apr 11, 2019 – Apr 12, 2019

Subsystems (2)
lore
Share & tools
lore

kbuild test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-fixes
head:   7c2e07130090ae001a97a6b65597830d6815e93e
commit: 7c2e07130090ae001a97a6b65597830d6815e93e [4/4] clk: x86: Add system specific quirk to mark clocks as critical
config: x86_64-randconfig-s4-04111213 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout 7c2e07130090ae001a97a6b65597830d6815e93e
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

>> WARNING: vmlinux.o(.text.unlikely+0x42409): Section mismatch in reference from the function pmc_setup_dev.isra.4() to the variable .init.rodata:critclk_systems

The function pmc_setup_dev.isra.4() references
the variable __initconst critclk_systems.
This is often because pmc_setup_dev.isra.4 lacks a __initconst annotation or the annotation of critclk_systems is wrong.

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

maintainer
#1 lore raw

Quoting kbuild test robot (2019-04-11 02:25:41)

Quoted 10 lines
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-fixes
head:   7c2e07130090ae001a97a6b65597830d6815e93e
commit: 7c2e07130090ae001a97a6b65597830d6815e93e [4/4] clk: x86: Add system specific quirk to mark clocks as critical
config: x86_64-randconfig-s4-04111213 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout 7c2e07130090ae001a97a6b65597830d6815e93e
        # save the attached .config to linux build tree
        make ARCH=x86_64 
Quoted 8 lines

All warnings (new ones prefixed by >>):

Quoted 1 line
Quoted 1 line

WARNING: vmlinux.o(.text.unlikely+0x42409): Section mismatch in reference from the function pmc_setup_dev.isra.4() to the variable .init.rodata:critclk_systems

The function pmc_setup_dev.isra.4() references
the variable __initconst critclk_systems.
This is often because pmc_setup_dev.isra.4 lacks a __initconst annotation or the annotation of critclk_systems is wrong.

I don't know why there's __initconst there at all.

---8<----

drivers/platform/x86/pmc_atom.c +1 -1
index eaec2d306481..c7039f52ad51 100644
@@ -396,7 +396,7 @@ static int pmc_dbgfs_register(struct pmc_dev *pmc)
  * Some systems need one or more of their pmc_plt_clks to be
  * marked as critical.
  */
-static const struct dmi_system_id critclk_systems[] __initconst = {
+static const struct dmi_system_id critclk_systems[] = {
 	{
 		.ident = "MPL CEC1x",
 		.matches = {

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer
#2 lore raw

PATCH 1/1 platform/x86: pmc_atom: Drop __initconst on dmi table

In reply to kbuild test robot

It's used by probe and that isn't an init function. Drop this so that we don't get a section mismatch.

Cc David Müller <[email protected]>
Cc Hans de Goede <[email protected]>
Cc Andy Shevchenko <[email protected]>
Fixes 7c2e07130090 ("clk: x86: Add system specific quirk to mark clocks as critical")
---
 drivers/platform/x86/pmc_atom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/pmc_atom.c +1 -1
index eaec2d306481..c7039f52ad51 100644
@@ -396,7 +396,7 @@ static int pmc_dbgfs_register(struct pmc_dev *pmc)
  * Some systems need one or more of their pmc_plt_clks to be
  * marked as critical.
  */
-static const struct dmi_system_id critclk_systems[] __initconst = {
+static const struct dmi_system_id critclk_systems[] = {
 	{
 		.ident = "MPL CEC1x",
 		.matches = {
Signature · 1 line
Sent by a computer through tubes
Reviewed-by on v1 1/1
#3 lore raw

Re: [PATCH] platform/x86: pmc_atom: Drop __initconst on dmi table

Hi Stephen,

Quoted 9 lines · Stephen Boyd

It's used by probe and that isn't an init function. Drop this so that we don't get a section mismatch.

Cc David Müller <[email protected]>
Cc Hans de Goede <[email protected]>
Cc Andy Shevchenko <[email protected]>
Fixes 7c2e07130090 ("clk: x86: Add system specific quirk to mark clocks as critical")

Thank you for fixing this, I agree that this is the correct fix:

Regards,

Hans

Quoted 18 lines
---
  drivers/platform/x86/pmc_atom.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/pmc_atom.c +1 -1
index eaec2d306481..c7039f52ad51 100644
@@ -396,7 +396,7 @@ static int pmc_dbgfs_register(struct pmc_dev *pmc)
   * Some systems need one or more of their pmc_plt_clks to be
   * marked as critical.
   */
-static const struct dmi_system_id critclk_systems[] __initconst = {
+static const struct dmi_system_id critclk_systems[] = {
  	{
  		.ident = "MPL CEC1x",
  		.matches = {