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=1796387740; b=T9LrJc5Sn7Q3ESEF9Q1pORpGQ/zNBGqDPDuOg1Se2eMMADrM/J0MdrPTJNsbIvOMaf5C dodtV6LgHGqWJ1r1jGb0PWaT+0yQmnHPE84WTDJdzrAaGbiFSGKdzy7CkMLfcLats+RMa yQereeT6Nprw90OLf9HktLos+6L05J9C01NQ10nWDm405oUdLlOm9zYR66+7UddnNCE6m oZNeleiLWBkFVX2Y1mFbYlHWrT3JplM4ScABtQGur9lwWBvg6mzX6Da43jAT41/Hp2Hc3 iJNpq9g8tAimVNjFPmrVv6zZCX2o+nUtSg7SmtesTQPzhm9nTvYMy32DjPV2Q6KSj5Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387740; 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=1oQHRbr8mHaQVcHupecWHZ8055ijmncvQFsf41qx9mo=; b=1kJLnNb12WBCrjXz3omVmYgzlCp1jdVGZY0RWstb0QZs0OVWXD84uV4/GG8SVVZTTrUr F6J9ykZpOGx9tgcukMBfDmsW3LCI/JfhJ6HQ3PoTbEkE8An1VgEsFZqEQ3xP1Mhfi+ml2 0NLD4VXIHyWczkBtFTSWgOh0IP1+v9NcpUcvG3W07kTNba4Da1DQ5Hy35b5R0HK1yXihO gl14UPhmuWCAboanIXysGpdyxWjhDKwW7BtwdHDdIiXuDye3J6cHvAxKIt7Q/0ied1KeR x76buVTpCwX4d80696xezObg4lNweGy/B6HeXLKtbdec6FYhsE4IvltC8APmtITAz9g== 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=SjKO7HIA; 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 167CA606A330; Fri, 4 Dec 2026 12:35: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=SjKO7HIA Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7DF671F0092C; Fri, 4 Dec 2026 12:35:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796387739; bh=1oQHRbr8mHaQVcHupecWHZ8055ijmncvQFsf41qx9mo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=SjKO7HIA7MUowMWnHzTlw7kl6C30lSA+Klwfrziy9NeWkTkMfGdmCi29SjelIhKDc u5IEhZHhnJQA4uFpKhz2rp1+0Id+cyy55jU7XO7tuh+iD0WKEcdMcXi39ZPSPOO9T9 seNl77cQaJ9t9l7/HgoFws5wodBl/2k0WR2d29ls= 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.1 0371/1059] dmaengine: ste_dma40: Preserve the LCPA I/O address space Date: Fri, 4 Dec 2026 18:58:22 +0900 Message-ID: <20261204100653.893726946@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-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 9276ac7f63eb4..430270287dcba 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -497,7 +497,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; @@ -610,7 +610,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 b5287c661eb7a..862ff5996b8ff 100644 --- a/drivers/dma/ste_dma40_ll.c +++ b/drivers/dma/ste_dma40_ll.c @@ -332,10 +332,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