From: Greg Kroah-Hartman Date: Fri, 6 Dec 2019 13:08:13 +0000 (+0100) Subject: 5.4-stable patches X-Git-Tag: v5.4.3~88 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d2cd78355709cdbbad45cba665ec9970377c2ea8;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: arm64-tegra-fix-active-low-warning-for-jetson-tx1-regulator.patch arm64-tegra-fix-active-low-warning-for-jetson-xavier-regulator.patch lp-fix-sparc64-lpsettimeout-ioctl.patch perf-scripts-python-exported-sql-viewer.py-fix-use-of-true-with-sqlite.patch sparc64-implement-ioremap_uc.patch time-zero-the-upper-32-bits-in-__kernel_timespec-on-32-bit.patch --- diff --git a/queue-5.4/arm64-tegra-fix-active-low-warning-for-jetson-tx1-regulator.patch b/queue-5.4/arm64-tegra-fix-active-low-warning-for-jetson-tx1-regulator.patch new file mode 100644 index 00000000000..c4b30d9f8a4 --- /dev/null +++ b/queue-5.4/arm64-tegra-fix-active-low-warning-for-jetson-tx1-regulator.patch @@ -0,0 +1,44 @@ +From 1e5e929c009559bd7e898ac8e17a5d01037cb057 Mon Sep 17 00:00:00 2001 +From: Jon Hunter +Date: Wed, 25 Sep 2019 15:12:29 +0100 +Subject: arm64: tegra: Fix 'active-low' warning for Jetson TX1 regulator + +From: Jon Hunter + +commit 1e5e929c009559bd7e898ac8e17a5d01037cb057 upstream. + +Commit 34993594181d ("arm64: tegra: Enable HDMI on Jetson TX1") +added a regulator for HDMI on the Jetson TX1 platform. This regulator +has an active high enable, but the GPIO specifier for enabling the +regulator incorrectly defines it as active-low. This causes the +following warning to occur on boot ... + + WARNING KERN regulator@10 GPIO handle specifies active low - ignored + +The fixed-regulator binding does not use the active-low flag from the +gpio specifier and purely relies of the presence of the +'enable-active-high' property to determine if it is active high or low +(if this property is omitted). Fix this warning by setting the GPIO +to active-high in the GPIO specifier which aligns with the presense of +the 'enable-active-high' property. + +Fixes: 34993594181d ("arm64: tegra: Enable HDMI on Jetson TX1") +Signed-off-by: Jon Hunter +Signed-off-by: Thierry Reding +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi ++++ b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi +@@ -1612,7 +1612,7 @@ + regulator-name = "VDD_HDMI_5V0"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; +- gpio = <&exp1 12 GPIO_ACTIVE_LOW>; ++ gpio = <&exp1 12 GPIO_ACTIVE_HIGH>; + enable-active-high; + vin-supply = <&vdd_5v0_sys>; + }; diff --git a/queue-5.4/arm64-tegra-fix-active-low-warning-for-jetson-xavier-regulator.patch b/queue-5.4/arm64-tegra-fix-active-low-warning-for-jetson-xavier-regulator.patch new file mode 100644 index 00000000000..8ca4157e900 --- /dev/null +++ b/queue-5.4/arm64-tegra-fix-active-low-warning-for-jetson-xavier-regulator.patch @@ -0,0 +1,46 @@ +From d440538e5f219900a9fc9d96fd10727b4d2b3c48 Mon Sep 17 00:00:00 2001 +From: Jon Hunter +Date: Wed, 25 Sep 2019 15:12:28 +0100 +Subject: arm64: tegra: Fix 'active-low' warning for Jetson Xavier regulator + +From: Jon Hunter + +commit d440538e5f219900a9fc9d96fd10727b4d2b3c48 upstream. + +Commit 4fdbfd60a3a2 ("arm64: tegra: Add PCIe slot supply information +in p2972-0000 platform") added regulators for the PCIe slot on the +Jetson Xavier platform. One of these regulators has an active-low enable +and this commit incorrectly added an active-low specifier for the GPIO +which causes the following warning to occur on boot ... + + WARNING KERN regulator@3 GPIO handle specifies active low - ignored + +The fixed-regulator binding does not use the active-low flag from the +gpio specifier and purely relies of the presence of the +'enable-active-high' property to determine if it is active high or low +(if this property is omitted). Fix this warning by setting the GPIO +to active-high in the GPIO specifier. Finally, remove the +'enable-active-low' as this is not a valid property. + +Fixes: 4fdbfd60a3a2 ("arm64: tegra: Add PCIe slot supply information in p2972-0000 platform") +Signed-off-by: Jon Hunter +Signed-off-by: Thierry Reding +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi ++++ b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi +@@ -309,9 +309,8 @@ + regulator-name = "VDD_12V"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; +- gpio = <&gpio TEGRA194_MAIN_GPIO(A, 1) GPIO_ACTIVE_LOW>; ++ gpio = <&gpio TEGRA194_MAIN_GPIO(A, 1) GPIO_ACTIVE_HIGH>; + regulator-boot-on; +- enable-active-low; + }; + }; + }; diff --git a/queue-5.4/lp-fix-sparc64-lpsettimeout-ioctl.patch b/queue-5.4/lp-fix-sparc64-lpsettimeout-ioctl.patch new file mode 100644 index 00000000000..9e78b29a96e --- /dev/null +++ b/queue-5.4/lp-fix-sparc64-lpsettimeout-ioctl.patch @@ -0,0 +1,40 @@ +From 45a2d64696b11913bcf1087b041740edbade3e21 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Fri, 8 Nov 2019 21:34:29 +0100 +Subject: lp: fix sparc64 LPSETTIMEOUT ioctl + +From: Arnd Bergmann + +commit 45a2d64696b11913bcf1087b041740edbade3e21 upstream. + +The layout of struct timeval is different on sparc64 from +anything else, and the patch I did long ago failed to take +this into account. + +Change it now to handle sparc64 user space correctly again. + +Quite likely nobody cares about parallel ports on sparc64, +but there is no reason not to fix it. + +Cc: stable@vger.kernel.org +Fixes: 9a450484089d ("lp: support 64-bit time_t user space") +Signed-off-by: Arnd Bergmann +Link: https://lore.kernel.org/r/20191108203435.112759-7-arnd@arndb.de +Signed-off-by: Greg Kroah-Hartman +--- + drivers/char/lp.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/char/lp.c ++++ b/drivers/char/lp.c +@@ -713,6 +713,10 @@ static int lp_set_timeout64(unsigned int + if (copy_from_user(karg, arg, sizeof(karg))) + return -EFAULT; + ++ /* sparc64 suseconds_t is 32-bit only */ ++ if (IS_ENABLED(CONFIG_SPARC64) && !in_compat_syscall()) ++ karg[1] >>= 32; ++ + return lp_set_timeout(minor, karg[0], karg[1]); + } + diff --git a/queue-5.4/perf-scripts-python-exported-sql-viewer.py-fix-use-of-true-with-sqlite.patch b/queue-5.4/perf-scripts-python-exported-sql-viewer.py-fix-use-of-true-with-sqlite.patch new file mode 100644 index 00000000000..d1fe7318114 --- /dev/null +++ b/queue-5.4/perf-scripts-python-exported-sql-viewer.py-fix-use-of-true-with-sqlite.patch @@ -0,0 +1,59 @@ +From af833988c088d3fed3e7188e7c3dd9ca17178dc3 Mon Sep 17 00:00:00 2001 +From: Adrian Hunter +Date: Wed, 13 Nov 2019 14:02:06 +0200 +Subject: perf scripts python: exported-sql-viewer.py: Fix use of TRUE with SQLite + +From: Adrian Hunter + +commit af833988c088d3fed3e7188e7c3dd9ca17178dc3 upstream. + +Prior to version 3.23 SQLite does not support TRUE or FALSE, so always +use 1 and 0 for SQLite. + +Fixes: 26c11206f433 ("perf scripts python: exported-sql-viewer.py: Use new 'has_calls' column") +Signed-off-by: Adrian Hunter +Cc: Jiri Olsa +Cc: stable@vger.kernel.org # v5.3+ +Link: http://lore.kernel.org/lkml/20191113120206.26957-1-adrian.hunter@intel.com +Signed-off-by: Arnaldo Carvalho de Melo +[Adrian: backported to v5.3, v5.4] +Signed-off-by: Adrian Hunter +Signed-off-by: Greg Kroah-Hartman + +--- + tools/perf/scripts/python/exported-sql-viewer.py | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +--- a/tools/perf/scripts/python/exported-sql-viewer.py ++++ b/tools/perf/scripts/python/exported-sql-viewer.py +@@ -625,7 +625,7 @@ class CallGraphRootItem(CallGraphLevelIt + self.query_done = True + if_has_calls = "" + if IsSelectable(glb.db, "comms", columns = "has_calls"): +- if_has_calls = " WHERE has_calls = TRUE" ++ if_has_calls = " WHERE has_calls = " + glb.dbref.TRUE + query = QSqlQuery(glb.db) + QueryExec(query, "SELECT id, comm FROM comms" + if_has_calls) + while query.next(): +@@ -905,7 +905,7 @@ class CallTreeRootItem(CallGraphLevelIte + self.query_done = True + if_has_calls = "" + if IsSelectable(glb.db, "comms", columns = "has_calls"): +- if_has_calls = " WHERE has_calls = TRUE" ++ if_has_calls = " WHERE has_calls = " + glb.dbref.TRUE + query = QSqlQuery(glb.db) + QueryExec(query, "SELECT id, comm FROM comms" + if_has_calls) + while query.next(): +@@ -3509,6 +3509,12 @@ class DBRef(): + def __init__(self, is_sqlite3, dbname): + self.is_sqlite3 = is_sqlite3 + self.dbname = dbname ++ self.TRUE = "TRUE" ++ self.FALSE = "FALSE" ++ # SQLite prior to version 3.23 does not support TRUE and FALSE ++ if self.is_sqlite3: ++ self.TRUE = "1" ++ self.FALSE = "0" + + def Open(self, connection_name): + dbname = self.dbname diff --git a/queue-5.4/series b/queue-5.4/series index 94cd1412733..fa8eb5b9e56 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -1 +1,7 @@ rsi-release-skb-if-rsi_prepare_beacon-fails.patch +arm64-tegra-fix-active-low-warning-for-jetson-tx1-regulator.patch +arm64-tegra-fix-active-low-warning-for-jetson-xavier-regulator.patch +perf-scripts-python-exported-sql-viewer.py-fix-use-of-true-with-sqlite.patch +sparc64-implement-ioremap_uc.patch +lp-fix-sparc64-lpsettimeout-ioctl.patch +time-zero-the-upper-32-bits-in-__kernel_timespec-on-32-bit.patch diff --git a/queue-5.4/sparc64-implement-ioremap_uc.patch b/queue-5.4/sparc64-implement-ioremap_uc.patch new file mode 100644 index 00000000000..81346b1fd5e --- /dev/null +++ b/queue-5.4/sparc64-implement-ioremap_uc.patch @@ -0,0 +1,34 @@ +From 38e45d81d14e5f78cd67922596b1c37b4c22ec74 Mon Sep 17 00:00:00 2001 +From: Tuowen Zhao +Date: Wed, 16 Oct 2019 15:06:27 -0600 +Subject: sparc64: implement ioremap_uc + +From: Tuowen Zhao + +commit 38e45d81d14e5f78cd67922596b1c37b4c22ec74 upstream. + +On sparc64, the whole physical IO address space is accessible using +physically addressed loads and stores. *_uc does nothing like the +others. + +Cc: # v4.19+ +Reported-by: kbuild test robot +Signed-off-by: Tuowen Zhao +Acked-by: David S. Miller +Signed-off-by: Lee Jones +Signed-off-by: Greg Kroah-Hartman + +--- + arch/sparc/include/asm/io_64.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/sparc/include/asm/io_64.h ++++ b/arch/sparc/include/asm/io_64.h +@@ -407,6 +407,7 @@ static inline void __iomem *ioremap(unsi + } + + #define ioremap_nocache(X,Y) ioremap((X),(Y)) ++#define ioremap_uc(X,Y) ioremap((X),(Y)) + #define ioremap_wc(X,Y) ioremap((X),(Y)) + #define ioremap_wt(X,Y) ioremap((X),(Y)) + diff --git a/queue-5.4/time-zero-the-upper-32-bits-in-__kernel_timespec-on-32-bit.patch b/queue-5.4/time-zero-the-upper-32-bits-in-__kernel_timespec-on-32-bit.patch new file mode 100644 index 00000000000..093783465a6 --- /dev/null +++ b/queue-5.4/time-zero-the-upper-32-bits-in-__kernel_timespec-on-32-bit.patch @@ -0,0 +1,41 @@ +From 7b8474466ed97be458c825f34a85f2c2b84c3f95 Mon Sep 17 00:00:00 2001 +From: Dmitry Safonov <0x7f454c46@gmail.com> +Date: Thu, 21 Nov 2019 00:03:03 +0000 +Subject: time: Zero the upper 32-bits in __kernel_timespec on 32-bit + +From: Dmitry Safonov + +commit 7b8474466ed97be458c825f34a85f2c2b84c3f95 upstream. + +On compat interfaces, the high order bits of nanoseconds should be zeroed +out. This is because the application code or the libc do not guarantee +zeroing of these. If used without zeroing, kernel might be at risk of using +timespec values incorrectly. + +Originally it was handled correctly, but lost during is_compat_syscall() +cleanup. Revert the condition back to check CONFIG_64BIT. + +Fixes: 98f76206b335 ("compat: Cleanup in_compat_syscall() callers") +Reported-by: Ben Hutchings +Signed-off-by: Dmitry Safonov +Signed-off-by: Thomas Gleixner +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20191121000303.126523-1-dima@arista.com +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/time/time.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/kernel/time/time.c ++++ b/kernel/time/time.c +@@ -881,7 +881,8 @@ int get_timespec64(struct timespec64 *ts + ts->tv_sec = kts.tv_sec; + + /* Zero out the padding for 32 bit systems or in compat mode */ +- if (IS_ENABLED(CONFIG_64BIT_TIME) && in_compat_syscall()) ++ if (IS_ENABLED(CONFIG_64BIT_TIME) && (!IS_ENABLED(CONFIG_64BIT) || ++ in_compat_syscall())) + kts.tv_nsec &= 0xFFFFFFFFUL; + + ts->tv_nsec = kts.tv_nsec;