From: Yang Shi <yang@os.amperecomputing.com>
To: kernel test robot <lkp@intel.com>,
catalin.marinas@arm.com, will@kernel.org, muchun.song@linux.dev,
akpm@linux-foundation.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [v2 PATCH 1/2] hugetlb: arm64: add mte support
Date: Mon, 26 Aug 2024 10:02:45 -0700 [thread overview]
Message-ID: <9b9b07cf-8edb-4779-96f8-324f81434d6d@os.amperecomputing.com> (raw)
In-Reply-To: <202408261816.ACEJvgZw-lkp@intel.com>
On 8/26/24 4:15 AM, kernel test robot wrote:
> Hi Yang,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on arm64/for-next/core]
> [also build test ERROR on kvmarm/next akpm-mm/mm-everything linus/master v6.11-rc5 next-20240823]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Yang-Shi/selftests-arm64-add-hugetlb-mte-tests/20240822-024935
> base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
> patch link: https://lore.kernel.org/r/20240821184752.3535276-1-yang%40os.amperecomputing.com
> patch subject: [v2 PATCH 1/2] hugetlb: arm64: add mte support
> config: arm64-randconfig-004-20240824 (https://download.01.org/0day-ci/archive/20240826/202408261816.ACEJvgZw-lkp@intel.com/config)
> compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 08e5a1de8227512d4774a534b91cb2353cef6284)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240826/202408261816.ACEJvgZw-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
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202408261816.ACEJvgZw-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> In file included from mm/gup.c:7:
> In file included from include/linux/mm.h:2228:
> include/linux/vmstat.h:500:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 500 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 501 | item];
> | ~~~~
> include/linux/vmstat.h:507:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 507 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 508 | NR_VM_NUMA_EVENT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~~
> include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 514 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
> | ~~~~~~~~~~~ ^ ~~~
> include/linux/vmstat.h:519:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 519 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 520 | NR_VM_NUMA_EVENT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~~
> In file included from mm/gup.c:18:
> In file included from include/linux/hugetlb.h:798:
>>> arch/arm64/include/asm/hugetlb.h:25:28: error: use of undeclared identifier 'PG_mte_lock'
> 25 | BIT(PG_mte_tagged) | BIT(PG_mte_lock);
Thanks for the report. It is because the config has CONFIG_MTE disabled.
I will fix this. But I'd prefer the response from the maintainers then
fix all them together.
> | ^
> In file included from mm/gup.c:20:
> include/linux/mm_inline.h:47:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 47 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
> | ~~~~~~~~~~~ ^ ~~~
> include/linux/mm_inline.h:49:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 49 | NR_ZONE_LRU_BASE + lru, nr_pages);
> | ~~~~~~~~~~~~~~~~ ^ ~~~
> 6 warnings and 1 error generated.
> --
> In file included from mm/swap.c:17:
> In file included from include/linux/mm.h:2228:
> include/linux/vmstat.h:500:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 500 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 501 | item];
> | ~~~~
> include/linux/vmstat.h:507:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 507 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 508 | NR_VM_NUMA_EVENT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~~
> include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 514 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
> | ~~~~~~~~~~~ ^ ~~~
> include/linux/vmstat.h:519:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 519 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 520 | NR_VM_NUMA_EVENT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~~
> In file included from mm/swap.c:26:
> include/linux/mm_inline.h:47:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 47 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
> | ~~~~~~~~~~~ ^ ~~~
> include/linux/mm_inline.h:49:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 49 | NR_ZONE_LRU_BASE + lru, nr_pages);
> | ~~~~~~~~~~~~~~~~ ^ ~~~
> In file included from mm/swap.c:36:
> In file included from include/linux/hugetlb.h:798:
>>> arch/arm64/include/asm/hugetlb.h:25:28: error: use of undeclared identifier 'PG_mte_lock'
> 25 | BIT(PG_mte_tagged) | BIT(PG_mte_lock);
> | ^
> 6 warnings and 1 error generated.
> --
> In file included from mm/shmem.c:28:
> In file included from include/linux/ramfs.h:5:
> In file included from include/linux/fs_parser.h:11:
> In file included from include/linux/fs_context.h:14:
> In file included from include/linux/security.h:33:
> In file included from include/linux/mm.h:2228:
> include/linux/vmstat.h:500:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 500 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 501 | item];
> | ~~~~
> include/linux/vmstat.h:507:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 507 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 508 | NR_VM_NUMA_EVENT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~~
> include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 514 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
> | ~~~~~~~~~~~ ^ ~~~
> include/linux/vmstat.h:519:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 519 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 520 | NR_VM_NUMA_EVENT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~~
> In file included from mm/shmem.c:39:
> In file included from include/linux/hugetlb.h:798:
>>> arch/arm64/include/asm/hugetlb.h:25:28: error: use of undeclared identifier 'PG_mte_lock'
> 25 | BIT(PG_mte_tagged) | BIT(PG_mte_lock);
> | ^
> In file included from mm/shmem.c:58:
> include/linux/mman.h:158:9: warning: division by zero is undefined [-Wdivision-by-zero]
> 158 | _calc_vm_trans(flags, MAP_SYNC, VM_SYNC ) |
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mman.h:136:21: note: expanded from macro '_calc_vm_trans'
> 136 | : ((x) & (bit1)) / ((bit1) / (bit2))))
> | ^ ~~~~~~~~~~~~~~~~~
> include/linux/mman.h:159:9: warning: division by zero is undefined [-Wdivision-by-zero]
> 159 | _calc_vm_trans(flags, MAP_STACK, VM_NOHUGEPAGE) |
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mman.h:136:21: note: expanded from macro '_calc_vm_trans'
> 136 | : ((x) & (bit1)) / ((bit1) / (bit2))))
> | ^ ~~~~~~~~~~~~~~~~~
> 6 warnings and 1 error generated.
> --
> In file included from mm/mprotect.c:12:
> In file included from include/linux/pagewalk.h:5:
> In file included from include/linux/mm.h:2228:
> include/linux/vmstat.h:500:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 500 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 501 | item];
> | ~~~~
> include/linux/vmstat.h:507:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 507 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 508 | NR_VM_NUMA_EVENT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~~
> include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 514 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
> | ~~~~~~~~~~~ ^ ~~~
> include/linux/vmstat.h:519:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 519 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 520 | NR_VM_NUMA_EVENT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~~
> In file included from mm/mprotect.c:13:
> In file included from include/linux/hugetlb.h:798:
>>> arch/arm64/include/asm/hugetlb.h:25:28: error: use of undeclared identifier 'PG_mte_lock'
> 25 | BIT(PG_mte_tagged) | BIT(PG_mte_lock);
> | ^
> In file included from mm/mprotect.c:15:
> include/linux/mman.h:158:9: warning: division by zero is undefined [-Wdivision-by-zero]
> 158 | _calc_vm_trans(flags, MAP_SYNC, VM_SYNC ) |
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mman.h:136:21: note: expanded from macro '_calc_vm_trans'
> 136 | : ((x) & (bit1)) / ((bit1) / (bit2))))
> | ^ ~~~~~~~~~~~~~~~~~
> include/linux/mman.h:159:9: warning: division by zero is undefined [-Wdivision-by-zero]
> 159 | _calc_vm_trans(flags, MAP_STACK, VM_NOHUGEPAGE) |
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mman.h:136:21: note: expanded from macro '_calc_vm_trans'
> 136 | : ((x) & (bit1)) / ((bit1) / (bit2))))
> | ^ ~~~~~~~~~~~~~~~~~
> In file included from mm/mprotect.c:30:
> include/linux/mm_inline.h:47:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 47 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
> | ~~~~~~~~~~~ ^ ~~~
> include/linux/mm_inline.h:49:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 49 | NR_ZONE_LRU_BASE + lru, nr_pages);
> | ~~~~~~~~~~~~~~~~ ^ ~~~
> 8 warnings and 1 error generated.
> --
> In file included from mm/show_mem.c:8:
> In file included from include/linux/blkdev.h:9:
> In file included from include/linux/blk_types.h:10:
> In file included from include/linux/bvec.h:10:
> In file included from include/linux/highmem.h:8:
> In file included from include/linux/cacheflush.h:5:
> In file included from arch/arm64/include/asm/cacheflush.h:11:
> In file included from include/linux/kgdb.h:19:
> In file included from include/linux/kprobes.h:28:
> In file included from include/linux/ftrace.h:13:
> In file included from include/linux/kallsyms.h:13:
> In file included from include/linux/mm.h:2228:
> include/linux/vmstat.h:500:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 500 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 501 | item];
> | ~~~~
> include/linux/vmstat.h:507:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 507 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 508 | NR_VM_NUMA_EVENT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~~
> include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 514 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
> | ~~~~~~~~~~~ ^ ~~~
> include/linux/vmstat.h:519:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 519 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 520 | NR_VM_NUMA_EVENT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~~
> In file included from mm/show_mem.c:12:
> In file included from include/linux/hugetlb.h:798:
>>> arch/arm64/include/asm/hugetlb.h:25:28: error: use of undeclared identifier 'PG_mte_lock'
> 25 | BIT(PG_mte_tagged) | BIT(PG_mte_lock);
> | ^
> 4 warnings and 1 error generated.
> --
> In file included from mm/mremap.c:11:
> In file included from include/linux/mm.h:2228:
> include/linux/vmstat.h:500:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 500 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 501 | item];
> | ~~~~
> include/linux/vmstat.h:507:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 507 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 508 | NR_VM_NUMA_EVENT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~~
> include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 514 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
> | ~~~~~~~~~~~ ^ ~~~
> include/linux/vmstat.h:519:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 519 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 520 | NR_VM_NUMA_EVENT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~~
> In file included from mm/mremap.c:12:
> include/linux/mm_inline.h:47:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 47 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
> | ~~~~~~~~~~~ ^ ~~~
> include/linux/mm_inline.h:49:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 49 | NR_ZONE_LRU_BASE + lru, nr_pages);
> | ~~~~~~~~~~~~~~~~ ^ ~~~
> In file included from mm/mremap.c:13:
> In file included from include/linux/hugetlb.h:798:
>>> arch/arm64/include/asm/hugetlb.h:25:28: error: use of undeclared identifier 'PG_mte_lock'
> 25 | BIT(PG_mte_tagged) | BIT(PG_mte_lock);
> | ^
> In file included from mm/mremap.c:16:
> include/linux/mman.h:158:9: warning: division by zero is undefined [-Wdivision-by-zero]
> 158 | _calc_vm_trans(flags, MAP_SYNC, VM_SYNC ) |
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mman.h:136:21: note: expanded from macro '_calc_vm_trans'
> 136 | : ((x) & (bit1)) / ((bit1) / (bit2))))
> | ^ ~~~~~~~~~~~~~~~~~
> include/linux/mman.h:159:9: warning: division by zero is undefined [-Wdivision-by-zero]
> 159 | _calc_vm_trans(flags, MAP_STACK, VM_NOHUGEPAGE) |
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mman.h:136:21: note: expanded from macro '_calc_vm_trans'
> 136 | : ((x) & (bit1)) / ((bit1) / (bit2))))
> | ^ ~~~~~~~~~~~~~~~~~
> 8 warnings and 1 error generated.
> --
> In file included from mm/huge_memory.c:8:
> In file included from include/linux/mm.h:2228:
> include/linux/vmstat.h:500:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 500 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 501 | item];
> | ~~~~
> include/linux/vmstat.h:507:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 507 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 508 | NR_VM_NUMA_EVENT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~~
> include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 514 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
> | ~~~~~~~~~~~ ^ ~~~
> include/linux/vmstat.h:519:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 519 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 520 | NR_VM_NUMA_EVENT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~~
> In file included from mm/huge_memory.c:14:
> In file included from include/linux/hugetlb.h:798:
>>> arch/arm64/include/asm/hugetlb.h:25:28: error: use of undeclared identifier 'PG_mte_lock'
> 25 | BIT(PG_mte_tagged) | BIT(PG_mte_lock);
> | ^
> In file included from mm/huge_memory.c:19:
> include/linux/mm_inline.h:47:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 47 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
> | ~~~~~~~~~~~ ^ ~~~
> include/linux/mm_inline.h:49:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 49 | NR_ZONE_LRU_BASE + lru, nr_pages);
> | ~~~~~~~~~~~~~~~~ ^ ~~~
> In file included from mm/huge_memory.c:27:
> include/linux/mman.h:158:9: warning: division by zero is undefined [-Wdivision-by-zero]
> 158 | _calc_vm_trans(flags, MAP_SYNC, VM_SYNC ) |
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mman.h:136:21: note: expanded from macro '_calc_vm_trans'
> 136 | : ((x) & (bit1)) / ((bit1) / (bit2))))
> | ^ ~~~~~~~~~~~~~~~~~
> include/linux/mman.h:159:9: warning: division by zero is undefined [-Wdivision-by-zero]
> 159 | _calc_vm_trans(flags, MAP_STACK, VM_NOHUGEPAGE) |
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mman.h:136:21: note: expanded from macro '_calc_vm_trans'
> 136 | : ((x) & (bit1)) / ((bit1) / (bit2))))
> | ^ ~~~~~~~~~~~~~~~~~
> 8 warnings and 1 error generated.
> --
> In file included from mm/vmscan.c:15:
> In file included from include/linux/mm.h:2228:
> include/linux/vmstat.h:500:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 500 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 501 | item];
> | ~~~~
> include/linux/vmstat.h:507:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 507 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 508 | NR_VM_NUMA_EVENT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~~
> include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 514 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
> | ~~~~~~~~~~~ ^ ~~~
> include/linux/vmstat.h:519:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> 519 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~ ^
> 520 | NR_VM_NUMA_EVENT_ITEMS +
> | ~~~~~~~~~~~~~~~~~~~~~~
> In file included from mm/vmscan.c:30:
> include/linux/mm_inline.h:47:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 47 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
> | ~~~~~~~~~~~ ^ ~~~
> include/linux/mm_inline.h:49:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 49 | NR_ZONE_LRU_BASE + lru, nr_pages);
> | ~~~~~~~~~~~~~~~~ ^ ~~~
> In file included from mm/vmscan.c:42:
> In file included from include/linux/migrate.h:8:
> In file included from include/linux/hugetlb.h:798:
>>> arch/arm64/include/asm/hugetlb.h:25:28: error: use of undeclared identifier 'PG_mte_lock'
> 25 | BIT(PG_mte_tagged) | BIT(PG_mte_lock);
> | ^
> mm/vmscan.c:401:51: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 401 | size += zone_page_state(zone, NR_ZONE_LRU_BASE + lru);
> | ~~~~~~~~~~~~~~~~ ^ ~~~
> mm/vmscan.c:1729:4: warning: arithmetic between different enumeration types ('enum vm_event_item' and 'enum zone_type') [-Wenum-enum-conversion]
> 1729 | __count_zid_vm_events(PGSCAN_SKIP, zid, nr_skipped[zid]);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/vmstat.h:135:34: note: expanded from macro '__count_zid_vm_events'
> 135 | __count_vm_events(item##_NORMAL - ZONE_NORMAL + zid, delta)
> | ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
> mm/vmscan.c:2232:51: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 2232 | inactive = lruvec_page_state(lruvec, NR_LRU_BASE + inactive_lru);
> | ~~~~~~~~~~~ ^ ~~~~~~~~~~~~
> mm/vmscan.c:2233:49: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> 2233 | active = lruvec_page_state(lruvec, NR_LRU_BASE + active_lru);
> | ~~~~~~~~~~~ ^ ~~~~~~~~~~
> mm/vmscan.c:6247:3: warning: arithmetic between different enumeration types ('enum vm_event_item' and 'enum zone_type') [-Wenum-enum-conversion]
> 6247 | __count_zid_vm_events(ALLOCSTALL, sc->reclaim_idx, 1);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/vmstat.h:135:34: note: expanded from macro '__count_zid_vm_events'
> 135 | __count_vm_events(item##_NORMAL - ZONE_NORMAL + zid, delta)
> | ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
> 11 warnings and 1 error generated.
> ..
>
>
> vim +/PG_mte_lock +25 arch/arm64/include/asm/hugetlb.h
>
> 21
> 22 static inline void arch_clear_hugetlb_flags(struct folio *folio)
> 23 {
> 24 const unsigned long clear_flags = BIT(PG_dcache_clean) |
> > 25 BIT(PG_mte_tagged) | BIT(PG_mte_lock);
> 26
> 27 if (!system_supports_mte()) {
> 28 clear_bit(PG_dcache_clean, &folio->flags);
> 29 return;
> 30 }
> 31
> 32 folio->flags &= ~clear_flags;
> 33 }
> 34 #define arch_clear_hugetlb_flags arch_clear_hugetlb_flags
> 35
>
next prev parent reply other threads:[~2024-08-26 17:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-21 18:47 Yang Shi
2024-08-21 18:47 ` [v2 PATCH 2/2] selftests: arm64: add hugetlb mte tests Yang Shi
2024-08-26 11:15 ` [v2 PATCH 1/2] hugetlb: arm64: add mte support kernel test robot
2024-08-26 17:02 ` Yang Shi [this message]
2024-08-28 17:57 ` Yang Shi
2024-09-02 14:33 ` David Hildenbrand
2024-09-03 16:46 ` Yang Shi
2024-09-03 21:35 ` David Hildenbrand
2024-09-04 17:57 ` Yang Shi
2024-09-04 18:35 ` David Hildenbrand
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=9b9b07cf-8edb-4779-96f8-324f81434d6d@os.amperecomputing.com \
--to=yang@os.amperecomputing.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=muchun.song@linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=will@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