All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, x86@kernel.org
Subject: [tip:tmp.tmp2 336/364] arch/x86/include/asm/page_types.h:11: warning: "PAGE_SIZE" redefined
Date: Mon, 14 Jun 2021 04:45:00 +0800	[thread overview]
Message-ID: <202106140453.7cj41TKx-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head:   adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 8ba52e725f44d3c1da94670a29614b683e286c5a [336/364] sched/headers, mm: Simplify <linux/slab.h>'s header file dependencies
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=8ba52e725f44d3c1da94670a29614b683e286c5a
        git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
        git fetch --no-tags tip tmp.tmp2
        git checkout 8ba52e725f44d3c1da94670a29614b683e286c5a
        # save the attached .config to linux build tree
        make W=1 ARCH=um SUBARCH=x86_64

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

All warnings (new ones prefixed by >>):

   arch/x86/um/user-offsets.c:18:6: warning: no previous prototype for 'foo' [-Wmissing-prototypes]
      18 | void foo(void)
         |      ^~~
   In file included from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
>> arch/x86/include/asm/page_types.h:11: warning: "PAGE_SIZE" redefined
      11 | #define PAGE_SIZE  (_AC(1,UL) << PAGE_SHIFT)
         | 
   In file included from arch/um/include/asm/thread_info.h:15,
                    from include/linux/thread_info.h:52,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:18,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:3,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/page.h:14: note: this is the location of the previous definition
      14 | #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
         | 
   In file included from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
>> arch/x86/include/asm/page_types.h:36: warning: "PAGE_OFFSET" redefined
      36 | #define PAGE_OFFSET  ((unsigned long)__PAGE_OFFSET)
         | 
   In file included from arch/um/include/asm/thread_info.h:15,
                    from include/linux/thread_info.h:52,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:18,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:3,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/page.h:93: note: this is the location of the previous definition
      93 | #define PAGE_OFFSET (uml_physmem)
         | 
   In file included from arch/x86/include/asm/page_types.h:46,
                    from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
>> arch/x86/include/asm/page_64_types.h:15: warning: "THREAD_SIZE_ORDER" redefined
      15 | #define THREAD_SIZE_ORDER (2 + KASAN_STACK_ORDER)
         | 
   In file included from include/linux/thread_info.h:52,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:18,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:3,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/thread_info.h:9: note: this is the location of the previous definition
       9 | #define THREAD_SIZE_ORDER CONFIG_KERNEL_STACK_ORDER
         | 
   In file included from arch/x86/include/asm/page_types.h:46,
                    from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
>> arch/x86/include/asm/page_64_types.h:16: warning: "THREAD_SIZE" redefined
      16 | #define THREAD_SIZE  (PAGE_SIZE << THREAD_SIZE_ORDER)
         | 
   In file included from include/linux/thread_info.h:52,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:18,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:3,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/thread_info.h:10: note: this is the location of the previous definition
      10 | #define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE)
         | 
   In file included from ./arch/um/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:80,
                    from include/linux/spinlock.h:53,
                    from include/linux/swait.h:7,
                    from include/linux/completion.h:12,
                    from include/linux/crypto.h:21,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
   include/asm-generic/preempt.h: In function '__preempt_count_dec_and_test':
   include/asm-generic/preempt.h:69:36: error: implicit declaration of function 'tif_need_resched' [-Werror=implicit-function-declaration]
      69 |  return !--*preempt_count_ptr() && tif_need_resched();
         |                                    ^~~~~~~~~~~~~~~~
   In file included from arch/x86/um/asm/processor.h:41,
                    from include/linux/spinlock_up.h:8,
                    from include/linux/spinlock.h:93,
                    from include/linux/swait.h:7,
                    from include/linux/completion.h:12,
                    from include/linux/crypto.h:21,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/processor-generic.h: At top level:
>> arch/um/include/asm/processor-generic.h:71: warning: "TASK_SIZE" redefined
      71 | #define TASK_SIZE (task_size)
         | 
   In file included from arch/x86/include/asm/page_types.h:46,
                    from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/x86/include/asm/page_64_types.h:75: note: this is the location of the previous definition
      75 | #define TASK_SIZE  (test_thread_flag(TIF_ADDR32) ? \
         | 
   In file included from arch/um/kernel/asm-offsets.c:1:
   arch/x86/um/shared/sysdep/kernel-offsets.h:9:6: warning: no previous prototype for 'foo' [-Wmissing-prototypes]
       9 | void foo(void)
         |      ^~~
   In file included from arch/x86/um/shared/sysdep/kernel-offsets.h:6,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/shared/common-offsets.h: In function 'foo':
   arch/um/include/shared/common-offsets.h:26:15: error: 'HZ' undeclared (first use in this function)
      26 | DEFINE(UM_HZ, HZ);
         |               ^~
   include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
       6 |  asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
         |                                                              ^~~
   arch/um/include/shared/common-offsets.h:26:15: note: each undeclared identifier is reported only once for each function it appears in
      26 | DEFINE(UM_HZ, HZ);
         |               ^~
   include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
       6 |  asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
         |                                                              ^~~
   cc1: some warnings being treated as errors
   make[2]: *** [scripts/Makefile.build:117: arch/um/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1232: prepare0] Error 2
   make[1]: Target 'modules_prepare' not remade because of errors.
   make: *** [Makefile:215: __sub-make] Error 2
   make: Target 'modules_prepare' not remade because of errors.
--
   arch/x86/um/user-offsets.c:18:6: warning: no previous prototype for 'foo' [-Wmissing-prototypes]
      18 | void foo(void)
         |      ^~~
   In file included from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
>> arch/x86/include/asm/page_types.h:11: warning: "PAGE_SIZE" redefined
      11 | #define PAGE_SIZE  (_AC(1,UL) << PAGE_SHIFT)
         | 
   In file included from arch/um/include/asm/thread_info.h:15,
                    from include/linux/thread_info.h:52,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:18,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:3,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/page.h:14: note: this is the location of the previous definition
      14 | #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
         | 
   In file included from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
>> arch/x86/include/asm/page_types.h:36: warning: "PAGE_OFFSET" redefined
      36 | #define PAGE_OFFSET  ((unsigned long)__PAGE_OFFSET)
         | 
   In file included from arch/um/include/asm/thread_info.h:15,
                    from include/linux/thread_info.h:52,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:18,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:3,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/page.h:93: note: this is the location of the previous definition
      93 | #define PAGE_OFFSET (uml_physmem)
         | 
   In file included from arch/x86/include/asm/page_types.h:46,
                    from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
>> arch/x86/include/asm/page_64_types.h:15: warning: "THREAD_SIZE_ORDER" redefined
      15 | #define THREAD_SIZE_ORDER (2 + KASAN_STACK_ORDER)
         | 
   In file included from include/linux/thread_info.h:52,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:18,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:3,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/thread_info.h:9: note: this is the location of the previous definition
       9 | #define THREAD_SIZE_ORDER CONFIG_KERNEL_STACK_ORDER
         | 
   In file included from arch/x86/include/asm/page_types.h:46,
                    from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
>> arch/x86/include/asm/page_64_types.h:16: warning: "THREAD_SIZE" redefined
      16 | #define THREAD_SIZE  (PAGE_SIZE << THREAD_SIZE_ORDER)
         | 
   In file included from include/linux/thread_info.h:52,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:18,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:3,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/thread_info.h:10: note: this is the location of the previous definition
      10 | #define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE)
         | 
   In file included from ./arch/um/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:80,
                    from include/linux/spinlock.h:53,
                    from include/linux/swait.h:7,
                    from include/linux/completion.h:12,
                    from include/linux/crypto.h:21,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
   include/asm-generic/preempt.h: In function '__preempt_count_dec_and_test':
   include/asm-generic/preempt.h:69:36: error: implicit declaration of function 'tif_need_resched' [-Werror=implicit-function-declaration]
      69 |  return !--*preempt_count_ptr() && tif_need_resched();
         |                                    ^~~~~~~~~~~~~~~~
   In file included from arch/x86/um/asm/processor.h:41,
                    from include/linux/spinlock_up.h:8,
                    from include/linux/spinlock.h:93,
                    from include/linux/swait.h:7,
                    from include/linux/completion.h:12,
                    from include/linux/crypto.h:21,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/processor-generic.h: At top level:
>> arch/um/include/asm/processor-generic.h:71: warning: "TASK_SIZE" redefined
      71 | #define TASK_SIZE (task_size)
         | 
   In file included from arch/x86/include/asm/page_types.h:46,
                    from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/x86/include/asm/page_64_types.h:75: note: this is the location of the previous definition
      75 | #define TASK_SIZE  (test_thread_flag(TIF_ADDR32) ? \
         | 
   In file included from arch/um/kernel/asm-offsets.c:1:
   arch/x86/um/shared/sysdep/kernel-offsets.h:9:6: warning: no previous prototype for 'foo' [-Wmissing-prototypes]
       9 | void foo(void)
         |      ^~~
   In file included from arch/x86/um/shared/sysdep/kernel-offsets.h:6,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/shared/common-offsets.h: In function 'foo':
   arch/um/include/shared/common-offsets.h:26:15: error: 'HZ' undeclared (first use in this function)
      26 | DEFINE(UM_HZ, HZ);
         |               ^~
   include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
       6 |  asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
         |                                                              ^~~
   arch/um/include/shared/common-offsets.h:26:15: note: each undeclared identifier is reported only once for each function it appears in
      26 | DEFINE(UM_HZ, HZ);
         |               ^~
   include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
       6 |  asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
         |                                                              ^~~
   cc1: some warnings being treated as errors
   make[2]: *** [scripts/Makefile.build:117: arch/um/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1232: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:215: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +/PAGE_SIZE +11 arch/x86/include/asm/page_types.h

51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08   8  
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08   9  /* PAGE_SHIFT determines the page size */
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  10  #define PAGE_SHIFT		12
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08 @11  #define PAGE_SIZE		(_AC(1,UL) << PAGE_SHIFT)
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  12  #define PAGE_MASK		(~(PAGE_SIZE-1))
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  13  
70f1528747651b Kirill A. Shutemov  2015-11-30  14  #define PMD_PAGE_SIZE		(_AC(1, UL) << PMD_SHIFT)
70f1528747651b Kirill A. Shutemov  2015-11-30  15  #define PMD_PAGE_MASK		(~(PMD_PAGE_SIZE-1))
70f1528747651b Kirill A. Shutemov  2015-11-30  16  
70f1528747651b Kirill A. Shutemov  2015-11-30  17  #define PUD_PAGE_SIZE		(_AC(1, UL) << PUD_SHIFT)
70f1528747651b Kirill A. Shutemov  2015-11-30  18  #define PUD_PAGE_MASK		(~(PUD_PAGE_SIZE-1))
70f1528747651b Kirill A. Shutemov  2015-11-30  19  
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  20  #define __VIRTUAL_MASK		((1UL << __VIRTUAL_MASK_SHIFT) - 1)
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  21  
70f1528747651b Kirill A. Shutemov  2015-11-30  22  /* Cast *PAGE_MASK to a signed type so that it is sign-extended if
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  23     virtual addresses are 32-bits but physical addresses are larger
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  24     (ie, 32-bit PAE). */
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  25  #define PHYSICAL_PAGE_MASK	(((signed long)PAGE_MASK) & __PHYSICAL_MASK)
70f1528747651b Kirill A. Shutemov  2015-11-30  26  #define PHYSICAL_PMD_PAGE_MASK	(((signed long)PMD_PAGE_MASK) & __PHYSICAL_MASK)
70f1528747651b Kirill A. Shutemov  2015-11-30  27  #define PHYSICAL_PUD_PAGE_MASK	(((signed long)PUD_PAGE_MASK) & __PHYSICAL_MASK)
832102671855f7 Toshi Kani          2015-09-17  28  
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  29  #define HPAGE_SHIFT		PMD_SHIFT
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  30  #define HPAGE_SIZE		(_AC(1,UL) << HPAGE_SHIFT)
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  31  #define HPAGE_MASK		(~(HPAGE_SIZE - 1))
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  32  #define HUGETLB_PAGE_ORDER	(HPAGE_SHIFT - PAGE_SHIFT)
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  33  
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  34  #define HUGE_MAX_HSTATE 2
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  35  
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08 @36  #define PAGE_OFFSET		((unsigned long)__PAGE_OFFSET)
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  37  

:::::: The code at line 11 was first introduced by commit
:::::: 51c78eb3f0eb033f9fb4f2316851df1d9b07b953 x86: create _types.h counterparts for page*.h

:::::: TO: Jeremy Fitzhardinge <jeremy@goop.org>
:::::: CC: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [tip:tmp.tmp2 336/364] arch/x86/include/asm/page_types.h:11: warning: "PAGE_SIZE" redefined
Date: Mon, 14 Jun 2021 04:45:00 +0800	[thread overview]
Message-ID: <202106140453.7cj41TKx-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head:   adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 8ba52e725f44d3c1da94670a29614b683e286c5a [336/364] sched/headers, mm: Simplify <linux/slab.h>'s header file dependencies
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=8ba52e725f44d3c1da94670a29614b683e286c5a
        git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
        git fetch --no-tags tip tmp.tmp2
        git checkout 8ba52e725f44d3c1da94670a29614b683e286c5a
        # save the attached .config to linux build tree
        make W=1 ARCH=um SUBARCH=x86_64

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

All warnings (new ones prefixed by >>):

   arch/x86/um/user-offsets.c:18:6: warning: no previous prototype for 'foo' [-Wmissing-prototypes]
      18 | void foo(void)
         |      ^~~
   In file included from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
>> arch/x86/include/asm/page_types.h:11: warning: "PAGE_SIZE" redefined
      11 | #define PAGE_SIZE  (_AC(1,UL) << PAGE_SHIFT)
         | 
   In file included from arch/um/include/asm/thread_info.h:15,
                    from include/linux/thread_info.h:52,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:18,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:3,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/page.h:14: note: this is the location of the previous definition
      14 | #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
         | 
   In file included from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
>> arch/x86/include/asm/page_types.h:36: warning: "PAGE_OFFSET" redefined
      36 | #define PAGE_OFFSET  ((unsigned long)__PAGE_OFFSET)
         | 
   In file included from arch/um/include/asm/thread_info.h:15,
                    from include/linux/thread_info.h:52,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:18,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:3,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/page.h:93: note: this is the location of the previous definition
      93 | #define PAGE_OFFSET (uml_physmem)
         | 
   In file included from arch/x86/include/asm/page_types.h:46,
                    from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
>> arch/x86/include/asm/page_64_types.h:15: warning: "THREAD_SIZE_ORDER" redefined
      15 | #define THREAD_SIZE_ORDER (2 + KASAN_STACK_ORDER)
         | 
   In file included from include/linux/thread_info.h:52,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:18,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:3,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/thread_info.h:9: note: this is the location of the previous definition
       9 | #define THREAD_SIZE_ORDER CONFIG_KERNEL_STACK_ORDER
         | 
   In file included from arch/x86/include/asm/page_types.h:46,
                    from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
>> arch/x86/include/asm/page_64_types.h:16: warning: "THREAD_SIZE" redefined
      16 | #define THREAD_SIZE  (PAGE_SIZE << THREAD_SIZE_ORDER)
         | 
   In file included from include/linux/thread_info.h:52,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:18,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:3,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/thread_info.h:10: note: this is the location of the previous definition
      10 | #define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE)
         | 
   In file included from ./arch/um/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:80,
                    from include/linux/spinlock.h:53,
                    from include/linux/swait.h:7,
                    from include/linux/completion.h:12,
                    from include/linux/crypto.h:21,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
   include/asm-generic/preempt.h: In function '__preempt_count_dec_and_test':
   include/asm-generic/preempt.h:69:36: error: implicit declaration of function 'tif_need_resched' [-Werror=implicit-function-declaration]
      69 |  return !--*preempt_count_ptr() && tif_need_resched();
         |                                    ^~~~~~~~~~~~~~~~
   In file included from arch/x86/um/asm/processor.h:41,
                    from include/linux/spinlock_up.h:8,
                    from include/linux/spinlock.h:93,
                    from include/linux/swait.h:7,
                    from include/linux/completion.h:12,
                    from include/linux/crypto.h:21,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/processor-generic.h: At top level:
>> arch/um/include/asm/processor-generic.h:71: warning: "TASK_SIZE" redefined
      71 | #define TASK_SIZE (task_size)
         | 
   In file included from arch/x86/include/asm/page_types.h:46,
                    from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/x86/include/asm/page_64_types.h:75: note: this is the location of the previous definition
      75 | #define TASK_SIZE  (test_thread_flag(TIF_ADDR32) ? \
         | 
   In file included from arch/um/kernel/asm-offsets.c:1:
   arch/x86/um/shared/sysdep/kernel-offsets.h:9:6: warning: no previous prototype for 'foo' [-Wmissing-prototypes]
       9 | void foo(void)
         |      ^~~
   In file included from arch/x86/um/shared/sysdep/kernel-offsets.h:6,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/shared/common-offsets.h: In function 'foo':
   arch/um/include/shared/common-offsets.h:26:15: error: 'HZ' undeclared (first use in this function)
      26 | DEFINE(UM_HZ, HZ);
         |               ^~
   include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
       6 |  asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
         |                                                              ^~~
   arch/um/include/shared/common-offsets.h:26:15: note: each undeclared identifier is reported only once for each function it appears in
      26 | DEFINE(UM_HZ, HZ);
         |               ^~
   include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
       6 |  asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
         |                                                              ^~~
   cc1: some warnings being treated as errors
   make[2]: *** [scripts/Makefile.build:117: arch/um/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1232: prepare0] Error 2
   make[1]: Target 'modules_prepare' not remade because of errors.
   make: *** [Makefile:215: __sub-make] Error 2
   make: Target 'modules_prepare' not remade because of errors.
--
   arch/x86/um/user-offsets.c:18:6: warning: no previous prototype for 'foo' [-Wmissing-prototypes]
      18 | void foo(void)
         |      ^~~
   In file included from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
>> arch/x86/include/asm/page_types.h:11: warning: "PAGE_SIZE" redefined
      11 | #define PAGE_SIZE  (_AC(1,UL) << PAGE_SHIFT)
         | 
   In file included from arch/um/include/asm/thread_info.h:15,
                    from include/linux/thread_info.h:52,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:18,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:3,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/page.h:14: note: this is the location of the previous definition
      14 | #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
         | 
   In file included from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
>> arch/x86/include/asm/page_types.h:36: warning: "PAGE_OFFSET" redefined
      36 | #define PAGE_OFFSET  ((unsigned long)__PAGE_OFFSET)
         | 
   In file included from arch/um/include/asm/thread_info.h:15,
                    from include/linux/thread_info.h:52,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:18,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:3,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/page.h:93: note: this is the location of the previous definition
      93 | #define PAGE_OFFSET (uml_physmem)
         | 
   In file included from arch/x86/include/asm/page_types.h:46,
                    from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
>> arch/x86/include/asm/page_64_types.h:15: warning: "THREAD_SIZE_ORDER" redefined
      15 | #define THREAD_SIZE_ORDER (2 + KASAN_STACK_ORDER)
         | 
   In file included from include/linux/thread_info.h:52,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:18,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:3,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/thread_info.h:9: note: this is the location of the previous definition
       9 | #define THREAD_SIZE_ORDER CONFIG_KERNEL_STACK_ORDER
         | 
   In file included from arch/x86/include/asm/page_types.h:46,
                    from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
>> arch/x86/include/asm/page_64_types.h:16: warning: "THREAD_SIZE" redefined
      16 | #define THREAD_SIZE  (PAGE_SIZE << THREAD_SIZE_ORDER)
         | 
   In file included from include/linux/thread_info.h:52,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:18,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:3,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/thread_info.h:10: note: this is the location of the previous definition
      10 | #define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE)
         | 
   In file included from ./arch/um/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:80,
                    from include/linux/spinlock.h:53,
                    from include/linux/swait.h:7,
                    from include/linux/completion.h:12,
                    from include/linux/crypto.h:21,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
   include/asm-generic/preempt.h: In function '__preempt_count_dec_and_test':
   include/asm-generic/preempt.h:69:36: error: implicit declaration of function 'tif_need_resched' [-Werror=implicit-function-declaration]
      69 |  return !--*preempt_count_ptr() && tif_need_resched();
         |                                    ^~~~~~~~~~~~~~~~
   In file included from arch/x86/um/asm/processor.h:41,
                    from include/linux/spinlock_up.h:8,
                    from include/linux/spinlock.h:93,
                    from include/linux/swait.h:7,
                    from include/linux/completion.h:12,
                    from include/linux/crypto.h:21,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/asm/processor-generic.h: At top level:
>> arch/um/include/asm/processor-generic.h:71: warning: "TASK_SIZE" redefined
      71 | #define TASK_SIZE (task_size)
         | 
   In file included from arch/x86/include/asm/page_types.h:46,
                    from include/linux/slab.h:20,
                    from include/linux/crypto.h:20,
                    from arch/x86/um/shared/sysdep/kernel-offsets.h:5,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/x86/include/asm/page_64_types.h:75: note: this is the location of the previous definition
      75 | #define TASK_SIZE  (test_thread_flag(TIF_ADDR32) ? \
         | 
   In file included from arch/um/kernel/asm-offsets.c:1:
   arch/x86/um/shared/sysdep/kernel-offsets.h:9:6: warning: no previous prototype for 'foo' [-Wmissing-prototypes]
       9 | void foo(void)
         |      ^~~
   In file included from arch/x86/um/shared/sysdep/kernel-offsets.h:6,
                    from arch/um/kernel/asm-offsets.c:1:
   arch/um/include/shared/common-offsets.h: In function 'foo':
   arch/um/include/shared/common-offsets.h:26:15: error: 'HZ' undeclared (first use in this function)
      26 | DEFINE(UM_HZ, HZ);
         |               ^~
   include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
       6 |  asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
         |                                                              ^~~
   arch/um/include/shared/common-offsets.h:26:15: note: each undeclared identifier is reported only once for each function it appears in
      26 | DEFINE(UM_HZ, HZ);
         |               ^~
   include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
       6 |  asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
         |                                                              ^~~
   cc1: some warnings being treated as errors
   make[2]: *** [scripts/Makefile.build:117: arch/um/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1232: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:215: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +/PAGE_SIZE +11 arch/x86/include/asm/page_types.h

51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08   8  
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08   9  /* PAGE_SHIFT determines the page size */
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  10  #define PAGE_SHIFT		12
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08 @11  #define PAGE_SIZE		(_AC(1,UL) << PAGE_SHIFT)
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  12  #define PAGE_MASK		(~(PAGE_SIZE-1))
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  13  
70f1528747651b Kirill A. Shutemov  2015-11-30  14  #define PMD_PAGE_SIZE		(_AC(1, UL) << PMD_SHIFT)
70f1528747651b Kirill A. Shutemov  2015-11-30  15  #define PMD_PAGE_MASK		(~(PMD_PAGE_SIZE-1))
70f1528747651b Kirill A. Shutemov  2015-11-30  16  
70f1528747651b Kirill A. Shutemov  2015-11-30  17  #define PUD_PAGE_SIZE		(_AC(1, UL) << PUD_SHIFT)
70f1528747651b Kirill A. Shutemov  2015-11-30  18  #define PUD_PAGE_MASK		(~(PUD_PAGE_SIZE-1))
70f1528747651b Kirill A. Shutemov  2015-11-30  19  
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  20  #define __VIRTUAL_MASK		((1UL << __VIRTUAL_MASK_SHIFT) - 1)
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  21  
70f1528747651b Kirill A. Shutemov  2015-11-30  22  /* Cast *PAGE_MASK to a signed type so that it is sign-extended if
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  23     virtual addresses are 32-bits but physical addresses are larger
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  24     (ie, 32-bit PAE). */
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  25  #define PHYSICAL_PAGE_MASK	(((signed long)PAGE_MASK) & __PHYSICAL_MASK)
70f1528747651b Kirill A. Shutemov  2015-11-30  26  #define PHYSICAL_PMD_PAGE_MASK	(((signed long)PMD_PAGE_MASK) & __PHYSICAL_MASK)
70f1528747651b Kirill A. Shutemov  2015-11-30  27  #define PHYSICAL_PUD_PAGE_MASK	(((signed long)PUD_PAGE_MASK) & __PHYSICAL_MASK)
832102671855f7 Toshi Kani          2015-09-17  28  
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  29  #define HPAGE_SHIFT		PMD_SHIFT
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  30  #define HPAGE_SIZE		(_AC(1,UL) << HPAGE_SHIFT)
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  31  #define HPAGE_MASK		(~(HPAGE_SIZE - 1))
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  32  #define HUGETLB_PAGE_ORDER	(HPAGE_SHIFT - PAGE_SHIFT)
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  33  
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  34  #define HUGE_MAX_HSTATE 2
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  35  
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08 @36  #define PAGE_OFFSET		((unsigned long)__PAGE_OFFSET)
51c78eb3f0eb03 Jeremy Fitzhardinge 2009-02-08  37  

:::::: The code@line 11 was first introduced by commit
:::::: 51c78eb3f0eb033f9fb4f2316851df1d9b07b953 x86: create _types.h counterparts for page*.h

:::::: TO: Jeremy Fitzhardinge <jeremy@goop.org>
:::::: CC: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

             reply	other threads:[~2021-06-13 20:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-13 20:45 kernel test robot [this message]
2021-06-13 20:45 ` [tip:tmp.tmp2 336/364] arch/x86/include/asm/page_types.h:11: warning: "PAGE_SIZE" redefined kernel test robot

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=202106140453.7cj41TKx-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=x86@kernel.org \
    /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.