linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: kernel test robot <lkp@intel.com>
Cc: Joe Perches <joe@perches.com>,
	kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	Linux Memory Management List <linux-mm@kvack.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>
Subject: Re: [linux-next:master 7236/7588] mm/util.c:999:2: error: statement requires expression of scalar type ('void' invalid)
Date: Mon, 29 Mar 2021 17:38:33 -0700	[thread overview]
Message-ID: <20210329173833.784cdee6654631c5f5cb2651@linux-foundation.org> (raw)
In-Reply-To: <202103291544.jvqt9U20-lkp@intel.com>

On Mon, 29 Mar 2021 15:21:47 +0800 kernel test robot <lkp@intel.com> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   931294922e65a23e1aad6398b9ae02df74044679
> commit: d1f75d5ddea82b2c610d194d253b4d4ecdaa6be3 [7236/7588] mm/util.c: reduce mem_dump_obj() object size
> config: riscv-randconfig-r034-20210328 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 821547cabb5819ed42245376a9afcd11cdee5ddd)
> 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
>         # install riscv cross compiling tool for clang build
>         # apt-get install binutils-riscv64-linux-gnu
>         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=d1f75d5ddea82b2c610d194d253b4d4ecdaa6be3
>         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>         git fetch --no-tags linux-next master
>         git checkout d1f75d5ddea82b2c610d194d253b4d4ecdaa6be3
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 
> 
> ...
>
>                                                      ~~~~~~~~~~ ^
>    In file included from mm/util.c:29:
>    mm/internal.h:454:8: error: use of undeclared identifier 'max_mapnr'
>                    if (!pfn_valid(pfn))
>                         ^
>    arch/riscv/include/asm/page.h:130:62: note: expanded from macro 'pfn_valid'
>            (((pfn) >= ARCH_PFN_OFFSET) && (((pfn) - ARCH_PFN_OFFSET) < max_mapnr))
>                                                                        ^
>    mm/util.c:999:6: error: use of undeclared identifier 'max_mapnr'
>            if (virt_addr_valid(object))
>                ^
>    arch/riscv/include/asm/page.h:137:43: note: expanded from macro 'virt_addr_valid'
>            (unsigned long)(_addr) >= PAGE_OFFSET && pfn_valid(virt_to_pfn(_addr)); \
>                                                     ^
>    arch/riscv/include/asm/page.h:130:62: note: expanded from macro 'pfn_valid'
>            (((pfn) >= ARCH_PFN_OFFSET) && (((pfn) - ARCH_PFN_OFFSET) < max_mapnr))
>                                                                        ^
> >> mm/util.c:999:2: error: statement requires expression of scalar type ('void' invalid)
>            if (virt_addr_valid(object))
>            ^   ~~~~~~~~~~~~~~~~~~~~~~~
>    7 warnings and 3 errors generated.

"mm/util.c: reduce mem_dump_obj() object size" can't be the cause of this.

It appears that riscv doesn't handle CONFIG_NEED_MULTIPLE_NODES=y.  Its
pfn_valid() (and hence virt_addr_valid()) implementations require that
max_mapnr be defined and implemented.  But with
CONFIG_NEED_MULTIPLE_NODES=y, that is not the case.

Probably riscv needs some Kconfig fix to disallow this config combination.


      reply	other threads:[~2021-03-30  0:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29  7:21 kernel test robot
2021-03-30  0:38 ` Andrew Morton [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=20210329173833.784cdee6654631c5f5cb2651@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=clang-built-linux@googlegroups.com \
    --cc=joe@perches.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    /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