lkml.org 
[lkml]   [2020]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectarch/powerpc/mm/pgtable_32.c:38:34: error: array is too large (34359672832 elements)
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 08bf1a27c4c354b853fd81a79e953525bbcc8506
commit: 925ac141d106b55acbe112a9272f970631a3c082 powerpc/mm: Allocate static page tables for fixmap
date: 3 weeks ago
:::::: branch date: 49 minutes ago
:::::: commit date: 3 weeks ago
config: powerpc64-randconfig-r011-20200614 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project c669a1ed6386d57a75a602b53266466dae1e1d84)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
git checkout 925ac141d106b55acbe112a9272f970631a3c082
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from arch/powerpc/mm/pgtable_32.c:20:
In file included from include/linux/mm.h:95:
In file included from arch/powerpc/include/asm/pgtable.h:20:
In file included from arch/powerpc/include/asm/nohash/pgtable.h:8:
In file included from arch/powerpc/include/asm/nohash/32/pgtable.h:77:
arch/powerpc/include/asm/fixmap.h:57:2: warning: overflow in enumeration value
FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */
^
In file included from arch/powerpc/mm/pgtable_32.c:20:
In file included from include/linux/mm.h:95:
In file included from arch/powerpc/include/asm/pgtable.h:20:
In file included from arch/powerpc/include/asm/nohash/pgtable.h:8:
In file included from arch/powerpc/include/asm/nohash/32/pgtable.h:77:
In file included from arch/powerpc/include/asm/fixmap.h:96:
include/asm-generic/fixmap.h:32:19: warning: result of comparison of constant '__end_of_fixed_addresses' (4294967376) with expression of type 'const unsigned int' is always false [-Wtautological-constant-out-of-range-compare]
BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:19: note: expanded from macro 'BUILD_BUG_ON'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~
include/linux/compiler.h:350:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler.h:338:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler.h:330:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) ^~~~~~~~~
In file included from arch/powerpc/mm/pgtable_32.c:20:
In file included from include/linux/mm.h:95:
In file included from arch/powerpc/include/asm/pgtable.h:20:
In file included from arch/powerpc/include/asm/nohash/pgtable.h:8:
In file included from arch/powerpc/include/asm/nohash/32/pgtable.h:77:
In file included from arch/powerpc/include/asm/fixmap.h:96:
include/asm-generic/fixmap.h:38:39: warning: result of comparison of constant 18445618177942224896 with expression of type 'const unsigned long' is always true [-Wtautological-constant-out-of-range-compare]
BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
arch/powerpc/include/asm/bug.h:73:27: note: expanded from macro 'BUG_ON'
if (__builtin_constant_p(x)) { ^
In file included from arch/powerpc/mm/pgtable_32.c:20:
In file included from include/linux/mm.h:95:
In file included from arch/powerpc/include/asm/pgtable.h:20:
In file included from arch/powerpc/include/asm/nohash/pgtable.h:8:
In file included from arch/powerpc/include/asm/nohash/32/pgtable.h:77:
In file included from arch/powerpc/include/asm/fixmap.h:96:
include/asm-generic/fixmap.h:38:39: warning: result of comparison of constant 18445618177942224896 with expression of type 'const unsigned long' is always true [-Wtautological-constant-out-of-range-compare]
BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
arch/powerpc/include/asm/bug.h:74:7: note: expanded from macro 'BUG_ON'
if (x) ^
>> arch/powerpc/mm/pgtable_32.c:38:34: error: array is too large (34359672832 elements)
static u8 early_fixmap_pagetable[FIXMAP_PTE_SIZE] __page_aligned_data;
^~~~~~~~~~~~~~~
arch/powerpc/include/asm/fixmap.h:91:25: note: expanded from macro 'FIXMAP_PTE_SIZE'
#define FIXMAP_PTE_SIZE (FIXMAP_ALIGNED_SIZE / PGDIR_SIZE * PTE_TABLE_SIZE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/powerpc/mm/pgtable_32.c:42:23: warning: implicit conversion from 'unsigned long long' to 'unsigned long' changes value from 18445618175950192640 to 2147483648 [-Wconstant-conversion]
unsigned long addr = ALIGN_DOWN(FIXADDR_START, PGDIR_SIZE);
~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:34:26: note: expanded from macro 'ALIGN_DOWN'
#define ALIGN_DOWN(x, a) __ALIGN_KERNEL((x) - ((a) - 1), (a))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/kernel.h:10:31: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/kernel.h:11:54: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
~~~~~~~~~~~~~~~^~~~~~~~~
5 warnings and 1 error generated.

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=925ac141d106b55acbe112a9272f970631a3c082
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 925ac141d106b55acbe112a9272f970631a3c082
vim +38 arch/powerpc/mm/pgtable_32.c

14cf11af6cf608 arch/powerpc/mm/pgtable.c Paul Mackerras 2005-09-26 37
925ac141d106b5 arch/powerpc/mm/pgtable_32.c Christophe Leroy 2020-05-19 @38 static u8 early_fixmap_pagetable[FIXMAP_PTE_SIZE] __page_aligned_data;
925ac141d106b5 arch/powerpc/mm/pgtable_32.c Christophe Leroy 2020-05-19 39
925ac141d106b5 arch/powerpc/mm/pgtable_32.c Christophe Leroy 2020-05-19 40 notrace void __init early_ioremap_init(void)
925ac141d106b5 arch/powerpc/mm/pgtable_32.c Christophe Leroy 2020-05-19 41 {
925ac141d106b5 arch/powerpc/mm/pgtable_32.c Christophe Leroy 2020-05-19 @42 unsigned long addr = ALIGN_DOWN(FIXADDR_START, PGDIR_SIZE);
925ac141d106b5 arch/powerpc/mm/pgtable_32.c Christophe Leroy 2020-05-19 43 pte_t *ptep = (pte_t *)early_fixmap_pagetable;
925ac141d106b5 arch/powerpc/mm/pgtable_32.c Christophe Leroy 2020-05-19 44 pmd_t *pmdp = pmd_ptr_k(addr);
925ac141d106b5 arch/powerpc/mm/pgtable_32.c Christophe Leroy 2020-05-19 45
925ac141d106b5 arch/powerpc/mm/pgtable_32.c Christophe Leroy 2020-05-19 46 for (; (s32)(FIXADDR_TOP - addr) > 0;
925ac141d106b5 arch/powerpc/mm/pgtable_32.c Christophe Leroy 2020-05-19 47 addr += PGDIR_SIZE, ptep += PTRS_PER_PTE, pmdp++)
925ac141d106b5 arch/powerpc/mm/pgtable_32.c Christophe Leroy 2020-05-19 48 pmd_populate_kernel(&init_mm, pmdp, ptep);
925ac141d106b5 arch/powerpc/mm/pgtable_32.c Christophe Leroy 2020-05-19 49
925ac141d106b5 arch/powerpc/mm/pgtable_32.c Christophe Leroy 2020-05-19 50 early_ioremap_setup();
925ac141d106b5 arch/powerpc/mm/pgtable_32.c Christophe Leroy 2020-05-19 51 }
925ac141d106b5 arch/powerpc/mm/pgtable_32.c Christophe Leroy 2020-05-19 52

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org
\
 
 \ /
  Last update: 2020-06-15 08:37    [W:0.039 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site