From: Greg Kroah-Hartman Date: Tue, 28 Apr 2020 09:09:26 +0000 (+0200) Subject: 5.6-stable patches X-Git-Tag: v4.19.119~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cd4e8ab9c582dc14e6dd146bdb858d9709812b71;p=thirdparty%2Fkernel%2Fstable-queue.git 5.6-stable patches added patches: drm-i915-gt-update-pmintrmsk-holding-fw.patch powerpc-kuap-ppc_kuap_debug-should-depend-on-ppc_kuap.patch powerpc-mm-fix-config_ppc_kuap_debug-on-ppc32.patch --- diff --git a/queue-5.6/drm-i915-gt-update-pmintrmsk-holding-fw.patch b/queue-5.6/drm-i915-gt-update-pmintrmsk-holding-fw.patch new file mode 100644 index 00000000000..622b3c218ce --- /dev/null +++ b/queue-5.6/drm-i915-gt-update-pmintrmsk-holding-fw.patch @@ -0,0 +1,55 @@ +From e1eb075c5051987fbbadbc0fb8211679df657721 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Wed, 15 Apr 2020 18:03:18 +0100 +Subject: drm/i915/gt: Update PMINTRMSK holding fw + +From: Chris Wilson + +commit e1eb075c5051987fbbadbc0fb8211679df657721 upstream. + +If we use a non-forcewaked write to PMINTRMSK, it does not take effect +until much later, if at all, causing a loss of RPS interrupts and no GPU +reclocking, leaving the GPU running at the wrong frequency for long +periods of time. + +Reported-by: Francisco Jerez +Suggested-by: Francisco Jerez +Fixes: 35cc7f32c298 ("drm/i915/gt: Use non-forcewake writes for RPS") +Signed-off-by: Chris Wilson +Cc: Francisco Jerez +Cc: Mika Kuoppala +Cc: Andi Shyti +Reviewed-by: Mika Kuoppala +Reviewed-by: Andi Shyti +Reviewed-by: Francisco Jerez +Cc: # v5.6+ +Link: https://patchwork.freedesktop.org/patch/msgid/20200415170318.16771-2-chris@chris-wilson.co.uk +(cherry picked from commit a080bd994c4023042a2b605c65fa10a25933f636) +Signed-off-by: Rodrigo Vivi +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/i915/gt/intel_rps.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/i915/gt/intel_rps.c ++++ b/drivers/gpu/drm/i915/gt/intel_rps.c +@@ -83,7 +83,8 @@ static void rps_enable_interrupts(struct + gen6_gt_pm_enable_irq(gt, rps->pm_events); + spin_unlock_irq(>->irq_lock); + +- set(gt->uncore, GEN6_PMINTRMSK, rps_pm_mask(rps, rps->cur_freq)); ++ intel_uncore_write(gt->uncore, ++ GEN6_PMINTRMSK, rps_pm_mask(rps, rps->last_freq)); + } + + static void gen6_rps_reset_interrupts(struct intel_rps *rps) +@@ -117,7 +118,8 @@ static void rps_disable_interrupts(struc + + rps->pm_events = 0; + +- set(gt->uncore, GEN6_PMINTRMSK, rps_pm_sanitize_mask(rps, ~0u)); ++ intel_uncore_write(gt->uncore, ++ GEN6_PMINTRMSK, rps_pm_sanitize_mask(rps, ~0u)); + + spin_lock_irq(>->irq_lock); + gen6_gt_pm_disable_irq(gt, GEN6_PM_RPS_EVENTS); diff --git a/queue-5.6/powerpc-kuap-ppc_kuap_debug-should-depend-on-ppc_kuap.patch b/queue-5.6/powerpc-kuap-ppc_kuap_debug-should-depend-on-ppc_kuap.patch new file mode 100644 index 00000000000..c1844618987 --- /dev/null +++ b/queue-5.6/powerpc-kuap-ppc_kuap_debug-should-depend-on-ppc_kuap.patch @@ -0,0 +1,35 @@ +From 61da50b76b62fd815aa82d853bf82bf4f69568f5 Mon Sep 17 00:00:00 2001 +From: Michael Ellerman +Date: Sun, 1 Mar 2020 22:17:38 +1100 +Subject: powerpc/kuap: PPC_KUAP_DEBUG should depend on PPC_KUAP + +From: Michael Ellerman + +commit 61da50b76b62fd815aa82d853bf82bf4f69568f5 upstream. + +Currently you can enable PPC_KUAP_DEBUG when PPC_KUAP is disabled, +even though the former has not effect without the latter. + +Fix it so that PPC_KUAP_DEBUG can only be enabled when PPC_KUAP is +enabled, not when the platform could support KUAP (PPC_HAVE_KUAP). + +Fixes: 890274c2dc4c ("powerpc/64s: Implement KUAP for Radix MMU") +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/20200301111738.22497-1-mpe@ellerman.id.au +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/platforms/Kconfig.cputype | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/powerpc/platforms/Kconfig.cputype ++++ b/arch/powerpc/platforms/Kconfig.cputype +@@ -397,7 +397,7 @@ config PPC_KUAP + + config PPC_KUAP_DEBUG + bool "Extra debugging for Kernel Userspace Access Protection" +- depends on PPC_HAVE_KUAP && (PPC_RADIX_MMU || PPC_32) ++ depends on PPC_KUAP && (PPC_RADIX_MMU || PPC_32) + help + Add extra debugging for Kernel Userspace Access Protection (KUAP) + If you're unsure, say N. diff --git a/queue-5.6/powerpc-mm-fix-config_ppc_kuap_debug-on-ppc32.patch b/queue-5.6/powerpc-mm-fix-config_ppc_kuap_debug-on-ppc32.patch new file mode 100644 index 00000000000..e98201fe1ef --- /dev/null +++ b/queue-5.6/powerpc-mm-fix-config_ppc_kuap_debug-on-ppc32.patch @@ -0,0 +1,51 @@ +From feb8e960d780e170e992a70491eec9dd68f4dbf2 Mon Sep 17 00:00:00 2001 +From: Christophe Leroy +Date: Fri, 17 Apr 2020 11:58:36 +0000 +Subject: powerpc/mm: Fix CONFIG_PPC_KUAP_DEBUG on PPC32 + +From: Christophe Leroy + +commit feb8e960d780e170e992a70491eec9dd68f4dbf2 upstream. + +CONFIG_PPC_KUAP_DEBUG is not selectable because it depends on PPC_32 +which doesn't exists. + +Fixing it leads to a deadlock due to a vital register getting +clobbered in _switch(). + +Change dependency to PPC32 and use r0 instead of r4 in _switch() + +Fixes: e2fb9f544431 ("powerpc/32: Prepare for Kernel Userspace Access Protection") +Cc: stable@vger.kernel.org # v5.2+ +Signed-off-by: Christophe Leroy +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/540242f7d4573f7cdf1b3bf46bb35f743b2cd68f.1587124651.git.christophe.leroy@c-s.fr +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/kernel/entry_32.S | 2 +- + arch/powerpc/platforms/Kconfig.cputype | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/powerpc/kernel/entry_32.S ++++ b/arch/powerpc/kernel/entry_32.S +@@ -710,7 +710,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_SPE) + stw r10,_CCR(r1) + stw r1,KSP(r3) /* Set old stack pointer */ + +- kuap_check r2, r4 ++ kuap_check r2, r0 + #ifdef CONFIG_SMP + /* We need a sync somewhere here to make sure that if the + * previous task gets rescheduled on another CPU, it sees all +--- a/arch/powerpc/platforms/Kconfig.cputype ++++ b/arch/powerpc/platforms/Kconfig.cputype +@@ -397,7 +397,7 @@ config PPC_KUAP + + config PPC_KUAP_DEBUG + bool "Extra debugging for Kernel Userspace Access Protection" +- depends on PPC_KUAP && (PPC_RADIX_MMU || PPC_32) ++ depends on PPC_KUAP && (PPC_RADIX_MMU || PPC32) + help + Add extra debugging for Kernel Userspace Access Protection (KUAP) + If you're unsure, say N. diff --git a/queue-5.6/series b/queue-5.6/series index ba3ef382ebc..d89e7ebe7c5 100644 --- a/queue-5.6/series +++ b/queue-5.6/series @@ -161,3 +161,6 @@ revert-serial-uartps-do-not-allow-use-aliases-max_uart_instances.patch revert-serial-uartps-change-uart-id-port-allocation.patch revert-serial-uartps-move-port-id-to-device-data-structure.patch revert-serial-uartps-register-own-uart-console-and-driver-structures.patch +drm-i915-gt-update-pmintrmsk-holding-fw.patch +powerpc-kuap-ppc_kuap_debug-should-depend-on-ppc_kuap.patch +powerpc-mm-fix-config_ppc_kuap_debug-on-ppc32.patch