From: Alexander Gordeev <agordeev@linux.ibm.com>
To: Naresh Kamboju <naresh.kamboju@linaro.org>,
Russell King <rmk+kernel@armlinux.org.uk>
Cc: open list <linux-kernel@vger.kernel.org>,
Netdev <netdev@vger.kernel.org>,
lkft-triage@lists.linaro.org,
Linux Regressions <regressions@lists.linux.dev>,
linux-s390@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Jakub Kicinski <kuba@kernel.org>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
Ben Copeland <benjamin.copeland@linaro.org>,
Anders Roxell <anders.roxell@linaro.org>,
Dan Carpenter <dan.carpenter@linaro.org>,
Arnd Bergmann <arnd@arndb.de>
Subject: Re: next-20250813 s390 allyesconfig undefined reference to `stmmac_simple_pm_ops'
Date: Tue, 19 Aug 2025 18:00:49 +0200 [thread overview]
Message-ID: <20250819160049.4004887A48-agordeev@linux.ibm.com> (raw)
In-Reply-To: <CA+G9fYuY=O9EU6yY_QzVdqYyvWVFMcUSM9f9rFg-+1sRVFS6zQ@mail.gmail.com>
On Tue, Aug 19, 2025 at 03:07:56PM +0530, Naresh Kamboju wrote:
Hi Naresh,
> Build regressions were detected on the s390 architecture with the
> Linux next-20250813 tag when building with the allyesconfig configuration.
>
> The failure is caused by unresolved symbol references to stmmac_simple_pm_ops
> in multiple STMMAC driver object files, resulting in a link error during
> vmlinux generation.
>
> First seen on next-20250813
> Good: next-20250812
> Bad: next-20250813 and next-20250819
>
> Regression Analysis:
> - New regression? yes
> - Reproducibility? yes
>
> * s390, build
> - gcc-13-allyesconfig
>
> Boot regression: next-20250813 s390 allyesconfig undefined reference
> to `stmmac_simple_pm_ops'
>
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
>
> ## Build log
> s390x-linux-gnu-ld:
> drivers/net/ethernet/stmicro/stmmac/dwmac-rk.o:(.data.rel+0xa0):
> undefined reference to `stmmac_simple_pm_ops'
> s390x-linux-gnu-ld:
> drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.o:(.data.rel+0xa0):
> undefined reference to `stmmac_simple_pm_ops'
> s390x-linux-gnu-ld:
> drivers/net/ethernet/stmicro/stmmac/stmmac_pci.o:(.data.rel+0xe0):
> undefined reference to `stmmac_simple_pm_ops'
> s390x-linux-gnu-ld:
> drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.o:(.data.rel+0xe0):
> undefined reference to `stmmac_simple_pm_ops'
> make[3]: *** [/scripts/Makefile.vmlinux:91: vmlinux.unstripped] Error 1
>
> ## Source
> * Kernel version: 6.17.0-rc2
> * Git tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next.git
> * Git describe: next-20250818
> * Git commit: 3ac864c2d9bb8608ee236e89bf561811613abfce
> * Architectures: s390
> * Toolchains: gcc-13
> * Kconfigs: allyesconfig
>
> ## Build
> * Build log: https://qa-reports.linaro.org/api/testruns/29579401/log_file/
> * Build details:
> https://regressions.linaro.org/lkft/linux-next-master/next-20250818/build/gcc-13-allyesconfig/
> * Build plan: https://tuxapi.tuxsuite.com/v1/groups/linaro/projects/lkft/builds/31RcVYdjsdhroYxXs4TJYixUCaE
> * Build link: https://storage.tuxsuite.com/public/linaro/lkft/builds/31RcVYdjsdhroYxXs4TJYixUCaE/
> * Kernel config:
> https://storage.tuxsuite.com/public/linaro/lkft/builds/31RcVYdjsdhroYxXs4TJYixUCaE/config
I guess it boils down to these commits:
0a529da8cfe3 Merge branch 'net-stmmac-improbe-suspend-resume-architecture'
d6e1f2272960 net: stmmac: mediatek: convert to resume() method
c7308b2f3d0d net: stmmac: stm32: convert to suspend()/resume() methods
d7a276a5768f net: stmmac: rk: convert to suspend()/resume() methods
c91918a1e976 net: stmmac: pci: convert to suspend()/resume() methods
38772638d6d1 net: stmmac: loongson: convert to suspend()/resume() methods
062b42801733 net: stmmac: intel: convert to suspend()/resume() methods
b51f34bc85e3 net: stmmac: platform: legacy hooks for suspend()/resume() methods
7e84b3fae58c net: stmmac: provide a set of simple PM ops
07bbbfe7addf net: stmmac: add suspend()/resume() platform ops
CONFIG_PM is not defined on s390 and as result stmmac_simple_pm_ops ends up
in _DISCARD_PM_OPS(). The below patch fixes the linking, but it is by no
means a correct solution:
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
index 5769165ee5ba..d475a77e4871 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
@@ -668,7 +668,7 @@ static struct pci_driver loongson_dwmac_driver = {
.probe = loongson_dwmac_probe,
.remove = loongson_dwmac_remove,
.driver = {
- .pm = &stmmac_simple_pm_ops,
+ .pm = &__static_stmmac_simple_pm_ops,
},
};
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index ac8288301994..69fcc8f10ccc 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -1820,7 +1820,7 @@ static struct platform_driver rk_gmac_dwmac_driver = {
.remove = rk_gmac_remove,
.driver = {
.name = "rk_gmac-dwmac",
- .pm = &stmmac_simple_pm_ops,
+ .pm = &__static_stmmac_simple_pm_ops,
.of_match_table = rk_gmac_dwmac_match,
},
};
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
index 77a04c4579c9..d3e1eb35b231 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
@@ -669,7 +669,7 @@ static struct platform_driver stm32_dwmac_driver = {
.remove = stm32_dwmac_remove,
.driver = {
.name = "stm32-dwmac",
- .pm = &stmmac_simple_pm_ops,
+ .pm = &__static_stmmac_simple_pm_ops,
.of_match_table = stm32_dwmac_match,
},
};
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
index bf95f03dd33f..c5554ede0ba4 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@ -375,6 +375,7 @@ enum stmmac_state {
};
extern const struct dev_pm_ops stmmac_simple_pm_ops;
+extern const struct dev_pm_ops __static_stmmac_simple_pm_ops;
int stmmac_mdio_unregister(struct net_device *ndev);
int stmmac_mdio_register(struct net_device *ndev);
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
index e6a7d0ddac2a..d1710f26d65a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
@@ -286,7 +286,7 @@ static struct pci_driver stmmac_pci_driver = {
.probe = stmmac_pci_probe,
.remove = stmmac_pci_remove,
.driver = {
- .pm = &stmmac_simple_pm_ops,
+ .pm = &__static_stmmac_simple_pm_ops,
},
};
diff --git a/include/linux/pm.h b/include/linux/pm.h
index cc7b2dc28574..05524761fd51 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -381,7 +381,7 @@ const struct dev_pm_ops name = { \
const struct dev_pm_ops name
#define _DISCARD_PM_OPS(name, license, ns) \
- static __maybe_unused const struct dev_pm_ops __static_##name
+ __maybe_unused const struct dev_pm_ops __static_##name
#ifdef CONFIG_PM
#define _EXPORT_DEV_PM_OPS(name, license, ns) _EXPORT_PM_OPS(name, license, ns)
> --
> Linaro LKFT
> https://lkft.linaro.org
next prev parent reply other threads:[~2025-08-19 16:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 9:37 Naresh Kamboju
2025-08-19 16:00 ` Alexander Gordeev [this message]
2025-08-19 17:35 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250819160049.4004887A48-agordeev@linux.ibm.com \
--to=agordeev@linux.ibm.com \
--cc=alexandre.torgue@foss.st.com \
--cc=anders.roxell@linaro.org \
--cc=arnd@arndb.de \
--cc=benjamin.copeland@linaro.org \
--cc=dan.carpenter@linaro.org \
--cc=davem@davemloft.net \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=joabreu@synopsys.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=lkft-triage@lists.linaro.org \
--cc=naresh.kamboju@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=regressions@lists.linux.dev \
--cc=rmk+kernel@armlinux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®