llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* arch/x86/mm/pat/memtype.c:128:39: error: use of undeclared identifier 'PG_arch_2'; did you mean 'PG_arch_1'?
@ 2024-10-05 10:11 kernel test robot
  2024-10-05 12:20 ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2024-10-05 10:11 UTC (permalink / raw)
  To: Matthew Wilcox (Oracle)
  Cc: llvm, oe-kbuild-all, linux-kernel, Andrew Morton,
	Linux Memory Management List

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   27cc6fdf720183dce1dbd293483ec5a9cb6b595e
commit: 7a87225ae2c6c317c7b80cf599e5cf0eee699196 x86: remove PG_uncached
date:   4 weeks ago
config: x86_64-randconfig-003-20241002 (https://download.01.org/0day-ci/archive/20241005/202410051828.Pb7a79Gu-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241005/202410051828.Pb7a79Gu-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/202410051828.Pb7a79Gu-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/x86/mm/pat/memtype.c:128:39: error: use of undeclared identifier 'PG_arch_2'; did you mean 'PG_arch_1'?
     128 |         unsigned long pg_flags = pg->flags & _PGMT_MASK;
         |                                              ^
   arch/x86/mm/pat/memtype.c:123:29: note: expanded from macro '_PGMT_MASK'
     123 | #define _PGMT_MASK              (1UL << PG_arch_2 | 1UL << PG_arch_1)
         |                                         ^
   include/linux/page-flags.h:106:2: note: 'PG_arch_1' declared here
     106 |         PG_arch_1,
         |         ^
   arch/x86/mm/pat/memtype.c:134:23: error: use of undeclared identifier 'PG_arch_2'; did you mean 'PG_arch_1'?
     134 |         else if (pg_flags == _PGMT_UC_MINUS)
         |                              ^
   arch/x86/mm/pat/memtype.c:121:33: note: expanded from macro '_PGMT_UC_MINUS'
     121 | #define _PGMT_UC_MINUS          (1UL << PG_arch_2)
         |                                         ^
   include/linux/page-flags.h:106:2: note: 'PG_arch_1' declared here
     106 |         PG_arch_1,
         |         ^
   arch/x86/mm/pat/memtype.c:152:19: error: use of undeclared identifier 'PG_arch_2'; did you mean 'PG_arch_1'?
     152 |                 memtype_flags = _PGMT_UC_MINUS;
         |                                 ^
   arch/x86/mm/pat/memtype.c:121:33: note: expanded from macro '_PGMT_UC_MINUS'
     121 | #define _PGMT_UC_MINUS          (1UL << PG_arch_2)
         |                                         ^
   include/linux/page-flags.h:106:2: note: 'PG_arch_1' declared here
     106 |         PG_arch_1,
         |         ^
   arch/x86/mm/pat/memtype.c:155:19: error: use of undeclared identifier 'PG_arch_2'; did you mean 'PG_arch_1'?
     155 |                 memtype_flags = _PGMT_WT;
         |                                 ^
   arch/x86/mm/pat/memtype.c:122:27: note: expanded from macro '_PGMT_WT'
     122 | #define _PGMT_WT                (1UL << PG_arch_2 | 1UL << PG_arch_1)
         |                                         ^
   include/linux/page-flags.h:106:2: note: 'PG_arch_1' declared here
     106 |         PG_arch_1,
         |         ^
   arch/x86/mm/pat/memtype.c:165:28: error: use of undeclared identifier 'PG_arch_2'; did you mean 'PG_arch_1'?
     165 |                 new_flags = (old_flags & _PGMT_CLEAR_MASK) | memtype_flags;
         |                                          ^
   arch/x86/mm/pat/memtype.c:124:28: note: expanded from macro '_PGMT_CLEAR_MASK'
     124 | #define _PGMT_CLEAR_MASK        (~_PGMT_MASK)
         |                                   ^
   arch/x86/mm/pat/memtype.c:123:29: note: expanded from macro '_PGMT_MASK'
     123 | #define _PGMT_MASK              (1UL << PG_arch_2 | 1UL << PG_arch_1)
         |                                         ^
   include/linux/page-flags.h:106:2: note: 'PG_arch_1' declared here
     106 |         PG_arch_1,
         |         ^
   5 errors generated.


vim +128 arch/x86/mm/pat/memtype.c

0dbcae884779fd arch/x86/mm/pat.c Thomas Gleixner 2014-11-16  125  
0dbcae884779fd arch/x86/mm/pat.c Thomas Gleixner 2014-11-16  126  static inline enum page_cache_mode get_page_memtype(struct page *pg)
0dbcae884779fd arch/x86/mm/pat.c Thomas Gleixner 2014-11-16  127  {
0dbcae884779fd arch/x86/mm/pat.c Thomas Gleixner 2014-11-16 @128  	unsigned long pg_flags = pg->flags & _PGMT_MASK;
0dbcae884779fd arch/x86/mm/pat.c Thomas Gleixner 2014-11-16  129  
35a5a10411d87e arch/x86/mm/pat.c Toshi Kani      2015-06-04  130  	if (pg_flags == _PGMT_WB)
35a5a10411d87e arch/x86/mm/pat.c Toshi Kani      2015-06-04  131  		return _PAGE_CACHE_MODE_WB;
0dbcae884779fd arch/x86/mm/pat.c Thomas Gleixner 2014-11-16  132  	else if (pg_flags == _PGMT_WC)
0dbcae884779fd arch/x86/mm/pat.c Thomas Gleixner 2014-11-16  133  		return _PAGE_CACHE_MODE_WC;
0dbcae884779fd arch/x86/mm/pat.c Thomas Gleixner 2014-11-16  134  	else if (pg_flags == _PGMT_UC_MINUS)
0dbcae884779fd arch/x86/mm/pat.c Thomas Gleixner 2014-11-16  135  		return _PAGE_CACHE_MODE_UC_MINUS;
0dbcae884779fd arch/x86/mm/pat.c Thomas Gleixner 2014-11-16  136  	else
35a5a10411d87e arch/x86/mm/pat.c Toshi Kani      2015-06-04  137  		return _PAGE_CACHE_MODE_WT;
0dbcae884779fd arch/x86/mm/pat.c Thomas Gleixner 2014-11-16  138  }
0dbcae884779fd arch/x86/mm/pat.c Thomas Gleixner 2014-11-16  139  

:::::: The code at line 128 was first introduced by commit
:::::: 0dbcae884779fdf7e2239a97ac7488877f0693d9 x86: mm: Move PAT only functions to mm/pat.c

:::::: TO: Thomas Gleixner <tglx@linutronix.de>
:::::: CC: Thomas Gleixner <tglx@linutronix.de>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-11 23:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-05 10:11 arch/x86/mm/pat/memtype.c:128:39: error: use of undeclared identifier 'PG_arch_2'; did you mean 'PG_arch_1'? kernel test robot
2024-10-05 12:20 ` Matthew Wilcox
2024-10-11 23:04   ` Philip Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).