All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: arch/powerpc/mm/book3s32/mmu.c:226:2: error: call to '__compiletime_assert_493' declared with 'error' attribute: BUILD_BUG_ON failed: ALIGN_DOWN(MODULES_VADDR, SZ_256M) < TASK_SIZE
Date: Sat, 26 Apr 2025 12:05:33 +0800	[thread overview]
Message-ID: <202504261245.Eci3yiZs-lkp@intel.com> (raw)

:::::: 
:::::: Manual check reason: "__compiletime_assert_NNN"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Christophe Leroy <christophe.leroy@csgroup.eu>
CC: Michael Ellerman <mpe@ellerman.id.au>

Hi Christophe,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   02ddfb981de88a2c15621115dd7be2431252c568
commit: 2f2b9a3adc66e978a1248ffb38df8477e8e97c57 powerpc/32s: Reduce default size of module/execmem area
date:   8 months ago
:::::: branch date: 32 hours ago
:::::: commit date: 8 months ago
config: powerpc-randconfig-r111-20250426 (https://download.01.org/0day-ci/archive/20250426/202504261245.Eci3yiZs-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce: (https://download.01.org/0day-ci/archive/20250426/202504261245.Eci3yiZs-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/r/202504261245.Eci3yiZs-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/powerpc/mm/book3s32/mmu.c:21:
   In file included from include/linux/mm.h:2228:
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> arch/powerpc/mm/book3s32/mmu.c:226:2: error: call to '__compiletime_assert_493' declared with 'error' attribute: BUILD_BUG_ON failed: ALIGN_DOWN(MODULES_VADDR, SZ_256M) < TASK_SIZE
     226 |         BUILD_BUG_ON(ALIGN_DOWN(MODULES_VADDR, SZ_256M) < TASK_SIZE);
         |         ^
   include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
      50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^
   include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^
   include/linux/compiler_types.h:510:2: note: expanded from macro 'compiletime_assert'
     510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^
   include/linux/compiler_types.h:498:2: note: expanded from macro '_compiletime_assert'
     498 |         __compiletime_assert(condition, msg, prefix, suffix)
         |         ^
   include/linux/compiler_types.h:491:4: note: expanded from macro '__compiletime_assert'
     491 |                         prefix ## suffix();                             \
         |                         ^
   <scratch space>:104:1: note: expanded from here
     104 | __compiletime_assert_493
         | ^
   1 warning and 1 error generated.


vim +226 arch/powerpc/mm/book3s32/mmu.c

c4964331971541 arch/powerpc/mm/book3s32/mmu.c Christophe Leroy 2020-06-29  195  
78cb0945f71419 arch/powerpc/mm/book3s32/mmu.c Christophe Leroy 2024-03-16  196  int mmu_mark_initmem_nx(void)
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  197  {
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  198  	int nb = mmu_has_feature(MMU_FTR_USE_HIGH_BATS) ? 8 : 4;
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  199  	int i;
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  200  	unsigned long base = (unsigned long)_stext - PAGE_OFFSET;
37eb7ca91b692e arch/powerpc/mm/book3s32/mmu.c Christophe Leroy 2021-11-26  201  	unsigned long top = ALIGN((unsigned long)_etext - PAGE_OFFSET, SZ_128K);
4b19f96a81bcea arch/powerpc/mm/book3s32/mmu.c Christophe Leroy 2020-05-19  202  	unsigned long border = (unsigned long)__init_begin - PAGE_OFFSET;
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  203  	unsigned long size;
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  204  
37eb7ca91b692e arch/powerpc/mm/book3s32/mmu.c Christophe Leroy 2021-11-26  205  	for (i = 0; i < nb - 1 && base < top;) {
d37823c3528e5e arch/powerpc/mm/book3s32/mmu.c Christophe Leroy 2022-01-10  206  		size = bat_block_size(base, top);
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  207  		setibat(i++, PAGE_OFFSET + base, base, size, PAGE_KERNEL_TEXT);
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  208  		base += size;
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  209  	}
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  210  	if (base < top) {
d37823c3528e5e arch/powerpc/mm/book3s32/mmu.c Christophe Leroy 2022-01-10  211  		size = bat_block_size(base, top);
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  212  		if ((top - base) > size) {
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  213  			size <<= 1;
4b19f96a81bcea arch/powerpc/mm/book3s32/mmu.c Christophe Leroy 2020-05-19  214  			if (strict_kernel_rwx_enabled() && base + size > border)
4b19f96a81bcea arch/powerpc/mm/book3s32/mmu.c Christophe Leroy 2020-05-19  215  				pr_warn("Some RW data is getting mapped X. "
4b19f96a81bcea arch/powerpc/mm/book3s32/mmu.c Christophe Leroy 2020-05-19  216  					"Adjust CONFIG_DATA_SHIFT to avoid that.\n");
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  217  		}
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  218  		setibat(i++, PAGE_OFFSET + base, base, size, PAGE_KERNEL_TEXT);
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  219  		base += size;
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  220  	}
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  221  	for (; i < nb; i++)
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  222  		clearibat(i);
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  223  
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  224  	update_bats();
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  225  
2f2b9a3adc66e9 arch/powerpc/mm/book3s32/mmu.c Christophe Leroy 2024-08-20 @226  	BUILD_BUG_ON(ALIGN_DOWN(MODULES_VADDR, SZ_256M) < TASK_SIZE);
2f2b9a3adc66e9 arch/powerpc/mm/book3s32/mmu.c Christophe Leroy 2024-08-20  227  
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  228  	for (i = TASK_SIZE >> 28; i < 16; i++) {
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  229  		/* Do not set NX on VM space for modules */
c4964331971541 arch/powerpc/mm/book3s32/mmu.c Christophe Leroy 2020-06-29  230  		if (is_module_segment(i << 28))
c4964331971541 arch/powerpc/mm/book3s32/mmu.c Christophe Leroy 2020-06-29  231  			continue;
c4964331971541 arch/powerpc/mm/book3s32/mmu.c Christophe Leroy 2020-06-29  232  
179ae57dbad1b9 arch/powerpc/mm/book3s32/mmu.c Christophe Leroy 2021-02-06  233  		mtsr(mfsr(i << 28) | 0x10000000, i << 28);
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  234  	}
78cb0945f71419 arch/powerpc/mm/book3s32/mmu.c Christophe Leroy 2024-03-16  235  	return 0;
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  236  }
63b2bc619565ef arch/powerpc/mm/ppc_mmu_32.c   Christophe Leroy 2019-02-21  237  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2025-04-26  4:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202504261245.Eci3yiZs-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.