]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Jan 2025 15:08:34 +0000 (16:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Jan 2025 15:08:34 +0000 (16:08 +0100)
added patches:
drm-i915-fb-relax-clear-color-alignment-to-64-bytes.patch
hrtimers-handle-cpu-state-correctly-on-hotplug.patch
irqchip-gic-v3-handle-cpu_pm_enter_failed-correctly.patch
irqchip-gic-v3-its-don-t-enable-interrupts-in-its_irq_set_vcpu_affinity.patch
irqchip-plug-a-of-node-reference-leak-in-platform_irqchip_probe.patch
pmdomain-imx8mp-blk-ctrl-add-missing-loop-break-condition.patch
revert-pci-use-preserve_config-in-place-of-pci_flags.patch

queue-6.1/drm-i915-fb-relax-clear-color-alignment-to-64-bytes.patch [new file with mode: 0644]
queue-6.1/hrtimers-handle-cpu-state-correctly-on-hotplug.patch [new file with mode: 0644]
queue-6.1/irqchip-gic-v3-handle-cpu_pm_enter_failed-correctly.patch [new file with mode: 0644]
queue-6.1/irqchip-gic-v3-its-don-t-enable-interrupts-in-its_irq_set_vcpu_affinity.patch [new file with mode: 0644]
queue-6.1/irqchip-plug-a-of-node-reference-leak-in-platform_irqchip_probe.patch [new file with mode: 0644]
queue-6.1/pmdomain-imx8mp-blk-ctrl-add-missing-loop-break-condition.patch [new file with mode: 0644]
queue-6.1/revert-pci-use-preserve_config-in-place-of-pci_flags.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/drm-i915-fb-relax-clear-color-alignment-to-64-bytes.patch b/queue-6.1/drm-i915-fb-relax-clear-color-alignment-to-64-bytes.patch
new file mode 100644 (file)
index 0000000..045db01
--- /dev/null
@@ -0,0 +1,62 @@
+From 1a5401ec3018c101c456cdbda2eaef9482db6786 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
+Date: Fri, 29 Nov 2024 08:50:11 +0200
+Subject: drm/i915/fb: Relax clear color alignment to 64 bytes
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Ville Syrjälä <ville.syrjala@linux.intel.com>
+
+commit 1a5401ec3018c101c456cdbda2eaef9482db6786 upstream.
+
+Mesa changed its clear color alignment from 4k to 64 bytes
+without informing the kernel side about the change. This
+is now likely to cause framebuffer creation to fail.
+
+The only thing we do with the clear color buffer in i915 is:
+1. map a single page
+2. read out bytes 16-23 from said page
+3. unmap the page
+
+So the only requirement we really have is that those 8 bytes
+are all contained within one page. Thus we can deal with the
+Mesa regression by reducing the alignment requiment from 4k
+to the same 64 bytes in the kernel. We could even go as low as
+32 bytes, but IIRC 64 bytes is the hardware requirement on
+the 3D engine side so matching that seems sensible.
+
+Note that the Mesa alignment chages were partially undone
+so the regression itself was already fixed on userspace
+side.
+
+Cc: stable@vger.kernel.org
+Cc: Sagar Ghuge <sagar.ghuge@intel.com>
+Cc: Nanley Chery <nanley.g.chery@intel.com>
+Reported-by: Xi Ruoyao <xry111@xry111.site>
+Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13057
+Closes: https://lore.kernel.org/all/45a5bba8de009347262d86a4acb27169d9ae0d9f.camel@xry111.site/
+Link: https://gitlab.freedesktop.org/mesa/mesa/-/commit/17f97a69c13832a6c1b0b3aad45b06f07d4b852f
+Link: https://gitlab.freedesktop.org/mesa/mesa/-/commit/888f63cf1baf34bc95e847a30a041dc7798edddb
+Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20241129065014.8363-2-ville.syrjala@linux.intel.com
+Tested-by: Xi Ruoyao <xry111@xry111.site>
+Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
+(cherry picked from commit ed3a892e5e3d6b3f6eeb76db7c92a968aeb52f3d)
+Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/i915/display/intel_fb.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/i915/display/intel_fb.c
++++ b/drivers/gpu/drm/i915/display/intel_fb.c
+@@ -1571,7 +1571,7 @@ int intel_fill_fb_info(struct drm_i915_p
+                * arithmetic related to alignment and offset calculation.
+                */
+               if (is_gen12_ccs_cc_plane(&fb->base, i)) {
+-                      if (IS_ALIGNED(fb->base.offsets[i], PAGE_SIZE))
++                      if (IS_ALIGNED(fb->base.offsets[i], 64))
+                               continue;
+                       else
+                               return -EINVAL;
diff --git a/queue-6.1/hrtimers-handle-cpu-state-correctly-on-hotplug.patch b/queue-6.1/hrtimers-handle-cpu-state-correctly-on-hotplug.patch
new file mode 100644 (file)
index 0000000..6fdb008
--- /dev/null
@@ -0,0 +1,101 @@
+From 2f8dea1692eef2b7ba6a256246ed82c365fdc686 Mon Sep 17 00:00:00 2001
+From: Koichiro Den <koichiro.den@canonical.com>
+Date: Fri, 20 Dec 2024 22:44:21 +0900
+Subject: hrtimers: Handle CPU state correctly on hotplug
+
+From: Koichiro Den <koichiro.den@canonical.com>
+
+commit 2f8dea1692eef2b7ba6a256246ed82c365fdc686 upstream.
+
+Consider a scenario where a CPU transitions from CPUHP_ONLINE to halfway
+through a CPU hotunplug down to CPUHP_HRTIMERS_PREPARE, and then back to
+CPUHP_ONLINE:
+
+Since hrtimers_prepare_cpu() does not run, cpu_base.hres_active remains set
+to 1 throughout. However, during a CPU unplug operation, the tick and the
+clockevents are shut down at CPUHP_AP_TICK_DYING. On return to the online
+state, for instance CFS incorrectly assumes that the hrtick is already
+active, and the chance of the clockevent device to transition to oneshot
+mode is also lost forever for the CPU, unless it goes back to a lower state
+than CPUHP_HRTIMERS_PREPARE once.
+
+This round-trip reveals another issue; cpu_base.online is not set to 1
+after the transition, which appears as a WARN_ON_ONCE in enqueue_hrtimer().
+
+Aside of that, the bulk of the per CPU state is not reset either, which
+means there are dangling pointers in the worst case.
+
+Address this by adding a corresponding startup() callback, which resets the
+stale per CPU state and sets the online flag.
+
+[ tglx: Make the new callback unconditionally available, remove the online
+       modification in the prepare() callback and clear the remaining
+       state in the starting callback instead of the prepare callback ]
+
+Fixes: 5c0930ccaad5 ("hrtimers: Push pending hrtimers away from outgoing CPU earlier")
+Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/all/20241220134421.3809834-1-koichiro.den@canonical.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/linux/hrtimer.h |    1 +
+ kernel/cpu.c            |    2 +-
+ kernel/time/hrtimer.c   |   11 ++++++++++-
+ 3 files changed, 12 insertions(+), 2 deletions(-)
+
+--- a/include/linux/hrtimer.h
++++ b/include/linux/hrtimer.h
+@@ -532,6 +532,7 @@ extern void __init hrtimers_init(void);
+ extern void sysrq_timer_list_show(void);
+ int hrtimers_prepare_cpu(unsigned int cpu);
++int hrtimers_cpu_starting(unsigned int cpu);
+ #ifdef CONFIG_HOTPLUG_CPU
+ int hrtimers_cpu_dying(unsigned int cpu);
+ #else
+--- a/kernel/cpu.c
++++ b/kernel/cpu.c
+@@ -1824,7 +1824,7 @@ static struct cpuhp_step cpuhp_hp_states
+       },
+       [CPUHP_AP_HRTIMERS_DYING] = {
+               .name                   = "hrtimers:dying",
+-              .startup.single         = NULL,
++              .startup.single         = hrtimers_cpu_starting,
+               .teardown.single        = hrtimers_cpu_dying,
+       },
+--- a/kernel/time/hrtimer.c
++++ b/kernel/time/hrtimer.c
+@@ -2177,6 +2177,15 @@ int hrtimers_prepare_cpu(unsigned int cp
+       }
+       cpu_base->cpu = cpu;
++      hrtimer_cpu_base_init_expiry_lock(cpu_base);
++      return 0;
++}
++
++int hrtimers_cpu_starting(unsigned int cpu)
++{
++      struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases);
++
++      /* Clear out any left over state from a CPU down operation */
+       cpu_base->active_bases = 0;
+       cpu_base->hres_active = 0;
+       cpu_base->hang_detected = 0;
+@@ -2185,7 +2194,6 @@ int hrtimers_prepare_cpu(unsigned int cp
+       cpu_base->expires_next = KTIME_MAX;
+       cpu_base->softirq_expires_next = KTIME_MAX;
+       cpu_base->online = 1;
+-      hrtimer_cpu_base_init_expiry_lock(cpu_base);
+       return 0;
+ }
+@@ -2263,6 +2271,7 @@ int hrtimers_cpu_dying(unsigned int dyin
+ void __init hrtimers_init(void)
+ {
+       hrtimers_prepare_cpu(smp_processor_id());
++      hrtimers_cpu_starting(smp_processor_id());
+       open_softirq(HRTIMER_SOFTIRQ, hrtimer_run_softirq);
+ }
diff --git a/queue-6.1/irqchip-gic-v3-handle-cpu_pm_enter_failed-correctly.patch b/queue-6.1/irqchip-gic-v3-handle-cpu_pm_enter_failed-correctly.patch
new file mode 100644 (file)
index 0000000..67086df
--- /dev/null
@@ -0,0 +1,46 @@
+From 0d62a49ab55c99e8deb4593b8d9f923de1ab5c18 Mon Sep 17 00:00:00 2001
+From: Yogesh Lal <quic_ylal@quicinc.com>
+Date: Fri, 20 Dec 2024 15:09:07 +0530
+Subject: irqchip/gic-v3: Handle CPU_PM_ENTER_FAILED correctly
+
+From: Yogesh Lal <quic_ylal@quicinc.com>
+
+commit 0d62a49ab55c99e8deb4593b8d9f923de1ab5c18 upstream.
+
+When a CPU attempts to enter low power mode, it disables the redistributor
+and Group 1 interrupts and reinitializes the system registers upon wakeup.
+
+If the transition into low power mode fails, then the CPU_PM framework
+invokes the PM notifier callback with CPU_PM_ENTER_FAILED to allow the
+drivers to undo the state changes.
+
+The GIC V3 driver ignores CPU_PM_ENTER_FAILED, which leaves the GIC in
+disabled state.
+
+Handle CPU_PM_ENTER_FAILED in the same way as CPU_PM_EXIT to restore normal
+operation.
+
+[ tglx: Massage change log, add Fixes tag ]
+
+Fixes: 3708d52fc6bb ("irqchip: gic-v3: Implement CPU PM notifier")
+Signed-off-by: Yogesh Lal <quic_ylal@quicinc.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Acked-by: Marc Zyngier <maz@kernel.org>
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/all/20241220093907.2747601-1-quic_ylal@quicinc.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/irqchip/irq-gic-v3.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/irqchip/irq-gic-v3.c
++++ b/drivers/irqchip/irq-gic-v3.c
+@@ -1424,7 +1424,7 @@ static int gic_retrigger(struct irq_data
+ static int gic_cpu_pm_notifier(struct notifier_block *self,
+                              unsigned long cmd, void *v)
+ {
+-      if (cmd == CPU_PM_EXIT) {
++      if (cmd == CPU_PM_EXIT || cmd == CPU_PM_ENTER_FAILED) {
+               if (gic_dist_security_disabled())
+                       gic_enable_redist(true);
+               gic_cpu_sys_reg_init();
diff --git a/queue-6.1/irqchip-gic-v3-its-don-t-enable-interrupts-in-its_irq_set_vcpu_affinity.patch b/queue-6.1/irqchip-gic-v3-its-don-t-enable-interrupts-in-its_irq_set_vcpu_affinity.patch
new file mode 100644 (file)
index 0000000..789dfaa
--- /dev/null
@@ -0,0 +1,48 @@
+From 35cb2c6ce7da545f3b5cb1e6473ad7c3a6f08310 Mon Sep 17 00:00:00 2001
+From: Tomas Krcka <krckatom@amazon.de>
+Date: Mon, 30 Dec 2024 15:08:25 +0000
+Subject: irqchip/gic-v3-its: Don't enable interrupts in its_irq_set_vcpu_affinity()
+
+From: Tomas Krcka <krckatom@amazon.de>
+
+commit 35cb2c6ce7da545f3b5cb1e6473ad7c3a6f08310 upstream.
+
+The following call-chain leads to enabling interrupts in a nested interrupt
+disabled section:
+
+irq_set_vcpu_affinity()
+  irq_get_desc_lock()
+     raw_spin_lock_irqsave()   <--- Disable interrupts
+  its_irq_set_vcpu_affinity()
+     guard(raw_spinlock_irq)   <--- Enables interrupts when leaving the guard()
+  irq_put_desc_unlock()        <--- Warns because interrupts are enabled
+
+This was broken in commit b97e8a2f7130, which replaced the original
+raw_spin_[un]lock() pair with guard(raw_spinlock_irq).
+
+Fix the issue by using guard(raw_spinlock).
+
+[ tglx: Massaged change log ]
+
+Fixes: b97e8a2f7130 ("irqchip/gic-v3-its: Fix potential race condition in its_vlpi_prop_update()")
+Signed-off-by: Tomas Krcka <krckatom@amazon.de>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Marc Zyngier <maz@kernel.org>
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/all/20241230150825.62894-1-krckatom@amazon.de
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/irqchip/irq-gic-v3-its.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/irqchip/irq-gic-v3-its.c
++++ b/drivers/irqchip/irq-gic-v3-its.c
+@@ -1967,7 +1967,7 @@ static int its_irq_set_vcpu_affinity(str
+       if (!is_v4(its_dev->its))
+               return -EINVAL;
+-      guard(raw_spinlock_irq)(&its_dev->event_map.vlpi_lock);
++      guard(raw_spinlock)(&its_dev->event_map.vlpi_lock);
+       /* Unmap request? */
+       if (!info)
diff --git a/queue-6.1/irqchip-plug-a-of-node-reference-leak-in-platform_irqchip_probe.patch b/queue-6.1/irqchip-plug-a-of-node-reference-leak-in-platform_irqchip_probe.patch
new file mode 100644 (file)
index 0000000..f5dd81e
--- /dev/null
@@ -0,0 +1,48 @@
+From 9322d1915f9d976ee48c09d800fbd5169bc2ddcc Mon Sep 17 00:00:00 2001
+From: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
+Date: Sun, 15 Dec 2024 12:39:45 +0900
+Subject: irqchip: Plug a OF node reference leak in platform_irqchip_probe()
+
+From: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
+
+commit 9322d1915f9d976ee48c09d800fbd5169bc2ddcc upstream.
+
+platform_irqchip_probe() leaks a OF node when irq_init_cb() fails. Fix it
+by declaring par_np with the __free(device_node) cleanup construct.
+
+This bug was found by an experimental static analysis tool that I am
+developing.
+
+Fixes: f8410e626569 ("irqchip: Add IRQCHIP_PLATFORM_DRIVER_BEGIN/END and IRQCHIP_MATCH helper macros")
+Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/all/20241215033945.3414223-1-joe@pf.is.s.u-tokyo.ac.jp
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/irqchip/irqchip.c |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/irqchip/irqchip.c
++++ b/drivers/irqchip/irqchip.c
+@@ -35,11 +35,10 @@ void __init irqchip_init(void)
+ int platform_irqchip_probe(struct platform_device *pdev)
+ {
+       struct device_node *np = pdev->dev.of_node;
+-      struct device_node *par_np = of_irq_find_parent(np);
++      struct device_node *par_np __free(device_node) = of_irq_find_parent(np);
+       of_irq_init_cb_t irq_init_cb = of_device_get_match_data(&pdev->dev);
+       if (!irq_init_cb) {
+-              of_node_put(par_np);
+               return -EINVAL;
+       }
+@@ -55,7 +54,6 @@ int platform_irqchip_probe(struct platfo
+        * interrupt controller can check for specific domains as necessary.
+        */
+       if (par_np && !irq_find_matching_host(par_np, DOMAIN_BUS_ANY)) {
+-              of_node_put(par_np);
+               return -EPROBE_DEFER;
+       }
diff --git a/queue-6.1/pmdomain-imx8mp-blk-ctrl-add-missing-loop-break-condition.patch b/queue-6.1/pmdomain-imx8mp-blk-ctrl-add-missing-loop-break-condition.patch
new file mode 100644 (file)
index 0000000..70763cd
--- /dev/null
@@ -0,0 +1,66 @@
+From 726efa92e02b460811e8bc6990dd742f03b645ea Mon Sep 17 00:00:00 2001
+From: Xiaolei Wang <xiaolei.wang@windriver.com>
+Date: Wed, 15 Jan 2025 09:41:18 +0800
+Subject: pmdomain: imx8mp-blk-ctrl: add missing loop break condition
+
+From: Xiaolei Wang <xiaolei.wang@windriver.com>
+
+commit 726efa92e02b460811e8bc6990dd742f03b645ea upstream.
+
+Currently imx8mp_blk_ctrl_remove() will continue the for loop
+until an out-of-bounds exception occurs.
+
+pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
+pc : dev_pm_domain_detach+0x8/0x48
+lr : imx8mp_blk_ctrl_shutdown+0x58/0x90
+sp : ffffffc084f8bbf0
+x29: ffffffc084f8bbf0 x28: ffffff80daf32ac0 x27: 0000000000000000
+x26: ffffffc081658d78 x25: 0000000000000001 x24: ffffffc08201b028
+x23: ffffff80d0db9490 x22: ffffffc082340a78 x21: 00000000000005b0
+x20: ffffff80d19bc180 x19: 000000000000000a x18: ffffffffffffffff
+x17: ffffffc080a39e08 x16: ffffffc080a39c98 x15: 4f435f464f006c72
+x14: 0000000000000004 x13: ffffff80d0172110 x12: 0000000000000000
+x11: ffffff80d0537740 x10: ffffff80d05376c0 x9 : ffffffc0808ed2d8
+x8 : ffffffc084f8bab0 x7 : 0000000000000000 x6 : 0000000000000000
+x5 : ffffff80d19b9420 x4 : fffffffe03466e60 x3 : 0000000080800077
+x2 : 0000000000000000 x1 : 0000000000000001 x0 : 0000000000000000
+Call trace:
+ dev_pm_domain_detach+0x8/0x48
+ platform_shutdown+0x2c/0x48
+ device_shutdown+0x158/0x268
+ kernel_restart_prepare+0x40/0x58
+ kernel_kexec+0x58/0xe8
+ __do_sys_reboot+0x198/0x258
+ __arm64_sys_reboot+0x2c/0x40
+ invoke_syscall+0x5c/0x138
+ el0_svc_common.constprop.0+0x48/0xf0
+ do_el0_svc+0x24/0x38
+ el0_svc+0x38/0xc8
+ el0t_64_sync_handler+0x120/0x130
+ el0t_64_sync+0x190/0x198
+Code: 8128c2d0 ffffffc0 aa1e03e9 d503201f
+
+Fixes: 556f5cf9568a ("soc: imx: add i.MX8MP HSIO blk-ctrl")
+Cc: stable@vger.kernel.org
+Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
+Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
+Reviewed-by: Fabio Estevam <festevam@gmail.com>
+Reviewed-by: Frank Li <Frank.Li@nxp.com>
+Link: https://lore.kernel.org/r/20250115014118.4086729-1-xiaolei.wang@windriver.com
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/soc/imx/imx8mp-blk-ctrl.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/soc/imx/imx8mp-blk-ctrl.c
++++ b/drivers/soc/imx/imx8mp-blk-ctrl.c
+@@ -659,7 +659,7 @@ static int imx8mp_blk_ctrl_remove(struct
+       of_genpd_del_provider(pdev->dev.of_node);
+-      for (i = 0; bc->onecell_data.num_domains; i++) {
++      for (i = 0; i < bc->onecell_data.num_domains; i++) {
+               struct imx8mp_blk_ctrl_domain *domain = &bc->domains[i];
+               pm_genpd_remove(&domain->genpd);
diff --git a/queue-6.1/revert-pci-use-preserve_config-in-place-of-pci_flags.patch b/queue-6.1/revert-pci-use-preserve_config-in-place-of-pci_flags.patch
new file mode 100644 (file)
index 0000000..8e0a704
--- /dev/null
@@ -0,0 +1,72 @@
+From stable+bounces-109390-greg=kroah.com@vger.kernel.org Fri Jan 17 16:16:53 2025
+From: Terry Tritton <terry.tritton@linaro.org>
+Date: Fri, 17 Jan 2025 15:16:39 +0000
+Subject: Revert "PCI: Use preserve_config in place of pci_flags"
+To: stable <stable@vger.kernel.org>
+Cc: Terry Tritton <ttritton@google.com>, Greg KH <gregkh@linuxfoundation.org>, Vidya Sagar <vidyas@nvidia.com>, Sasha Levin <sashal@kernel.org>, Daniel Verkamp <dverkamp@chromium.org>, Terry Tritton <terry.tritton@linaro.org>
+Message-ID: <20250117151639.6448-1-terry.tritton@linaro.org>
+
+From: Terry Tritton <terry.tritton@linaro.org>
+
+This reverts commit f858b0fab28d8bc2d0f0e8cd4afc3216f347cfcc which is
+commit 7246a4520b4bf1494d7d030166a11b5226f6d508 upstream.
+
+This patch causes a regression in cuttlefish/crossvm boot on arm64.
+
+The patch was part of a series that when applied will not cause a regression
+but this patch was backported to the 6.1 branch by itself.
+
+The other patches do not apply cleanly to the 6.1 branch.
+
+Signed-off-by: Terry Tritton <terry.tritton@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/pci/controller/pci-host-common.c |    4 ++++
+ drivers/pci/probe.c                      |   20 +++++++++++---------
+ 2 files changed, 15 insertions(+), 9 deletions(-)
+
+--- a/drivers/pci/controller/pci-host-common.c
++++ b/drivers/pci/controller/pci-host-common.c
+@@ -73,6 +73,10 @@ int pci_host_common_probe(struct platfor
+       if (IS_ERR(cfg))
+               return PTR_ERR(cfg);
++      /* Do not reassign resources if probe only */
++      if (!pci_has_flag(PCI_PROBE_ONLY))
++              pci_add_flags(PCI_REASSIGN_ALL_BUS);
++
+       bridge->sysdata = cfg;
+       bridge->ops = (struct pci_ops *)&ops->pci_ops;
+       bridge->msi_domain = true;
+--- a/drivers/pci/probe.c
++++ b/drivers/pci/probe.c
+@@ -3082,18 +3082,20 @@ int pci_host_probe(struct pci_host_bridg
+       bus = bridge->bus;
+-      /* If we must preserve the resource configuration, claim now */
+-      if (bridge->preserve_config)
+-              pci_bus_claim_resources(bus);
+-
+       /*
+-       * Assign whatever was left unassigned. If we didn't claim above,
+-       * this will reassign everything.
++       * We insert PCI resources into the iomem_resource and
++       * ioport_resource trees in either pci_bus_claim_resources()
++       * or pci_bus_assign_resources().
+        */
+-      pci_assign_unassigned_root_bus_resources(bus);
++      if (pci_has_flag(PCI_PROBE_ONLY)) {
++              pci_bus_claim_resources(bus);
++      } else {
++              pci_bus_size_bridges(bus);
++              pci_bus_assign_resources(bus);
+-      list_for_each_entry(child, &bus->children, node)
+-              pcie_bus_configure_settings(child);
++              list_for_each_entry(child, &bus->children, node)
++                      pcie_bus_configure_settings(child);
++      }
+       pci_bus_add_devices(bus);
+       return 0;
index 29c123cbecd35e8c16c6a4744aac72d3e743f864..bc15f62a95ac21d88c057dbfca6ba5959fc0f963 100644 (file)
@@ -39,3 +39,10 @@ vsock-prevent-null-ptr-deref-in-vsock_.patch
 filemap-avoid-truncating-64-bit-offset-to-32-bits.patch
 fs-proc-fix-softlockup-in-__read_vmcore-part-2.patch
 gpiolib-cdev-fix-use-after-free-in-lineinfo_changed_notify.patch
+pmdomain-imx8mp-blk-ctrl-add-missing-loop-break-condition.patch
+irqchip-plug-a-of-node-reference-leak-in-platform_irqchip_probe.patch
+irqchip-gic-v3-handle-cpu_pm_enter_failed-correctly.patch
+irqchip-gic-v3-its-don-t-enable-interrupts-in-its_irq_set_vcpu_affinity.patch
+hrtimers-handle-cpu-state-correctly-on-hotplug.patch
+drm-i915-fb-relax-clear-color-alignment-to-64-bytes.patch
+revert-pci-use-preserve_config-in-place-of-pci_flags.patch