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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72764C77B73 for ; Wed, 31 May 2023 03:40:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 88659900002; Tue, 30 May 2023 23:40:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 836B06B0074; Tue, 30 May 2023 23:40:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6FDD5900002; Tue, 30 May 2023 23:40:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 5C36C6B0072 for ; Tue, 30 May 2023 23:40:06 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 24F6AAD83A for ; Wed, 31 May 2023 03:40:06 +0000 (UTC) X-FDA: 80849146812.09.2F4BBEB Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by imf29.hostedemail.com (Postfix) with ESMTP id 7961B120013 for ; Wed, 31 May 2023 03:40:02 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=SDyn58+r; spf=pass (imf29.hostedemail.com: domain of lkp@intel.com designates 134.134.136.100 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1685504403; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=GR7cdAfxOzlQCH2YW+kytKtWdxSJcwZ0DdnzUxD5R8M=; b=qCV3k2X25hhdSc1eEPhIjTAITLP01O5z5selywZqJBeVEoxEUnyl+VuMqvqwGNAVY0FrtZ BG6OB9z+bBgP08L7CKESDuEA+bBZWnECki52mlyfr+uA+pcVCLXCcjdkGAlLqkxsfnTY1/ 3p5iqnLsq2eMX3P8R8b0OSeXapfbTBA= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685504403; a=rsa-sha256; cv=none; b=yPPtmE7y3ajyYWvmL5Nk1hP33GYpD65TcXD/Kvy+OMt/Xwb9lFsd37kj+wjH8O1gNCiEpp BziiWRv0jT8SHevkMCp5QXWgvm55KgUhyS9snsNhe32HV+MEeyOdipapGiQ1ZwnNOpM0mx xx6tCB9PzULi4Os47hnR7Ls4XzuOxuQ= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=SDyn58+r; spf=pass (imf29.hostedemail.com: domain of lkp@intel.com designates 134.134.136.100 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685504401; x=1717040401; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=qoSeqrGDeqziWOuX3hoaPbRwFv6t937bkJpzzdMtEi0=; b=SDyn58+rLv4YzUptPCq7vUBRP10RqerOrRB1NW34MCl09ZFfqeH2WOez J1GIaB64wicbxwlQOBXXCqaIA3+ZgmS9mtArAh7js+cqSnLdGI3YrYdcS o44iYpuSwwoq/aqwgM28e6pmSiN4aOtaR5R0y6JfoJwascqD0NEe1kXhO P/x15AWWM9hDTzY0bTQAUO3tPKHbQF8hTEJM4j5mtKRnvdPf8QyPmSgDl HICnNovrpo0GuRbin7KxwJCWnA7KmsSf7IHWsFFlbWZShlC8IzbaEqnUm j1ATwYpxVD9rWPFLyGy92wFEX4xDvpgU2w3mKMChTtucumsht7wfUmYmZ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10726"; a="420889962" X-IronPort-AV: E=Sophos;i="6.00,205,1681196400"; d="scan'208";a="420889962" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2023 20:39:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10726"; a="851051247" X-IronPort-AV: E=Sophos;i="6.00,205,1681196400"; d="scan'208";a="851051247" Received: from lkp-server01.sh.intel.com (HELO fb1ced2c09fb) ([10.239.97.150]) by fmsmga001.fm.intel.com with ESMTP; 30 May 2023 20:39:57 -0700 Received: from kbuild by fb1ced2c09fb with local (Exim 4.96) (envelope-from ) id 1q4Cgm-00013W-2Y; Wed, 31 May 2023 03:39:56 +0000 Date: Wed, 31 May 2023 11:39:23 +0800 From: kernel test robot To: =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org Cc: oe-kbuild-all@lists.linux.dev, =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux@rivosinc.com, Alexandre Ghiti , Joerg Roedel Subject: Re: [PATCH] riscv: mm: Pre-allocate PGD entries vmalloc/modules area Message-ID: <202305311117.huD9v4Y8-lkp@intel.com> References: <20230529180023.289904-1-bjorn@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230529180023.289904-1-bjorn@kernel.org> X-Stat-Signature: kuz4rxut96byqqygozi4dcaekwoyg33p X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 7961B120013 X-Rspam-User: X-HE-Tag: 1685504402-954383 X-HE-Meta: U2FsdGVkX1+R6No+n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kdMov6Gb/8HuQpv2/MyVTlnEUT57PBYGlRmtpM4KLvBk9fnZ9myNWNzzYWVpq25tE2eXKtDehnqiGKKH6hkxMQHNCvOzhVOuzf9Z1RhWn2kEhe3053Va/A+BumwzfFOxeWNr4Q1qsa2gfguUP7/fo9TX3QJzvSx8es6+TsHzF348dOEnZhXwAqzU6n67IRk4CC6GppOOV6havpdhTFGVG54LqON0Z8uhfonTvxrjbB21iS47iGaWFJABCvXzPVp3m4MkE4YBI1/GeJFO+Q== 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: Hi Björn, kernel test robot noticed the following build errors: [auto build test ERROR on ac9a78681b921877518763ba0e89202254349d1b] url: https://github.com/intel-lab-lkp/linux/commits/Bj-rn-T-pel/riscv-mm-Pre-allocate-PGD-entries-vmalloc-modules-area/20230530-020212 base: ac9a78681b921877518763ba0e89202254349d1b patch link: https://lore.kernel.org/r/20230529180023.289904-1-bjorn%40kernel.org patch subject: [PATCH] riscv: mm: Pre-allocate PGD entries vmalloc/modules area config: riscv-randconfig-r042-20230530 (https://download.01.org/0day-ci/archive/20230531/202305311117.huD9v4Y8-lkp@intel.com/config) compiler: riscv64-linux-gcc (GCC) 12.3.0 reproduce (this is a W=1 build): mkdir -p ~/bin wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/9383adbcdfb7f850149742579615e8c174328a78 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Bj-rn-T-pel/riscv-mm-Pre-allocate-PGD-entries-vmalloc-modules-area/20230530-020212 git checkout 9383adbcdfb7f850149742579615e8c174328a78 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=riscv olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202305311117.huD9v4Y8-lkp@intel.com/ All errors (new ones prefixed by >>): arch/riscv/mm/init.c: In function 'preallocate_pgd_pages_range': >> arch/riscv/mm/init.c:1381:30: error: implicit declaration of function 'pgd_offset_k'; did you mean 'p4d_offset'? [-Werror=implicit-function-declaration] 1381 | pgd_t *pgd = pgd_offset_k(addr); | ^~~~~~~~~~~~ | p4d_offset arch/riscv/mm/init.c:1381:30: warning: initialization of 'pgd_t *' from 'int' makes pointer from integer without a cast [-Wint-conversion] >> arch/riscv/mm/init.c:1387:23: error: implicit declaration of function 'p4d_alloc'; did you mean 'd_alloc'? [-Werror=implicit-function-declaration] 1387 | p4d = p4d_alloc(&init_mm, pgd, addr); | ^~~~~~~~~ | d_alloc arch/riscv/mm/init.c:1387:21: warning: assignment to 'p4d_t *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 1387 | p4d = p4d_alloc(&init_mm, pgd, addr); | ^ >> arch/riscv/mm/init.c:1395:23: error: implicit declaration of function 'pud_alloc'; did you mean 'd_alloc'? [-Werror=implicit-function-declaration] 1395 | pud = pud_alloc(&init_mm, p4d, addr); | ^~~~~~~~~ | d_alloc arch/riscv/mm/init.c:1395:21: warning: assignment to 'pud_t *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 1395 | pud = pud_alloc(&init_mm, p4d, addr); | ^ >> arch/riscv/mm/init.c:1403:23: error: implicit declaration of function 'pmd_alloc'; did you mean 'mm_alloc'? [-Werror=implicit-function-declaration] 1403 | pmd = pmd_alloc(&init_mm, pud, addr); | ^~~~~~~~~ | mm_alloc arch/riscv/mm/init.c:1403:21: warning: assignment to 'pmd_t *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 1403 | pmd = pmd_alloc(&init_mm, pud, addr); | ^ arch/riscv/mm/init.c: In function 'pgtable_cache_init': >> arch/riscv/mm/init.c:1421:45: error: 'MODULES_VADDR' undeclared (first use in this function) 1421 | preallocate_pgd_pages_range(MODULES_VADDR, MODULES_END, "bpf/modules"); | ^~~~~~~~~~~~~ arch/riscv/mm/init.c:1421:45: note: each undeclared identifier is reported only once for each function it appears in >> arch/riscv/mm/init.c:1421:60: error: 'MODULES_END' undeclared (first use in this function) 1421 | preallocate_pgd_pages_range(MODULES_VADDR, MODULES_END, "bpf/modules"); | ^~~~~~~~~~~ cc1: some warnings being treated as errors vim +1381 arch/riscv/mm/init.c 1366 1367 #ifdef CONFIG_64BIT 1368 /* 1369 * Pre-allocates page-table pages for a specific area in the kernel 1370 * page-table. Only the level which needs to be synchronized between 1371 * all page-tables is allocated because the synchronization can be 1372 * expensive. 1373 */ 1374 static void __init preallocate_pgd_pages_range(unsigned long start, unsigned long end, 1375 const char *area) 1376 { 1377 unsigned long addr; 1378 const char *lvl; 1379 1380 for (addr = start; addr < end && addr >= start; addr = ALIGN(addr + 1, PGDIR_SIZE)) { > 1381 pgd_t *pgd = pgd_offset_k(addr); 1382 p4d_t *p4d; 1383 pud_t *pud; 1384 pmd_t *pmd; 1385 1386 lvl = "p4d"; > 1387 p4d = p4d_alloc(&init_mm, pgd, addr); 1388 if (!p4d) 1389 goto failed; 1390 1391 if (pgtable_l5_enabled) 1392 continue; 1393 1394 lvl = "pud"; > 1395 pud = pud_alloc(&init_mm, p4d, addr); 1396 if (!pud) 1397 goto failed; 1398 1399 if (pgtable_l4_enabled) 1400 continue; 1401 1402 lvl = "pmd"; > 1403 pmd = pmd_alloc(&init_mm, pud, addr); 1404 if (!pmd) 1405 goto failed; 1406 } 1407 return; 1408 1409 failed: 1410 /* 1411 * The pages have to be there now or they will be missing in 1412 * process page-tables later. 1413 */ 1414 panic("Failed to pre-allocate %s pages for %s area\n", lvl, area); 1415 } 1416 1417 void __init pgtable_cache_init(void) 1418 { 1419 preallocate_pgd_pages_range(VMALLOC_START, VMALLOC_END, "vmalloc"); 1420 if (IS_ENABLED(CONFIG_MODULES)) > 1421 preallocate_pgd_pages_range(MODULES_VADDR, MODULES_END, "bpf/modules"); -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki