]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Apr 2021 09:50:47 +0000 (11:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Apr 2021 09:50:47 +0000 (11:50 +0200)
added patches:
init-kconfig-make-compile_test-depend-on-has_iomem.patch
init-kconfig-make-compile_test-depend-on-s390.patch
init-kconfig-make-compile_test-depend-on-uml.patch

queue-4.4/init-kconfig-make-compile_test-depend-on-has_iomem.patch [new file with mode: 0644]
queue-4.4/init-kconfig-make-compile_test-depend-on-s390.patch [new file with mode: 0644]
queue-4.4/init-kconfig-make-compile_test-depend-on-uml.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/init-kconfig-make-compile_test-depend-on-has_iomem.patch b/queue-4.4/init-kconfig-make-compile_test-depend-on-has_iomem.patch
new file mode 100644 (file)
index 0000000..e66cd82
--- /dev/null
@@ -0,0 +1,60 @@
+From ea29b20a828511de3348334e529a3d046a180416 Mon Sep 17 00:00:00 2001
+From: Masahiro Yamada <masahiroy@kernel.org>
+Date: Fri, 12 Mar 2021 21:07:08 -0800
+Subject: init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM
+
+From: Masahiro Yamada <masahiroy@kernel.org>
+
+commit ea29b20a828511de3348334e529a3d046a180416 upstream.
+
+I read the commit log of the following two:
+
+- bc083a64b6c0 ("init/Kconfig: make COMPILE_TEST depend on !UML")
+- 334ef6ed06fa ("init/Kconfig: make COMPILE_TEST depend on !S390")
+
+Both are talking about HAS_IOMEM dependency missing in many drivers.
+
+So, 'depends on HAS_IOMEM' seems the direct, sensible solution to me.
+
+This does not change the behavior of UML. UML still cannot enable
+COMPILE_TEST because it does not provide HAS_IOMEM.
+
+The current dependency for S390 is too strong. Under the condition of
+CONFIG_PCI=y, S390 provides HAS_IOMEM, hence can enable COMPILE_TEST.
+
+I also removed the meaningless 'default n'.
+
+Link: https://lkml.kernel.org/r/20210224140809.1067582-1-masahiroy@kernel.org
+Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
+Cc: Heiko Carstens <hca@linux.ibm.com>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Cc: Arnd Bergmann <arnd@kernel.org>
+Cc: Kees Cook <keescook@chromium.org>
+Cc: Daniel Borkmann <daniel@iogearbox.net>
+Cc: Johannes Weiner <hannes@cmpxchg.org>
+Cc: KP Singh <kpsingh@google.com>
+Cc: Nathan Chancellor <nathan@kernel.org>
+Cc: Nick Terrell <terrelln@fb.com>
+Cc: Quentin Perret <qperret@google.com>
+Cc: Valentin Schneider <valentin.schneider@arm.com>
+Cc: "Enrico Weigelt, metux IT consult" <lkml@metux.net>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ init/Kconfig |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/init/Kconfig
++++ b/init/Kconfig
+@@ -65,8 +65,7 @@ config CROSS_COMPILE
+ config COMPILE_TEST
+       bool "Compile also drivers which will not load"
+-      depends on !UML && !S390
+-      default n
++      depends on HAS_IOMEM
+       help
+         Some drivers can be compiled on a different platform than they are
+         intended to be run on. Despite they cannot be loaded there (or even
diff --git a/queue-4.4/init-kconfig-make-compile_test-depend-on-s390.patch b/queue-4.4/init-kconfig-make-compile_test-depend-on-s390.patch
new file mode 100644 (file)
index 0000000..b09924c
--- /dev/null
@@ -0,0 +1,39 @@
+From 334ef6ed06fa1a54e35296b77b693bcf6d63ee9e Mon Sep 17 00:00:00 2001
+From: Heiko Carstens <hca@linux.ibm.com>
+Date: Wed, 18 Nov 2020 21:32:33 +0100
+Subject: init/Kconfig: make COMPILE_TEST depend on !S390
+
+From: Heiko Carstens <hca@linux.ibm.com>
+
+commit 334ef6ed06fa1a54e35296b77b693bcf6d63ee9e upstream.
+
+While allmodconfig and allyesconfig build for s390 there are also
+various bots running compile tests with randconfig, where PCI is
+disabled. This reveals that a lot of drivers should actually depend on
+HAS_IOMEM.
+Adding this to each device driver would be a never ending story,
+therefore just disable COMPILE_TEST for s390.
+
+The reasoning is more or less the same as described in
+commit bc083a64b6c0 ("init/Kconfig: make COMPILE_TEST depend on !UML").
+
+Reported-by: kernel test robot <lkp@intel.com>
+Suggested-by: Arnd Bergmann <arnd@kernel.org>
+Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ init/Kconfig |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/init/Kconfig
++++ b/init/Kconfig
+@@ -65,7 +65,7 @@ config CROSS_COMPILE
+ config COMPILE_TEST
+       bool "Compile also drivers which will not load"
+-      depends on !UML
++      depends on !UML && !S390
+       default n
+       help
+         Some drivers can be compiled on a different platform than they are
diff --git a/queue-4.4/init-kconfig-make-compile_test-depend-on-uml.patch b/queue-4.4/init-kconfig-make-compile_test-depend-on-uml.patch
new file mode 100644 (file)
index 0000000..9790bed
--- /dev/null
@@ -0,0 +1,49 @@
+From bc083a64b6c035135c0f80718f9e9192cc0867c6 Mon Sep 17 00:00:00 2001
+From: Richard Weinberger <richard@nod.at>
+Date: Tue, 2 Aug 2016 14:03:27 -0700
+Subject: init/Kconfig: make COMPILE_TEST depend on !UML
+
+From: Richard Weinberger <richard@nod.at>
+
+commit bc083a64b6c035135c0f80718f9e9192cc0867c6 upstream.
+
+UML is a bit special since it does not have iomem nor dma.  That means a
+lot of drivers will not build if they miss a dependency on HAS_IOMEM.
+s390 used to have the same issues but since it gained PCI support UML is
+the only stranger.
+
+We are tired of patching dozens of new drivers after every merge window
+just to un-break allmod/yesconfig UML builds.  One could argue that a
+decent driver has to know on what it depends and therefore a missing
+HAS_IOMEM dependency is a clear driver bug.  But the dependency not
+obvious and not everyone does UML builds with COMPILE_TEST enabled when
+developing a device driver.
+
+A possible solution to make these builds succeed on UML would be
+providing stub functions for ioremap() and friends which fail upon
+runtime.  Another one is simply disabling COMPILE_TEST for UML.  Since
+it is the least hassle and does not force use to fake iomem support
+let's do the latter.
+
+Link: http://lkml.kernel.org/r/1466152995-28367-1-git-send-email-richard@nod.at
+Signed-off-by: Richard Weinberger <richard@nod.at>
+Acked-by: Arnd Bergmann <arnd@arndb.de>
+Cc: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ init/Kconfig |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/init/Kconfig
++++ b/init/Kconfig
+@@ -65,6 +65,7 @@ config CROSS_COMPILE
+ config COMPILE_TEST
+       bool "Compile also drivers which will not load"
++      depends on !UML
+       default n
+       help
+         Some drivers can be compiled on a different platform than they are
index ef509e0fbda75d1e9da33985a2b03719ae2e533c..a1989d8bdc660fc07d60912482ce2b25f7fec739 100644 (file)
@@ -15,3 +15,6 @@ mtd-rawnand-pasemi-fix-the-probe-error-path.patch
 mtd-rawnand-orion-fix-the-probe-error-path.patch
 mtd-rawnand-diskonchip-fix-the-probe-error-path.patch
 tracing-add-a-vmalloc_sync_mappings-for-safe-measure.patch
+init-kconfig-make-compile_test-depend-on-uml.patch
+init-kconfig-make-compile_test-depend-on-s390.patch
+init-kconfig-make-compile_test-depend-on-has_iomem.patch