]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Aug 2019 11:25:05 +0000 (13:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Aug 2019 11:25:05 +0000 (13:25 +0200)
added patches:
arc-enable-uboot-support-unconditionally.patch
eeprom-at24-make-spd-world-readable-again.patch

queue-4.19/arc-enable-uboot-support-unconditionally.patch [new file with mode: 0644]
queue-4.19/eeprom-at24-make-spd-world-readable-again.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/arc-enable-uboot-support-unconditionally.patch b/queue-4.19/arc-enable-uboot-support-unconditionally.patch
new file mode 100644 (file)
index 0000000..8bc2300
--- /dev/null
@@ -0,0 +1,128 @@
+From 493a2f812446e92bcb1e69a77381b4d39808d730 Mon Sep 17 00:00:00 2001
+From: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
+Date: Thu, 14 Feb 2019 18:07:45 +0300
+Subject: ARC: enable uboot support unconditionally
+
+From: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
+
+commit 493a2f812446e92bcb1e69a77381b4d39808d730 upstream.
+
+After reworking U-boot args handling code and adding paranoid
+arguments check we can eliminate CONFIG_ARC_UBOOT_SUPPORT and
+enable uboot support unconditionally.
+
+For JTAG case we can assume that core registers will come up
+reset value of 0 or in worst case we rely on user passing
+'-on=clear_regs' to Metaware debugger.
+
+Cc: stable@vger.kernel.org
+Tested-by: Corentin LABBE <clabbe@baylibre.com>
+Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
+Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arc/Kconfig                        |   13 -------------
+ arch/arc/configs/nps_defconfig          |    1 -
+ arch/arc/configs/vdk_hs38_defconfig     |    1 -
+ arch/arc/configs/vdk_hs38_smp_defconfig |    2 --
+ arch/arc/kernel/head.S                  |    2 --
+ arch/arc/kernel/setup.c                 |    2 --
+ 6 files changed, 21 deletions(-)
+
+--- a/arch/arc/Kconfig
++++ b/arch/arc/Kconfig
+@@ -199,7 +199,6 @@ config NR_CPUS
+ config ARC_SMP_HALT_ON_RESET
+       bool "Enable Halt-on-reset boot mode"
+-      default y if ARC_UBOOT_SUPPORT
+       help
+         In SMP configuration cores can be configured as Halt-on-reset
+         or they could all start at same time. For Halt-on-reset, non
+@@ -539,18 +538,6 @@ config ARC_DBG_TLB_PARANOIA
+ endif
+-config ARC_UBOOT_SUPPORT
+-      bool "Support uboot arg Handling"
+-      default n
+-      help
+-        ARC Linux by default checks for uboot provided args as pointers to
+-        external cmdline or DTB. This however breaks in absence of uboot,
+-        when booting from Metaware debugger directly, as the registers are
+-        not zeroed out on reset by mdb and/or ARCv2 based cores. The bogus
+-        registers look like uboot args to kernel which then chokes.
+-        So only enable the uboot arg checking/processing if users are sure
+-        of uboot being in play.
+-
+ config ARC_BUILTIN_DTB_NAME
+       string "Built in DTB"
+       help
+--- a/arch/arc/configs/nps_defconfig
++++ b/arch/arc/configs/nps_defconfig
+@@ -31,7 +31,6 @@ CONFIG_ARC_CACHE_LINE_SHIFT=5
+ # CONFIG_ARC_HAS_LLSC is not set
+ CONFIG_ARC_KVADDR_SIZE=402
+ CONFIG_ARC_EMUL_UNALIGNED=y
+-CONFIG_ARC_UBOOT_SUPPORT=y
+ CONFIG_PREEMPT=y
+ CONFIG_NET=y
+ CONFIG_UNIX=y
+--- a/arch/arc/configs/vdk_hs38_defconfig
++++ b/arch/arc/configs/vdk_hs38_defconfig
+@@ -13,7 +13,6 @@ CONFIG_PARTITION_ADVANCED=y
+ CONFIG_ARC_PLAT_AXS10X=y
+ CONFIG_AXS103=y
+ CONFIG_ISA_ARCV2=y
+-CONFIG_ARC_UBOOT_SUPPORT=y
+ CONFIG_ARC_BUILTIN_DTB_NAME="vdk_hs38"
+ CONFIG_PREEMPT=y
+ CONFIG_NET=y
+--- a/arch/arc/configs/vdk_hs38_smp_defconfig
++++ b/arch/arc/configs/vdk_hs38_smp_defconfig
+@@ -15,8 +15,6 @@ CONFIG_AXS103=y
+ CONFIG_ISA_ARCV2=y
+ CONFIG_SMP=y
+ # CONFIG_ARC_TIMERS_64BIT is not set
+-# CONFIG_ARC_SMP_HALT_ON_RESET is not set
+-CONFIG_ARC_UBOOT_SUPPORT=y
+ CONFIG_ARC_BUILTIN_DTB_NAME="vdk_hs38_smp"
+ CONFIG_PREEMPT=y
+ CONFIG_NET=y
+--- a/arch/arc/kernel/head.S
++++ b/arch/arc/kernel/head.S
+@@ -100,7 +100,6 @@ ENTRY(stext)
+       st.ab   0, [r5, 4]
+ 1:
+-#ifdef CONFIG_ARC_UBOOT_SUPPORT
+       ; Uboot - kernel ABI
+       ;    r0 = [0] No uboot interaction, [1] cmdline in r2, [2] DTB in r2
+       ;    r1 = magic number (always zero as of now)
+@@ -109,7 +108,6 @@ ENTRY(stext)
+       st      r0, [@uboot_tag]
+       st      r1, [@uboot_magic]
+       st      r2, [@uboot_arg]
+-#endif
+       ; setup "current" tsk and optionally cache it in dedicated r25
+       mov     r9, @init_task
+--- a/arch/arc/kernel/setup.c
++++ b/arch/arc/kernel/setup.c
+@@ -493,7 +493,6 @@ void __init handle_uboot_args(void)
+       bool use_embedded_dtb = true;
+       bool append_cmdline = false;
+-#ifdef CONFIG_ARC_UBOOT_SUPPORT
+       /* check that we know this tag */
+       if (uboot_tag != UBOOT_TAG_NONE &&
+           uboot_tag != UBOOT_TAG_CMDLINE &&
+@@ -525,7 +524,6 @@ void __init handle_uboot_args(void)
+               append_cmdline = true;
+ ignore_uboot_args:
+-#endif
+       if (use_embedded_dtb) {
+               machine_desc = setup_machine_fdt(__dtb_start);
diff --git a/queue-4.19/eeprom-at24-make-spd-world-readable-again.patch b/queue-4.19/eeprom-at24-make-spd-world-readable-again.patch
new file mode 100644 (file)
index 0000000..ae69335
--- /dev/null
@@ -0,0 +1,40 @@
+From 25e5ef302c24a6fead369c0cfe88c073d7b97ca8 Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Sun, 28 Jul 2019 18:41:38 +0200
+Subject: eeprom: at24: make spd world-readable again
+
+From: Jean Delvare <jdelvare@suse.de>
+
+commit 25e5ef302c24a6fead369c0cfe88c073d7b97ca8 upstream.
+
+The integration of the at24 driver into the nvmem framework broke the
+world-readability of spd EEPROMs. Fix it.
+
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+Cc: stable@vger.kernel.org
+Fixes: 57d155506dd5 ("eeprom: at24: extend driver to plug into the NVMEM framework")
+Cc: Andrew Lunn <andrew@lunn.ch>
+Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Cc: Bartosz Golaszewski <brgl@bgdev.pl>
+Cc: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+[Bartosz: backported to v4.19.y]
+Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/misc/eeprom/at24.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/misc/eeprom/at24.c
++++ b/drivers/misc/eeprom/at24.c
+@@ -724,7 +724,7 @@ static int at24_probe(struct i2c_client
+       nvmem_config.name = dev_name(dev);
+       nvmem_config.dev = dev;
+       nvmem_config.read_only = !writable;
+-      nvmem_config.root_only = true;
++      nvmem_config.root_only = !(pdata.flags & AT24_FLAG_IRUGO);
+       nvmem_config.owner = THIS_MODULE;
+       nvmem_config.compat = true;
+       nvmem_config.base_dev = dev;
index 79465cf93f82ddd6d52a5f0cacec035074538cf6..2ab9364d5acacd79e6fb2a373376416dfc90ed6c 100644 (file)
@@ -66,3 +66,5 @@ ib-mlx5-fix-clean_mr-to-work-in-the-expected-order.patch
 ib-mlx5-fix-rss-toeplitz-setup-to-be-aligned-with-the-hw-specification.patch
 ib-hfi1-check-for-error-on-call-to-alloc_rsm_map_table.patch
 drm-i915-gvt-fix-incorrect-cache-entry-for-guest-page-mapping.patch
+eeprom-at24-make-spd-world-readable-again.patch
+arc-enable-uboot-support-unconditionally.patch