From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796385040; b=lGBR40x8GM/AnHQ2KkqRBULmyaEpYUpqtCLZeYqpCtphAeSUnhvY8Lo+8dPLutZ5pvml vkpL1YGSvt7omMJuWNsXrTIM69wk2BAIK90vqQag3Wz4fQ8H2XmnPHZGOz09EgcB+llNv z/2f/ythoYgy8TCUlBGOzLlqBSCZQ5xcuA3BIzCbiLq1Lz+IVYRVro1wFuyWh98cDqpqB /uyn+uL04AhQH+CYAxMtpX6ry40tN2K6Qi5SRXYzE5xBpi1KgninwCE6lVZFDqQO0fZlS zQvdfIHjAQGsGM39PUbyIJ6oFvKHE7V6ndQwwz8gzLuLJ5SOPNY5Iih8BNNZPjegOEA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796385040; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=T/aKZlGkIFF1ERovuNnCc+IWXdfTsISr44n2Z0QFM6s=; b=b06A0Ujz/ONPUgajeUh+QsVhp6mRNDwm7KMHDiyKkNnd5TrdHHYMBruitwIsN5hXdZzM 84d0XSm/n1qH6ZJ0MHQcQ0crzyorjphVQ/6A99yTpStjDOlkYOpAb9r7cjvogY/IH7BKU PuUrpDiaXsZJa8d0H96urk9uMqNNRgE0jP9fY+W3XGmFa+4mtDJx1bgYq+u9mXneVsPWE uX7TdBuJIinqJ+3f+kCqPxs3rvWBAT2ede0GCVbe232XRmB3N7lG9x3inu9g1cIe8O4+B AV0ArgPmF78ICq3sxEBdQWTq5wvXRaKzGE0jD5ViPjj5XJfMjyK2Kdc5fhA+JCx0jtw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=LqIus9WI; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0826606A322; Fri, 4 Dec 2026 11:50:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=LqIus9WI Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26CF01F000C2; Fri, 4 Dec 2026 11:50:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796385040; bh=T/aKZlGkIFF1ERovuNnCc+IWXdfTsISr44n2Z0QFM6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=LqIus9WISmzDPJ1WEZ1CmN2LqqmKSnCVyX9N0McN4aePncomQahGyys1RdWpsgQEn tVDOoixoufmUUhpUxvlWPDJRhktRZvsts/2YTgFyy9+3IzEpcOG7LbfKR4/SPAM9P0 9OHl/MjMJ67DiHI7ZZR/K8y6+OIcdNL1NZPmpcTI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, kernel test robot , Linus Walleij , Frank Li , Vinod Koul , Sasha Levin Subject: [PATCH 6.6 0394/1167] dmaengine: ste_dma40: Preserve the LCPA I/O address space Date: Fri, 4 Dec 2026 18:57:01 +0900 Message-ID: <20261204100712.288515752@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Linus Walleij [ Upstream commit 42c31fec1ca76b8b5f7759def122d418dff2cd4b ] The LCPA area is mapped with devm_ioremap(), but lcpa_base and the per-channel lcpa pointer lack __iomem annotations. This loses the I/O address space and makes sparse warn when d40_current_addr() assigns LCPA register addresses to its __iomem pointers. Annotate both pointers and the LCPA argument of d40_log_lli_lcpa_write() to preserve the I/O address space from the mapping to the register accessors. This also fixes the existing LCPA read and write warnings without changing the generated code. Fixes: c80edceff29e ("dmaengine: ste_dma40: Fix cyclic transfer residue") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202610090216.pjMRxhRL-lkp@intel.com/ Assisted-by: LLM Signed-off-by: Linus Walleij Reviewed-by: Frank Li Link: https://patch.msgid.link/20261010-dma40-smatch-fix-v1-1-26ca10043957@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/ste_dma40.c | 4 ++-- drivers/dma/ste_dma40_ll.c | 8 ++++---- drivers/dma/ste_dma40_ll.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index b645d83d0306b..fe27e5ce296a0 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -511,7 +511,7 @@ struct d40_chan { u32 src_def_cfg; u32 dst_def_cfg; struct d40_def_lcsp log_def; - struct d40_log_lli_full *lcpa; + struct d40_log_lli_full __iomem *lcpa; /* Runtime reconfiguration */ dma_addr_t runtime_addr; enum dma_transfer_direction runtime_direction; @@ -619,7 +619,7 @@ struct d40_base { /* Physical half channels */ struct d40_phy_res *phy_res; struct d40_lcla_pool lcla_pool; - void *lcpa_base; + void __iomem *lcpa_base; dma_addr_t phy_lcpa; resource_size_t lcpa_size; struct kmem_cache *desc_slab; diff --git a/drivers/dma/ste_dma40_ll.c b/drivers/dma/ste_dma40_ll.c index 4c489b126cb27..3be7f5b1abb08 100644 --- a/drivers/dma/ste_dma40_ll.c +++ b/drivers/dma/ste_dma40_ll.c @@ -333,10 +333,10 @@ static void d40_log_lli_link(struct d40_log_lli *lli_dst, (dlos << D40_MEM_LCSP1_SLOS_POS); } -void d40_log_lli_lcpa_write(struct d40_log_lli_full *lcpa, - struct d40_log_lli *lli_dst, - struct d40_log_lli *lli_src, - int next, unsigned int flags) +void d40_log_lli_lcpa_write(struct d40_log_lli_full __iomem *lcpa, + struct d40_log_lli *lli_dst, + struct d40_log_lli *lli_src, + int next, unsigned int flags) { d40_log_lli_link(lli_dst, lli_src, next, flags); diff --git a/drivers/dma/ste_dma40_ll.h b/drivers/dma/ste_dma40_ll.h index b04c4e92b4ed0..171249527fde2 100644 --- a/drivers/dma/ste_dma40_ll.h +++ b/drivers/dma/ste_dma40_ll.h @@ -455,7 +455,7 @@ int d40_log_sg_to_lli(struct scatterlist *sg, u32 lcsp13, /* src or dst*/ u32 data_width1, u32 data_width2); -void d40_log_lli_lcpa_write(struct d40_log_lli_full *lcpa, +void d40_log_lli_lcpa_write(struct d40_log_lli_full __iomem *lcpa, struct d40_log_lli *lli_dst, struct d40_log_lli *lli_src, int next, unsigned int flags); -- 2.53.0