* [powerpc:next 84/128] arch/powerpc/mm/init_64.c:477:38: error: use of undeclared identifier 'SECTION_SIZE_BITS'
@ 2023-08-25 7:09 kernel test robot
2023-08-25 18:14 ` Aneesh Kumar K V
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-08-25 7:09 UTC (permalink / raw)
To: Aneesh Kumar K.V; +Cc: Reza Arbab, llvm, linuxppc-dev, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
head: b9bbbf4979073d5536b7650decd37fcb901e6556
commit: 4d15721177d539d743fcf31d7bb376fb3b81aeb6 [84/128] powerpc/mm: Cleanup memory block size probing
config: powerpc64-randconfig-r005-20230825 (https://download.01.org/0day-ci/archive/20230825/202308251532.k9PpWEAD-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/20230825/202308251532.k9PpWEAD-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/202308251532.k9PpWEAD-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/powerpc/mm/init_64.c:477:38: error: use of undeclared identifier 'SECTION_SIZE_BITS'
477 | unsigned long section_size = 1UL << SECTION_SIZE_BITS;
| ^
arch/powerpc/mm/init_64.c:510:18: error: use of undeclared identifier 'SECTION_SIZE_BITS'
510 | *block_size = MIN_MEMORY_BLOCK_SIZE;
| ^
include/linux/memory.h:23:43: note: expanded from macro 'MIN_MEMORY_BLOCK_SIZE'
23 | #define MIN_MEMORY_BLOCK_SIZE (1UL << SECTION_SIZE_BITS)
| ^
2 errors generated.
vim +/SECTION_SIZE_BITS +477 arch/powerpc/mm/init_64.c
474
475 static void update_memory_block_size(unsigned long *block_size, unsigned long mem_size)
476 {
> 477 unsigned long section_size = 1UL << SECTION_SIZE_BITS;
478
479 for (; *block_size > section_size; *block_size >>= 2) {
480
481 if ((mem_size & *block_size) == 0)
482 break;
483 }
484 }
485
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [powerpc:next 84/128] arch/powerpc/mm/init_64.c:477:38: error: use of undeclared identifier 'SECTION_SIZE_BITS'
2023-08-25 7:09 [powerpc:next 84/128] arch/powerpc/mm/init_64.c:477:38: error: use of undeclared identifier 'SECTION_SIZE_BITS' kernel test robot
@ 2023-08-25 18:14 ` Aneesh Kumar K V
0 siblings, 0 replies; 2+ messages in thread
From: Aneesh Kumar K V @ 2023-08-25 18:14 UTC (permalink / raw)
To: kernel test robot; +Cc: Reza Arbab, llvm, linuxppc-dev, oe-kbuild-all
On 8/25/23 12:39 PM, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
> head: b9bbbf4979073d5536b7650decd37fcb901e6556
> commit: 4d15721177d539d743fcf31d7bb376fb3b81aeb6 [84/128] powerpc/mm: Cleanup memory block size probing
> config: powerpc64-randconfig-r005-20230825 (https://download.01.org/0day-ci/archive/20230825/202308251532.k9PpWEAD-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/20230825/202308251532.k9PpWEAD-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/202308251532.k9PpWEAD-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
>>> arch/powerpc/mm/init_64.c:477:38: error: use of undeclared identifier 'SECTION_SIZE_BITS'
> 477 | unsigned long section_size = 1UL << SECTION_SIZE_BITS;
> | ^
> arch/powerpc/mm/init_64.c:510:18: error: use of undeclared identifier 'SECTION_SIZE_BITS'
> 510 | *block_size = MIN_MEMORY_BLOCK_SIZE;
> | ^
> include/linux/memory.h:23:43: note: expanded from macro 'MIN_MEMORY_BLOCK_SIZE'
> 23 | #define MIN_MEMORY_BLOCK_SIZE (1UL << SECTION_SIZE_BITS)
> | ^
> 2 errors generated.
>
>
> vim +/SECTION_SIZE_BITS +477 arch/powerpc/mm/init_64.c
>
> 474
> 475 static void update_memory_block_size(unsigned long *block_size, unsigned long mem_size)
> 476 {
> > 477 unsigned long section_size = 1UL << SECTION_SIZE_BITS;
> 478
> 479 for (; *block_size > section_size; *block_size >>= 2) {
> 480
> 481 if ((mem_size & *block_size) == 0)
> 482 break;
> 483 }
> 484 }
> 485
>
Not a nice fix:
modified arch/powerpc/mm/init_64.c
@@ -472,11 +472,17 @@ static int __init dt_scan_mmu_pid_width(unsigned long node,
return 1;
}
+#ifndef CONFIG_MEMORY_HOTPLUG
+#define MEMORY_BLOCK_SIZE SZ_16M
+#else
+#define MEMORY_BLOCK_SIZE MIN_MEMORY_BLOCK_SIZE
+#endif
+
static void update_memory_block_size(unsigned long *block_size, unsigned long mem_size)
{
- unsigned long section_size = 1UL << SECTION_SIZE_BITS;
+ unsigned long min_memory_block_size = MEMORY_BLOCK_SIZE;
- for (; *block_size > section_size; *block_size >>= 2) {
+ for (; *block_size > min_memory_block_size; *block_size >>= 2) {
if ((mem_size & *block_size) == 0)
break;
@@ -507,7 +513,7 @@ static int __init probe_memory_block_size(unsigned long node, const char *uname,
/*
* Nothing in the device tree
*/
- *block_size = MIN_MEMORY_BLOCK_SIZE;
+ *block_size = MEMORY_BLOCK_SIZE;
else
*block_size = of_read_number(prop, dt_root_size_cells);
/*
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-25 18:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-25 7:09 [powerpc:next 84/128] arch/powerpc/mm/init_64.c:477:38: error: use of undeclared identifier 'SECTION_SIZE_BITS' kernel test robot
2023-08-25 18:14 ` Aneesh Kumar K V
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).