]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 29 Jan 2023 13:35:21 +0000 (14:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 29 Jan 2023 13:35:21 +0000 (14:35 +0100)
added patches:
arm-9280-1-mm-fix-warning-on-phys_addr_t-to-void-pointer-assignment.patch
edac-device-respect-any-driver-supplied-workqueue-polling-value.patch

queue-4.19/arm-9280-1-mm-fix-warning-on-phys_addr_t-to-void-pointer-assignment.patch [new file with mode: 0644]
queue-4.19/edac-device-respect-any-driver-supplied-workqueue-polling-value.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/arm-9280-1-mm-fix-warning-on-phys_addr_t-to-void-pointer-assignment.patch b/queue-4.19/arm-9280-1-mm-fix-warning-on-phys_addr_t-to-void-pointer-assignment.patch
new file mode 100644 (file)
index 0000000..8643714
--- /dev/null
@@ -0,0 +1,34 @@
+From a4e03921c1bb118e6718e0a3b0322a2c13ed172b Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@benettiengineering.com>
+Date: Tue, 13 Dec 2022 20:24:03 +0100
+Subject: ARM: 9280/1: mm: fix warning on phys_addr_t to void pointer assignment
+
+From: Giulio Benetti <giulio.benetti@benettiengineering.com>
+
+commit a4e03921c1bb118e6718e0a3b0322a2c13ed172b upstream.
+
+zero_page is a void* pointer but memblock_alloc() returns phys_addr_t type
+so this generates a warning while using clang and with -Wint-error enabled
+that becomes and error. So let's cast the return of memblock_alloc() to
+(void *).
+
+Cc: <stable@vger.kernel.org> # 4.14.x +
+Fixes: 340a982825f7 ("ARM: 9266/1: mm: fix no-MMU ZERO_PAGE() implementation")
+Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
+Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm/mm/nommu.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/mm/nommu.c
++++ b/arch/arm/mm/nommu.c
+@@ -160,7 +160,7 @@ void __init paging_init(const struct mac
+       mpu_setup();
+       /* allocate the zero page. */
+-      zero_page = memblock_alloc(PAGE_SIZE, PAGE_SIZE);
++      zero_page = (void *)memblock_alloc(PAGE_SIZE, PAGE_SIZE);
+       if (!zero_page)
+               panic("%s: Failed to allocate %lu bytes align=0x%lx\n",
+                     __func__, PAGE_SIZE, PAGE_SIZE);
diff --git a/queue-4.19/edac-device-respect-any-driver-supplied-workqueue-polling-value.patch b/queue-4.19/edac-device-respect-any-driver-supplied-workqueue-polling-value.patch
new file mode 100644 (file)
index 0000000..b4e57de
--- /dev/null
@@ -0,0 +1,79 @@
+From cec669ff716cc83505c77b242aecf6f7baad869d Mon Sep 17 00:00:00 2001
+From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
+Date: Wed, 18 Jan 2023 20:38:48 +0530
+Subject: EDAC/device: Respect any driver-supplied workqueue polling value
+
+From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
+
+commit cec669ff716cc83505c77b242aecf6f7baad869d upstream.
+
+The EDAC drivers may optionally pass the poll_msec value. Use that value
+if available, else fall back to 1000ms.
+
+  [ bp: Touchups. ]
+
+Fixes: e27e3dac6517 ("drivers/edac: add edac_device class")
+Reported-by: Luca Weiss <luca.weiss@fairphone.com>
+Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
+Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
+Tested-by: Steev Klimaszewski <steev@kali.org> # Thinkpad X13s
+Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8540p-ride
+Cc: <stable@vger.kernel.org> # 4.9
+Link: https://lore.kernel.org/r/COZYL8MWN97H.MROQ391BGA09@otso
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/edac/edac_device.c |   15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+--- a/drivers/edac/edac_device.c
++++ b/drivers/edac/edac_device.c
+@@ -34,6 +34,9 @@
+ static DEFINE_MUTEX(device_ctls_mutex);
+ static LIST_HEAD(edac_device_list);
++/* Default workqueue processing interval on this instance, in msecs */
++#define DEFAULT_POLL_INTERVAL 1000
++
+ #ifdef CONFIG_EDAC_DEBUG
+ static void edac_device_dump_device(struct edac_device_ctl_info *edac_dev)
+ {
+@@ -366,7 +369,7 @@ static void edac_device_workq_function(s
+        * whole one second to save timers firing all over the period
+        * between integral seconds
+        */
+-      if (edac_dev->poll_msec == 1000)
++      if (edac_dev->poll_msec == DEFAULT_POLL_INTERVAL)
+               edac_queue_work(&edac_dev->work, round_jiffies_relative(edac_dev->delay));
+       else
+               edac_queue_work(&edac_dev->work, edac_dev->delay);
+@@ -396,7 +399,7 @@ static void edac_device_workq_setup(stru
+        * timers firing on sub-second basis, while they are happy
+        * to fire together on the 1 second exactly
+        */
+-      if (edac_dev->poll_msec == 1000)
++      if (edac_dev->poll_msec == DEFAULT_POLL_INTERVAL)
+               edac_queue_work(&edac_dev->work, round_jiffies_relative(edac_dev->delay));
+       else
+               edac_queue_work(&edac_dev->work, edac_dev->delay);
+@@ -430,7 +433,7 @@ void edac_device_reset_delay_period(stru
+       edac_dev->delay     = msecs_to_jiffies(msec);
+       /* See comment in edac_device_workq_setup() above */
+-      if (edac_dev->poll_msec == 1000)
++      if (edac_dev->poll_msec == DEFAULT_POLL_INTERVAL)
+               edac_mod_work(&edac_dev->work, round_jiffies_relative(edac_dev->delay));
+       else
+               edac_mod_work(&edac_dev->work, edac_dev->delay);
+@@ -472,11 +475,7 @@ int edac_device_add_device(struct edac_d
+               /* This instance is NOW RUNNING */
+               edac_dev->op_state = OP_RUNNING_POLL;
+-              /*
+-               * enable workq processing on this instance,
+-               * default = 1000 msec
+-               */
+-              edac_device_workq_setup(edac_dev, 1000);
++              edac_device_workq_setup(edac_dev, edac_dev->poll_msec ?: DEFAULT_POLL_INTERVAL);
+       } else {
+               edac_dev->op_state = OP_RUNNING_INTERRUPT;
+       }
index 0d4d4357b4c74afd1065ddd27460ac9a43153822..cb8169725e33c934e40ca69f91370d2b4b2d4081 100644 (file)
@@ -45,3 +45,5 @@ tracing-make-sure-trace_printk-can-output-as-soon-as-it-can-be-used.patch
 trace_events_hist-add-check-for-return-value-of-create_hist_field.patch
 smbd-make-upper-layer-decide-when-to-destroy-the-tra.patch
 cifs-fix-oops-due-to-uncleared-server-smbd_conn-in-r.patch
+arm-9280-1-mm-fix-warning-on-phys_addr_t-to-void-pointer-assignment.patch
+edac-device-respect-any-driver-supplied-workqueue-polling-value.patch