public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [ia64:noboot 4/4] mm/page_alloc.c:321:14: error: 'PAGES_PER_SECTION' undeclared; did you mean 'USEC_
@ 2018-07-26 23:43 kbuild test robot
  2018-07-27 19:08 ` [ia64:noboot 4/4] mm/page_alloc.c:321:14: error: 'PAGES_PER_SECTION' undeclared; did you mean 'U Luck, Tony
  2018-07-27 20:36 ` Mike Rapoport
  0 siblings, 2 replies; 3+ messages in thread
From: kbuild test robot @ 2018-07-26 23:43 UTC (permalink / raw)
  To: linux-ia64

[-- Attachment #1: Type: text/plain, Size: 6522 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git noboot
head:   f62800992e5917f2bed143dbcdce2501bc6933a9
commit: f62800992e5917f2bed143dbcdce2501bc6933a9 [4/4] ia64: switch to NO_BOOTMEM
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout f62800992e5917f2bed143dbcdce2501bc6933a9
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=ia64 

All errors (new ones prefixed by >>):

   mm/page_alloc.c: In function 'update_defer_init':
>> mm/page_alloc.c:321:14: error: 'PAGES_PER_SECTION' undeclared (first use in this function); did you mean 'USEC_PER_SEC'?
         (pfn & (PAGES_PER_SECTION - 1)) == 0) {
                 ^~~~~~~~~~~~~~~~~
                 USEC_PER_SEC
   mm/page_alloc.c:321:14: note: each undeclared identifier is reported only once for each function it appears in
   In file included from include/linux/cache.h:5,
                    from include/linux/printk.h:9,
                    from include/linux/kernel.h:14,
                    from include/asm-generic/bug.h:18,
                    from arch/ia64/include/asm/bug.h:17,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/mm.h:9,
                    from mm/page_alloc.c:18:
   mm/page_alloc.c: In function 'deferred_grow_zone':
   mm/page_alloc.c:1624:52: error: 'PAGES_PER_SECTION' undeclared (first use in this function); did you mean 'USEC_PER_SEC'?
     unsigned long nr_pages_needed = ALIGN(1 << order, PAGES_PER_SECTION);
                                                       ^~~~~~~~~~~~~~~~~
   include/uapi/linux/kernel.h:11:47: note: in definition of macro '__ALIGN_KERNEL_MASK'
    #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
                                                  ^~~~
   include/linux/kernel.h:58:22: note: in expansion of macro '__ALIGN_KERNEL'
    #define ALIGN(x, a)  __ALIGN_KERNEL((x), (a))
                         ^~~~~~~~~~~~~~
   mm/page_alloc.c:1624:34: note: in expansion of macro 'ALIGN'
     unsigned long nr_pages_needed = ALIGN(1 << order, PAGES_PER_SECTION);
                                     ^~~~~
   In file included from include/asm-generic/bug.h:18,
                    from arch/ia64/include/asm/bug.h:17,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/mm.h:9,
                    from mm/page_alloc.c:18:
   mm/page_alloc.c: In function 'free_area_init_node':
   mm/page_alloc.c:6379:50: error: 'PAGES_PER_SECTION' undeclared (first use in this function); did you mean 'USEC_PER_SEC'?
     pgdat->static_init_pgcnt = min_t(unsigned long, PAGES_PER_SECTION,
                                                     ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:812:22: note: in definition of macro '__typecheck'
      (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
                         ^
   include/linux/kernel.h:836:24: note: in expansion of macro '__safe_cmp'
     __builtin_choose_expr(__safe_cmp(x, y), \
                           ^~~~~~~~~~
   include/linux/kernel.h:904:27: note: in expansion of macro '__careful_cmp'
    #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
                              ^~~~~~~~~~~~~
   mm/page_alloc.c:6379:29: note: in expansion of macro 'min_t'
     pgdat->static_init_pgcnt = min_t(unsigned long, PAGES_PER_SECTION,
                                ^~~~~
   include/linux/kernel.h:836:2: error: first argument to '__builtin_choose_expr' not a constant
     __builtin_choose_expr(__safe_cmp(x, y), \
     ^~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:904:27: note: in expansion of macro '__careful_cmp'
    #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
                              ^~~~~~~~~~~~~
   mm/page_alloc.c:6379:29: note: in expansion of macro 'min_t'
     pgdat->static_init_pgcnt = min_t(unsigned long, PAGES_PER_SECTION,
                                ^~~~~

vim +321 mm/page_alloc.c

3a80a7fa Mel Gorman     2015-06-30  307  
3a80a7fa Mel Gorman     2015-06-30  308  /*
3a80a7fa Mel Gorman     2015-06-30  309   * Returns false when the remaining initialisation should be deferred until
3a80a7fa Mel Gorman     2015-06-30  310   * later in the boot cycle when it can be parallelised.
3a80a7fa Mel Gorman     2015-06-30  311   */
3a80a7fa Mel Gorman     2015-06-30  312  static inline bool update_defer_init(pg_data_t *pgdat,
3a80a7fa Mel Gorman     2015-06-30  313  				unsigned long pfn, unsigned long zone_end,
3a80a7fa Mel Gorman     2015-06-30  314  				unsigned long *nr_initialised)
3a80a7fa Mel Gorman     2015-06-30  315  {
3c2c6488 Shile Zhang    2018-01-31  316  	/* Always populate low zones for address-constrained allocations */
3a80a7fa Mel Gorman     2015-06-30  317  	if (zone_end < pgdat_end_pfn(pgdat))
3a80a7fa Mel Gorman     2015-06-30  318  		return true;
3a80a7fa Mel Gorman     2015-06-30  319  	(*nr_initialised)++;
d135e575 Pavel Tatashin 2017-11-15  320  	if ((*nr_initialised > pgdat->static_init_pgcnt) &&
3a80a7fa Mel Gorman     2015-06-30 @321  	    (pfn & (PAGES_PER_SECTION - 1)) == 0) {
3a80a7fa Mel Gorman     2015-06-30  322  		pgdat->first_deferred_pfn = pfn;
3a80a7fa Mel Gorman     2015-06-30  323  		return false;
3a80a7fa Mel Gorman     2015-06-30  324  	}
3a80a7fa Mel Gorman     2015-06-30  325  
3a80a7fa Mel Gorman     2015-06-30  326  	return true;
3a80a7fa Mel Gorman     2015-06-30  327  }
3a80a7fa Mel Gorman     2015-06-30  328  #else
3a80a7fa Mel Gorman     2015-06-30  329  static inline bool early_page_uninitialised(unsigned long pfn)
3a80a7fa Mel Gorman     2015-06-30  330  {
3a80a7fa Mel Gorman     2015-06-30  331  	return false;
3a80a7fa Mel Gorman     2015-06-30  332  }
3a80a7fa Mel Gorman     2015-06-30  333  

:::::: The code at line 321 was first introduced by commit
:::::: 3a80a7fa7989fbb6aa56bb6ad31811b62cf99e60 mm: meminit: initialise a subset of struct pages if CONFIG_DEFERRED_STRUCT_PAGE_INIT is set

:::::: TO: Mel Gorman <mgorman@suse.de>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 50849 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [ia64:noboot 4/4] mm/page_alloc.c:321:14: error: 'PAGES_PER_SECTION' undeclared; did you mean 'U
  2018-07-26 23:43 [ia64:noboot 4/4] mm/page_alloc.c:321:14: error: 'PAGES_PER_SECTION' undeclared; did you mean 'USEC_ kbuild test robot
@ 2018-07-27 19:08 ` Luck, Tony
  2018-07-27 20:36 ` Mike Rapoport
  1 sibling, 0 replies; 3+ messages in thread
From: Luck, Tony @ 2018-07-27 19:08 UTC (permalink / raw)
  To: linux-ia64

>> mm/page_alloc.c:321:14: error: 'PAGES_PER_SECTION' undeclared (first use in this function); did you mean 'USEC_PER_SEC'?

Weird.  I unpacked that config file and tried to reproduce ... but got a clean build.

Maybe my build flipped some other options because I'm using an ancient compiler?
I noticed this difference at the top of the output when I diffed my .config with the
supplied one:

< CONFIG_GCC_VERSION€100
---
> CONFIG_GCC_VERSION@304

Mike: Did you see anything like this when you did cross builds?

-Tony



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ia64:noboot 4/4] mm/page_alloc.c:321:14: error: 'PAGES_PER_SECTION' undeclared; did you mean 'U
  2018-07-26 23:43 [ia64:noboot 4/4] mm/page_alloc.c:321:14: error: 'PAGES_PER_SECTION' undeclared; did you mean 'USEC_ kbuild test robot
  2018-07-27 19:08 ` [ia64:noboot 4/4] mm/page_alloc.c:321:14: error: 'PAGES_PER_SECTION' undeclared; did you mean 'U Luck, Tony
@ 2018-07-27 20:36 ` Mike Rapoport
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Rapoport @ 2018-07-27 20:36 UTC (permalink / raw)
  To: linux-ia64

On Fri, Jul 27, 2018 at 07:08:40PM +0000, Luck, Tony wrote:
> >> mm/page_alloc.c:321:14: error: 'PAGES_PER_SECTION' undeclared (first use in this function); did you mean 'USEC_PER_SEC'?
> 
> Weird.  I unpacked that config file and tried to reproduce ... but got a clean build.
> 
> Maybe my build flipped some other options because I'm using an ancient compiler?
> I noticed this difference at the top of the output when I diffed my .config with the
> supplied one:
> 
> < CONFIG_GCC_VERSION€100
> ---
> > CONFIG_GCC_VERSION@304
> 
> Mike: Did you see anything like this when you did cross builds?
 
Yep, and I think it's not related to the compiler version. Selecting
NO_BOOTMEM allows enabling the DEFERRED_STRUCT_PAGE_INIT option that in
turn causes compilation of the code that uses PAGES_PER_SECTION.  The
definition of PAGES_PER_SECTION, though, depends on SPARSEMEM which is not
enabled in allmconfig for ia64.

I've sent a patch [1] to make DEFERRED_STRUCT_PAGE_INIT depend on
SPARSEMEM, it's landed in the akmp tree.

[1] https://lore.kernel.org/lkml/1530279308-24988-1-git-send-email-rppt@linux.vnet.ibm.com/#t

> -Tony
> 
> 

-- 
Sincerely yours,
Mike.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-27 20:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-26 23:43 [ia64:noboot 4/4] mm/page_alloc.c:321:14: error: 'PAGES_PER_SECTION' undeclared; did you mean 'USEC_ kbuild test robot
2018-07-27 19:08 ` [ia64:noboot 4/4] mm/page_alloc.c:321:14: error: 'PAGES_PER_SECTION' undeclared; did you mean 'U Luck, Tony
2018-07-27 20:36 ` Mike Rapoport

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox