diff -druNp --no-dereference linux-libre-4.19.50-gnu/arch/arm/boot/dts/exynos5420-arndale-octa.dts linux-libre-4.19.51-gnu/arch/arm/boot/dts/exynos5420-arndale-octa.dts
--- linux-libre-4.19.50-gnu/arch/arm/boot/dts/exynos5420-arndale-octa.dts	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/arch/arm/boot/dts/exynos5420-arndale-octa.dts	2019-06-15 05:54:11.000000000 -0400
@@ -106,6 +106,7 @@
 				regulator-name = "PVDD_APIO_1V8";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
 			};
 
 			ldo3_reg: LDO3 {
@@ -144,6 +145,7 @@
 				regulator-name = "PVDD_ABB_1V8";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
 			};
 
 			ldo9_reg: LDO9 {
diff -druNp --no-dereference linux-libre-4.19.50-gnu/arch/arm/boot/dts/imx50.dtsi linux-libre-4.19.51-gnu/arch/arm/boot/dts/imx50.dtsi
--- linux-libre-4.19.50-gnu/arch/arm/boot/dts/imx50.dtsi	2019-06-11 15:18:55.000000000 -0400
+++ linux-libre-4.19.51-gnu/arch/arm/boot/dts/imx50.dtsi	2019-06-15 17:48:58.000000000 -0400
@@ -420,7 +420,7 @@
 				reg = <0x63fb0000 0x4000>;
 				interrupts = <6>;
 				clocks = <&clks IMX5_CLK_SDMA_GATE>,
-					 <&clks IMX5_CLK_SDMA_GATE>;
+					 <&clks IMX5_CLK_AHB>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
 				fsl,sdma-ram-script-name = "/*(DEBLOBBED)*/";
diff -druNp --no-dereference linux-libre-4.19.50-gnu/arch/arm/boot/dts/imx51.dtsi linux-libre-4.19.51-gnu/arch/arm/boot/dts/imx51.dtsi
--- linux-libre-4.19.50-gnu/arch/arm/boot/dts/imx51.dtsi	2019-06-11 15:18:58.000000000 -0400
+++ linux-libre-4.19.51-gnu/arch/arm/boot/dts/imx51.dtsi	2019-06-15 17:49:01.000000000 -0400
@@ -481,7 +481,7 @@
 				reg = <0x83fb0000 0x4000>;
 				interrupts = <6>;
 				clocks = <&clks IMX5_CLK_SDMA_GATE>,
-					 <&clks IMX5_CLK_SDMA_GATE>;
+					 <&clks IMX5_CLK_AHB>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
 				fsl,sdma-ram-script-name = "/*(DEBLOBBED)*/";
diff -druNp --no-dereference linux-libre-4.19.50-gnu/arch/arm/boot/dts/imx53.dtsi linux-libre-4.19.51-gnu/arch/arm/boot/dts/imx53.dtsi
--- linux-libre-4.19.50-gnu/arch/arm/boot/dts/imx53.dtsi	2019-06-11 15:19:01.000000000 -0400
+++ linux-libre-4.19.51-gnu/arch/arm/boot/dts/imx53.dtsi	2019-06-15 17:49:04.000000000 -0400
@@ -701,7 +701,7 @@
 				reg = <0x63fb0000 0x4000>;
 				interrupts = <6>;
 				clocks = <&clks IMX5_CLK_SDMA_GATE>,
-					 <&clks IMX5_CLK_SDMA_GATE>;
+					 <&clks IMX5_CLK_AHB>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
 				fsl,sdma-ram-script-name = "/*(DEBLOBBED)*/";
diff -druNp --no-dereference linux-libre-4.19.50-gnu/arch/arm/boot/dts/imx6qdl.dtsi linux-libre-4.19.51-gnu/arch/arm/boot/dts/imx6qdl.dtsi
--- linux-libre-4.19.50-gnu/arch/arm/boot/dts/imx6qdl.dtsi	2019-06-11 15:19:07.000000000 -0400
+++ linux-libre-4.19.51-gnu/arch/arm/boot/dts/imx6qdl.dtsi	2019-06-15 17:49:11.000000000 -0400
@@ -905,7 +905,7 @@
 				compatible = "fsl,imx6q-sdma", "fsl,imx35-sdma";
 				reg = <0x020ec000 0x4000>;
 				interrupts = <0 2 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clks IMX6QDL_CLK_SDMA>,
+				clocks = <&clks IMX6QDL_CLK_IPG>,
 					 <&clks IMX6QDL_CLK_SDMA>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
diff -druNp --no-dereference linux-libre-4.19.50-gnu/arch/arm/boot/dts/imx6sl.dtsi linux-libre-4.19.51-gnu/arch/arm/boot/dts/imx6sl.dtsi
--- linux-libre-4.19.50-gnu/arch/arm/boot/dts/imx6sl.dtsi	2019-06-11 15:19:10.000000000 -0400
+++ linux-libre-4.19.51-gnu/arch/arm/boot/dts/imx6sl.dtsi	2019-06-15 17:49:14.000000000 -0400
@@ -739,7 +739,7 @@
 				reg = <0x020ec000 0x4000>;
 				interrupts = <0 2 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clks IMX6SL_CLK_SDMA>,
-					 <&clks IMX6SL_CLK_SDMA>;
+					 <&clks IMX6SL_CLK_AHB>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
 				/* imx6sl reuses imx6q sdma firmware */
diff -druNp --no-dereference linux-libre-4.19.50-gnu/arch/arm/boot/dts/imx6sll.dtsi linux-libre-4.19.51-gnu/arch/arm/boot/dts/imx6sll.dtsi
--- linux-libre-4.19.50-gnu/arch/arm/boot/dts/imx6sll.dtsi	2019-06-11 15:19:13.000000000 -0400
+++ linux-libre-4.19.51-gnu/arch/arm/boot/dts/imx6sll.dtsi	2019-06-15 17:49:17.000000000 -0400
@@ -591,7 +591,7 @@
 				compatible = "fsl,imx6sll-sdma", "fsl,imx35-sdma";
 				reg = <0x020ec000 0x4000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clks IMX6SLL_CLK_SDMA>,
+				clocks = <&clks IMX6SLL_CLK_IPG>,
 					 <&clks IMX6SLL_CLK_SDMA>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
diff -druNp --no-dereference linux-libre-4.19.50-gnu/arch/arm/boot/dts/imx6sx.dtsi linux-libre-4.19.51-gnu/arch/arm/boot/dts/imx6sx.dtsi
--- linux-libre-4.19.50-gnu/arch/arm/boot/dts/imx6sx.dtsi	2019-06-11 15:19:17.000000000 -0400
+++ linux-libre-4.19.51-gnu/arch/arm/boot/dts/imx6sx.dtsi	2019-06-15 17:49:20.000000000 -0400
@@ -803,7 +803,7 @@
 				compatible = "fsl,imx6sx-sdma", "fsl,imx6q-sdma";
 				reg = <0x020ec000 0x4000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clks IMX6SX_CLK_SDMA>,
+				clocks = <&clks IMX6SX_CLK_IPG>,
 					 <&clks IMX6SX_CLK_SDMA>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
diff -druNp --no-dereference linux-libre-4.19.50-gnu/arch/arm/boot/dts/imx6ul.dtsi linux-libre-4.19.51-gnu/arch/arm/boot/dts/imx6ul.dtsi
--- linux-libre-4.19.50-gnu/arch/arm/boot/dts/imx6ul.dtsi	2019-06-11 15:19:20.000000000 -0400
+++ linux-libre-4.19.51-gnu/arch/arm/boot/dts/imx6ul.dtsi	2019-06-15 17:49:24.000000000 -0400
@@ -707,7 +707,7 @@
 					     "fsl,imx35-sdma";
 				reg = <0x020ec000 0x4000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clks IMX6UL_CLK_SDMA>,
+				clocks = <&clks IMX6UL_CLK_IPG>,
 					 <&clks IMX6UL_CLK_SDMA>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
diff -druNp --no-dereference linux-libre-4.19.50-gnu/arch/arm/boot/dts/imx7s.dtsi linux-libre-4.19.51-gnu/arch/arm/boot/dts/imx7s.dtsi
--- linux-libre-4.19.50-gnu/arch/arm/boot/dts/imx7s.dtsi	2019-06-11 15:19:24.000000000 -0400
+++ linux-libre-4.19.51-gnu/arch/arm/boot/dts/imx7s.dtsi	2019-06-15 17:49:27.000000000 -0400
@@ -1050,8 +1050,8 @@
 				compatible = "fsl,imx7d-sdma", "fsl,imx35-sdma";
 				reg = <0x30bd0000 0x10000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clks IMX7D_SDMA_CORE_CLK>,
-					 <&clks IMX7D_AHB_CHANNEL_ROOT_CLK>;
+				clocks = <&clks IMX7D_IPG_ROOT_CLK>,
+					 <&clks IMX7D_SDMA_CORE_CLK>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
 				fsl,sdma-ram-script-name = "/*(DEBLOBBED)*/";
diff -druNp --no-dereference linux-libre-4.19.50-gnu/arch/arm/include/asm/hardirq.h linux-libre-4.19.51-gnu/arch/arm/include/asm/hardirq.h
--- linux-libre-4.19.50-gnu/arch/arm/include/asm/hardirq.h	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/arch/arm/include/asm/hardirq.h	2019-06-15 05:54:11.000000000 -0400
@@ -6,6 +6,7 @@
 #include <linux/threads.h>
 #include <asm/irq.h>
 
+/* number of IPIS _not_ including IPI_CPU_BACKTRACE */
 #define NR_IPI	7
 
 typedef struct {
diff -druNp --no-dereference linux-libre-4.19.50-gnu/arch/arm/kernel/smp.c linux-libre-4.19.51-gnu/arch/arm/kernel/smp.c
--- linux-libre-4.19.50-gnu/arch/arm/kernel/smp.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/arch/arm/kernel/smp.c	2019-06-15 05:54:11.000000000 -0400
@@ -76,6 +76,10 @@ enum ipi_msg_type {
 	IPI_CPU_STOP,
 	IPI_IRQ_WORK,
 	IPI_COMPLETION,
+	/*
+	 * CPU_BACKTRACE is special and not included in NR_IPI
+	 * or tracable with trace_ipi_*
+	 */
 	IPI_CPU_BACKTRACE,
 	/*
 	 * SGI8-15 can be reserved by secure firmware, and thus may
@@ -803,7 +807,7 @@ core_initcall(register_cpufreq_notifier)
 
 static void raise_nmi(cpumask_t *mask)
 {
-	smp_cross_call(mask, IPI_CPU_BACKTRACE);
+	__smp_cross_call(mask, IPI_CPU_BACKTRACE);
 }
 
 void arch_trigger_cpumask_backtrace(const cpumask_t *mask, bool exclude_self)
diff -druNp --no-dereference linux-libre-4.19.50-gnu/arch/arm/mach-exynos/suspend.c linux-libre-4.19.51-gnu/arch/arm/mach-exynos/suspend.c
--- linux-libre-4.19.50-gnu/arch/arm/mach-exynos/suspend.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/arch/arm/mach-exynos/suspend.c	2019-06-15 05:54:11.000000000 -0400
@@ -434,8 +434,27 @@ early_wakeup:
 
 static void exynos5420_prepare_pm_resume(void)
 {
+	unsigned int mpidr, cluster;
+
+	mpidr = read_cpuid_mpidr();
+	cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
+
 	if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM))
 		WARN_ON(mcpm_cpu_powered_up());
+
+	if (IS_ENABLED(CONFIG_HW_PERF_EVENTS) && cluster != 0) {
+		/*
+		 * When system is resumed on the LITTLE/KFC core (cluster 1),
+		 * the DSCR is not properly updated until the power is turned
+		 * on also for the cluster 0. Enable it for a while to
+		 * propagate the SPNIDEN and SPIDEN signals from Secure JTAG
+		 * block and avoid undefined instruction issue on CP14 reset.
+		 */
+		pmu_raw_writel(S5P_CORE_LOCAL_PWR_EN,
+				EXYNOS_COMMON_CONFIGURATION(0));
+		pmu_raw_writel(0,
+				EXYNOS_COMMON_CONFIGURATION(0));
+	}
 }
 
 static void exynos5420_pm_resume(void)
diff -druNp --no-dereference linux-libre-4.19.50-gnu/arch/arm/mach-omap2/pm33xx-core.c linux-libre-4.19.51-gnu/arch/arm/mach-omap2/pm33xx-core.c
--- linux-libre-4.19.50-gnu/arch/arm/mach-omap2/pm33xx-core.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/arch/arm/mach-omap2/pm33xx-core.c	2019-06-15 05:54:11.000000000 -0400
@@ -51,10 +51,12 @@ static int amx3_common_init(void)
 
 	/* CEFUSE domain can be turned off post bootup */
 	cefuse_pwrdm = pwrdm_lookup("cefuse_pwrdm");
-	if (cefuse_pwrdm)
-		omap_set_pwrdm_state(cefuse_pwrdm, PWRDM_POWER_OFF);
-	else
+	if (!cefuse_pwrdm)
 		pr_err("PM: Failed to get cefuse_pwrdm\n");
+	else if (omap_type() != OMAP2_DEVICE_TYPE_GP)
+		pr_info("PM: Leaving EFUSE power domain active\n");
+	else
+		omap_set_pwrdm_state(cefuse_pwrdm, PWRDM_POWER_OFF);
 
 	return 0;
 }
diff -druNp --no-dereference linux-libre-4.19.50-gnu/arch/mips/kernel/prom.c linux-libre-4.19.51-gnu/arch/mips/kernel/prom.c
--- linux-libre-4.19.50-gnu/arch/mips/kernel/prom.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/arch/mips/kernel/prom.c	2019-06-15 05:54:11.000000000 -0400
@@ -41,7 +41,19 @@ char *mips_get_machine_name(void)
 #ifdef CONFIG_USE_OF
 void __init early_init_dt_add_memory_arch(u64 base, u64 size)
 {
-	return add_memory_region(base, size, BOOT_MEM_RAM);
+	if (base >= PHYS_ADDR_MAX) {
+		pr_warn("Trying to add an invalid memory region, skipped\n");
+		return;
+	}
+
+	/* Truncate the passed memory region instead of type casting */
+	if (base + size - 1 >= PHYS_ADDR_MAX || base + size < base) {
+		pr_warn("Truncate memory region %llx @ %llx to size %llx\n",
+			size, base, PHYS_ADDR_MAX - base);
+		size = PHYS_ADDR_MAX - base;
+	}
+
+	add_memory_region(base, size, BOOT_MEM_RAM);
 }
 
 int __init early_init_dt_reserve_memory_arch(phys_addr_t base,
diff -druNp --no-dereference linux-libre-4.19.50-gnu/arch/um/kernel/time.c linux-libre-4.19.51-gnu/arch/um/kernel/time.c
--- linux-libre-4.19.50-gnu/arch/um/kernel/time.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/arch/um/kernel/time.c	2019-06-15 05:54:11.000000000 -0400
@@ -56,7 +56,7 @@ static int itimer_one_shot(struct clock_
 static struct clock_event_device timer_clockevent = {
 	.name			= "posix-timer",
 	.rating			= 250,
-	.cpumask		= cpu_all_mask,
+	.cpumask		= cpu_possible_mask,
 	.features		= CLOCK_EVT_FEAT_PERIODIC |
 				  CLOCK_EVT_FEAT_ONESHOT,
 	.set_state_shutdown	= itimer_shutdown,
diff -druNp --no-dereference linux-libre-4.19.50-gnu/arch/x86/events/intel/core.c linux-libre-4.19.51-gnu/arch/x86/events/intel/core.c
--- linux-libre-4.19.50-gnu/arch/x86/events/intel/core.c	2019-06-11 15:13:49.000000000 -0400
+++ linux-libre-4.19.51-gnu/arch/x86/events/intel/core.c	2019-06-15 17:43:46.000000000 -0400
@@ -3072,7 +3072,7 @@ static int intel_pmu_hw_config(struct pe
 		return ret;
 
 	if (event->attr.precise_ip) {
-		if (!(event->attr.freq || event->attr.wakeup_events)) {
+		if (!(event->attr.freq || (event->attr.wakeup_events && !event->attr.watermark))) {
 			event->hw.flags |= PERF_X86_EVENT_AUTO_RELOAD;
 			if (!(event->attr.sample_type &
 			      ~intel_pmu_large_pebs_flags(event)))
diff -druNp --no-dereference linux-libre-4.19.50-gnu/arch/x86/pci/irq.c linux-libre-4.19.51-gnu/arch/x86/pci/irq.c
--- linux-libre-4.19.50-gnu/arch/x86/pci/irq.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/arch/x86/pci/irq.c	2019-06-15 05:54:11.000000000 -0400
@@ -1119,6 +1119,8 @@ static const struct dmi_system_id pciirq
 
 void __init pcibios_irq_init(void)
 {
+	struct irq_routing_table *rtable = NULL;
+
 	DBG(KERN_DEBUG "PCI: IRQ init\n");
 
 	if (raw_pci_ops == NULL)
@@ -1129,8 +1131,10 @@ void __init pcibios_irq_init(void)
 	pirq_table = pirq_find_routing_table();
 
 #ifdef CONFIG_PCI_BIOS
-	if (!pirq_table && (pci_probe & PCI_BIOS_IRQ_SCAN))
+	if (!pirq_table && (pci_probe & PCI_BIOS_IRQ_SCAN)) {
 		pirq_table = pcibios_get_irq_routing_table();
+		rtable = pirq_table;
+	}
 #endif
 	if (pirq_table) {
 		pirq_peer_trick();
@@ -1145,8 +1149,10 @@ void __init pcibios_irq_init(void)
 		 * If we're using the I/O APIC, avoid using the PCI IRQ
 		 * routing table
 		 */
-		if (io_apic_assign_pci_irqs)
+		if (io_apic_assign_pci_irqs) {
+			kfree(rtable);
 			pirq_table = NULL;
+		}
 	}
 
 	x86_init.pci.fixup_irqs();
diff -druNp --no-dereference linux-libre-4.19.50-gnu/block/bfq-iosched.c linux-libre-4.19.51-gnu/block/bfq-iosched.c
--- linux-libre-4.19.50-gnu/block/bfq-iosched.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/block/bfq-iosched.c	2019-06-15 05:54:11.000000000 -0400
@@ -2509,6 +2509,8 @@ static void bfq_arm_slice_timer(struct b
 	if (BFQQ_SEEKY(bfqq) && bfqq->wr_coeff == 1 &&
 	    bfq_symmetric_scenario(bfqd))
 		sl = min_t(u64, sl, BFQ_MIN_TT);
+	else if (bfqq->wr_coeff > 1)
+		sl = max_t(u32, sl, 20ULL * NSEC_PER_MSEC);
 
 	bfqd->last_idling_start = ktime_get();
 	hrtimer_start(&bfqd->idle_slice_timer, ns_to_ktime(sl),
diff -druNp --no-dereference linux-libre-4.19.50-gnu/block/blk-core.c linux-libre-4.19.51-gnu/block/blk-core.c
--- linux-libre-4.19.50-gnu/block/blk-core.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/block/blk-core.c	2019-06-15 05:54:11.000000000 -0400
@@ -411,7 +411,6 @@ void blk_sync_queue(struct request_queue
 		struct blk_mq_hw_ctx *hctx;
 		int i;
 
-		cancel_delayed_work_sync(&q->requeue_work);
 		queue_for_each_hw_ctx(q, hctx, i)
 			cancel_delayed_work_sync(&hctx->run_work);
 	} else {
diff -druNp --no-dereference linux-libre-4.19.50-gnu/block/blk-mq.c linux-libre-4.19.51-gnu/block/blk-mq.c
--- linux-libre-4.19.50-gnu/block/blk-mq.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/block/blk-mq.c	2019-06-15 05:54:11.000000000 -0400
@@ -2465,6 +2465,8 @@ void blk_mq_release(struct request_queue
 	struct blk_mq_hw_ctx *hctx;
 	unsigned int i;
 
+	cancel_delayed_work_sync(&q->requeue_work);
+
 	/* hctx kobj stays in hctx */
 	queue_for_each_hw_ctx(q, hctx, i) {
 		if (!hctx)
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/clk/rockchip/clk-rk3288.c linux-libre-4.19.51-gnu/drivers/clk/rockchip/clk-rk3288.c
--- linux-libre-4.19.50-gnu/drivers/clk/rockchip/clk-rk3288.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/clk/rockchip/clk-rk3288.c	2019-06-15 05:54:11.000000000 -0400
@@ -835,6 +835,9 @@ static const int rk3288_saved_cru_reg_id
 	RK3288_CLKSEL_CON(10),
 	RK3288_CLKSEL_CON(33),
 	RK3288_CLKSEL_CON(37),
+
+	/* We turn aclk_dmac1 on for suspend; this will restore it */
+	RK3288_CLKGATE_CON(10),
 };
 
 static u32 rk3288_saved_cru_regs[ARRAY_SIZE(rk3288_saved_cru_reg_ids)];
@@ -851,6 +854,14 @@ static int rk3288_clk_suspend(void)
 	}
 
 	/*
+	 * Going into deep sleep (specifically setting PMU_CLR_DMA in
+	 * RK3288_PMU_PWRMODE_CON1) appears to fail unless
+	 * "aclk_dmac1" is on.
+	 */
+	writel_relaxed(1 << (12 + 16),
+		       rk3288_cru_base + RK3288_CLKGATE_CON(10));
+
+	/*
 	 * Switch PLLs other than DPLL (for SDRAM) to slow mode to
 	 * avoid crashes on resume. The Mask ROM on the system will
 	 * put APLL, CPLL, and GPLL into slow mode at resume time
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/dma/idma64.c linux-libre-4.19.51-gnu/drivers/dma/idma64.c
--- linux-libre-4.19.50-gnu/drivers/dma/idma64.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/dma/idma64.c	2019-06-15 05:54:11.000000000 -0400
@@ -597,7 +597,7 @@ static int idma64_probe(struct idma64_ch
 	idma64->dma.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
 	idma64->dma.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
 
-	idma64->dma.dev = chip->dev;
+	idma64->dma.dev = chip->sysdev;
 
 	dma_set_max_seg_size(idma64->dma.dev, IDMA64C_CTLH_BLOCK_TS_MASK);
 
@@ -637,6 +637,7 @@ static int idma64_platform_probe(struct
 {
 	struct idma64_chip *chip;
 	struct device *dev = &pdev->dev;
+	struct device *sysdev = dev->parent;
 	struct resource *mem;
 	int ret;
 
@@ -653,11 +654,12 @@ static int idma64_platform_probe(struct
 	if (IS_ERR(chip->regs))
 		return PTR_ERR(chip->regs);
 
-	ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
+	ret = dma_coerce_mask_and_coherent(sysdev, DMA_BIT_MASK(64));
 	if (ret)
 		return ret;
 
 	chip->dev = dev;
+	chip->sysdev = sysdev;
 
 	ret = idma64_probe(chip);
 	if (ret)
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/dma/idma64.h linux-libre-4.19.51-gnu/drivers/dma/idma64.h
--- linux-libre-4.19.50-gnu/drivers/dma/idma64.h	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/dma/idma64.h	2019-06-15 05:54:11.000000000 -0400
@@ -216,12 +216,14 @@ static inline void idma64_writel(struct
 /**
  * struct idma64_chip - representation of iDMA 64-bit controller hardware
  * @dev:		struct device of the DMA controller
+ * @sysdev:		struct device of the physical device that does DMA
  * @irq:		irq line
  * @regs:		memory mapped I/O space
  * @idma64:		struct idma64 that is filed by idma64_probe()
  */
 struct idma64_chip {
 	struct device	*dev;
+	struct device	*sysdev;
 	int		irq;
 	void __iomem	*regs;
 	struct idma64	*idma64;
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/edac/Kconfig linux-libre-4.19.51-gnu/drivers/edac/Kconfig
--- linux-libre-4.19.50-gnu/drivers/edac/Kconfig	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/edac/Kconfig	2019-06-15 05:54:11.000000000 -0400
@@ -250,8 +250,8 @@ config EDAC_PND2
 	  micro-server but may appear on others in the future.
 
 config EDAC_MPC85XX
-	tristate "Freescale MPC83xx / MPC85xx"
-	depends on FSL_SOC
+	bool "Freescale MPC83xx / MPC85xx"
+	depends on FSL_SOC && EDAC=y
 	help
 	  Support for error detection and correction on the Freescale
 	  MPC8349, MPC8560, MPC8540, MPC8548, T4240
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/gpio/gpio-omap.c linux-libre-4.19.51-gnu/drivers/gpio/gpio-omap.c
--- linux-libre-4.19.50-gnu/drivers/gpio/gpio-omap.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/gpio/gpio-omap.c	2019-06-15 05:54:11.000000000 -0400
@@ -343,6 +343,22 @@ static void omap_clear_gpio_debounce(str
 	}
 }
 
+/*
+ * Off mode wake-up capable GPIOs in bank(s) that are in the wakeup domain.
+ * See TRM section for GPIO for "Wake-Up Generation" for the list of GPIOs
+ * in wakeup domain. If bank->non_wakeup_gpios is not configured, assume none
+ * are capable waking up the system from off mode.
+ */
+static bool omap_gpio_is_off_wakeup_capable(struct gpio_bank *bank, u32 gpio_mask)
+{
+	u32 no_wake = bank->non_wakeup_gpios;
+
+	if (no_wake)
+		return !!(~no_wake & gpio_mask);
+
+	return false;
+}
+
 static inline void omap_set_gpio_trigger(struct gpio_bank *bank, int gpio,
 						unsigned trigger)
 {
@@ -374,13 +390,7 @@ static inline void omap_set_gpio_trigger
 	}
 
 	/* This part needs to be executed always for OMAP{34xx, 44xx} */
-	if (!bank->regs->irqctrl) {
-		/* On omap24xx proceed only when valid GPIO bit is set */
-		if (bank->non_wakeup_gpios) {
-			if (!(bank->non_wakeup_gpios & gpio_bit))
-				goto exit;
-		}
-
+	if (!bank->regs->irqctrl && !omap_gpio_is_off_wakeup_capable(bank, gpio)) {
 		/*
 		 * Log the edge gpio and manually trigger the IRQ
 		 * after resume if the input level changes
@@ -393,7 +403,6 @@ static inline void omap_set_gpio_trigger
 			bank->enabled_non_wakeup_gpios &= ~gpio_bit;
 	}
 
-exit:
 	bank->level_mask =
 		readl_relaxed(bank->base + bank->regs->leveldetect0) |
 		readl_relaxed(bank->base + bank->regs->leveldetect1);
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/gpio/gpio-vf610.c linux-libre-4.19.51-gnu/drivers/gpio/gpio-vf610.c
--- linux-libre-4.19.50-gnu/drivers/gpio/gpio-vf610.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/gpio/gpio-vf610.c	2019-06-15 05:54:11.000000000 -0400
@@ -37,6 +37,7 @@ struct fsl_gpio_soc_data {
 
 struct vf610_gpio_port {
 	struct gpio_chip gc;
+	struct irq_chip ic;
 	void __iomem *base;
 	void __iomem *gpio_base;
 	const struct fsl_gpio_soc_data *sdata;
@@ -66,8 +67,6 @@ struct vf610_gpio_port {
 #define PORT_INT_EITHER_EDGE	0xb
 #define PORT_INT_LOGIC_ONE	0xc
 
-static struct irq_chip vf610_gpio_irq_chip;
-
 static const struct fsl_gpio_soc_data imx_data = {
 	.have_paddr = true,
 };
@@ -243,15 +242,6 @@ static int vf610_gpio_irq_set_wake(struc
 	return 0;
 }
 
-static struct irq_chip vf610_gpio_irq_chip = {
-	.name		= "gpio-vf610",
-	.irq_ack	= vf610_gpio_irq_ack,
-	.irq_mask	= vf610_gpio_irq_mask,
-	.irq_unmask	= vf610_gpio_irq_unmask,
-	.irq_set_type	= vf610_gpio_irq_set_type,
-	.irq_set_wake	= vf610_gpio_irq_set_wake,
-};
-
 static int vf610_gpio_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -259,6 +249,7 @@ static int vf610_gpio_probe(struct platf
 	struct vf610_gpio_port *port;
 	struct resource *iores;
 	struct gpio_chip *gc;
+	struct irq_chip *ic;
 	int i;
 	int ret;
 
@@ -295,6 +286,14 @@ static int vf610_gpio_probe(struct platf
 	gc->direction_output = vf610_gpio_direction_output;
 	gc->set = vf610_gpio_set;
 
+	ic = &port->ic;
+	ic->name = "gpio-vf610";
+	ic->irq_ack = vf610_gpio_irq_ack;
+	ic->irq_mask = vf610_gpio_irq_mask;
+	ic->irq_unmask = vf610_gpio_irq_unmask;
+	ic->irq_set_type = vf610_gpio_irq_set_type;
+	ic->irq_set_wake = vf610_gpio_irq_set_wake;
+
 	ret = gpiochip_add_data(gc, port);
 	if (ret < 0)
 		return ret;
@@ -306,14 +305,13 @@ static int vf610_gpio_probe(struct platf
 	/* Clear the interrupt status register for all GPIO's */
 	vf610_gpio_writel(~0, port->base + PORT_ISFR);
 
-	ret = gpiochip_irqchip_add(gc, &vf610_gpio_irq_chip, 0,
-				   handle_edge_irq, IRQ_TYPE_NONE);
+	ret = gpiochip_irqchip_add(gc, ic, 0, handle_edge_irq, IRQ_TYPE_NONE);
 	if (ret) {
 		dev_err(dev, "failed to add irqchip\n");
 		gpiochip_remove(gc);
 		return ret;
 	}
-	gpiochip_set_chained_irqchip(gc, &vf610_gpio_irq_chip, port->irq,
+	gpiochip_set_chained_irqchip(gc, ic, port->irq,
 				     vf610_gpio_irq_handler);
 
 	return 0;
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c linux-libre-4.19.51-gnu/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c
--- linux-libre-4.19.50-gnu/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c	2019-06-15 05:54:11.000000000 -0400
@@ -388,6 +388,10 @@ void dpp1_cnv_setup (
 	default:
 		break;
 	}
+
+	/* Set default color space based on format if none is given. */
+	color_space = input_color_space ? input_color_space : color_space;
+
 	REG_SET(CNVC_SURFACE_PIXEL_FORMAT, 0,
 			CNVC_SURFACE_PIXEL_FORMAT, pixel_format);
 	REG_UPDATE(FORMAT_CONTROL, FORMAT_CONTROL__ALPHA_EN, alpha_en);
@@ -399,7 +403,7 @@ void dpp1_cnv_setup (
 		for (i = 0; i < 12; i++)
 			tbl_entry.regval[i] = input_csc_color_matrix.matrix[i];
 
-		tbl_entry.color_space = input_color_space;
+		tbl_entry.color_space = color_space;
 
 		if (color_space >= COLOR_SPACE_YCBCR601)
 			select = INPUT_CSC_SELECT_ICSC;
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c linux-libre-4.19.51-gnu/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
--- linux-libre-4.19.50-gnu/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c	2019-06-15 05:54:11.000000000 -0400
@@ -1890,7 +1890,7 @@ static void update_dpp(struct dpp *dpp,
 			plane_state->format,
 			EXPANSION_MODE_ZERO,
 			plane_state->input_csc_color_matrix,
-			COLOR_SPACE_YCBCR601_LIMITED);
+			plane_state->color_space);
 
 	//set scale and bias registers
 	build_prescale_params(&bns_params, plane_state);
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c linux-libre-4.19.51-gnu/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
--- linux-libre-4.19.50-gnu/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c	2019-06-15 05:54:11.000000000 -0400
@@ -747,11 +747,11 @@ static void adv7511_mode_set(struct adv7
 			vsync_polarity = 1;
 	}
 
-	if (mode->vrefresh <= 24000)
+	if (drm_mode_vrefresh(mode) <= 24)
 		low_refresh_rate = ADV7511_LOW_REFRESH_RATE_24HZ;
-	else if (mode->vrefresh <= 25000)
+	else if (drm_mode_vrefresh(mode) <= 25)
 		low_refresh_rate = ADV7511_LOW_REFRESH_RATE_25HZ;
-	else if (mode->vrefresh <= 30000)
+	else if (drm_mode_vrefresh(mode) <= 30)
 		low_refresh_rate = ADV7511_LOW_REFRESH_RATE_30HZ;
 	else
 		low_refresh_rate = ADV7511_LOW_REFRESH_RATE_NONE;
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/gpu/drm/nouveau/dispnv50/disp.h linux-libre-4.19.51-gnu/drivers/gpu/drm/nouveau/dispnv50/disp.h
--- linux-libre-4.19.50-gnu/drivers/gpu/drm/nouveau/dispnv50/disp.h	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/gpu/drm/nouveau/dispnv50/disp.h	2019-06-15 05:54:11.000000000 -0400
@@ -41,6 +41,7 @@ struct nv50_disp_interlock {
 		NV50_DISP_INTERLOCK__SIZE
 	} type;
 	u32 data;
+	u32 wimm;
 };
 
 void corec37d_ntfy_init(struct nouveau_bo *, u32);
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/gpu/drm/nouveau/dispnv50/head.c linux-libre-4.19.51-gnu/drivers/gpu/drm/nouveau/dispnv50/head.c
--- linux-libre-4.19.50-gnu/drivers/gpu/drm/nouveau/dispnv50/head.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/gpu/drm/nouveau/dispnv50/head.c	2019-06-15 05:54:11.000000000 -0400
@@ -306,7 +306,7 @@ nv50_head_atomic_check(struct drm_crtc *
 			asyh->set.or = head->func->or != NULL;
 		}
 
-		if (asyh->state.mode_changed)
+		if (asyh->state.mode_changed || asyh->state.connectors_changed)
 			nv50_head_atomic_check_mode(head, asyh);
 
 		if (asyh->state.color_mgmt_changed ||
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c linux-libre-4.19.51-gnu/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c
--- linux-libre-4.19.50-gnu/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c	2019-06-15 05:54:11.000000000 -0400
@@ -75,6 +75,7 @@ wimmc37b_init_(const struct nv50_wimm_fu
 		return ret;
 	}
 
+	wndw->interlock.wimm = wndw->interlock.data;
 	wndw->immd = func;
 	return 0;
 }
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/gpu/drm/nouveau/dispnv50/wndw.c linux-libre-4.19.51-gnu/drivers/gpu/drm/nouveau/dispnv50/wndw.c
--- linux-libre-4.19.50-gnu/drivers/gpu/drm/nouveau/dispnv50/wndw.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/gpu/drm/nouveau/dispnv50/wndw.c	2019-06-15 05:54:11.000000000 -0400
@@ -151,7 +151,7 @@ nv50_wndw_flush_set(struct nv50_wndw *wn
 	if (asyw->set.point) {
 		if (asyw->set.point = false, asyw->set.mask)
 			interlock[wndw->interlock.type] |= wndw->interlock.data;
-		interlock[NV50_DISP_INTERLOCK_WIMM] |= wndw->interlock.data;
+		interlock[NV50_DISP_INTERLOCK_WIMM] |= wndw->interlock.wimm;
 
 		wndw->immd->point(wndw, asyw);
 		wndw->immd->update(wndw, interlock);
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/gpu/drm/nouveau/Kconfig linux-libre-4.19.51-gnu/drivers/gpu/drm/nouveau/Kconfig
--- linux-libre-4.19.50-gnu/drivers/gpu/drm/nouveau/Kconfig	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/gpu/drm/nouveau/Kconfig	2019-06-15 05:54:11.000000000 -0400
@@ -16,20 +16,9 @@ config DRM_NOUVEAU
 	select INPUT if ACPI && X86
 	select THERMAL if ACPI && X86
 	select ACPI_VIDEO if ACPI && X86
-	help
-	  Choose this option for open-source NVIDIA support.
-
-config NOUVEAU_LEGACY_CTX_SUPPORT
-	bool "Nouveau legacy context support"
-	depends on DRM_NOUVEAU
 	select DRM_VM
-	default y
 	help
-	  There was a version of the nouveau DDX that relied on legacy
-	  ctx ioctls not erroring out. But that was back in time a long
-	  ways, so offer a way to disable it now. For uapi compat with
-	  old nouveau ddx this should be on by default, but modern distros
-	  should consider turning it off.
+	  Choose this option for open-source NVIDIA support.
 
 config NOUVEAU_PLATFORM_DRIVER
 	bool "Nouveau (NVIDIA) SoC GPUs"
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/gpu/drm/nouveau/nouveau_drm.c linux-libre-4.19.51-gnu/drivers/gpu/drm/nouveau/nouveau_drm.c
--- linux-libre-4.19.50-gnu/drivers/gpu/drm/nouveau/nouveau_drm.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/gpu/drm/nouveau/nouveau_drm.c	2019-06-15 05:54:11.000000000 -0400
@@ -1015,11 +1015,8 @@ nouveau_driver_fops = {
 static struct drm_driver
 driver_stub = {
 	.driver_features =
-		DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | DRIVER_RENDER
-#if defined(CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT)
-		| DRIVER_KMS_LEGACY_CONTEXT
-#endif
-		,
+		DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | DRIVER_RENDER |
+		DRIVER_KMS_LEGACY_CONTEXT,
 
 	.load = nouveau_drm_load,
 	.unload = nouveau_drm_unload,
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c linux-libre-4.19.51-gnu/drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c
--- linux-libre-4.19.50-gnu/drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c	2019-06-15 05:54:11.000000000 -0400
@@ -365,8 +365,15 @@ nvkm_dp_train(struct nvkm_dp *dp, u32 da
 	 * and it's better to have a failed modeset than that.
 	 */
 	for (cfg = nvkm_dp_rates; cfg->rate; cfg++) {
-		if (cfg->nr <= outp_nr && cfg->nr <= outp_bw)
-			failsafe = cfg;
+		if (cfg->nr <= outp_nr && cfg->nr <= outp_bw) {
+			/* Try to respect sink limits too when selecting
+			 * lowest link configuration.
+			 */
+			if (!failsafe ||
+			    (cfg->nr <= sink_nr && cfg->bw <= sink_bw))
+				failsafe = cfg;
+		}
+
 		if (failsafe && cfg[1].rate < dataKBps)
 			break;
 	}
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/gpu/drm/pl111/pl111_display.c linux-libre-4.19.51-gnu/drivers/gpu/drm/pl111/pl111_display.c
--- linux-libre-4.19.50-gnu/drivers/gpu/drm/pl111/pl111_display.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/gpu/drm/pl111/pl111_display.c	2019-06-15 05:54:11.000000000 -0400
@@ -531,14 +531,15 @@ pl111_init_clock_divider(struct drm_devi
 		dev_err(drm->dev, "CLCD: unable to get clcdclk.\n");
 		return PTR_ERR(parent);
 	}
+
+	spin_lock_init(&priv->tim2_lock);
+
 	/* If the clock divider is broken, use the parent directly */
 	if (priv->variant->broken_clockdivider) {
 		priv->clk = parent;
 		return 0;
 	}
 	parent_name = __clk_get_name(parent);
-
-	spin_lock_init(&priv->tim2_lock);
 	div->init = &init;
 
 	ret = devm_clk_hw_register(drm->dev, div);
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/gpu/drm/vc4/vc4_plane.c linux-libre-4.19.51-gnu/drivers/gpu/drm/vc4/vc4_plane.c
--- linux-libre-4.19.50-gnu/drivers/gpu/drm/vc4/vc4_plane.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/gpu/drm/vc4/vc4_plane.c	2019-06-15 05:54:11.000000000 -0400
@@ -818,6 +818,7 @@ static void vc4_plane_atomic_async_updat
 		drm_atomic_set_fb_for_plane(plane->state, state->fb);
 	}
 
+	swap(plane->state->fb, state->fb);
 	/* Set the cursor's position on the screen.  This is the
 	 * expected change from the drm_mode_cursor_universal()
 	 * helper.
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/iommu/arm-smmu-v3.c linux-libre-4.19.51-gnu/drivers/iommu/arm-smmu-v3.c
--- linux-libre-4.19.50-gnu/drivers/iommu/arm-smmu-v3.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/iommu/arm-smmu-v3.c	2019-06-15 05:54:11.000000000 -0400
@@ -2414,13 +2414,9 @@ static int arm_smmu_device_reset(struct
 	/* Clear CR0 and sync (disables SMMU and queue processing) */
 	reg = readl_relaxed(smmu->base + ARM_SMMU_CR0);
 	if (reg & CR0_SMMUEN) {
-		if (is_kdump_kernel()) {
-			arm_smmu_update_gbpa(smmu, GBPA_ABORT, 0);
-			arm_smmu_device_disable(smmu);
-			return -EBUSY;
-		}
-
 		dev_warn(smmu->dev, "SMMU currently enabled! Resetting...\n");
+		WARN_ON(is_kdump_kernel() && !disable_bypass);
+		arm_smmu_update_gbpa(smmu, GBPA_ABORT, 0);
 	}
 
 	ret = arm_smmu_device_disable(smmu);
@@ -2513,6 +2509,8 @@ static int arm_smmu_device_reset(struct
 		return ret;
 	}
 
+	if (is_kdump_kernel())
+		enables &= ~(CR0_EVTQEN | CR0_PRIQEN);
 
 	/* Enable the SMMU interface, or ensure bypass */
 	if (!bypass || disable_bypass) {
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/iommu/intel-iommu.c linux-libre-4.19.51-gnu/drivers/iommu/intel-iommu.c
--- linux-libre-4.19.50-gnu/drivers/iommu/intel-iommu.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/iommu/intel-iommu.c	2019-06-15 05:54:11.000000000 -0400
@@ -4033,9 +4033,7 @@ static void __init init_no_remapping_dev
 
 		/* This IOMMU has *only* gfx devices. Either bypass it or
 		   set the gfx_mapped flag, as appropriate */
-		if (dmar_map_gfx) {
-			intel_iommu_gfx_mapped = 1;
-		} else {
+		if (!dmar_map_gfx) {
 			drhd->ignored = 1;
 			for_each_active_dev_scope(drhd->devices,
 						  drhd->devices_cnt, i, dev)
@@ -4831,6 +4829,9 @@ int __init intel_iommu_init(void)
 		goto out_free_reserved_range;
 	}
 
+	if (dmar_map_gfx)
+		intel_iommu_gfx_mapped = 1;
+
 	init_no_remapping_devices();
 
 	ret = init_dmars();
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/mailbox/stm32-ipcc.c linux-libre-4.19.51-gnu/drivers/mailbox/stm32-ipcc.c
--- linux-libre-4.19.50-gnu/drivers/mailbox/stm32-ipcc.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/mailbox/stm32-ipcc.c	2019-06-15 05:54:11.000000000 -0400
@@ -8,9 +8,9 @@
 #include <linux/bitfield.h>
 #include <linux/clk.h>
 #include <linux/interrupt.h>
+#include <linux/io.h>
 #include <linux/mailbox_controller.h>
 #include <linux/module.h>
-#include <linux/of_irq.h>
 #include <linux/platform_device.h>
 #include <linux/pm_wakeirq.h>
 
@@ -240,9 +240,11 @@ static int stm32_ipcc_probe(struct platf
 
 	/* irq */
 	for (i = 0; i < IPCC_IRQ_NUM; i++) {
-		ipcc->irqs[i] = of_irq_get_byname(dev->of_node, irq_name[i]);
+		ipcc->irqs[i] = platform_get_irq_byname(pdev, irq_name[i]);
 		if (ipcc->irqs[i] < 0) {
-			dev_err(dev, "no IRQ specified %s\n", irq_name[i]);
+			if (ipcc->irqs[i] != -EPROBE_DEFER)
+				dev_err(dev, "no IRQ specified %s\n",
+					irq_name[i]);
 			ret = ipcc->irqs[i];
 			goto err_clk;
 		}
@@ -263,9 +265,10 @@ static int stm32_ipcc_probe(struct platf
 
 	/* wakeup */
 	if (of_property_read_bool(np, "wakeup-source")) {
-		ipcc->wkp = of_irq_get_byname(dev->of_node, "wakeup");
+		ipcc->wkp = platform_get_irq_byname(pdev, "wakeup");
 		if (ipcc->wkp < 0) {
-			dev_err(dev, "could not get wakeup IRQ\n");
+			if (ipcc->wkp != -EPROBE_DEFER)
+				dev_err(dev, "could not get wakeup IRQ\n");
 			ret = ipcc->wkp;
 			goto err_clk;
 		}
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/mfd/intel-lpss.c linux-libre-4.19.51-gnu/drivers/mfd/intel-lpss.c
--- linux-libre-4.19.50-gnu/drivers/mfd/intel-lpss.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/mfd/intel-lpss.c	2019-06-15 05:54:11.000000000 -0400
@@ -273,6 +273,9 @@ static void intel_lpss_init_dev(const st
 {
 	u32 value = LPSS_PRIV_SSP_REG_DIS_DMA_FIN;
 
+	/* Set the device in reset state */
+	writel(0, lpss->priv + LPSS_PRIV_RESETS);
+
 	intel_lpss_deassert_reset(lpss);
 
 	intel_lpss_set_remap_addr(lpss);
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/mfd/tps65912-spi.c linux-libre-4.19.51-gnu/drivers/mfd/tps65912-spi.c
--- linux-libre-4.19.50-gnu/drivers/mfd/tps65912-spi.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/mfd/tps65912-spi.c	2019-06-15 05:54:11.000000000 -0400
@@ -27,6 +27,7 @@ static const struct of_device_id tps6591
 	{ .compatible = "ti,tps65912", },
 	{ /* sentinel */ }
 };
+MODULE_DEVICE_TABLE(of, tps65912_spi_of_match_table);
 
 static int tps65912_spi_probe(struct spi_device *spi)
 {
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/mfd/twl6040.c linux-libre-4.19.51-gnu/drivers/mfd/twl6040.c
--- linux-libre-4.19.50-gnu/drivers/mfd/twl6040.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/mfd/twl6040.c	2019-06-15 05:54:11.000000000 -0400
@@ -322,8 +322,19 @@ int twl6040_power(struct twl6040 *twl604
 			}
 		}
 
+		/*
+		 * Register access can produce errors after power-up unless we
+		 * wait at least 8ms based on measurements on duovero.
+		 */
+		usleep_range(10000, 12000);
+
 		/* Sync with the HW */
-		regcache_sync(twl6040->regmap);
+		ret = regcache_sync(twl6040->regmap);
+		if (ret) {
+			dev_err(twl6040->dev, "Failed to sync with the HW: %i\n",
+				ret);
+			goto out;
+		}
 
 		/* Default PLL configuration after power up */
 		twl6040->pll = TWL6040_SYSCLK_SEL_LPPLL;
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/misc/pci_endpoint_test.c linux-libre-4.19.51-gnu/drivers/misc/pci_endpoint_test.c
--- linux-libre-4.19.50-gnu/drivers/misc/pci_endpoint_test.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/misc/pci_endpoint_test.c	2019-06-15 05:54:11.000000000 -0400
@@ -662,6 +662,7 @@ static int pci_endpoint_test_probe(struc
 	data = (struct pci_endpoint_test_data *)ent->driver_data;
 	if (data) {
 		test_reg_bar = data->test_reg_bar;
+		test->test_reg_bar = test_reg_bar;
 		test->alignment = data->alignment;
 		irq_type = data->irq_type;
 	}
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/mmc/host/mmci.c linux-libre-4.19.51-gnu/drivers/mmc/host/mmci.c
--- linux-libre-4.19.50-gnu/drivers/mmc/host/mmci.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/mmc/host/mmci.c	2019-06-15 05:54:11.000000000 -0400
@@ -1295,9 +1295,10 @@ static irqreturn_t mmci_irq(int irq, voi
 		}
 
 		/*
-		 * Don't poll for busy completion in irq context.
+		 * Busy detection has been handled by mmci_cmd_irq() above.
+		 * Clear the status bit to prevent polling in IRQ context.
 		 */
-		if (host->variant->busy_detect && host->busy_status)
+		if (host->variant->busy_detect_flag)
 			status &= ~host->variant->busy_detect_flag;
 
 		ret = 1;
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c linux-libre-4.19.51-gnu/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
--- linux-libre-4.19.50-gnu/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c	2019-06-15 05:54:11.000000000 -0400
@@ -4300,8 +4300,11 @@ int hclge_add_uc_addr_common(struct hclg
 		return hclge_add_mac_vlan_tbl(vport, &req, NULL);
 
 	/* check if we just hit the duplicate */
-	if (!ret)
-		ret = -EINVAL;
+	if (!ret) {
+		dev_warn(&hdev->pdev->dev, "VF %d mac(%pM) exists\n",
+			 vport->vport_id, addr);
+		return 0;
+	}
 
 	dev_err(&hdev->pdev->dev,
 		"PF failed to add unicast entry(%pM) in the MAC table\n",
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/net/ethernet/intel/i40e/i40e_main.c linux-libre-4.19.51-gnu/drivers/net/ethernet/intel/i40e/i40e_main.c
--- linux-libre-4.19.50-gnu/drivers/net/ethernet/intel/i40e/i40e_main.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/net/ethernet/intel/i40e/i40e_main.c	2019-06-15 05:54:11.000000000 -0400
@@ -6758,10 +6758,12 @@ static int i40e_setup_tc(struct net_devi
 	struct i40e_pf *pf = vsi->back;
 	u8 enabled_tc = 0, num_tc, hw;
 	bool need_reset = false;
+	int old_queue_pairs;
 	int ret = -EINVAL;
 	u16 mode;
 	int i;
 
+	old_queue_pairs = vsi->num_queue_pairs;
 	num_tc = mqprio_qopt->qopt.num_tc;
 	hw = mqprio_qopt->qopt.hw;
 	mode = mqprio_qopt->mode;
@@ -6862,6 +6864,7 @@ config_tc:
 		}
 		ret = i40e_configure_queue_channels(vsi);
 		if (ret) {
+			vsi->num_queue_pairs = old_queue_pairs;
 			netdev_info(netdev,
 				    "Failed configuring queue channels\n");
 			need_reset = true;
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/net/ethernet/intel/ice/ice_main.c linux-libre-4.19.51-gnu/drivers/net/ethernet/intel/ice/ice_main.c
--- linux-libre-4.19.50-gnu/drivers/net/ethernet/intel/ice/ice_main.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/net/ethernet/intel/ice/ice_main.c	2019-06-15 05:54:11.000000000 -0400
@@ -652,6 +652,9 @@ void ice_print_link_msg(struct ice_vsi *
 	case ICE_FC_RX_PAUSE:
 		fc = "RX";
 		break;
+	case ICE_FC_NONE:
+		fc = "None";
+		break;
 	default:
 		fc = "Unknown";
 		break;
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/net/thunderbolt.c linux-libre-4.19.51-gnu/drivers/net/thunderbolt.c
--- linux-libre-4.19.50-gnu/drivers/net/thunderbolt.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/net/thunderbolt.c	2019-06-15 05:54:11.000000000 -0400
@@ -1285,6 +1285,7 @@ static int __maybe_unused tbnet_suspend(
 		tbnet_tear_down(net, true);
 	}
 
+	tb_unregister_protocol_handler(&net->handler);
 	return 0;
 }
 
@@ -1293,6 +1294,8 @@ static int __maybe_unused tbnet_resume(s
 	struct tb_service *svc = tb_to_service(dev);
 	struct tbnet *net = tb_service_get_drvdata(svc);
 
+	tb_register_protocol_handler(&net->handler);
+
 	netif_carrier_off(net->dev);
 	if (netif_running(net->dev)) {
 		netif_device_attach(net->dev);
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/nvme/host/pci.c linux-libre-4.19.51-gnu/drivers/nvme/host/pci.c
--- linux-libre-4.19.50-gnu/drivers/nvme/host/pci.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/nvme/host/pci.c	2019-06-15 05:54:11.000000000 -0400
@@ -1132,6 +1132,7 @@ static enum blk_eh_timer_return nvme_tim
 	struct nvme_dev *dev = nvmeq->dev;
 	struct request *abort_req;
 	struct nvme_command cmd;
+	bool shutdown = false;
 	u32 csts = readl(dev->bar + NVME_REG_CSTS);
 
 	/* If PCI error recovery process is happening, we cannot reset or
@@ -1168,12 +1169,14 @@ static enum blk_eh_timer_return nvme_tim
 	 * shutdown, so we return BLK_EH_DONE.
 	 */
 	switch (dev->ctrl.state) {
+	case NVME_CTRL_DELETING:
+		shutdown = true;
 	case NVME_CTRL_CONNECTING:
 	case NVME_CTRL_RESETTING:
 		dev_warn_ratelimited(dev->ctrl.device,
 			 "I/O %d QID %d timeout, disable controller\n",
 			 req->tag, nvmeq->qid);
-		nvme_dev_disable(dev, false);
+		nvme_dev_disable(dev, shutdown);
 		nvme_req(req)->flags |= NVME_REQ_CANCELLED;
 		return BLK_EH_DONE;
 	default:
@@ -2187,8 +2190,11 @@ static void nvme_dev_disable(struct nvme
 	 * must flush all entered requests to their failed completion to avoid
 	 * deadlocking blk-mq hot-cpu notifier.
 	 */
-	if (shutdown)
+	if (shutdown) {
 		nvme_start_queues(&dev->ctrl);
+		if (dev->ctrl.admin_q && !blk_queue_dying(dev->ctrl.admin_q))
+			blk_mq_unquiesce_queue(dev->ctrl.admin_q);
+	}
 	mutex_unlock(&dev->shutdown_lock);
 }
 
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/nvmem/core.c linux-libre-4.19.51-gnu/drivers/nvmem/core.c
--- linux-libre-4.19.50-gnu/drivers/nvmem/core.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/nvmem/core.c	2019-06-15 05:54:11.000000000 -0400
@@ -1028,7 +1028,7 @@ EXPORT_SYMBOL_GPL(nvmem_cell_put);
 static void nvmem_shift_read_buffer_in_place(struct nvmem_cell *cell, void *buf)
 {
 	u8 *p, *b;
-	int i, bit_offset = cell->bit_offset;
+	int i, extra, bit_offset = cell->bit_offset;
 
 	p = b = buf;
 	if (bit_offset) {
@@ -1043,11 +1043,16 @@ static void nvmem_shift_read_buffer_in_p
 			p = b;
 			*b++ >>= bit_offset;
 		}
-
-		/* result fits in less bytes */
-		if (cell->bytes != DIV_ROUND_UP(cell->nbits, BITS_PER_BYTE))
-			*p-- = 0;
+	} else {
+		/* point to the msb */
+		p += cell->bytes - 1;
 	}
+
+	/* result fits in less bytes */
+	extra = cell->bytes - DIV_ROUND_UP(cell->nbits, BITS_PER_BYTE);
+	while (--extra >= 0)
+		*p-- = 0;
+
 	/* clear msb bits if any leftover in the last byte */
 	*p &= GENMASK((cell->nbits%BITS_PER_BYTE) - 1, 0);
 }
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/nvmem/sunxi_sid.c linux-libre-4.19.51-gnu/drivers/nvmem/sunxi_sid.c
--- linux-libre-4.19.50-gnu/drivers/nvmem/sunxi_sid.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/nvmem/sunxi_sid.c	2019-06-15 05:54:11.000000000 -0400
@@ -235,8 +235,10 @@ static const struct sunxi_sid_cfg sun50i
 static const struct of_device_id sunxi_sid_of_match[] = {
 	{ .compatible = "allwinner,sun4i-a10-sid", .data = &sun4i_a10_cfg },
 	{ .compatible = "allwinner,sun7i-a20-sid", .data = &sun7i_a20_cfg },
+	{ .compatible = "allwinner,sun8i-a83t-sid", .data = &sun50i_a64_cfg },
 	{ .compatible = "allwinner,sun8i-h3-sid", .data = &sun8i_h3_cfg },
 	{ .compatible = "allwinner,sun50i-a64-sid", .data = &sun50i_a64_cfg },
+	{ .compatible = "allwinner,sun50i-h5-sid", .data = &sun50i_a64_cfg },
 	{/* sentinel */},
 };
 MODULE_DEVICE_TABLE(of, sunxi_sid_of_match);
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/pci/controller/dwc/pcie-designware-ep.c linux-libre-4.19.51-gnu/drivers/pci/controller/dwc/pcie-designware-ep.c
--- linux-libre-4.19.50-gnu/drivers/pci/controller/dwc/pcie-designware-ep.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/pci/controller/dwc/pcie-designware-ep.c	2019-06-15 05:54:11.000000000 -0400
@@ -385,6 +385,7 @@ int dw_pcie_ep_raise_msi_irq(struct dw_p
 {
 	struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
 	struct pci_epc *epc = ep->epc;
+	unsigned int aligned_offset;
 	u16 msg_ctrl, msg_data;
 	u32 msg_addr_lower, msg_addr_upper, reg;
 	u64 msg_addr;
@@ -410,13 +411,15 @@ int dw_pcie_ep_raise_msi_irq(struct dw_p
 		reg = ep->msi_cap + PCI_MSI_DATA_32;
 		msg_data = dw_pcie_readw_dbi(pci, reg);
 	}
-	msg_addr = ((u64) msg_addr_upper) << 32 | msg_addr_lower;
+	aligned_offset = msg_addr_lower & (epc->mem->page_size - 1);
+	msg_addr = ((u64)msg_addr_upper) << 32 |
+			(msg_addr_lower & ~aligned_offset);
 	ret = dw_pcie_ep_map_addr(epc, func_no, ep->msi_mem_phys, msg_addr,
 				  epc->mem->page_size);
 	if (ret)
 		return ret;
 
-	writel(msg_data | (interrupt_num - 1), ep->msi_mem);
+	writel(msg_data | (interrupt_num - 1), ep->msi_mem + aligned_offset);
 
 	dw_pcie_ep_unmap_addr(epc, func_no, ep->msi_mem_phys);
 
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/pci/controller/dwc/pcie-designware.h linux-libre-4.19.51-gnu/drivers/pci/controller/dwc/pcie-designware.h
--- linux-libre-4.19.50-gnu/drivers/pci/controller/dwc/pcie-designware.h	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/pci/controller/dwc/pcie-designware.h	2019-06-15 05:54:11.000000000 -0400
@@ -164,6 +164,7 @@ struct pcie_port {
 	struct irq_domain	*irq_domain;
 	struct irq_domain	*msi_domain;
 	dma_addr_t		msi_data;
+	struct page		*msi_page;
 	u32			num_vectors;
 	u32			irq_status[MAX_MSI_CTRLS];
 	raw_spinlock_t		lock;
diff -druNp --no-dereference linux-libre-4.19.50-gnu/drivers/pci/controller/dwc/pcie-designware-host.c linux-libre-4.19.51-gnu/drivers/pci/controller/dwc/pcie-designware-host.c
--- linux-libre-4.19.50-gnu/drivers/pci/controller/dwc/pcie-designware-host.c	2019-06-11 06:20:57.000000000 -0400
+++ linux-libre-4.19.51-gnu/drivers/pci/controller/dwc/pcie-designware-host.c	2019-06-15 05:54:11.000000000 -0400
@@ -303,20 +303,24 @@ void dw_pcie_free_msi(struct pcie_port *
 
 	irq_domain_remove(pp->msi_domain);
 	irq_domain_remove(pp->irq_domain);
+
+	if (pp->msi_page)
+		__free_page(pp->msi_page);
 }
 
 void dw_pcie_msi_init(struct pcie_port *pp)
 {
 	struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
 	struct device *dev = pci->dev;
-	struct page *page;
 	u64 msi_target;
 
-	page = alloc_page(GFP_KERNEL);
-	pp->msi_data = dma_map_page(dev, page, 0, PAGE_SIZE, DMA_FROM_DEVICE);
+	pp->msi_page = alloc_page(GFP_KERNEL);
+	pp->msi_data = dma_map_page(dev, pp->msi_page, 0, PAGE_SIZE,
+				    DMA_FROM_DEVICE);
 	if (dma_mapping_error(dev, pp->msi_data)) {
 		dev_err(dev, "Failed to map MSI data\n");
-