From: kernel test robot <lkp@intel.com>
To: alexs@kernel.org
Cc: oe-kbuild-all@lists.linux.dev
Subject: [alexshi:ptdesc1217 1/1] arch/xtensa/include/asm/pgalloc.h:58:7: error: assignment to 'struct page *' from incompatible pointer type 'pgtable_t' {aka 'struct ptdesc *'}
Date: Mon, 22 Dec 2025 06:48:09 +0800 [thread overview]
Message-ID: <202512220624.cxcWToU5-lkp@intel.com> (raw)
tree: https://github.com/alexshi/linux.git ptdesc1217
head: 5a13c35972782c993b40bf3d92ada4db87f4ee5e
commit: 5a13c35972782c993b40bf3d92ada4db87f4ee5e [1/1] mm/pgtable: convert pgtable_t to ptdesc pointer
config: xtensa-randconfig-r072-20251221 (https://download.01.org/0day-ci/archive/20251222/202512220624.cxcWToU5-lkp@intel.com/config)
compiler: xtensa-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251222/202512220624.cxcWToU5-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/202512220624.cxcWToU5-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/linux/pgalloc.h:6,
from mm/filemap.c:51:
arch/xtensa/include/asm/pgalloc.h: In function 'pte_alloc_one':
>> arch/xtensa/include/asm/pgalloc.h:58:7: error: assignment to 'struct page *' from incompatible pointer type 'pgtable_t' {aka 'struct ptdesc *'} [-Werror=incompatible-pointer-types]
page = __pte_alloc_one(mm, GFP_PGTABLE_USER);
^
>> arch/xtensa/include/asm/pgalloc.h:62:9: error: returning 'struct page *' from a function with incompatible return type 'pgtable_t' {aka 'struct ptdesc *'} [-Werror=incompatible-pointer-types]
return page;
^~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/pgalloc.h:6,
from mm/memory.c:79:
arch/xtensa/include/asm/pgalloc.h: In function 'pte_alloc_one':
>> arch/xtensa/include/asm/pgalloc.h:58:7: error: assignment to 'struct page *' from incompatible pointer type 'pgtable_t' {aka 'struct ptdesc *'} [-Werror=incompatible-pointer-types]
page = __pte_alloc_one(mm, GFP_PGTABLE_USER);
^
>> arch/xtensa/include/asm/pgalloc.h:62:9: error: returning 'struct page *' from a function with incompatible return type 'pgtable_t' {aka 'struct ptdesc *'} [-Werror=incompatible-pointer-types]
return page;
^~~~
In file included from include/linux/shm.h:6,
from include/linux/sched.h:23,
from include/linux/percpu.h:12,
from include/linux/kernel_stat.h:7,
from mm/memory.c:42:
mm/memory.c: In function 'pmd_install':
include/asm-generic/memory_model.h:19:53: error: invalid operands to binary - (have 'pgtable_t' {aka 'struct ptdesc *'} and 'struct page *')
#define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
~~~~~~ ^
arch/xtensa/include/asm/page.h:169:29: note: in definition of macro '__va'
((void *)((unsigned long) (x) - PHYS_OFFSET + PAGE_OFFSET))
^
include/asm-generic/memory_model.h:73:21: note: in expansion of macro '__page_to_pfn'
#define page_to_pfn __page_to_pfn
^~~~~~~~~~~~~
arch/xtensa/include/asm/page.h:172:33: note: in expansion of macro 'page_to_pfn'
#define page_to_virt(page) __va(page_to_pfn(page) << PAGE_SHIFT)
^~~~~~~~~~~
arch/xtensa/include/asm/pgalloc.h:27:38: note: in expansion of macro 'page_to_virt'
(pmd_val(*(pmdp)) = ((unsigned long)page_to_virt(page)))
^~~~~~~~~~~~
mm/memory.c:445:3: note: in expansion of macro 'pmd_populate'
pmd_populate(mm, pmd, *pte);
^~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/pgalloc.h:6,
from mm/debug_vm_pgtable.c:33:
arch/xtensa/include/asm/pgalloc.h: In function 'pte_alloc_one':
>> arch/xtensa/include/asm/pgalloc.h:58:7: error: assignment to 'struct page *' from incompatible pointer type 'pgtable_t' {aka 'struct ptdesc *'} [-Werror=incompatible-pointer-types]
page = __pte_alloc_one(mm, GFP_PGTABLE_USER);
^
>> arch/xtensa/include/asm/pgalloc.h:62:9: error: returning 'struct page *' from a function with incompatible return type 'pgtable_t' {aka 'struct ptdesc *'} [-Werror=incompatible-pointer-types]
return page;
^~~~
In file included from include/linux/mm_types_task.h:14,
from include/linux/mm_types.h:5,
from include/linux/mmzone.h:22,
from include/linux/gfp.h:7,
from mm/debug_vm_pgtable.c:13:
mm/debug_vm_pgtable.c: In function 'pmd_populate_tests':
include/asm-generic/memory_model.h:19:53: error: invalid operands to binary - (have 'pgtable_t' {aka 'struct ptdesc *'} and 'struct page *')
#define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
~~~~~~ ^
arch/xtensa/include/asm/page.h:169:29: note: in definition of macro '__va'
((void *)((unsigned long) (x) - PHYS_OFFSET + PAGE_OFFSET))
^
include/asm-generic/memory_model.h:73:21: note: in expansion of macro '__page_to_pfn'
#define page_to_pfn __page_to_pfn
^~~~~~~~~~~~~
arch/xtensa/include/asm/page.h:172:33: note: in expansion of macro 'page_to_pfn'
#define page_to_virt(page) __va(page_to_pfn(page) << PAGE_SHIFT)
^~~~~~~~~~~
arch/xtensa/include/asm/pgalloc.h:27:38: note: in expansion of macro 'page_to_virt'
(pmd_val(*(pmdp)) = ((unsigned long)page_to_virt(page)))
^~~~~~~~~~~~
mm/debug_vm_pgtable.c:655:2: note: in expansion of macro 'pmd_populate'
pmd_populate(args->mm, args->pmdp, args->start_ptep);
^~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +58 arch/xtensa/include/asm/pgalloc.h
9a8fd558990215 include/asm-xtensa/pgalloc.h Chris Zankel 2005-06-23 53
4cf58924951ef8 arch/xtensa/include/asm/pgalloc.h Joel Fernandes (Google 2019-01-03 54) static inline pgtable_t pte_alloc_one(struct mm_struct *mm)
6656920b0b50be include/asm-xtensa/pgalloc.h Chris Zankel 2007-08-22 55 {
2f569afd9ced9e include/asm-xtensa/pgalloc.h Martin Schwidefsky 2008-02-08 56 struct page *page;
2f569afd9ced9e include/asm-xtensa/pgalloc.h Martin Schwidefsky 2008-02-08 57
7278914ca1fdb5 arch/xtensa/include/asm/pgalloc.h Mike Rapoport 2020-08-06 @58 page = __pte_alloc_one(mm, GFP_PGTABLE_USER);
7278914ca1fdb5 arch/xtensa/include/asm/pgalloc.h Mike Rapoport 2020-08-06 59 if (!page)
8f43123d170ad9 arch/xtensa/include/asm/pgalloc.h Kiryl Shutsemau 2013-11-14 60 return NULL;
7278914ca1fdb5 arch/xtensa/include/asm/pgalloc.h Mike Rapoport 2020-08-06 61 ptes_clear(page_address(page));
2f569afd9ced9e include/asm-xtensa/pgalloc.h Martin Schwidefsky 2008-02-08 @62 return page;
9a8fd558990215 include/asm-xtensa/pgalloc.h Chris Zankel 2005-06-23 63 }
9a8fd558990215 include/asm-xtensa/pgalloc.h Chris Zankel 2005-06-23 64
:::::: The code at line 58 was first introduced by commit
:::::: 7278914ca1fdb54ba101c8617fb86953b31348cd xtensa: switch to generic version of pte allocation
:::::: TO: Mike Rapoport <rppt@linux.ibm.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-12-21 22:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202512220624.cxcWToU5-lkp@intel.com \
--to=lkp@intel.com \
--cc=alexs@kernel.org \
--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.