From nobody Sat Jul 25 16:20:12 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A07B386C3B for ; Thu, 16 Jul 2026 05:33:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784180015; cv=none; b=sHWcUSrXu30RNweFX7jMz1zrYlCIDMQ8kPPDSppQj4RvAaEsVexFVDUzJxgH4FllfwUb/9CKWpzZRJuFpedn6DFBHAvZJ6JCtFN2OBTkkWGuJmGi+g6a8mTfE/4XolLwoV2WOi20C3+Z4ZO4zScYClzz0QfSJh95sdjETBb9AoY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784180015; c=relaxed/simple; bh=eRonLbdx4OF+MNQqzo5lNKRBAsNmvqvTZWzvIE0YxXA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=X9lYhyV8HoOYbVbnAUUzi2AIp9AkjlFmeht9BM5fNRn8kudl14hInaePLDzMeWUkGznGUsAhil/ALSLzWVJvwUK3Q9mucnDA+z/kfpUoUIGUHmk70ioLnGmFqcmxE87OEwJva8OKlJ5mPio0C4w0caBDPMVNNoICwTvgGMKQIuc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=khdTYKRC; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ZOk0FZc7; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="khdTYKRC"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ZOk0FZc7" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1784180011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Mg3nTgYwXyWhy++IW/BUraB5RyAXTd+3PP9tGBp6bEA=; b=khdTYKRCKNphPkwp+sMx9U0V79QhChBSwT36G+Lcs1+e/3KovqC55Zjef3YJ9XbSccXN36 8xu1aNQGrcFZ1c0Zxzx5A4qkmpAKgHffF5UaTzG2oElYkC72J1ES0A+NxFTZc9QYgnYY5C v2GxRAqk9GTKkO/DCnGRh3WVzsPTbb4sYa+N/tR9m6WOw6O5VCxBRV8RjoICuFbopQryfa LDSsifemEd30TjF5owxXy7t0GXpR95uimeihg/ddP1Ydlhg4Ic+V9CrBpkvtUFu1WMoNlm IpDWQJSMV6ZodrULDl4DYj35eNTCo4477j/SEqBNr6cX7YTKdtC3j+dQDpoIsw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1784180011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Mg3nTgYwXyWhy++IW/BUraB5RyAXTd+3PP9tGBp6bEA=; b=ZOk0FZc7zaWr8jLGN/sZkX5J/zdfWVAlyTYvZjkJoRclBh8H0epJb8uGizSrBu0SEO7APz uliT2cZTD358irCA== To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Nam Cao , kernel test robot Subject: [PATCH] riscv: time: Add missing __iomem in get_cycles() and get_cycles_hi() Date: Thu, 16 Jul 2026 07:33:19 +0200 Message-ID: <20260716053319.2178937-1-namcao@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" __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 Closes: https://lore.kernel.org/oe-kbuild-all/202607160619.14G8GHp5-lkp@int= el.com/ Signed-off-by: Nam Cao --- arch/riscv/include/asm/timex.h | 4 ++-- 1 file 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 =20 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 */ --=20 2.47.3