alpha-linux-ld: drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.o:undefined reference to `stmmac_simple_pm_ops'
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 43c3c17f0c805882d1b48818b1085747a68c80ec commit: 38772638d6d1989655f5a05b273dc62a026e0ef1 [2051/2153] net: stmmac: loongson: convert to suspend()/resume() methods config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20250813/[email protected]/config) compiler: alpha-linux-gcc (GCC) 15.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250813/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
xe_configfs_exit' referenced in section .data.rel.ro' of drivers/gpu/drm/xe/xe_module.o: defined in discarded section `.exit.text' of drivers/gpu/drm/xe/xe_configfs.o
>> alpha-linux-ld: drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.o:(.data.rel+0xe0): undefined reference to `stmmac_simple_pm_ops'
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Hi Rafael,
It seems that in the config below, CONFIG_PM is not set, which leads EXPORT_SIMPLE_DEV_PM_OPS() not to export the ops, and define it static.
However, if I instead do:
DEFINE_SIMPLE_DEV_PM_OPS(name, ...);EXPORT_SYMBOL_GPL(name);
then the symbol will obviously still be exported, and it also won't be static, but the struct will be empty.
Essentially, EXPORT_SIMPLE_DEV_PM_OPS() is not semantically the same as DEFINE_SIMPLE_DEV_PM_OPS() + EXPORT_SYMBOL_GPL() which is not what I expected.
First question is, is this expected behaviour?
Second, should I be using DEFINE_SIMPLE_DEV_PM_OPS() + EXPORT_SYMBOL_GPL() instead for this case? If not, should I use pm_ptr() in all the drivers that reference the EXPORT_SIMPLE_DEV_PM_OPS() symbol?
Thanks.
Quoted 21 lines · kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 43c3c17f0c805882d1b48818b1085747a68c80ec commit: 38772638d6d1989655f5a05b273dc62a026e0ef1 [2051/2153] net: stmmac: loongson: convert to suspend()/resume() methods config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20250813/[email protected]/config) compiler: alpha-linux-gcc (GCC) 15.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250813/[email protected]/reproduce)If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/All errors (new ones prefixed by >>):
xe_configfs_exit' referenced in section.data.rel.ro' ofdrivers/gpu/drm/xe/xe_module.o: defined in discarded section `.exit.text' ofdrivers/gpu/drm/xe/xe_configfs.oQuoted 1 line
Quoted 1 line
alpha-linux-ld: drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.o:(.data.rel+0xe0): undefined reference to `stmmac_simple_pm_ops'
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!