From: kernel test robot <lkp@intel.com>
To: "Björn Töpel" <bjorn@kernel.org>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
linux-riscv@lists.infradead.org
Cc: oe-kbuild-all@lists.linux.dev, "Björn Töpel" <bjorn@rivosinc.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux@rivosinc.com, "Alexandre Ghiti" <alexghiti@rivosinc.com>,
"Joerg Roedel" <joro@8bytes.org>
Subject: Re: [PATCH] riscv: mm: Pre-allocate PGD entries vmalloc/modules area
Date: Wed, 31 May 2023 08:32:26 +0800 [thread overview]
Message-ID: <202305310822.dhnyydJC-lkp@intel.com> (raw)
In-Reply-To: <20230529180023.289904-1-bjorn@kernel.org>
Hi Björn,
kernel test robot noticed the following build warnings:
[auto build test WARNING 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/202305310822.dhnyydJC-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 arch/riscv/mm/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202305310822.dhnyydJC-lkp@intel.com/
All warnings (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
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2023-05-31 0:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-29 18:00 [PATCH] riscv: mm: Pre-allocate PGD entries vmalloc/modules area Björn Töpel
2023-05-30 6:37 ` Björn Töpel
2023-05-31 0:32 ` kernel test robot [this message]
2023-05-31 3:39 ` kernel test robot
2023-06-22 15:13 ` Palmer Dabbelt
2023-06-22 15:51 ` Björn Töpel
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=202305310822.dhnyydJC-lkp@intel.com \
--to=lkp@intel.com \
--cc=alexghiti@rivosinc.com \
--cc=aou@eecs.berkeley.edu \
--cc=bjorn@kernel.org \
--cc=bjorn@rivosinc.com \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux@rivosinc.com \
--cc=oe-kbuild-all@lists.linux.dev \
--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;
as well as URLs for NNTP newsgroup(s).