From: Greg Kroah-Hartman Date: Sun, 29 Jan 2023 13:32:32 +0000 (+0100) Subject: 4.14-stable patches X-Git-Tag: v5.10.166~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3f476e157b0d90054ea1d8fa212c472d425b5f4d;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches 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 --- diff --git a/queue-4.14/arm-9280-1-mm-fix-warning-on-phys_addr_t-to-void-pointer-assignment.patch b/queue-4.14/arm-9280-1-mm-fix-warning-on-phys_addr_t-to-void-pointer-assignment.patch new file mode 100644 index 00000000000..14085e09901 --- /dev/null +++ b/queue-4.14/arm-9280-1-mm-fix-warning-on-phys_addr_t-to-void-pointer-assignment.patch @@ -0,0 +1,34 @@ +From a4e03921c1bb118e6718e0a3b0322a2c13ed172b Mon Sep 17 00:00:00 2001 +From: Giulio Benetti +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 + +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: # 4.14.x + +Fixes: 340a982825f7 ("ARM: 9266/1: mm: fix no-MMU ZERO_PAGE() implementation") +Signed-off-by: Giulio Benetti +Signed-off-by: Russell King (Oracle) +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -379,7 +379,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.14/edac-device-respect-any-driver-supplied-workqueue-polling-value.patch b/queue-4.14/edac-device-respect-any-driver-supplied-workqueue-polling-value.patch new file mode 100644 index 00000000000..b4e57de3617 --- /dev/null +++ b/queue-4.14/edac-device-respect-any-driver-supplied-workqueue-polling-value.patch @@ -0,0 +1,79 @@ +From cec669ff716cc83505c77b242aecf6f7baad869d Mon Sep 17 00:00:00 2001 +From: Manivannan Sadhasivam +Date: Wed, 18 Jan 2023 20:38:48 +0530 +Subject: EDAC/device: Respect any driver-supplied workqueue polling value + +From: Manivannan Sadhasivam + +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 +Signed-off-by: Manivannan Sadhasivam +Signed-off-by: Borislav Petkov (AMD) +Tested-by: Steev Klimaszewski # Thinkpad X13s +Tested-by: Andrew Halaney # sa8540p-ride +Cc: # 4.9 +Link: https://lore.kernel.org/r/COZYL8MWN97H.MROQ391BGA09@otso +Signed-off-by: Greg Kroah-Hartman +--- + 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; + } diff --git a/queue-4.14/series b/queue-4.14/series index 62c41be6e60..8e5403d26ef 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -25,3 +25,5 @@ bluetooth-hci_sync-cancel-cmd_timer-if-hci_open-fail.patch scsi-hpsa-fix-allocation-size-for-scsi_host_alloc.patch module-don-t-wait-for-going-modules.patch tracing-make-sure-trace_printk-can-output-as-soon-as-it-can-be-used.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