From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF86AC433C1 for ; Tue, 30 Mar 2021 00:38:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 16C4961935 for ; Tue, 30 Mar 2021 00:38:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16C4961935 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8ECC96B007D; Mon, 29 Mar 2021 20:38:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 88BB06B007E; Mon, 29 Mar 2021 20:38:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 754646B0080; Mon, 29 Mar 2021 20:38:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0210.hostedemail.com [216.40.44.210]) by kanga.kvack.org (Postfix) with ESMTP id 5C81C6B007D for ; Mon, 29 Mar 2021 20:38:36 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 20387181AEF31 for ; Tue, 30 Mar 2021 00:38:36 +0000 (UTC) X-FDA: 77974679832.27.24B1205 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf20.hostedemail.com (Postfix) with ESMTP id 88D90138 for ; Tue, 30 Mar 2021 00:38:32 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 0190F61969; Tue, 30 Mar 2021 00:38:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1617064714; bh=U9fkhdaAIT/y25q3iyjpH3QmwnVGv1X1o6BBnEh9yjE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qKLvY1D7qeEMHF0RC/mvS+rpH6xfnROiPwIqSJ/RyQnqOoKb0Okir44w8AEXDBsWg q1Cgak6t37ILMs3kFd7KZOThKlAHbzfIS8kucjIRULAW4I0uQFZumFpmjcI/IsJmjU 8O1+HQNavrHCI1JpdAREp1k4ktn3yDnghszLEohk= Date: Mon, 29 Mar 2021 17:38:33 -0700 From: Andrew Morton To: kernel test robot Cc: Joe Perches , kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, Linux Memory Management List , Paul Walmsley , Palmer Dabbelt , Albert Ou Subject: Re: [linux-next:master 7236/7588] mm/util.c:999:2: error: statement requires expression of scalar type ('void' invalid) Message-Id: <20210329173833.784cdee6654631c5f5cb2651@linux-foundation.org> In-Reply-To: <202103291544.jvqt9U20-lkp@intel.com> References: <202103291544.jvqt9U20-lkp@intel.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 88D90138 X-Stat-Signature: 5438atwufydeqtmcjsewua6phdmgao14 Received-SPF: none (linux-foundation.org>: No applicable sender policy available) receiver=imf20; identity=mailfrom; envelope-from=""; helo=mail.kernel.org; client-ip=198.145.29.99 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617064712-84766 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, 29 Mar 2021 15:21:47 +0800 kernel test robot 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.