[xilinx-xlnx:xlnx_rebase_v5.15 480/923] include/linux/cpumask.h:95:42: error: enumerator value for 'FIX_KMAP_END' is not an integer constant

kernel test robot lkp at intel.com
Thu Feb 10 08:00:53 PST 2022


tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15
head:   966124532656bc95d781abf57531e4cd4f962237
commit: 23b920bb9d53a7fcb8e9938f70228ae4d137f244 [480/923] microblaze: Enable experimental SMP functionality
config: microblaze-randconfig-r023-20220210 (https://download.01.org/0day-ci/archive/20220210/202202102317.n7MAKI54-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 11.2.0
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
        # https://github.com/Xilinx/linux-xlnx/commit/23b920bb9d53a7fcb8e9938f70228ae4d137f244
        git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.15
        git checkout 23b920bb9d53a7fcb8e9938f70228ae4d137f244
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=microblaze SHELL=/bin/bash arch/microblaze/kernel/ mm/

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

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

   In file included from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:63,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/mm.h:10,
                    from arch/microblaze/kernel/ptrace.c:28:
>> include/linux/cpumask.h:95:42: error: enumerator value for 'FIX_KMAP_END' is not an integer constant
      95 | #define cpu_possible_mask ((const struct cpumask *)&__cpu_possible_mask)
         |                                          ^~~~~~~
   include/linux/cpumask.h:889:48: note: in expansion of macro 'cpu_possible_mask'
     889 | #define num_possible_cpus()     cpumask_weight(cpu_possible_mask)
         |                                                ^~~~~~~~~~~~~~~~~
   arch/microblaze/include/asm/fixmap.h:50:55: note: in expansion of macro 'num_possible_cpus'
      50 |         FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * num_possible_cpus()) - 1,
         |                                                       ^~~~~~~~~~~~~~~~~
--
>> arch/microblaze/kernel/smp.c:156:6: warning: no previous prototype for 'crash___smp_cross_call' [-Wmissing-prototypes]
     156 | void crash___smp_cross_call(void (*crash_ipi_callback)(struct pt_regs *))
         |      ^~~~~~~~~~~~~~~~~~~~~~
   arch/microblaze/kernel/smp.c: In function 'smp_prepare_cpus':
>> arch/microblaze/kernel/smp.c:197:43: warning: parameter 'max_cpus' set but not used [-Wunused-but-set-parameter]
     197 | void __init smp_prepare_cpus(unsigned int max_cpus)
         |                              ~~~~~~~~~~~~~^~~~~~~~
--
   In file included from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:63,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/mm.h:10,
                    from mm/vmscan.c:15:
>> include/linux/cpumask.h:95:42: error: enumerator value for 'FIX_KMAP_END' is not an integer constant
      95 | #define cpu_possible_mask ((const struct cpumask *)&__cpu_possible_mask)
         |                                          ^~~~~~~
   include/linux/cpumask.h:889:48: note: in expansion of macro 'cpu_possible_mask'
     889 | #define num_possible_cpus()     cpumask_weight(cpu_possible_mask)
         |                                                ^~~~~~~~~~~~~~~~~
   arch/microblaze/include/asm/fixmap.h:50:55: note: in expansion of macro 'num_possible_cpus'
      50 |         FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * num_possible_cpus()) - 1,
         |                                                       ^~~~~~~~~~~~~~~~~
   mm/vmscan.c: In function 'demote_page_list':
   mm/vmscan.c:1340:13: warning: variable 'err' set but not used [-Wunused-but-set-variable]
    1340 |         int err;
         |             ^~~
--
   In file included from mm/percpu.c:72:
>> include/linux/cpumask.h:95:42: error: enumerator value for 'FIX_KMAP_END' is not an integer constant
      95 | #define cpu_possible_mask ((const struct cpumask *)&__cpu_possible_mask)
         |                                          ^~~~~~~
   include/linux/cpumask.h:889:48: note: in expansion of macro 'cpu_possible_mask'
     889 | #define num_possible_cpus()     cpumask_weight(cpu_possible_mask)
         |                                                ^~~~~~~~~~~~~~~~~
   arch/microblaze/include/asm/fixmap.h:50:55: note: in expansion of macro 'num_possible_cpus'
      50 |         FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * num_possible_cpus()) - 1,
         |                                                       ^~~~~~~~~~~~~~~~~
   mm/percpu.c:3030:12: warning: no previous prototype for 'pcpu_embed_first_chunk' [-Wmissing-prototypes]
    3030 | int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size,
         |            ^~~~~~~~~~~~~~~~~~~~~~
--
   In file included from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/rcupdate.h:29,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from mm/compaction.c:11:
>> include/linux/cpumask.h:95:42: error: enumerator value for 'FIX_KMAP_END' is not an integer constant
      95 | #define cpu_possible_mask ((const struct cpumask *)&__cpu_possible_mask)
         |                                          ^~~~~~~
   include/linux/cpumask.h:889:48: note: in expansion of macro 'cpu_possible_mask'
     889 | #define num_possible_cpus()     cpumask_weight(cpu_possible_mask)
         |                                                ^~~~~~~~~~~~~~~~~
   arch/microblaze/include/asm/fixmap.h:50:55: note: in expansion of macro 'num_possible_cpus'
      50 |         FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * num_possible_cpus()) - 1,
         |                                                       ^~~~~~~~~~~~~~~~~
   mm/compaction.c:56:27: warning: 'HPAGE_FRAG_CHECK_INTERVAL_MSEC' defined but not used [-Wunused-const-variable=]
      56 | static const unsigned int HPAGE_FRAG_CHECK_INTERVAL_MSEC = 500;
         |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   In file included from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:63,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/mm.h:10,
                    from mm/page_alloc.c:19:
>> include/linux/cpumask.h:95:42: error: enumerator value for 'FIX_KMAP_END' is not an integer constant
      95 | #define cpu_possible_mask ((const struct cpumask *)&__cpu_possible_mask)
         |                                          ^~~~~~~
   include/linux/cpumask.h:889:48: note: in expansion of macro 'cpu_possible_mask'
     889 | #define num_possible_cpus()     cpumask_weight(cpu_possible_mask)
         |                                                ^~~~~~~~~~~~~~~~~
   arch/microblaze/include/asm/fixmap.h:50:55: note: in expansion of macro 'num_possible_cpus'
      50 |         FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * num_possible_cpus()) - 1,
         |                                                       ^~~~~~~~~~~~~~~~~
   mm/page_alloc.c:3812:15: warning: no previous prototype for 'should_fail_alloc_page' [-Wmissing-prototypes]
    3812 | noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
         |               ^~~~~~~~~~~~~~~~~~~~~~


vim +/FIX_KMAP_END +95 include/linux/cpumask.h

^1da177e4c3f41 Linus Torvalds   2005-04-16   49  
^1da177e4c3f41 Linus Torvalds   2005-04-16   50  /*
^1da177e4c3f41 Linus Torvalds   2005-04-16   51   * The following particular system cpumasks and operations manage
b3199c025d1646 Rusty Russell    2008-12-30   52   * possible, present, active and online cpus.
^1da177e4c3f41 Linus Torvalds   2005-04-16   53   *
b3199c025d1646 Rusty Russell    2008-12-30   54   *     cpu_possible_mask- has bit 'cpu' set iff cpu is populatable
b3199c025d1646 Rusty Russell    2008-12-30   55   *     cpu_present_mask - has bit 'cpu' set iff cpu is populated
b3199c025d1646 Rusty Russell    2008-12-30   56   *     cpu_online_mask  - has bit 'cpu' set iff cpu available to scheduler
b3199c025d1646 Rusty Russell    2008-12-30   57   *     cpu_active_mask  - has bit 'cpu' set iff cpu available to migration
^1da177e4c3f41 Linus Torvalds   2005-04-16   58   *
b3199c025d1646 Rusty Russell    2008-12-30   59   *  If !CONFIG_HOTPLUG_CPU, present == possible, and active == online.
^1da177e4c3f41 Linus Torvalds   2005-04-16   60   *
b3199c025d1646 Rusty Russell    2008-12-30   61   *  The cpu_possible_mask is fixed at boot time, as the set of CPU id's
b3199c025d1646 Rusty Russell    2008-12-30   62   *  that it is possible might ever be plugged in at anytime during the
b3199c025d1646 Rusty Russell    2008-12-30   63   *  life of that system boot.  The cpu_present_mask is dynamic(*),
b3199c025d1646 Rusty Russell    2008-12-30   64   *  representing which CPUs are currently plugged in.  And
b3199c025d1646 Rusty Russell    2008-12-30   65   *  cpu_online_mask is the dynamic subset of cpu_present_mask,
b3199c025d1646 Rusty Russell    2008-12-30   66   *  indicating those CPUs available for scheduling.
b3199c025d1646 Rusty Russell    2008-12-30   67   *
b3199c025d1646 Rusty Russell    2008-12-30   68   *  If HOTPLUG is enabled, then cpu_possible_mask is forced to have
^1da177e4c3f41 Linus Torvalds   2005-04-16   69   *  all NR_CPUS bits set, otherwise it is just the set of CPUs that
^1da177e4c3f41 Linus Torvalds   2005-04-16   70   *  ACPI reports present at boot.
^1da177e4c3f41 Linus Torvalds   2005-04-16   71   *
b3199c025d1646 Rusty Russell    2008-12-30   72   *  If HOTPLUG is enabled, then cpu_present_mask varies dynamically,
^1da177e4c3f41 Linus Torvalds   2005-04-16   73   *  depending on what ACPI reports as currently plugged in, otherwise
b3199c025d1646 Rusty Russell    2008-12-30   74   *  cpu_present_mask is just a copy of cpu_possible_mask.
^1da177e4c3f41 Linus Torvalds   2005-04-16   75   *
b3199c025d1646 Rusty Russell    2008-12-30   76   *  (*) Well, cpu_present_mask is dynamic in the hotplug case.  If not
b3199c025d1646 Rusty Russell    2008-12-30   77   *      hotplug, it's a copy of cpu_possible_mask, hence fixed at boot.
^1da177e4c3f41 Linus Torvalds   2005-04-16   78   *
^1da177e4c3f41 Linus Torvalds   2005-04-16   79   * Subtleties:
^1da177e4c3f41 Linus Torvalds   2005-04-16   80   * 1) UP arch's (NR_CPUS == 1, CONFIG_SMP not defined) hardcode
^1da177e4c3f41 Linus Torvalds   2005-04-16   81   *    assumption that their single CPU is online.  The UP
b3199c025d1646 Rusty Russell    2008-12-30   82   *    cpu_{online,possible,present}_masks are placebos.  Changing them
^1da177e4c3f41 Linus Torvalds   2005-04-16   83   *    will have no useful affect on the following num_*_cpus()
^1da177e4c3f41 Linus Torvalds   2005-04-16   84   *    and cpu_*() macros in the UP case.  This ugliness is a UP
^1da177e4c3f41 Linus Torvalds   2005-04-16   85   *    optimization - don't waste any instructions or memory references
^1da177e4c3f41 Linus Torvalds   2005-04-16   86   *    asking if you're online or how many CPUs there are if there is
^1da177e4c3f41 Linus Torvalds   2005-04-16   87   *    only one CPU.
^1da177e4c3f41 Linus Torvalds   2005-04-16   88   */
^1da177e4c3f41 Linus Torvalds   2005-04-16   89  
4b804c85dc37db Rasmus Villemoes 2016-01-20   90  extern struct cpumask __cpu_possible_mask;
4b804c85dc37db Rasmus Villemoes 2016-01-20   91  extern struct cpumask __cpu_online_mask;
4b804c85dc37db Rasmus Villemoes 2016-01-20   92  extern struct cpumask __cpu_present_mask;
4b804c85dc37db Rasmus Villemoes 2016-01-20   93  extern struct cpumask __cpu_active_mask;
e40f74c535b8a0 Peter Zijlstra   2021-01-19   94  extern struct cpumask __cpu_dying_mask;
5aec01b834fd6f Rasmus Villemoes 2016-01-20  @95  #define cpu_possible_mask ((const struct cpumask *)&__cpu_possible_mask)
5aec01b834fd6f Rasmus Villemoes 2016-01-20   96  #define cpu_online_mask   ((const struct cpumask *)&__cpu_online_mask)
5aec01b834fd6f Rasmus Villemoes 2016-01-20   97  #define cpu_present_mask  ((const struct cpumask *)&__cpu_present_mask)
5aec01b834fd6f Rasmus Villemoes 2016-01-20   98  #define cpu_active_mask   ((const struct cpumask *)&__cpu_active_mask)
e40f74c535b8a0 Peter Zijlstra   2021-01-19   99  #define cpu_dying_mask    ((const struct cpumask *)&__cpu_dying_mask)
b3199c025d1646 Rusty Russell    2008-12-30  100  

:::::: The code at line 95 was first introduced by commit
:::::: 5aec01b834fd6f8ca49d1aeede665b950d0c148e kernel/cpu.c: eliminate cpu_*_mask

:::::: TO: Rasmus Villemoes <linux at rasmusvillemoes.dk>
:::::: CC: Linus Torvalds <torvalds at linux-foundation.org>

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



More information about the linux-arm-kernel mailing list