[openwrt/openwrt] uml: fix 5.10 build

LEDE Commits lede-commits at lists.infradead.org
Mon Jan 2 16:24:44 PST 2023


hauke pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/181390f57d46539ef059095675553867a27c6d4a

commit 181390f57d46539ef059095675553867a27c6d4a
Author: Christian Lamparter <chunkeey at gmail.com>
AuthorDate: Sat Sep 24 23:42:42 2022 +0200

    uml: fix 5.10 build
    
    the 5.10 uml build currently breaks with:
    
    /usr/bin/ld: arch/um/os-Linux/signal.o: in function `sigusr1_handler':
    arch/um/os-Linux/signal.c:141: undefined reference to `uml_pm_wake'
    
    But there's an upstream fix for this. Backport the fix
    for now but also let upstream know so it finds its way
    through the -stable releases.
    
    Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
    (cherry picked from commit 8bea5edf89e57c32b98620540a457441f5f8ddeb)
---
 .../001-um-Fix-build-w-o-CONFIG_PM_SLEEP.patch     | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/target/linux/uml/patches-5.10/001-um-Fix-build-w-o-CONFIG_PM_SLEEP.patch b/target/linux/uml/patches-5.10/001-um-Fix-build-w-o-CONFIG_PM_SLEEP.patch
new file mode 100644
index 0000000000..acee358dd7
--- /dev/null
+++ b/target/linux/uml/patches-5.10/001-um-Fix-build-w-o-CONFIG_PM_SLEEP.patch
@@ -0,0 +1,32 @@
+From 1fb1abc83636f5329c26cd29f0f19f3faeb697a5 Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg at intel.com>
+Date: Mon, 14 Dec 2020 20:51:02 +0100
+Subject: [PATCH] um: Fix build w/o CONFIG_PM_SLEEP
+
+uml_pm_wake() is unconditionally called from the SIGUSR1 wakeup
+handler since that's in the userspace portion of UML, and thus
+a bit tricky to ifdef out. Since pm_system_wakeup() can always
+be called (but may be an empty inline), also simply always have
+uml_pm_wake() to fix the build.
+
+Reported-by: Randy Dunlap <rdunlap at infradead.org>
+Acked-by: Randy Dunlap <rdunlap at infradead.org> # build-tested
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+Signed-off-by: Richard Weinberger <richard at nod.at>
+---
+--- a/arch/um/kernel/um_arch.c
++++ b/arch/um/kernel/um_arch.c
+@@ -387,12 +387,12 @@ void text_poke_sync(void)
+ {
+ }
+ 
+-#ifdef CONFIG_PM_SLEEP
+ void uml_pm_wake(void)
+ {
+ 	pm_system_wakeup();
+ }
+ 
++#ifdef CONFIG_PM_SLEEP
+ static int init_pm_wake_signal(void)
+ {
+ 	/*




More information about the lede-commits mailing list