--- /dev/null
+From a88afa46b86ff461c89cc33fc3a45267fff053e8 Mon Sep 17 00:00:00 2001
+From: Max Krummenacher <max.oss.09@gmail.com>
+Date: Mon, 11 Jan 2021 16:17:04 +0100
+Subject: ARM: imx: build suspend-imx6.S with arm instruction set
+
+From: Max Krummenacher <max.oss.09@gmail.com>
+
+commit a88afa46b86ff461c89cc33fc3a45267fff053e8 upstream.
+
+When the kernel is configured to use the Thumb-2 instruction set
+"suspend-to-memory" fails to resume. Observed on a Colibri iMX6ULL
+(i.MX 6ULL) and Apalis iMX6 (i.MX 6Q).
+
+It looks like the CPU resumes unconditionally in ARM instruction mode
+and then chokes on the presented Thumb-2 code it should execute.
+
+Fix this by using the arm instruction set for all code in
+suspend-imx6.S.
+
+Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
+Fixes: df595746fa69 ("ARM: imx: add suspend in ocram support for i.mx6q")
+Acked-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
+Signed-off-by: Shawn Guo <shawnguo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/mach-imx/suspend-imx6.S | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm/mach-imx/suspend-imx6.S
++++ b/arch/arm/mach-imx/suspend-imx6.S
+@@ -67,6 +67,7 @@
+ #define MX6Q_CCM_CCR 0x0
+
+ .align 3
++ .arm
+
+ .macro sync_l2_cache
+
--- /dev/null
+From 8f6d08c9af284d74276da6681348e4673f13caea Mon Sep 17 00:00:00 2001
+From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
+Date: Thu, 21 Jan 2021 16:19:35 +0000
+Subject: drm/i915: Check for all subplatform bits
+
+From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
+
+commit 8f6d08c9af284d74276da6681348e4673f13caea upstream.
+
+Current code is checking only 2 bits in the subplatform, but actually 3
+bits are allocated for the field. Check all 3 bits.
+
+Fixes: 805446c8347c ("drm/i915: Introduce concept of a sub-platform")
+Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
+Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
+Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+Link: https://patchwork.freedesktop.org/patch/msgid/20210121161936.746591-1-tvrtko.ursulin@linux.intel.com
+(cherry picked from commit 27b695ee1af9bb36605e67055874ec081306ac28)
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/i915_drv.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/i915/i915_drv.h
++++ b/drivers/gpu/drm/i915/i915_drv.h
+@@ -1894,7 +1894,7 @@ intel_subplatform(const struct intel_run
+ {
+ const unsigned int pi = __platform_mask_index(info, p);
+
+- return info->platform_mask[pi] & INTEL_SUBPLATFORM_BITS;
++ return info->platform_mask[pi] & ((1 << INTEL_SUBPLATFORM_BITS) - 1);
+ }
+
+ static __always_inline bool
--- /dev/null
+From dcd602cc5fe2803bf532d407cde24ba0b7808ff3 Mon Sep 17 00:00:00 2001
+From: Karol Herbst <kherbst@redhat.com>
+Date: Mon, 18 Jan 2021 18:16:06 +0100
+Subject: drm/nouveau/svm: fail NOUVEAU_SVM_INIT ioctl on unsupported devices
+
+From: Karol Herbst <kherbst@redhat.com>
+
+commit dcd602cc5fe2803bf532d407cde24ba0b7808ff3 upstream.
+
+Fixes a crash when trying to create a channel on e.g. Turing GPUs when
+NOUVEAU_SVM_INIT was called before.
+
+Fixes: eeaf06ac1a558 ("drm/nouveau/svm: initial support for shared virtual memory")
+Signed-off-by: Karol Herbst <kherbst@redhat.com>
+Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/nouveau/nouveau_svm.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/gpu/drm/nouveau/nouveau_svm.c
++++ b/drivers/gpu/drm/nouveau/nouveau_svm.c
+@@ -306,6 +306,10 @@ nouveau_svmm_init(struct drm_device *dev
+ struct drm_nouveau_svm_init *args = data;
+ int ret;
+
++ /* We need to fail if svm is disabled */
++ if (!cli->drm->svm)
++ return -ENOSYS;
++
+ /* Allocate tracking for SVM-enabled VMM. */
+ if (!(svmm = kzalloc(sizeof(*svmm), GFP_KERNEL)))
+ return -ENOMEM;
--- /dev/null
+From 0c5b7a501e7400869ee905b4f7af3d6717802bcb Mon Sep 17 00:00:00 2001
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+Date: Sat, 16 Jan 2021 19:20:15 +0100
+Subject: netfilter: nft_dynset: add timeout extension to template
+
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+
+commit 0c5b7a501e7400869ee905b4f7af3d6717802bcb upstream.
+
+Otherwise, the newly create element shows no timeout when listing the
+ruleset. If the set definition does not specify a default timeout, then
+the set element only shows the expiration time, but not the timeout.
+This is a problem when restoring a stateful ruleset listing since it
+skips the timeout policy entirely.
+
+Fixes: 22fe54d5fefc ("netfilter: nf_tables: add support for dynamic set updates")
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/netfilter/nft_dynset.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/net/netfilter/nft_dynset.c
++++ b/net/netfilter/nft_dynset.c
+@@ -233,8 +233,10 @@ static int nft_dynset_init(const struct
+ nft_set_ext_add_length(&priv->tmpl, NFT_SET_EXT_EXPR,
+ priv->expr->ops->size);
+ if (set->flags & NFT_SET_TIMEOUT) {
+- if (timeout || set->timeout)
++ if (timeout || set->timeout) {
++ nft_set_ext_add(&priv->tmpl, NFT_SET_EXT_TIMEOUT);
+ nft_set_ext_add(&priv->tmpl, NFT_SET_EXT_EXPIRATION);
++ }
+ }
+
+ priv->timeout = timeout;
arm64-dts-broadcom-fix-usb-dma-address-translation-for-stingray.patch
mt7601u-fix-kernel-crash-unplugging-the-device.patch
mt7601u-fix-rx-buffer-refcounting.patch
+drm-nouveau-svm-fail-nouveau_svm_init-ioctl-on-unsupported-devices.patch
+drm-i915-check-for-all-subplatform-bits.patch
+tee-optee-replace-might_sleep-with-cond_resched.patch
+xen-blkfront-allow-discard-nodes-to-be-optional.patch
+arm-imx-build-suspend-imx6.s-with-arm-instruction-set.patch
+netfilter-nft_dynset-add-timeout-extension-to-template.patch
--- /dev/null
+From dcb3b06d9c34f33a249f65c08805461fb0c4325b Mon Sep 17 00:00:00 2001
+From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
+Date: Tue, 5 Jan 2021 11:28:44 +0100
+Subject: tee: optee: replace might_sleep with cond_resched
+
+From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
+
+commit dcb3b06d9c34f33a249f65c08805461fb0c4325b upstream.
+
+might_sleep() is a debugging aid and triggers rescheduling only for
+certain kernel configurations. Replace with an explicit check and
+reschedule to work for all kernel configurations. Fixes the following
+trace:
+
+ [ 572.945146] rcu: INFO: rcu_sched self-detected stall on CPU
+ [ 572.949275] rcu: 0-....: (2099 ticks this GP) idle=572/1/0x40000002 softirq=7412/7412 fqs=974
+ [ 572.957964] (t=2100 jiffies g=10393 q=21)
+ [ 572.962054] NMI backtrace for cpu 0
+ [ 572.965540] CPU: 0 PID: 165 Comm: xtest Not tainted 5.8.7 #1
+ [ 572.971188] Hardware name: STM32 (Device Tree Support)
+ [ 572.976354] [<c011163c>] (unwind_backtrace) from [<c010b7f8>] (show_stack+0x10/0x14)
+ [ 572.984080] [<c010b7f8>] (show_stack) from [<c0511e4c>] (dump_stack+0xc4/0xd8)
+ [ 572.991300] [<c0511e4c>] (dump_stack) from [<c0519abc>] (nmi_cpu_backtrace+0x90/0xc4)
+ [ 572.999130] [<c0519abc>] (nmi_cpu_backtrace) from [<c0519bdc>] (nmi_trigger_cpumask_backtrace+0xec/0x130)
+ [ 573.008706] [<c0519bdc>] (nmi_trigger_cpumask_backtrace) from [<c01a5184>] (rcu_dump_cpu_stacks+0xe8/0x110)
+ [ 573.018453] [<c01a5184>] (rcu_dump_cpu_stacks) from [<c01a4234>] (rcu_sched_clock_irq+0x7fc/0xa88)
+ [ 573.027416] [<c01a4234>] (rcu_sched_clock_irq) from [<c01acdd0>] (update_process_times+0x30/0x8c)
+ [ 573.036291] [<c01acdd0>] (update_process_times) from [<c01bfb90>] (tick_sched_timer+0x4c/0xa8)
+ [ 573.044905] [<c01bfb90>] (tick_sched_timer) from [<c01adcc8>] (__hrtimer_run_queues+0x174/0x358)
+ [ 573.053696] [<c01adcc8>] (__hrtimer_run_queues) from [<c01aea2c>] (hrtimer_interrupt+0x118/0x2bc)
+ [ 573.062573] [<c01aea2c>] (hrtimer_interrupt) from [<c09ad664>] (arch_timer_handler_virt+0x28/0x30)
+ [ 573.071536] [<c09ad664>] (arch_timer_handler_virt) from [<c0190f50>] (handle_percpu_devid_irq+0x8c/0x240)
+ [ 573.081109] [<c0190f50>] (handle_percpu_devid_irq) from [<c018ab8c>] (generic_handle_irq+0x34/0x44)
+ [ 573.090156] [<c018ab8c>] (generic_handle_irq) from [<c018b194>] (__handle_domain_irq+0x5c/0xb0)
+ [ 573.098857] [<c018b194>] (__handle_domain_irq) from [<c052ac50>] (gic_handle_irq+0x4c/0x90)
+ [ 573.107209] [<c052ac50>] (gic_handle_irq) from [<c0100b0c>] (__irq_svc+0x6c/0x90)
+ [ 573.114682] Exception stack(0xd90dfcf8 to 0xd90dfd40)
+ [ 573.119732] fce0: ffff0004 00000000
+ [ 573.127917] fd00: 00000000 00000000 00000000 00000000 00000000 00000000 d93493cc ffff0000
+ [ 573.136098] fd20: d2bc39c0 be926998 d90dfd58 d90dfd48 c09f3384 c01151f0 400d0013 ffffffff
+ [ 573.144281] [<c0100b0c>] (__irq_svc) from [<c01151f0>] (__arm_smccc_smc+0x10/0x20)
+ [ 573.151854] [<c01151f0>] (__arm_smccc_smc) from [<c09f3384>] (optee_smccc_smc+0x3c/0x44)
+ [ 573.159948] [<c09f3384>] (optee_smccc_smc) from [<c09f4170>] (optee_do_call_with_arg+0xb8/0x154)
+ [ 573.168735] [<c09f4170>] (optee_do_call_with_arg) from [<c09f4638>] (optee_invoke_func+0x110/0x190)
+ [ 573.177786] [<c09f4638>] (optee_invoke_func) from [<c09f1ebc>] (tee_ioctl+0x10b8/0x11c0)
+ [ 573.185879] [<c09f1ebc>] (tee_ioctl) from [<c029f62c>] (ksys_ioctl+0xe0/0xa4c)
+ [ 573.193101] [<c029f62c>] (ksys_ioctl) from [<c0100060>] (ret_fast_syscall+0x0/0x54)
+ [ 573.200750] Exception stack(0xd90dffa8 to 0xd90dfff0)
+ [ 573.205803] ffa0: be926bf4 be926a78 00000003 8010a403 be926908 004e3cf8
+ [ 573.213987] ffc0: be926bf4 be926a78 00000000 00000036 be926908 be926918 be9269b0 bffdf0f8
+ [ 573.222162] ffe0: b6d76fb0 be9268fc b6d66621 b6c7e0d8
+
+seen on STM32 DK2 with CONFIG_PREEMPT_NONE.
+
+Fixes: 9f02b8f61f29 ("tee: optee: add might_sleep for RPC requests")
+Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
+Tested-by: Sumit Garg <sumit.garg@linaro.org>
+[jw: added fixes tag + small adjustments in the code]
+Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/tee/optee/call.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/tee/optee/call.c
++++ b/drivers/tee/optee/call.c
+@@ -7,6 +7,7 @@
+ #include <linux/err.h>
+ #include <linux/errno.h>
+ #include <linux/mm.h>
++#include <linux/sched.h>
+ #include <linux/slab.h>
+ #include <linux/tee_drv.h>
+ #include <linux/types.h>
+@@ -148,7 +149,8 @@ u32 optee_do_call_with_arg(struct tee_co
+ */
+ optee_cq_wait_for_completion(&optee->call_queue, &w);
+ } else if (OPTEE_SMC_RETURN_IS_RPC(res.a0)) {
+- might_sleep();
++ if (need_resched())
++ cond_resched();
+ param.a0 = res.a0;
+ param.a1 = res.a1;
+ param.a2 = res.a2;
--- /dev/null
+From 0549cd67b01016b579047bce045b386202a8bcfc Mon Sep 17 00:00:00 2001
+From: Roger Pau Monne <roger.pau@citrix.com>
+Date: Tue, 19 Jan 2021 11:57:27 +0100
+Subject: xen-blkfront: allow discard-* nodes to be optional
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Roger Pau Monne <roger.pau@citrix.com>
+
+commit 0549cd67b01016b579047bce045b386202a8bcfc upstream.
+
+This is inline with the specification described in blkif.h:
+
+ * discard-granularity: should be set to the physical block size if
+ node is not present.
+ * discard-alignment, discard-secure: should be set to 0 if node not
+ present.
+
+This was detected as QEMU would only create the discard-granularity
+node but not discard-alignment, and thus the setup done in
+blkfront_setup_discard would fail.
+
+Fix blkfront_setup_discard to not fail on missing nodes, and also fix
+blkif_set_queue_limits to set the discard granularity to the physical
+block size if none is specified in xenbus.
+
+Fixes: ed30bf317c5ce ('xen-blkfront: Handle discard requests.')
+Reported-by: Arthur Borsboom <arthurborsboom@gmail.com>
+Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
+Reviewed-by: Juergen Gross <jgross@suse.com>
+Tested-By: Arthur Borsboom <arthurborsboom@gmail.com>
+Link: https://lore.kernel.org/r/20210119105727.95173-1-roger.pau@citrix.com
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/block/xen-blkfront.c | 20 +++++++-------------
+ 1 file changed, 7 insertions(+), 13 deletions(-)
+
+--- a/drivers/block/xen-blkfront.c
++++ b/drivers/block/xen-blkfront.c
+@@ -936,7 +936,8 @@ static void blkif_set_queue_limits(struc
+ if (info->feature_discard) {
+ blk_queue_flag_set(QUEUE_FLAG_DISCARD, rq);
+ blk_queue_max_discard_sectors(rq, get_capacity(gd));
+- rq->limits.discard_granularity = info->discard_granularity;
++ rq->limits.discard_granularity = info->discard_granularity ?:
++ info->physical_sector_size;
+ rq->limits.discard_alignment = info->discard_alignment;
+ if (info->feature_secdiscard)
+ blk_queue_flag_set(QUEUE_FLAG_SECERASE, rq);
+@@ -2169,19 +2170,12 @@ static void blkfront_closing(struct blkf
+
+ static void blkfront_setup_discard(struct blkfront_info *info)
+ {
+- int err;
+- unsigned int discard_granularity;
+- unsigned int discard_alignment;
+-
+ info->feature_discard = 1;
+- err = xenbus_gather(XBT_NIL, info->xbdev->otherend,
+- "discard-granularity", "%u", &discard_granularity,
+- "discard-alignment", "%u", &discard_alignment,
+- NULL);
+- if (!err) {
+- info->discard_granularity = discard_granularity;
+- info->discard_alignment = discard_alignment;
+- }
++ info->discard_granularity = xenbus_read_unsigned(info->xbdev->otherend,
++ "discard-granularity",
++ 0);
++ info->discard_alignment = xenbus_read_unsigned(info->xbdev->otherend,
++ "discard-alignment", 0);
+ info->feature_secdiscard =
+ !!xenbus_read_unsigned(info->xbdev->otherend, "discard-secure",
+ 0);