summaryrefslogtreecommitdiff
path: root/arch/riscv/include
diff options
context:
space:
mode:
authorNam Cao <namcao@linutronix.de>2026-07-20 19:18:02 -0600
committerPaul Walmsley <pjw@kernel.org>2026-07-20 19:18:02 -0600
commit1d6f0a217c662693d2307ee06851cb4bfcbf9529 (patch)
tree0aca0221df69af83283f05c50a74cf73e34af925 /arch/riscv/include
parent1590cf0329716306e948a8fc29f1d3ee87d3989f (diff)
downloadlinux-next-1d6f0a217c662693d2307ee06851cb4bfcbf9529.tar.gz
linux-next-1d6f0a217c662693d2307ee06851cb4bfcbf9529.zip
riscv: time: Add missing __iomem in get_cycles() and get_cycles_hi()
__iomem is missing while calling readl_relaxed() in get_cycles() and get_cycles_hi() and sparse complains. Add __iomem to silence the sparse warnings. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202607160619.14G8GHp5-lkp@intel.com/ Signed-off-by: Nam Cao <namcao@linutronix.de> Link: https://patch.msgid.link/20260716053319.2178937-1-namcao@linutronix.de Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'arch/riscv/include')
-rw-r--r--arch/riscv/include/asm/timex.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/riscv/include/asm/timex.h b/arch/riscv/include/asm/timex.h
index a06697846e69..d41acfb3959d 100644
--- a/arch/riscv/include/asm/timex.h
+++ b/arch/riscv/include/asm/timex.h
@@ -22,13 +22,13 @@ static inline cycles_t get_cycles(void)
#else /* !CONFIG_64BIT */
static inline u32 get_cycles(void)
{
- return readl_relaxed(((u32 *)clint_time_val));
+ return readl_relaxed(((u32 __iomem *)clint_time_val));
}
#define get_cycles get_cycles
static inline u32 get_cycles_hi(void)
{
- return readl_relaxed(((u32 *)clint_time_val) + 1);
+ return readl_relaxed(((u32 __iomem *)clint_time_val) + 1);
}
#define get_cycles_hi get_cycles_hi
#endif /* CONFIG_64BIT */