From: Greg Kroah-Hartman Date: Tue, 18 Jan 2022 15:40:35 +0000 (+0100) Subject: 5.10-stable patches X-Git-Tag: v5.16.2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=190173ce57f6488875c4661acd62ffa354185b64;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: mtd-fixup-cfi-on-ixp4xx.patch powerpc-pseries-get-entry-and-uaccess-flush-required-bits-from-h_get_cpu_characteristics.patch --- 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 index 00000000000..8fd788d4afd --- /dev/null +++ b/queue-5.10/mtd-fixup-cfi-on-ixp4xx.patch @@ -0,0 +1,57 @@ +From 603362b4a58393061dcfed1c7f0d0fd4aba61126 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Mon, 27 Sep 2021 16:10:37 +0200 +Subject: mtd: fixup CFI on ixp4xx + +From: Arnd Bergmann + +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 +Acked-by: Linus Walleij +Signed-off-by: Miquel Raynal +Link: https://lore.kernel.org/linux-mtd/20210927141045.1597593-1-arnd@kernel.org +Cc: Anders Roxell +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..031fee1c423 --- /dev/null +++ b/queue-5.10/powerpc-pseries-get-entry-and-uaccess-flush-required-bits-from-h_get_cpu_characteristics.patch @@ -0,0 +1,47 @@ +From 65c7d070850e109a8a75a431f5a7f6eb4c007b77 Mon Sep 17 00:00:00 2001 +From: Nicholas Piggin +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 + +commit 65c7d070850e109a8a75a431f5a7f6eb4c007b77 upstream. + +This allows the hypervisor / firmware to describe these workarounds to +the guest. + +Signed-off-by: Nicholas Piggin +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/20210503130243.891868-2-npiggin@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + 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); + } diff --git a/queue-5.10/series b/queue-5.10/series index 39391e2bb2d..7698e856d1f 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -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