From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [ardb:arm64-ro-page-tables-pkvm 63/63] include/asm-generic/memory_model.h:63:30: error: initialization of 'const struct page from incompatible pointer type 'pgtable_t' {aka 'struct <anonymous>
Date: Wed, 10 Mar 2021 06:01:59 +0800 [thread overview]
Message-ID: <202103100651.4mnJSgdQ-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 8978 bytes --]
tree: git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git arm64-ro-page-tables-pkvm
head: 013c3cfada2933235858e3db49db939379e7003f
commit: 013c3cfada2933235858e3db49db939379e7003f [63/63] mm: HACK provide target address when migrating a PMD entry
config: sparc64-randconfig-r015-20210309 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?id=013c3cfada2933235858e3db49db939379e7003f
git remote add ardb git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
git fetch --no-tags ardb arm64-ro-page-tables-pkvm
git checkout 013c3cfada2933235858e3db49db939379e7003f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from arch/sparc/include/asm/page.h:8,
from arch/sparc/include/asm/thread_info_64.h:27,
from arch/sparc/include/asm/thread_info.h:5,
from include/linux/thread_info.h:58,
from include/asm-generic/preempt.h:5,
from ./arch/sparc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from mm/huge_memory.c:8:
mm/huge_memory.c: In function '__split_huge_zero_page_pmd':
>> include/asm-generic/memory_model.h:63:30: error: initialization of 'const struct page *' from incompatible pointer type 'pgtable_t' {aka 'struct <anonymous> *'} [-Werror=incompatible-pointer-types]
63 | ({ const struct page *__pg = (pg); \
| ^
arch/sparc/include/asm/page_64.h:85:37: note: in definition of macro '__pmd'
85 | #define __pmd(x) ((pmd_t) { (x) } )
| ^
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
arch/sparc/include/asm/page.h:5:29: note: in expansion of macro 'page_to_pfn'
5 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
| ^~~~~~~~~~~
mm/huge_memory.c:2031:35: note: in expansion of macro 'page_to_phys'
2031 | set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
| ^~~~~~~~~~~~
include/asm-generic/memory_model.h:63:30: note: (near initialization for '(anonymous)')
63 | ({ const struct page *__pg = (pg); \
| ^
arch/sparc/include/asm/page_64.h:85:37: note: in definition of macro '__pmd'
85 | #define __pmd(x) ((pmd_t) { (x) } )
| ^
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
arch/sparc/include/asm/page.h:5:29: note: in expansion of macro 'page_to_pfn'
5 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
| ^~~~~~~~~~~
mm/huge_memory.c:2031:35: note: in expansion of macro 'page_to_phys'
2031 | set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
| ^~~~~~~~~~~~
mm/huge_memory.c:2031:59: error: 'PMD_TYPE_TABLE' undeclared (first use in this function)
2031 | set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
| ^~~~~~~~~~~~~~
arch/sparc/include/asm/page_64.h:85:37: note: in definition of macro '__pmd'
85 | #define __pmd(x) ((pmd_t) { (x) } )
| ^
mm/huge_memory.c:2031:59: note: each undeclared identifier is reported only once for each function it appears in
2031 | set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
| ^~~~~~~~~~~~~~
arch/sparc/include/asm/page_64.h:85:37: note: in definition of macro '__pmd'
85 | #define __pmd(x) ((pmd_t) { (x) } )
| ^
mm/huge_memory.c: In function '__split_huge_pmd_locked':
>> include/asm-generic/memory_model.h:63:30: error: initialization of 'const struct page *' from incompatible pointer type 'pgtable_t' {aka 'struct <anonymous> *'} [-Werror=incompatible-pointer-types]
63 | ({ const struct page *__pg = (pg); \
| ^
arch/sparc/include/asm/page_64.h:85:37: note: in definition of macro '__pmd'
85 | #define __pmd(x) ((pmd_t) { (x) } )
| ^
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
arch/sparc/include/asm/page.h:5:29: note: in expansion of macro 'page_to_pfn'
5 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
| ^~~~~~~~~~~
mm/huge_memory.c:2198:35: note: in expansion of macro 'page_to_phys'
2198 | set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
| ^~~~~~~~~~~~
include/asm-generic/memory_model.h:63:30: note: (near initialization for '(anonymous)')
63 | ({ const struct page *__pg = (pg); \
| ^
arch/sparc/include/asm/page_64.h:85:37: note: in definition of macro '__pmd'
85 | #define __pmd(x) ((pmd_t) { (x) } )
| ^
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
arch/sparc/include/asm/page.h:5:29: note: in expansion of macro 'page_to_pfn'
5 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
| ^~~~~~~~~~~
mm/huge_memory.c:2198:35: note: in expansion of macro 'page_to_phys'
2198 | set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
| ^~~~~~~~~~~~
mm/huge_memory.c:2198:59: error: 'PMD_TYPE_TABLE' undeclared (first use in this function)
2198 | set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
| ^~~~~~~~~~~~~~
arch/sparc/include/asm/page_64.h:85:37: note: in definition of macro '__pmd'
85 | #define __pmd(x) ((pmd_t) { (x) } )
| ^
cc1: some warnings being treated as errors
vim +63 include/asm-generic/memory_model.h
8f6aac419bd590 Christoph Lameter 2007-10-16 56
a117e66ed45ac0 KAMEZAWA Hiroyuki 2006-03-27 57 #elif defined(CONFIG_SPARSEMEM)
a117e66ed45ac0 KAMEZAWA Hiroyuki 2006-03-27 58 /*
1a49123b343461 Zhang Yanfei 2013-10-03 59 * Note: section's mem_map is encoded to reflect its start_pfn.
a117e66ed45ac0 KAMEZAWA Hiroyuki 2006-03-27 60 * section[i].section_mem_map == mem_map's address - start_pfn;
a117e66ed45ac0 KAMEZAWA Hiroyuki 2006-03-27 61 */
67de648211fa04 Andy Whitcroft 2006-06-23 62 #define __page_to_pfn(pg) \
aa462abe8aaf21 Ian Campbell 2011-08-17 @63 ({ const struct page *__pg = (pg); \
a117e66ed45ac0 KAMEZAWA Hiroyuki 2006-03-27 64 int __sec = page_to_section(__pg); \
f05b6284ee5d3b Randy Dunlap 2007-02-10 65 (unsigned long)(__pg - __section_mem_map_addr(__nr_to_section(__sec))); \
a117e66ed45ac0 KAMEZAWA Hiroyuki 2006-03-27 66 })
a117e66ed45ac0 KAMEZAWA Hiroyuki 2006-03-27 67
:::::: The code@line 63 was first introduced by commit
:::::: aa462abe8aaf2198d6aef97da20c874ac694a39f mm: fix __page_to_pfn for a const struct page argument
:::::: TO: Ian Campbell <ian.campbell@citrix.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 29497 bytes --]
reply other threads:[~2021-03-09 22:01 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=202103100651.4mnJSgdQ-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 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.