From: "Chen, Rong A" <rong.a.chen@intel.com>
To: Wei Yang <richard.weiyang@gmail.com>, kernel test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [kbuild-all] Re: include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, mapping) == offsetof(struct folio, mapping)"
Date: Mon, 14 Feb 2022 14:26:22 +0800 [thread overview]
Message-ID: <25632145-1c75-edc3-3efa-4c0bf8574678@intel.com> (raw)
In-Reply-To: <20220214000500.4ao6vrh4l33donqz@master>
On 2/14/2022 8:05 AM, Wei Yang wrote:
> On Sun, Feb 13, 2022 at 07:51:34PM +0800, kernel test robot wrote:
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head: b81b1829e7e39f6cebdf6e4d5484eacbceda8554
>> commit: 536f4217ced62b671bd759f6b549621a5654a70f mm: page->mapping folio->mapping should have the same offset
>> date: 2 weeks ago
>> config: parisc-randconfig-r004-20220213 (https://download.01.org/0day-ci/archive/20220213/202202131932.diaqTbxo-lkp@intel.com/config)
>> compiler: hppa64-linux-gcc (GCC) 11.2.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/torvalds/linux.git/commit/?id=536f4217ced62b671bd759f6b549621a5654a70f
>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>> git fetch --no-tags linus master
>> git checkout 536f4217ced62b671bd759f6b549621a5654a70f
>> # save the config file to linux build tree
>> mkdir build_dir
>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc prepare
>>
>> 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 >>):
>>
>> 18 | if (!(word & (~0ul << 32))) {
>> | ^~
>> include/asm-generic/bitops/__fls.h:20:22: warning: left shift count >= width of type [-Wshift-count-overflow]
>> 20 | word <<= 32;
>> | ^~~
>> include/asm-generic/bitops/__fls.h:23:28: warning: left shift count >= width of type [-Wshift-count-overflow]
>> 23 | if (!(word & (~0ul << (BITS_PER_LONG-16)))) {
>> | ^~
>> include/asm-generic/bitops/__fls.h:27:28: warning: left shift count >= width of type [-Wshift-count-overflow]
>> 27 | if (!(word & (~0ul << (BITS_PER_LONG-8)))) {
>> | ^~
>> include/asm-generic/bitops/__fls.h:31:28: warning: left shift count >= width of type [-Wshift-count-overflow]
>> 31 | if (!(word & (~0ul << (BITS_PER_LONG-4)))) {
>> | ^~
>> include/asm-generic/bitops/__fls.h:35:28: warning: left shift count >= width of type [-Wshift-count-overflow]
>> 35 | if (!(word & (~0ul << (BITS_PER_LONG-2)))) {
>> | ^~
>> include/asm-generic/bitops/__fls.h:39:28: warning: left shift count >= width of type [-Wshift-count-overflow]
>> 39 | if (!(word & (~0ul << (BITS_PER_LONG-1))))
>> | ^~
>> In file included from arch/parisc/include/asm/bitops.h:201,
>> from include/linux/bitops.h:33,
>> from include/linux/kernel.h:22,
>> from arch/parisc/include/asm/bug.h:5,
>> from include/linux/bug.h:5,
>> from include/linux/thread_info.h:13,
>> from include/asm-generic/preempt.h:5,
>> from ./arch/parisc/include/generated/asm/preempt.h:1,
>> from include/linux/preempt.h:78,
>> from include/linux/rcupdate.h:27,
>> from include/linux/rculist.h:11,
>> from include/linux/pid.h:5,
>> from include/linux/sched.h:14,
>> from arch/parisc/kernel/asm-offsets.c:18:
>> include/asm-generic/bitops/__fls.h: In function '__fls':
>> include/asm-generic/bitops/__fls.h:18:28: warning: left shift count >= width of type [-Wshift-count-overflow]
>> 18 | if (!(word & (~0ul << 32))) {
>> | ^~
>> include/asm-generic/bitops/__fls.h:20:22: warning: left shift count >= width of type [-Wshift-count-overflow]
>> 20 | word <<= 32;
>> | ^~~
>> include/asm-generic/bitops/__fls.h:23:28: warning: left shift count >= width of type [-Wshift-count-overflow]
>> 23 | if (!(word & (~0ul << (BITS_PER_LONG-16)))) {
>> | ^~
>> include/asm-generic/bitops/__fls.h:27:28: warning: left shift count >= width of type [-Wshift-count-overflow]
>> 27 | if (!(word & (~0ul << (BITS_PER_LONG-8)))) {
>> | ^~
>> include/asm-generic/bitops/__fls.h:31:28: warning: left shift count >= width of type [-Wshift-count-overflow]
>> 31 | if (!(word & (~0ul << (BITS_PER_LONG-4)))) {
>> | ^~
>> include/asm-generic/bitops/__fls.h:35:28: warning: left shift count >= width of type [-Wshift-count-overflow]
>> 35 | if (!(word & (~0ul << (BITS_PER_LONG-2)))) {
>> | ^~
>> include/asm-generic/bitops/__fls.h:39:28: warning: left shift count >= width of type [-Wshift-count-overflow]
>> 39 | if (!(word & (~0ul << (BITS_PER_LONG-1))))
>> | ^~
>> In file included from arch/parisc/include/asm/processor.h:18,
>> from arch/parisc/include/asm/thread_info.h:6,
>> from include/linux/thread_info.h:60,
>> from include/asm-generic/preempt.h:5,
>> from ./arch/parisc/include/generated/asm/preempt.h:1,
>> from include/linux/preempt.h:78,
>> from include/linux/rcupdate.h:27,
>> from include/linux/rculist.h:11,
>> from include/linux/pid.h:5,
>> from include/linux/sched.h:14,
>> from arch/parisc/kernel/asm-offsets.c:18:
>> arch/parisc/include/asm/pdc.h: At top level:
>> arch/parisc/include/asm/pdc.h:77:24: warning: 'struct pdc_memory_table' declared inside parameter list will not be visible outside of this definition or declaration
>> 77 | struct pdc_memory_table *tbl, unsigned long entries);
>> | ^~~~~~~~~~~~~~~~
>> arch/parisc/include/asm/pdc.h:76:30: warning: 'struct pdc_memory_table_raddr' declared inside parameter list will not be visible outside of this definition or declaration
>> 76 | int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
>> | ^~~~~~~~~~~~~~~~~~~~~~
>> In file included from include/linux/compiler_types.h:65,
>> from <command-line>:
>> include/linux/smp.h:34:33: error: requested alignment '20' is not a positive power of 2
>> 34 | __aligned(sizeof(struct __call_single_data));
>> | ^~~~~~~~~~~~~~~~~~
>> include/linux/compiler_attributes.h:33:68: note: in definition of macro '__aligned'
>> 33 | #define __aligned(x) __attribute__((__aligned__(x)))
>> | ^
>> In file included from include/linux/container_of.h:5,
>> from include/linux/list.h:5,
>> from include/linux/rculist.h:10,
>> from include/linux/pid.h:5,
>> from include/linux/sched.h:14,
>> from arch/parisc/kernel/asm-offsets.c:18:
>> include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, lru) == offsetof(struct folio, lru)"
>> 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
>> | ^~~~~~~~~~~~~~
>> include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
>> 77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
>> | ^~~~~~~~~~~~~~~
>> include/linux/mm_types.h:261:9: note: in expansion of macro 'static_assert'
>> 261 | static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
>> | ^~~~~~~~~~~~~
>> include/linux/mm_types.h:263:1: note: in expansion of macro 'FOLIO_MATCH'
>> 263 | FOLIO_MATCH(lru, lru);
>
> Sounds each FOLIO_MATCH() gets an compile error?
>
> Compile on my machine looks good to me. How this happens?
>
Hi Wei,
Sorry for the inconvenience, it's a false positive, the problem is
that ARCH=parisc was used to build the 64 bit kernel.
Best Regards,
Rong Chen
prev parent reply other threads:[~2022-02-14 6:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-13 11:51 kernel test robot
2022-02-14 0:05 ` Wei Yang
2022-02-14 6:26 ` Chen, Rong A [this message]
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=25632145-1c75-edc3-3efa-4c0bf8574678@intel.com \
--to=rong.a.chen@intel.com \
--cc=akpm@linux-foundation.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=richard.weiyang@gmail.com \
--cc=willy@infradead.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