From: Matthew Wilcox <willy@infradead.org>
To: kernel test robot <lkp@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: arch/x86/mm/pat/memtype.c:128:39: error: use of undeclared identifier 'PG_arch_2'; did you mean 'PG_arch_1'?
Date: Sat, 5 Oct 2024 13:20:22 +0100 [thread overview]
Message-ID: <ZwEvBunv7-JtcLdn@casper.infradead.org> (raw)
In-Reply-To: <202410051828.Pb7a79Gu-lkp@intel.com>
On Sat, Oct 05, 2024 at 06:11:14PM +0800, kernel test robot wrote:
> 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)
Hum, works for me with both gcc and clang-17, but that shouldn't make a
difference here. The config has ARCH_USES_PG_ARCH_2 selected.
> 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
next prev parent reply other threads:[~2024-10-05 12:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2024-10-11 23:04 ` Philip Li
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=ZwEvBunv7-JtcLdn@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.