]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Nov 2023 11:40:47 +0000 (11:40 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Nov 2023 11:40:47 +0000 (11:40 +0000)
added patches:
parisc-pgtable-do-not-drop-upper-5-address-bits-of-physical-address.patch
parisc-power-fix-power-soft-off-when-running-on-qemu.patch
parisc-prevent-booting-64-bit-kernels-on-pa1.x-machines.patch
xhci-enable-rpm-on-controllers-that-support-low-power-states.patch

queue-5.10/parisc-pgtable-do-not-drop-upper-5-address-bits-of-physical-address.patch [new file with mode: 0644]
queue-5.10/parisc-power-fix-power-soft-off-when-running-on-qemu.patch [new file with mode: 0644]
queue-5.10/parisc-prevent-booting-64-bit-kernels-on-pa1.x-machines.patch [new file with mode: 0644]
queue-5.10/series
queue-5.10/xhci-enable-rpm-on-controllers-that-support-low-power-states.patch [new file with mode: 0644]

diff --git a/queue-5.10/parisc-pgtable-do-not-drop-upper-5-address-bits-of-physical-address.patch b/queue-5.10/parisc-pgtable-do-not-drop-upper-5-address-bits-of-physical-address.patch
new file mode 100644 (file)
index 0000000..425edef
--- /dev/null
@@ -0,0 +1,49 @@
+From 166b0110d1ee53290bd11618df6e3991c117495a Mon Sep 17 00:00:00 2001
+From: Helge Deller <deller@gmx.de>
+Date: Tue, 7 Nov 2023 14:33:32 +0100
+Subject: parisc/pgtable: Do not drop upper 5 address bits of physical address
+
+From: Helge Deller <deller@gmx.de>
+
+commit 166b0110d1ee53290bd11618df6e3991c117495a upstream.
+
+When calculating the pfn for the iitlbt/idtlbt instruction, do not
+drop the upper 5 address bits. This doesn't seem to have an effect
+on physical hardware which uses less physical address bits, but in
+qemu the missing bits are visible.
+
+Signed-off-by: Helge Deller <deller@gmx.de>
+Cc:  <stable@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/parisc/kernel/entry.S |    7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+--- a/arch/parisc/kernel/entry.S
++++ b/arch/parisc/kernel/entry.S
+@@ -497,13 +497,13 @@
+        * to a CPU TLB 4k PFN (4k => 12 bits to shift) */
+       #define PAGE_ADD_SHIFT          (PAGE_SHIFT-12)
+       #define PAGE_ADD_HUGE_SHIFT     (REAL_HPAGE_SHIFT-12)
++      #define PFN_START_BIT   (63-ASM_PFN_PTE_SHIFT+(63-58)-PAGE_ADD_SHIFT)
+       /* Drop prot bits and convert to page addr for iitlbt and idtlbt */
+       .macro          convert_for_tlb_insert20 pte,tmp
+ #ifdef CONFIG_HUGETLB_PAGE
+       copy            \pte,\tmp
+-      extrd,u         \tmp,(63-ASM_PFN_PTE_SHIFT)+(63-58)+PAGE_ADD_SHIFT,\
+-                              64-PAGE_SHIFT-PAGE_ADD_SHIFT,\pte
++      extrd,u         \tmp,PFN_START_BIT,PFN_START_BIT+1,\pte
+       depdi           _PAGE_SIZE_ENCODING_DEFAULT,63,\
+                               (63-58)+PAGE_ADD_SHIFT,\pte
+@@ -511,8 +511,7 @@
+       depdi           _HUGE_PAGE_SIZE_ENCODING_DEFAULT,63,\
+                               (63-58)+PAGE_ADD_HUGE_SHIFT,\pte
+ #else /* Huge pages disabled */
+-      extrd,u         \pte,(63-ASM_PFN_PTE_SHIFT)+(63-58)+PAGE_ADD_SHIFT,\
+-                              64-PAGE_SHIFT-PAGE_ADD_SHIFT,\pte
++      extrd,u         \pte,PFN_START_BIT,PFN_START_BIT+1,\pte
+       depdi           _PAGE_SIZE_ENCODING_DEFAULT,63,\
+                               (63-58)+PAGE_ADD_SHIFT,\pte
+ #endif
diff --git a/queue-5.10/parisc-power-fix-power-soft-off-when-running-on-qemu.patch b/queue-5.10/parisc-power-fix-power-soft-off-when-running-on-qemu.patch
new file mode 100644 (file)
index 0000000..1ed60ef
--- /dev/null
@@ -0,0 +1,31 @@
+From 6ad6e15a9c46b8f0932cd99724f26f3db4db1cdf Mon Sep 17 00:00:00 2001
+From: Helge Deller <deller@gmx.de>
+Date: Fri, 17 Nov 2023 16:43:52 +0100
+Subject: parisc/power: Fix power soft-off when running on qemu
+
+From: Helge Deller <deller@gmx.de>
+
+commit 6ad6e15a9c46b8f0932cd99724f26f3db4db1cdf upstream.
+
+Firmware returns the physical address of the power switch,
+so need to use gsc_writel() instead of direct memory access.
+
+Fixes: d0c219472980 ("parisc/power: Add power soft-off when running on qemu")
+Signed-off-by: Helge Deller <deller@gmx.de>
+Cc: stable@vger.kernel.org # v6.0+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/parisc/power.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/parisc/power.c
++++ b/drivers/parisc/power.c
+@@ -196,7 +196,7 @@ static struct notifier_block parisc_pani
+ static int qemu_power_off(struct sys_off_data *data)
+ {
+       /* this turns the system off via SeaBIOS */
+-      *(int *)data->cb_data = 0;
++      gsc_writel(0, (unsigned long) data->cb_data);
+       pdc_soft_power_button(1);
+       return NOTIFY_DONE;
+ }
diff --git a/queue-5.10/parisc-prevent-booting-64-bit-kernels-on-pa1.x-machines.patch b/queue-5.10/parisc-prevent-booting-64-bit-kernels-on-pa1.x-machines.patch
new file mode 100644 (file)
index 0000000..d7901c2
--- /dev/null
@@ -0,0 +1,35 @@
+From a406b8b424fa01f244c1aab02ba186258448c36b Mon Sep 17 00:00:00 2001
+From: Helge Deller <deller@gmx.de>
+Date: Fri, 10 Nov 2023 16:13:15 +0100
+Subject: parisc: Prevent booting 64-bit kernels on PA1.x machines
+
+From: Helge Deller <deller@gmx.de>
+
+commit a406b8b424fa01f244c1aab02ba186258448c36b upstream.
+
+Bail out early with error message when trying to boot a 64-bit kernel on
+32-bit machines. This fixes the previous commit to include the check for
+true 64-bit kernels as well.
+
+Signed-off-by: Helge Deller <deller@gmx.de>
+Fixes: 591d2108f3abc ("parisc: Add runtime check to prevent PA2.0 kernels on PA1.x machines")
+Cc:  <stable@vger.kernel.org> # v6.0+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/parisc/kernel/head.S |    5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- a/arch/parisc/kernel/head.S
++++ b/arch/parisc/kernel/head.S
+@@ -69,9 +69,8 @@ $bss_loop:
+       stw,ma          %arg2,4(%r1)
+       stw,ma          %arg3,4(%r1)
+-#if !defined(CONFIG_64BIT) && defined(CONFIG_PA20)
+-      /* This 32-bit kernel was compiled for PA2.0 CPUs. Check current CPU
+-       * and halt kernel if we detect a PA1.x CPU. */
++#if defined(CONFIG_PA20)
++      /* check for 64-bit capable CPU as required by current kernel */
+       ldi             32,%r10
+       mtctl           %r10,%cr11
+       .level 2.0
index c74b63c7344a57d8afacd08d8ad906a4e94cb0ca..ebef35605ec35c486dbee4da35174c6fc87cafd6 100644 (file)
@@ -138,6 +138,10 @@ mm-cma-use-nth_page-in-place-of-direct-struct-page-manipulation.patch
 mm-memory_hotplug-use-pfn-math-in-place-of-direct-struct-page-manipulation.patch
 mtd-cfi_cmdset_0001-byte-swap-otp-info.patch
 i3c-master-cdns-fix-reading-status-register.patch
+parisc-prevent-booting-64-bit-kernels-on-pa1.x-machines.patch
+parisc-pgtable-do-not-drop-upper-5-address-bits-of-physical-address.patch
+parisc-power-fix-power-soft-off-when-running-on-qemu.patch
+xhci-enable-rpm-on-controllers-that-support-low-power-states.patch
 serial-meson-remove-redundant-initialization-of-vari.patch
 tty-serial-meson-retrieve-port-fifo-size-from-dt.patch
 serial-meson-use-platform_get_irq-to-get-the-interru.patch
diff --git a/queue-5.10/xhci-enable-rpm-on-controllers-that-support-low-power-states.patch b/queue-5.10/xhci-enable-rpm-on-controllers-that-support-low-power-states.patch
new file mode 100644 (file)
index 0000000..5544c17
--- /dev/null
@@ -0,0 +1,37 @@
+From a5d6264b638efeca35eff72177fd28d149e0764b Mon Sep 17 00:00:00 2001
+From: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
+Date: Thu, 19 Oct 2023 13:29:20 +0300
+Subject: xhci: Enable RPM on controllers that support low-power states
+
+From: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
+
+commit a5d6264b638efeca35eff72177fd28d149e0764b upstream.
+
+Use the low-power states of the underlying platform to enable runtime PM.
+If the platform doesn't support runtime D3, then enabling default RPM will
+result in the controller malfunctioning, as in the case of hotplug devices
+not being detected because of a failed interrupt generation.
+
+Cc: Mario Limonciello <mario.limonciello@amd.com>
+Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
+Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Link: https://lore.kernel.org/r/20231019102924.2797346-16-mathias.nyman@linux.intel.com
+Cc: Oleksandr Natalenko <oleksandr@natalenko.name>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/host/xhci-pci.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/host/xhci-pci.c
++++ b/drivers/usb/host/xhci-pci.c
+@@ -505,7 +505,9 @@ static int xhci_pci_probe(struct pci_dev
+       /* USB-2 and USB-3 roothubs initialized, allow runtime pm suspend */
+       pm_runtime_put_noidle(&dev->dev);
+-      if (xhci->quirks & XHCI_DEFAULT_PM_RUNTIME_ALLOW)
++      if (pci_choose_state(dev, PMSG_SUSPEND) == PCI_D0)
++              pm_runtime_forbid(&dev->dev);
++      else if (xhci->quirks & XHCI_DEFAULT_PM_RUNTIME_ALLOW)
+               pm_runtime_allow(&dev->dev);
+       dma_set_max_seg_size(&dev->dev, UINT_MAX);