From: Sasha Levin Date: Mon, 30 Dec 2024 03:56:40 +0000 (-0500) Subject: Fixes for 6.12 X-Git-Tag: v6.1.123~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9f14639ba471f7a09d1ab2fa53e8eb8f17b80b32;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 6.12 Signed-off-by: Sasha Levin --- diff --git a/queue-6.12/dmaengine-loongson2-apb-change-genmask-to-genmask_ul.patch b/queue-6.12/dmaengine-loongson2-apb-change-genmask-to-genmask_ul.patch new file mode 100644 index 00000000000..8159bf9c897 --- /dev/null +++ b/queue-6.12/dmaengine-loongson2-apb-change-genmask-to-genmask_ul.patch @@ -0,0 +1,45 @@ +From 221d65ca3b728ce1529323e2febb894b6829603d Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 30 Dec 2024 09:39:19 +0800 +Subject: dmaengine: loongson2-apb: Change GENMASK to GENMASK_ULL + +From: Binbin Zhou + +[ Upstream commit 4b65d5322e1d8994acfdb9b867aa00bdb30d177b ] + +Fix the following smatch static checker warning: + +drivers/dma/loongson2-apb-dma.c:189 ls2x_dma_write_cmd() +warn: was expecting a 64 bit value instead of '~(((0)) + (((~((0))) - (((1)) << (0)) + 1) & (~((0)) >> ((8 * 4) - 1 - (4)))))' + +The GENMASK macro used "unsigned long", which caused build issues when +using a 32-bit toolchain because it would try to access bits > 31. This +patch switches GENMASK to GENMASK_ULL, which uses "unsigned long long". + +Fixes: 71e7d3cb6e55 ("dmaengine: ls2x-apb: New driver for the Loongson LS2X APB DMA controller") +Reported-by: Dan Carpenter +Closes: https://lore.kernel.org/all/87cdc025-7246-4548-85ca-3d36fdc2be2d@stanley.mountain/ +Signed-off-by: Binbin Zhou +Link: https://lore.kernel.org/r/20241028093413.1145820-1-zhoubinbin@loongson.cn +Signed-off-by: Vinod Koul +Signed-off-by: Sasha Levin +--- + drivers/dma/ls2x-apb-dma.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/dma/ls2x-apb-dma.c b/drivers/dma/ls2x-apb-dma.c +index 9652e8666722..b4f18be62945 100644 +--- a/drivers/dma/ls2x-apb-dma.c ++++ b/drivers/dma/ls2x-apb-dma.c +@@ -31,7 +31,7 @@ + #define LDMA_ASK_VALID BIT(2) + #define LDMA_START BIT(3) /* DMA start operation */ + #define LDMA_STOP BIT(4) /* DMA stop operation */ +-#define LDMA_CONFIG_MASK GENMASK(4, 0) /* DMA controller config bits mask */ ++#define LDMA_CONFIG_MASK GENMASK_ULL(4, 0) /* DMA controller config bits mask */ + + /* Bitfields in ndesc_addr field of HW descriptor */ + #define LDMA_DESC_EN BIT(0) /*1: The next descriptor is valid */ +-- +2.39.5 + diff --git a/queue-6.12/series b/queue-6.12/series index d5c2f6d261f..18fddd4b74c 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -81,3 +81,4 @@ drm-xe-take-pm-ref-in-delayed-snapshot-capture-worke.patch drm-xe-move-the-coredump-registration-to-the-worker-.patch objtool-add-bch2_trans_unlocked_error-to-bcachefs-no.patch freezer-sched-report-frozen-tasks-as-d-instead-of-r.patch +dmaengine-loongson2-apb-change-genmask-to-genmask_ul.patch