From: kernel test robot <lkp@intel.com>
To: Nam Cao <namcao@linutronix.de>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Paul Walmsley <pjw@kernel.org>
Subject: arch/riscv/include/asm/timex.h:31:16: sparse: sparse: cast removes address space '__iomem' of expression
Date: Thu, 16 Jul 2026 06:58:47 +0800 [thread overview]
Message-ID: <202607160619.14G8GHp5-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 58717b2a1365d06c8c64b72aa948541b53fe31eb
commit: c03ad15f7cf60999681a3e5784404a73a93e6506 riscv: Reuse measure_cycles() in check_vector_unaligned_access()
date: 3 months ago
config: riscv-randconfig-r111-20260715 (https://download.01.org/0day-ci/archive/20260716/202607160619.14G8GHp5-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project b3e6e6dabdc02153552a64fc74ff5c7532447eed)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260716/202607160619.14G8GHp5-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: c03ad15f7cf6 ("riscv: Reuse measure_cycles() in check_vector_unaligned_access()")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607160619.14G8GHp5-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
WARNING: invalid argument to '-march': '_zacas_zabha'
arch/riscv/kernel/unaligned_access_speed.c: note: in included file (through include/linux/timex.h, include/linux/time32.h, include/linux/time.h, include/linux/jiffies.h, ...):
>> arch/riscv/include/asm/timex.h:31:16: sparse: sparse: cast removes address space '__iomem' of expression
>> arch/riscv/include/asm/timex.h:31:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int [usertype] * @@
arch/riscv/include/asm/timex.h:31:16: sparse: expected void const volatile [noderef] __iomem *addr
arch/riscv/include/asm/timex.h:31:16: sparse: got unsigned int [usertype] *
>> arch/riscv/include/asm/timex.h:31:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int [usertype] * @@
arch/riscv/include/asm/timex.h:31:16: sparse: expected void const volatile [noderef] __iomem *addr
arch/riscv/include/asm/timex.h:31:16: sparse: got unsigned int [usertype] *
arch/riscv/include/asm/timex.h:25:16: sparse: sparse: cast removes address space '__iomem' of expression
arch/riscv/include/asm/timex.h:25:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int [usertype] * @@
arch/riscv/include/asm/timex.h:25:16: sparse: expected void const volatile [noderef] __iomem *addr
arch/riscv/include/asm/timex.h:25:16: sparse: got unsigned int [usertype] *
>> arch/riscv/include/asm/timex.h:31:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int [usertype] * @@
arch/riscv/include/asm/timex.h:31:16: sparse: expected void const volatile [noderef] __iomem *addr
arch/riscv/include/asm/timex.h:31:16: sparse: got unsigned int [usertype] *
>> arch/riscv/include/asm/timex.h:31:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int [usertype] * @@
arch/riscv/include/asm/timex.h:31:16: sparse: expected void const volatile [noderef] __iomem *addr
arch/riscv/include/asm/timex.h:31:16: sparse: got unsigned int [usertype] *
arch/riscv/include/asm/timex.h:25:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int [usertype] * @@
arch/riscv/include/asm/timex.h:25:16: sparse: expected void const volatile [noderef] __iomem *addr
arch/riscv/include/asm/timex.h:25:16: sparse: got unsigned int [usertype] *
vim +/__iomem +31 arch/riscv/include/asm/timex.h
d5be89a8d118a8e Palmer Dabbelt 2020-09-14 28
d5be89a8d118a8e Palmer Dabbelt 2020-09-14 29 static inline u32 get_cycles_hi(void)
d5be89a8d118a8e Palmer Dabbelt 2020-09-14 30 {
d5be89a8d118a8e Palmer Dabbelt 2020-09-14 @31 return readl_relaxed(((u32 *)clint_time_val) + 1);
d5be89a8d118a8e Palmer Dabbelt 2020-09-14 32 }
d5be89a8d118a8e Palmer Dabbelt 2020-09-14 33 #define get_cycles_hi get_cycles_hi
d5be89a8d118a8e Palmer Dabbelt 2020-09-14 34 #endif /* CONFIG_64BIT */
d5be89a8d118a8e Palmer Dabbelt 2020-09-14 35
:::::: The code at line 31 was first introduced by commit
:::::: d5be89a8d118a8e8d09cd74a921a808f17fbdd09 RISC-V: Resurrect the MMIO timer implementation for M-mode systems
:::::: TO: Palmer Dabbelt <palmerdabbelt@google.com>
:::::: CC: Palmer Dabbelt <palmerdabbelt@google.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-07-15 22:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 22:58 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-06-04 0:19 kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202607160619.14G8GHp5-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namcao@linutronix.de \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pjw@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome