]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Jan 2022 15:40:35 +0000 (16:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Jan 2022 15:40:35 +0000 (16:40 +0100)
added patches:
mtd-fixup-cfi-on-ixp4xx.patch
powerpc-pseries-get-entry-and-uaccess-flush-required-bits-from-h_get_cpu_characteristics.patch

queue-5.10/mtd-fixup-cfi-on-ixp4xx.patch [new file with mode: 0644]
queue-5.10/powerpc-pseries-get-entry-and-uaccess-flush-required-bits-from-h_get_cpu_characteristics.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/mtd-fixup-cfi-on-ixp4xx.patch b/queue-5.10/mtd-fixup-cfi-on-ixp4xx.patch
new file mode 100644 (file)
index 0000000..8fd788d
--- /dev/null
@@ -0,0 +1,57 @@
+From 603362b4a58393061dcfed1c7f0d0fd4aba61126 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Mon, 27 Sep 2021 16:10:37 +0200
+Subject: mtd: fixup CFI on ixp4xx
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit 603362b4a58393061dcfed1c7f0d0fd4aba61126 upstream.
+
+drivers/mtd/maps/ixp4xx.c requires MTD_CFI_BE_BYTE_SWAP to be set
+in order to compile.
+
+drivers/mtd/maps/ixp4xx.c:57:4: error: #error CONFIG_MTD_CFI_BE_BYTE_SWAP required
+
+This patch avoids the #error output by enforcing the policy in
+Kconfig. Not sure if this is the right approach, but it helps doing
+randconfig builds.
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Acked-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
+Link: https://lore.kernel.org/linux-mtd/20210927141045.1597593-1-arnd@kernel.org
+Cc: Anders Roxell <anders.roxell@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/mtd/chips/Kconfig |    2 ++
+ drivers/mtd/maps/Kconfig  |    2 +-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/mtd/chips/Kconfig
++++ b/drivers/mtd/chips/Kconfig
+@@ -55,12 +55,14 @@ choice
+         LITTLE_ENDIAN_BYTE, if the bytes are reversed.
+ config MTD_CFI_NOSWAP
++      depends on !ARCH_IXP4XX || CPU_BIG_ENDIAN
+       bool "NO"
+ config MTD_CFI_BE_BYTE_SWAP
+       bool "BIG_ENDIAN_BYTE"
+ config MTD_CFI_LE_BYTE_SWAP
++      depends on !ARCH_IXP4XX
+       bool "LITTLE_ENDIAN_BYTE"
+ endchoice
+--- a/drivers/mtd/maps/Kconfig
++++ b/drivers/mtd/maps/Kconfig
+@@ -325,7 +325,7 @@ config MTD_DC21285
+ config MTD_IXP4XX
+       tristate "CFI Flash device mapped on Intel IXP4xx based systems"
+-      depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP4XX
++      depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP4XX && MTD_CFI_ADV_OPTIONS
+       help
+         This enables MTD access to flash devices on platforms based
+         on Intel's IXP4xx family of network processors such as the
diff --git a/queue-5.10/powerpc-pseries-get-entry-and-uaccess-flush-required-bits-from-h_get_cpu_characteristics.patch b/queue-5.10/powerpc-pseries-get-entry-and-uaccess-flush-required-bits-from-h_get_cpu_characteristics.patch
new file mode 100644 (file)
index 0000000..031fee1
--- /dev/null
@@ -0,0 +1,47 @@
+From 65c7d070850e109a8a75a431f5a7f6eb4c007b77 Mon Sep 17 00:00:00 2001
+From: Nicholas Piggin <npiggin@gmail.com>
+Date: Mon, 3 May 2021 23:02:40 +1000
+Subject: powerpc/pseries: Get entry and uaccess flush required bits from H_GET_CPU_CHARACTERISTICS
+
+From: Nicholas Piggin <npiggin@gmail.com>
+
+commit 65c7d070850e109a8a75a431f5a7f6eb4c007b77 upstream.
+
+This allows the hypervisor / firmware to describe these workarounds to
+the guest.
+
+Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/20210503130243.891868-2-npiggin@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/powerpc/include/asm/hvcall.h      |    2 ++
+ arch/powerpc/platforms/pseries/setup.c |    6 ++++++
+ 2 files changed, 8 insertions(+)
+
+--- a/arch/powerpc/include/asm/hvcall.h
++++ b/arch/powerpc/include/asm/hvcall.h
+@@ -382,6 +382,8 @@
+ #define H_CPU_BEHAV_BNDS_CHK_SPEC_BAR (1ull << 61) // IBM bit 2
+ #define H_CPU_BEHAV_FLUSH_COUNT_CACHE (1ull << 58) // IBM bit 5
+ #define H_CPU_BEHAV_FLUSH_LINK_STACK  (1ull << 57) // IBM bit 6
++#define H_CPU_BEHAV_NO_L1D_FLUSH_ENTRY        (1ull << 56) // IBM bit 7
++#define H_CPU_BEHAV_NO_L1D_FLUSH_UACCESS (1ull << 55) // IBM bit 8
+ /* Flag values used in H_REGISTER_PROC_TBL hcall */
+ #define PROC_TABLE_OP_MASK    0x18
+--- a/arch/powerpc/platforms/pseries/setup.c
++++ b/arch/powerpc/platforms/pseries/setup.c
+@@ -538,6 +538,12 @@ static void init_cpu_char_feature_flags(
+       if (!(result->behaviour & H_CPU_BEHAV_L1D_FLUSH_PR))
+               security_ftr_clear(SEC_FTR_L1D_FLUSH_PR);
++      if (result->behaviour & H_CPU_BEHAV_NO_L1D_FLUSH_ENTRY)
++              security_ftr_clear(SEC_FTR_L1D_FLUSH_ENTRY);
++
++      if (result->behaviour & H_CPU_BEHAV_NO_L1D_FLUSH_UACCESS)
++              security_ftr_clear(SEC_FTR_L1D_FLUSH_UACCESS);
++
+       if (!(result->behaviour & H_CPU_BEHAV_BNDS_CHK_SPEC_BAR))
+               security_ftr_clear(SEC_FTR_BNDS_CHK_SPEC_BAR);
+ }
index 39391e2bb2d8bb4074e07372eab7100af0045cb7..7698e856d1f7cf1a932ba73a166563ef83572805 100644 (file)
@@ -19,3 +19,5 @@ alsa-hda-realtek-fix-silent-output-on-gigabyte-x570-aorus-master-after-reboot-fr
 alsa-hda-alc287-add-lenovo-ideapad-slim-9i-14itl5-speaker-quirk.patch
 alsa-hda-realtek-add-quirk-for-legion-y9000x-2020.patch
 alsa-hda-realtek-re-order-quirk-entries-for-lenovo.patch
+powerpc-pseries-get-entry-and-uaccess-flush-required-bits-from-h_get_cpu_characteristics.patch
+mtd-fixup-cfi-on-ixp4xx.patch