]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jan 2019 12:03:43 +0000 (13:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jan 2019 12:03:43 +0000 (13:03 +0100)
added patches:
mips-only-include-mmzone.h-when-config_need_multiple_nodes-y.patch

queue-4.14/mips-only-include-mmzone.h-when-config_need_multiple_nodes-y.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/mips-only-include-mmzone.h-when-config_need_multiple_nodes-y.patch b/queue-4.14/mips-only-include-mmzone.h-when-config_need_multiple_nodes-y.patch
new file mode 100644 (file)
index 0000000..08528b6
--- /dev/null
@@ -0,0 +1,66 @@
+From 66a4059ba72c23ae74a7c702894ff76c4b7eac1f Mon Sep 17 00:00:00 2001
+From: Paul Burton <paul.burton@mips.com>
+Date: Wed, 21 Nov 2018 19:47:57 -0800
+Subject: MIPS: Only include mmzone.h when CONFIG_NEED_MULTIPLE_NODES=y
+
+From: Paul Burton <paul.burton@mips.com>
+
+commit 66a4059ba72c23ae74a7c702894ff76c4b7eac1f upstream.
+
+MIPS' asm/mmzone.h includes the machine/platform mmzone.h
+unconditionally, but since commit bb53fdf395ee ("MIPS: c-r4k: Add
+r4k_blast_scache_node for Loongson-3") is included by asm/rk4cache.h for
+all r4k-style configs regardless of CONFIG_NEED_MULTIPLE_NODES.
+
+This is problematic when CONFIG_NEED_MULTIPLE_NODES=n because both the
+loongson3 & ip27 mmzone.h headers unconditionally define the NODE_DATA
+preprocessor macro which is aready defined by linux/mmzone.h, resulting
+in the following build error:
+
+  In file included from ./arch/mips/include/asm/mmzone.h:10,
+                   from ./arch/mips/include/asm/r4kcache.h:23,
+                   from arch/mips/mm/c-r4k.c:33:
+  ./arch/mips/include/asm/mach-loongson64/mmzone.h:48: error: "NODE_DATA" redefined [-Werror]
+   #define NODE_DATA(n)  (&__node_data[(n)]->pglist)
+
+  In file included from ./include/linux/topology.h:32,
+                   from ./include/linux/irq.h:19,
+                   from ./include/asm-generic/hardirq.h:13,
+                   from ./arch/mips/include/asm/hardirq.h:16,
+                   from ./include/linux/hardirq.h:9,
+                   from arch/mips/mm/c-r4k.c:11:
+  ./include/linux/mmzone.h:907: note: this is the location of the previous definition
+   #define NODE_DATA(nid)  (&contig_page_data)
+
+Resolve this by only including the machine mmzone.h when
+CONFIG_NEED_MULTIPLE_NODES=y, which also removes the need for the empty
+mach-generic version of the header which we delete.
+
+Signed-off-by: Paul Burton <paul.burton@mips.com>
+Fixes: bb53fdf395ee ("MIPS: c-r4k: Add r4k_blast_scache_node for Loongson-3")
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/mips/include/asm/mach-generic/mmzone.h |    2 --
+ arch/mips/include/asm/mmzone.h              |    5 ++++-
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+--- a/arch/mips/include/asm/mach-generic/mmzone.h
++++ /dev/null
+@@ -1,2 +0,0 @@
+-// SPDX-License-Identifier: GPL-2.0
+-/* Intentionally empty */
+--- a/arch/mips/include/asm/mmzone.h
++++ b/arch/mips/include/asm/mmzone.h
+@@ -7,7 +7,10 @@
+ #define _ASM_MMZONE_H_
+ #include <asm/page.h>
+-#include <mmzone.h>
++
++#ifdef CONFIG_NEED_MULTIPLE_NODES
++# include <mmzone.h>
++#endif
+ #ifndef pa_to_nid
+ #define pa_to_nid(addr) 0
index 320bf57caa168e954adb6f7a26852b11ff125871..b52bff87f62e119330eb2cf9fdce1b460977c609 100644 (file)
@@ -96,3 +96,4 @@ rtc-m41t80-correct-alarm-month-range-with-rtc-reads.patch
 tpm-tpm_try_transmit-refactor-error-flow.patch
 tpm-tpm_i2c_nuvoton-use-correct-command-duration-for-tpm-2.x.patch
 spi-bcm2835-unbreak-the-build-of-esoteric-configs.patch
+mips-only-include-mmzone.h-when-config_need_multiple_nodes-y.patch