include/asm-generic/tlb.h:609:42: sparse: sparse: cast truncates bits from constant value (1000000000 becomes 0)
From: kernel test robot
Date: Mon Apr 20 2026 - 23:31:33 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b4e07588e743c989499ca24d49e752c074924a9a
commit: c090868f59ce888db838cf543d18f731d13ed498 Revert "hugetlb: make hugetlb depends on SYSFS or SYSCTL"
date: 7 months ago
config: arm64-randconfig-r112-20260420 (https://download.01.org/0day-ci/archive/20260421/202604211126.7cN4M93P-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 8.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260421/202604211126.7cN4M93P-lkp@xxxxxxxxx/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: c090868f59ce ("Revert "hugetlb: make hugetlb depends on SYSFS or SYSCTL"")
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604211126.7cN4M93P-lkp@xxxxxxxxx/
sparse warnings: (new ones prefixed by >>)
mm/hugetlb.c:665:12: sparse: sparse: context imbalance in 'allocate_file_region_entries' - wrong count at exit
mm/hugetlb.c:736:13: sparse: sparse: context imbalance in 'region_add' - wrong count at exit
mm/hugetlb.c:803:13: sparse: sparse: context imbalance in 'region_chg' - wrong count at exit
mm/hugetlb.c:5778:20: sparse: sparse: context imbalance in 'move_huge_pte' - different lock contexts for basic block
mm/hugetlb.c: note: in included file (through arch/arm64/include/asm/tlb.h):
>> include/asm-generic/tlb.h:609:42: sparse: sparse: cast truncates bits from constant value (1000000000 becomes 0)
mm/hugetlb.c: note: in included file (through arch/arm64/include/asm/barrier.h, include/linux/list.h):
arch/arm64/include/asm/alternative-macros.h:232:9: sparse: sparse: context imbalance in 'hugetlb_wp' - unexpected unlock
vim +609 include/asm-generic/tlb.h
2631ed00b04988 Peter Zijlstra (Intel 2020-06-25 605)
2631ed00b04988 Peter Zijlstra (Intel 2020-06-25 606) static inline void tlb_flush_pmd_range(struct mmu_gather *tlb,
2631ed00b04988 Peter Zijlstra (Intel 2020-06-25 607) unsigned long address, unsigned long size)
2631ed00b04988 Peter Zijlstra (Intel 2020-06-25 608) {
2631ed00b04988 Peter Zijlstra (Intel 2020-06-25 @609) __tlb_adjust_range(tlb, address, size);
2631ed00b04988 Peter Zijlstra (Intel 2020-06-25 610) tlb->cleared_pmds = 1;
2631ed00b04988 Peter Zijlstra (Intel 2020-06-25 611) }
2631ed00b04988 Peter Zijlstra (Intel 2020-06-25 612)
:::::: The code at line 609 was first introduced by commit
:::::: 2631ed00b0498810f8d5c2163c6b5270d893687b tlb: mmu_gather: add tlb_flush_*_range APIs
:::::: TO: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
:::::: CC: Catalin Marinas <catalin.marinas@xxxxxxx>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki