]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Mar 2018 06:27:35 +0000 (07:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Mar 2018 06:27:35 +0000 (07:27 +0100)
added patches:
powerpc-pseries-enable-ras-hotplug-events-later.patch

queue-4.15/powerpc-pseries-enable-ras-hotplug-events-later.patch [new file with mode: 0644]
queue-4.15/series

diff --git a/queue-4.15/powerpc-pseries-enable-ras-hotplug-events-later.patch b/queue-4.15/powerpc-pseries-enable-ras-hotplug-events-later.patch
new file mode 100644 (file)
index 0000000..515f39b
--- /dev/null
@@ -0,0 +1,79 @@
+From c9dccf1d074a67d36c510845f663980d69e3409b Mon Sep 17 00:00:00 2001
+From: Sam Bobroff <sam.bobroff@au1.ibm.com>
+Date: Mon, 12 Feb 2018 11:19:29 +1100
+Subject: powerpc/pseries: Enable RAS hotplug events later
+
+From: Sam Bobroff <sam.bobroff@au1.ibm.com>
+
+commit c9dccf1d074a67d36c510845f663980d69e3409b upstream.
+
+Currently if the kernel receives a memory hot-unplug event early
+enough, it may get stuck in an infinite loop in
+dissolve_free_huge_pages(). This appears as a stall just after:
+
+  pseries-hotplug-mem: Attempting to hot-remove XX LMB(s) at YYYYYYYY
+
+It appears to be caused by "minimum_order" being uninitialized, due to
+init_ras_IRQ() executing before hugetlb_init().
+
+To correct this, extract the part of init_ras_IRQ() that enables
+hotplug event processing and place it in the machine_late_initcall
+phase, which is guaranteed to be after hugetlb_init() is called.
+
+Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
+Acked-by: Balbir Singh <bsingharora@gmail.com>
+[mpe: Reorder the functions to make the diff readable]
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/powerpc/platforms/pseries/ras.c |   31 ++++++++++++++++++++++---------
+ 1 file changed, 22 insertions(+), 9 deletions(-)
+
+--- a/arch/powerpc/platforms/pseries/ras.c
++++ b/arch/powerpc/platforms/pseries/ras.c
+@@ -49,6 +49,28 @@ static irqreturn_t ras_error_interrupt(i
+ /*
++ * Enable the hotplug interrupt late because processing them may touch other
++ * devices or systems (e.g. hugepages) that have not been initialized at the
++ * subsys stage.
++ */
++int __init init_ras_hotplug_IRQ(void)
++{
++      struct device_node *np;
++
++      /* Hotplug Events */
++      np = of_find_node_by_path("/event-sources/hot-plug-events");
++      if (np != NULL) {
++              if (dlpar_workqueue_init() == 0)
++                      request_event_sources_irqs(np, ras_hotplug_interrupt,
++                                                 "RAS_HOTPLUG");
++              of_node_put(np);
++      }
++
++      return 0;
++}
++machine_late_initcall(pseries, init_ras_hotplug_IRQ);
++
++/*
+  * Initialize handlers for the set of interrupts caused by hardware errors
+  * and power system events.
+  */
+@@ -66,15 +88,6 @@ static int __init init_ras_IRQ(void)
+               of_node_put(np);
+       }
+-      /* Hotplug Events */
+-      np = of_find_node_by_path("/event-sources/hot-plug-events");
+-      if (np != NULL) {
+-              if (dlpar_workqueue_init() == 0)
+-                      request_event_sources_irqs(np, ras_hotplug_interrupt,
+-                                         "RAS_HOTPLUG");
+-              of_node_put(np);
+-      }
+-
+       /* EPOW Events */
+       np = of_find_node_by_path("/event-sources/epow-events");
+       if (np != NULL) {
index ebda8d37348200f1c0901bc6d2ad34d20d3c2845..1a8abc942e6fa2d7444fea1fefb1e42a109d5fba 100644 (file)
@@ -2,3 +2,4 @@ vsprintf-avoid-misleading-null-for-px.patch
 hrtimer-ensure-posix-compliance-relative-clock_realtime-hrtimers.patch
 ipmi_si-fix-error-handling-of-platform-device.patch
 platform-x86-dell-laptop-allocate-buffer-on-heap-rather-than-globally.patch
+powerpc-pseries-enable-ras-hotplug-events-later.patch