[linux-next:master 10352/10516] kernel/resource.c:1874:43: error: use of undeclared identifier 'MAX_PHYSMEM_BITS'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   100cc857359b5d731407d1038f7e76cd0e871d94
commit: 5f445800cbdfc4b4185d496a43dfd78df63d2265 [10352/10516] Merge branch 'mm-everything' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
config: arm-randconfig-001-20240910 (https://download.01.org/0day-ci/archive/20240910/202409101018.h037Tq0a-lkp@xxxxxxxxx/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 05f5a91d00b02f4369f46d076411c700755ae041)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240910/202409101018.h037Tq0a-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409101018.h037Tq0a-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   In file included from kernel/resource.c:21:
   In file included from include/linux/pseudo_fs.h:4:
   In file included from include/linux/fs_context.h:14:
   In file included from include/linux/security.h:33:
   In file included from include/linux/mm.h:2202:
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> kernel/resource.c:1874:43: error: use of undeclared identifier 'MAX_PHYSMEM_BITS'
    1874 |                 end = min_t(resource_size_t, base->end, PHYSMEM_END);
         |                                                         ^
   include/linux/mm.h:101:32: note: expanded from macro 'PHYSMEM_END'
     101 | # define PHYSMEM_END    ((1ULL << MAX_PHYSMEM_BITS) - 1)
         |                                   ^
   kernel/resource.c:1891:51: error: use of undeclared identifier 'MAX_PHYSMEM_BITS'
    1891 |                addr <= min_t(resource_size_t, base->end, PHYSMEM_END);
         |                                                          ^
   include/linux/mm.h:101:32: note: expanded from macro 'PHYSMEM_END'
     101 | # define PHYSMEM_END    ((1ULL << MAX_PHYSMEM_BITS) - 1)
         |                                   ^
   1 warning and 2 errors generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for GET_FREE_REGION
   Depends on [n]: SPARSEMEM [=n]
   Selected by [y]:
   - RESOURCE_KUNIT_TEST [=y] && RUNTIME_TESTING_MENU [=y] && KUNIT [=y]


vim +/MAX_PHYSMEM_BITS +1874 kernel/resource.c

14b80582c43e4f Dan Williams    2022-05-20  1867  
14b80582c43e4f Dan Williams    2022-05-20  1868  static resource_size_t gfr_start(struct resource *base, resource_size_t size,
14b80582c43e4f Dan Williams    2022-05-20  1869  				 resource_size_t align, unsigned long flags)
14b80582c43e4f Dan Williams    2022-05-20  1870  {
14b80582c43e4f Dan Williams    2022-05-20  1871  	if (flags & GFR_DESCENDING) {
14b80582c43e4f Dan Williams    2022-05-20  1872  		resource_size_t end;
14b80582c43e4f Dan Williams    2022-05-20  1873  
ea72ce5da22806 Thomas Gleixner 2024-08-14 @1874  		end = min_t(resource_size_t, base->end, PHYSMEM_END);
14b80582c43e4f Dan Williams    2022-05-20  1875  		return end - size + 1;
14b80582c43e4f Dan Williams    2022-05-20  1876  	}
14b80582c43e4f Dan Williams    2022-05-20  1877  
9d844a11c912c3 Huang Ying      2024-09-06  1878  	return ALIGN(max(base->start, align), align);
14b80582c43e4f Dan Williams    2022-05-20  1879  }
14b80582c43e4f Dan Williams    2022-05-20  1880  

:::::: The code at line 1874 was first introduced by commit
:::::: ea72ce5da22806d5713f3ffb39a6d5ae73841f93 x86/kaslr: Expose and use the end of the physical memory address space

:::::: TO: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
:::::: CC: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux