From: kernel test robot <lkp@intel.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au,
npiggin@gmail.com, christophe.leroy@csgroup.eu
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
foraker1@llnl.gov, llvm@lists.linux.dev,
Reza Arbab <arbab@linux.ibm.com>,
oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v3 1/2] powerpc/mm: Cleanup memory block size probing
Date: Sat, 29 Jul 2023 17:55:56 +0800 [thread overview]
Message-ID: <202307291753.opRf3JsB-lkp@intel.com> (raw)
In-Reply-To: <20230728103556.745681-1-aneesh.kumar@linux.ibm.com>
Hi Aneesh,
kernel test robot noticed the following build errors:
[auto build test ERROR on powerpc/next]
[also build test ERROR on powerpc/fixes linus/master v6.5-rc3 next-20230728]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Aneesh-Kumar-K-V/powerpc-mm-Add-memory_block_size-as-a-kernel-parameter/20230728-184256
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link: https://lore.kernel.org/r/20230728103556.745681-1-aneesh.kumar%40linux.ibm.com
patch subject: [PATCH v3 1/2] powerpc/mm: Cleanup memory block size probing
config: powerpc-powernv_defconfig (https://download.01.org/0day-ci/archive/20230729/202307291753.opRf3JsB-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230729/202307291753.opRf3JsB-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307291753.opRf3JsB-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/powerpc/mm/init_64.c:558:7: error: variable 'base' set but not used [-Werror,-Wunused-but-set-variable]
558 | u64 base, size;
| ^
1 error generated.
vim +/base +558 arch/powerpc/mm/init_64.c
485
486 static int __init probe_memory_block_size(unsigned long node, const char *uname, int
487 depth, void *data)
488 {
489 const char *type;
490 const char *compatible;
491 unsigned long *block_size = (unsigned long *)data;
492 const __be32 *reg, *endp;
493 int l;
494
495 if (depth != 1)
496 return 0;
497 /*
498 * If we have dynamic-reconfiguration-memory node, use the
499 * lmb value.
500 */
501 if (strcmp(uname, "ibm,dynamic-reconfiguration-memory") == 0) {
502
503 const __be32 *prop;
504
505 prop = of_get_flat_dt_prop(node, "ibm,lmb-size", &l);
506
507 if (!prop || l < dt_root_size_cells * sizeof(__be32))
508 /*
509 * Nothing in the device tree
510 */
511 *block_size = MIN_MEMORY_BLOCK_SIZE;
512 else
513 *block_size = of_read_number(prop, dt_root_size_cells);
514 /*
515 * We have found the final value. Don't probe further.
516 */
517 return 1;
518 }
519 /*
520 * Find all the device tree nodes of memory type and make sure
521 * the area can be mapped using the memory block size value
522 * we end up using. We start with 1G value and keep reducing
523 * it such that we can map the entire area using memory_block_size.
524 * This will be used on powernv and older pseries that don't
525 * have ibm,lmb-size node.
526 * For ex: with P5 we can end up with
527 * memory@0 -> 128MB
528 * memory@128M -> 64M
529 * This will end up using 64MB memory block size value.
530 */
531 type = of_get_flat_dt_prop(node, "device_type", NULL);
532 if (type == NULL || strcmp(type, "memory") != 0)
533 return 0;
534
535 /*
536 * "ibm,coherent-device-memory with linux,usable-memory = 0
537 * Force 256MiB block size. Work around for GPUs on P9 PowerNV
538 * linux,usable-memory == 0 implies driver managed memory and
539 * we can't use large memory block size due to hotplug/unplug
540 * limitations.
541 */
542 compatible = of_get_flat_dt_prop(node, "compatible", NULL);
543 if (compatible && !strcmp(compatible, "ibm,coherent-device-memory")) {
544 int len = 0;
545 const __be32 *usm;
546
547 usm = of_get_flat_dt_prop(node, "linux,drconf-usable-memory", &len);
548 if (usm && !len) {
549 *block_size = SZ_256M;
550 return 1;
551 }
552 }
553
554 reg = of_get_flat_dt_prop(node, "reg", &l);
555 endp = reg + (l / sizeof(__be32));
556
557 while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) {
> 558 u64 base, size;
559
560 base = dt_mem_next_cell(dt_root_addr_cells, ®);
561 size = dt_mem_next_cell(dt_root_size_cells, ®);
562
563 if (size == 0)
564 continue;
565
566 update_memory_block_size(block_size, size);
567 }
568 /* continue looking for other memory device types */
569 return 0;
570 }
571
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2023-07-29 9:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-28 10:35 [PATCH v3 1/2] powerpc/mm: Cleanup memory block size probing Aneesh Kumar K.V
2023-07-28 10:35 ` [PATCH v3 2/2] powerpc/mm: Add memory_block_size as a kernel parameter Aneesh Kumar K.V
2023-07-28 21:55 ` [PATCH v3 1/2] powerpc/mm: Cleanup memory block size probing Reza Arbab
2023-07-29 15:28 ` Aneesh Kumar K V
2023-07-31 13:15 ` Reza Arbab
2023-07-29 9:55 ` kernel test robot [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=202307291753.opRf3JsB-lkp@intel.com \
--to=lkp@intel.com \
--cc=aneesh.kumar@linux.ibm.com \
--cc=arbab@linux.ibm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=foraker1@llnl.gov \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=llvm@lists.linux.dev \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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).