lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 12 Apr 2020 13:24:19 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Jiaxun Yang <jiaxun.yang@...goat.com>
Cc:     kbuild-all@...ts.01.org, linux-mips@...r.kernel.org,
        "dietmar.eggemann@....com, Jiaxun Yang" <jiaxun.yang@...goat.com>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Huacai Chen <chenhc@...ote.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Florian Fainelli <f.fainelli@...il.com>,
        Robert Richter <rric@...nel.org>,
        Sudeep Holla <sudeep.holla@....com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Jason Cooper <jason@...edaemon.net>,
        Marc Zyngier <maz@...nel.org>,
        Paul Burton <paulburton@...nel.org>,
        Allison Randal <allison@...utok.net>,
        Enrico Weigelt <info@...ux.net>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        Vladimir Kondratiev <vladimir.kondratiev@...el.com>,
        Paul Cercueil <paul@...pouillou.net>,
        Zhou Yanjie <zhouyanjie@...o.com>,
        周琰杰 (Zhou Yanjie) 
        <zhouyanjie@...yeetech.com>, YunQiang Su <syq@...ian.org>,
        Arnd Bergmann <arnd@...db.de>,
        Serge Semin <fancer.lancer@...il.com>,
        Matt Redfearn <matt.redfearn@...s.com>,
        Steve Winslow <swinslow@...il.com>,
        Alexios Zavras <alexios.zavras@...el.com>,
        Richard Fontana <rfontana@...hat.com>,
        Peter Xu <peterx@...hat.com>,
        afzal mohammed <afzal.mohd.ma@...il.com>,
        Kamal Dasu <kdasu.kdev@...il.com>,
        Oleksij Rempel <linux@...pel-privat.de>,
        linux-kernel@...r.kernel.org,
        bcm-kernel-feedback-list@...adcom.com, oprofile-list@...ts.sf.net,
        linux-pm@...r.kernel.org
Subject: Re: [PATCH v2 05/11] MIPS: Switch to arch_topology

Hi Jiaxun,

I love your patch! Yet something to improve:

[auto build test ERROR on driver-core/driver-core-testing]
[also build test ERROR on pm/linux-next linus/master next-20200411]
[cannot apply to tip/perf/core tip/irq/core v5.6]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Jiaxun-Yang/MIPS-Topology-DeviceTree-CPU-rework-v2/20200412-113308
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git a10c9c710f9ecea87b9f4bbb837467893b4bef01
config: mips-fuloong2e_defconfig (attached as .config)
compiler: mips64el-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=9.3.0 make.cross ARCH=mips 

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

Note: the linux-review/Jiaxun-Yang/MIPS-Topology-DeviceTree-CPU-rework-v2/20200412-113308 HEAD 8e8e9d4f7aa74359f2199773786ffe2fbb7877d0 builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   In file included from arch/mips/include/asm/mips-cps.h:104,
                    from arch/mips/kernel/process.c:43:
   arch/mips/include/asm/mips-cm.h: In function 'mips_cm_vp_id':
>> arch/mips/include/asm/mips-cm.h:398:31: error: passing argument 1 of 'cpu_core' makes integer from pointer without a cast [-Werror=int-conversion]
     398 |  unsigned int core = cpu_core(&cpu_data[cpu]);
         |                               ^~~~~~~~~~~~~~
         |                               |
         |                               struct cpuinfo_mips *
   In file included from include/linux/topology.h:36,
                    from include/linux/gfp.h:9,
                    from include/linux/xarray.h:14,
                    from include/linux/radix-tree.h:18,
                    from include/linux/idr.h:15,
                    from include/linux/kernfs.h:13,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/of.h:17,
                    from include/linux/clocksource.h:19,
                    from include/linux/clockchips.h:14,
                    from include/linux/tick.h:8,
                    from arch/mips/kernel/process.c:17:
   arch/mips/include/asm/topology.h:68:41: note: expected 'int' but argument is of type 'struct cpuinfo_mips *'
      68 | static inline unsigned int cpu_core(int cpu)
         |                                     ~~~~^~~
   In file included from arch/mips/include/asm/mips-cps.h:104,
                    from arch/mips/kernel/process.c:43:
>> arch/mips/include/asm/mips-cm.h:399:31: error: passing argument 1 of 'cpu_vpe_id' makes integer from pointer without a cast [-Werror=int-conversion]
     399 |  unsigned int vp = cpu_vpe_id(&cpu_data[cpu]);
         |                               ^~~~~~~~~~~~~~
         |                               |
         |                               struct cpuinfo_mips *
   In file included from include/linux/topology.h:36,
                    from include/linux/gfp.h:9,
                    from include/linux/xarray.h:14,
                    from include/linux/radix-tree.h:18,
                    from include/linux/idr.h:15,
                    from include/linux/kernfs.h:13,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/of.h:17,
                    from include/linux/clocksource.h:19,
                    from include/linux/clockchips.h:14,
                    from include/linux/tick.h:8,
                    from arch/mips/kernel/process.c:17:
   arch/mips/include/asm/topology.h:73:43: note: expected 'int' but argument is of type 'struct cpuinfo_mips *'
      73 | static inline unsigned int cpu_vpe_id(int cpu)
         |                                       ~~~~^~~
   In file included from arch/mips/include/asm/mips-cps.h:104,
                    from arch/mips/kernel/process.c:43:
   arch/mips/include/asm/mips-cm.h: In function 'mips_cm_lock_other_cpu':
>> arch/mips/include/asm/mips-cm.h:456:33: error: passing argument 1 of 'cpu_cluster' makes integer from pointer without a cast [-Werror=int-conversion]
     456 |  mips_cm_lock_other(cpu_cluster(d), cpu_core(d), cpu_vpe_id(d), block);
         |                                 ^
         |                                 |
         |                                 struct cpuinfo_mips *
   In file included from include/linux/topology.h:36,
                    from include/linux/gfp.h:9,
                    from include/linux/xarray.h:14,
                    from include/linux/radix-tree.h:18,
                    from include/linux/idr.h:15,
                    from include/linux/kernfs.h:13,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/of.h:17,
                    from include/linux/clocksource.h:19,
                    from include/linux/clockchips.h:14,
                    from include/linux/tick.h:8,
                    from arch/mips/kernel/process.c:17:
   arch/mips/include/asm/topology.h:63:44: note: expected 'int' but argument is of type 'struct cpuinfo_mips *'
      63 | static inline unsigned int cpu_cluster(int cpu)
         |                                        ~~~~^~~
   In file included from arch/mips/include/asm/mips-cps.h:104,
                    from arch/mips/kernel/process.c:43:
   arch/mips/include/asm/mips-cm.h:456:46: error: passing argument 1 of 'cpu_core' makes integer from pointer without a cast [-Werror=int-conversion]
     456 |  mips_cm_lock_other(cpu_cluster(d), cpu_core(d), cpu_vpe_id(d), block);
         |                                              ^
         |                                              |
         |                                              struct cpuinfo_mips *
   In file included from include/linux/topology.h:36,
                    from include/linux/gfp.h:9,
                    from include/linux/xarray.h:14,
                    from include/linux/radix-tree.h:18,
                    from include/linux/idr.h:15,
                    from include/linux/kernfs.h:13,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/of.h:17,
                    from include/linux/clocksource.h:19,
                    from include/linux/clockchips.h:14,
                    from include/linux/tick.h:8,
                    from arch/mips/kernel/process.c:17:
   arch/mips/include/asm/topology.h:68:41: note: expected 'int' but argument is of type 'struct cpuinfo_mips *'
      68 | static inline unsigned int cpu_core(int cpu)
         |                                     ~~~~^~~
   In file included from arch/mips/include/asm/mips-cps.h:104,
                    from arch/mips/kernel/process.c:43:
   arch/mips/include/asm/mips-cm.h:456:61: error: passing argument 1 of 'cpu_vpe_id' makes integer from pointer without a cast [-Werror=int-conversion]
     456 |  mips_cm_lock_other(cpu_cluster(d), cpu_core(d), cpu_vpe_id(d), block);
         |                                                             ^
         |                                                             |
         |                                                             struct cpuinfo_mips *
   In file included from include/linux/topology.h:36,
                    from include/linux/gfp.h:9,
                    from include/linux/xarray.h:14,
                    from include/linux/radix-tree.h:18,
                    from include/linux/idr.h:15,
                    from include/linux/kernfs.h:13,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/of.h:17,
                    from include/linux/clocksource.h:19,
                    from include/linux/clockchips.h:14,
                    from include/linux/tick.h:8,
                    from arch/mips/kernel/process.c:17:
   arch/mips/include/asm/topology.h:73:43: note: expected 'int' but argument is of type 'struct cpuinfo_mips *'
      73 | static inline unsigned int cpu_vpe_id(int cpu)
         |                                       ~~~~^~~
   cc1: all warnings being treated as errors
--
   arch/mips/kernel/cacheinfo.c: In function 'fill_cpumask_siblings':
   arch/mips/kernel/cacheinfo.c:58:7: error: implicit declaration of function 'cpus_are_siblings' [-Werror=implicit-function-declaration]
      58 |   if (cpus_are_siblings(cpu, cpu1))
         |       ^~~~~~~~~~~~~~~~~
   arch/mips/kernel/cacheinfo.c: In function 'fill_cpumask_cluster':
>> arch/mips/kernel/cacheinfo.c:65:16: error: implicit declaration of function 'cpu_cluster' [-Werror=implicit-function-declaration]
      65 |  int cluster = cpu_cluster(&cpu_data[cpu]);
         |                ^~~~~~~~~~~
   cc1: all warnings being treated as errors
--
   arch/mips/kernel/proc.c: In function 'show_cpuinfo':
>> arch/mips/kernel/proc.c:141:50: error: 'struct cpuinfo_mips' has no member named 'package'
     141 |  seq_printf(m, "package\t\t\t: %d\n", cpu_data[n].package);
         |                                                  ^
>> arch/mips/kernel/proc.c:142:45: error: passing argument 1 of 'cpu_core' makes integer from pointer without a cast [-Werror=int-conversion]
     142 |  seq_printf(m, "core\t\t\t: %d\n", cpu_core(&cpu_data[n]));
         |                                             ^~~~~~~~~~~~
         |                                             |
         |                                             struct cpuinfo_mips *
   In file included from include/linux/topology.h:36,
                    from include/linux/gfp.h:9,
                    from include/linux/xarray.h:14,
                    from include/linux/radix-tree.h:18,
                    from include/linux/fs.h:15,
                    from include/linux/seq_file.h:11,
                    from arch/mips/kernel/proc.c:10:
   arch/mips/include/asm/topology.h:68:41: note: expected 'int' but argument is of type 'struct cpuinfo_mips *'
      68 | static inline unsigned int cpu_core(int cpu)
         |                                     ~~~~^~~
   cc1: all warnings being treated as errors

vim +/cpu_core +398 arch/mips/include/asm/mips-cm.h

7573b94e08aeb5 Paul Burton 2015-09-22  385  
7573b94e08aeb5 Paul Burton 2015-09-22  386  /**
7573b94e08aeb5 Paul Burton 2015-09-22  387   * mips_cm_vp_id() - calculate the hardware VP ID for a CPU
7573b94e08aeb5 Paul Burton 2015-09-22  388   * @cpu: the CPU whose VP ID to calculate
7573b94e08aeb5 Paul Burton 2015-09-22  389   *
7573b94e08aeb5 Paul Burton 2015-09-22  390   * Hardware such as the GIC uses identifiers for VPs which may not match the
7573b94e08aeb5 Paul Burton 2015-09-22  391   * CPU numbers used by Linux. This function calculates the hardware VP
7573b94e08aeb5 Paul Burton 2015-09-22  392   * identifier corresponding to a given CPU.
7573b94e08aeb5 Paul Burton 2015-09-22  393   *
7573b94e08aeb5 Paul Burton 2015-09-22  394   * Return: the VP ID for the CPU.
7573b94e08aeb5 Paul Burton 2015-09-22  395   */
7573b94e08aeb5 Paul Burton 2015-09-22  396  static inline unsigned int mips_cm_vp_id(unsigned int cpu)
7573b94e08aeb5 Paul Burton 2015-09-22  397  {
f875a832d20285 Paul Burton 2017-08-12 @398  	unsigned int core = cpu_core(&cpu_data[cpu]);
7573b94e08aeb5 Paul Burton 2015-09-22 @399  	unsigned int vp = cpu_vpe_id(&cpu_data[cpu]);
7573b94e08aeb5 Paul Burton 2015-09-22  400  
7573b94e08aeb5 Paul Burton 2015-09-22  401  	return (core * mips_cm_max_vp_width()) + vp;
7573b94e08aeb5 Paul Burton 2015-09-22  402  }
7573b94e08aeb5 Paul Burton 2015-09-22  403  
23d5de8efb9aed Paul Burton 2015-09-22  404  #ifdef CONFIG_MIPS_CM
23d5de8efb9aed Paul Burton 2015-09-22  405  
23d5de8efb9aed Paul Burton 2015-09-22  406  /**
68923cdc2eb341 Paul Burton 2017-08-12  407   * mips_cm_lock_other - lock access to redirect/other region
68923cdc2eb341 Paul Burton 2017-08-12  408   * @cluster: the other cluster to be accessed
23d5de8efb9aed Paul Burton 2015-09-22  409   * @core: the other core to be accessed
23d5de8efb9aed Paul Burton 2015-09-22  410   * @vp: the VP within the other core to be accessed
68923cdc2eb341 Paul Burton 2017-08-12  411   * @block: the register block to be accessed
23d5de8efb9aed Paul Burton 2015-09-22  412   *
68923cdc2eb341 Paul Burton 2017-08-12  413   * Configure the redirect/other region for the local core/VP (depending upon
68923cdc2eb341 Paul Burton 2017-08-12  414   * the CM revision) to target the specified @cluster, @core, @vp & register
68923cdc2eb341 Paul Burton 2017-08-12  415   * @block. Must be called before using the redirect/other region, and followed
68923cdc2eb341 Paul Burton 2017-08-12  416   * by a call to mips_cm_unlock_other() when access to the redirect/other region
68923cdc2eb341 Paul Burton 2017-08-12  417   * is complete.
68923cdc2eb341 Paul Burton 2017-08-12  418   *
68923cdc2eb341 Paul Burton 2017-08-12  419   * This function acquires a spinlock such that code between it &
68923cdc2eb341 Paul Burton 2017-08-12  420   * mips_cm_unlock_other() calls cannot be pre-empted by anything which may
68923cdc2eb341 Paul Burton 2017-08-12  421   * reconfigure the redirect/other region, and cannot be interfered with by
68923cdc2eb341 Paul Burton 2017-08-12  422   * another VP in the core. As such calls to this function should not be nested.
23d5de8efb9aed Paul Burton 2015-09-22  423   */
68923cdc2eb341 Paul Burton 2017-08-12  424  extern void mips_cm_lock_other(unsigned int cluster, unsigned int core,
68923cdc2eb341 Paul Burton 2017-08-12  425  			       unsigned int vp, unsigned int block);
23d5de8efb9aed Paul Burton 2015-09-22  426  
23d5de8efb9aed Paul Burton 2015-09-22  427  /**
68923cdc2eb341 Paul Burton 2017-08-12  428   * mips_cm_unlock_other - unlock access to redirect/other region
23d5de8efb9aed Paul Burton 2015-09-22  429   *
68923cdc2eb341 Paul Burton 2017-08-12  430   * Must be called after mips_cm_lock_other() once all required access to the
68923cdc2eb341 Paul Burton 2017-08-12  431   * redirect/other region has been completed.
23d5de8efb9aed Paul Burton 2015-09-22  432   */
23d5de8efb9aed Paul Burton 2015-09-22  433  extern void mips_cm_unlock_other(void);
23d5de8efb9aed Paul Burton 2015-09-22  434  
23d5de8efb9aed Paul Burton 2015-09-22  435  #else /* !CONFIG_MIPS_CM */
23d5de8efb9aed Paul Burton 2015-09-22  436  
68923cdc2eb341 Paul Burton 2017-08-12  437  static inline void mips_cm_lock_other(unsigned int cluster, unsigned int core,
68923cdc2eb341 Paul Burton 2017-08-12  438  				      unsigned int vp, unsigned int block) { }
23d5de8efb9aed Paul Burton 2015-09-22  439  static inline void mips_cm_unlock_other(void) { }
23d5de8efb9aed Paul Burton 2015-09-22  440  
23d5de8efb9aed Paul Burton 2015-09-22  441  #endif /* !CONFIG_MIPS_CM */
23d5de8efb9aed Paul Burton 2015-09-22  442  
68923cdc2eb341 Paul Burton 2017-08-12  443  /**
68923cdc2eb341 Paul Burton 2017-08-12  444   * mips_cm_lock_other_cpu - lock access to redirect/other region
68923cdc2eb341 Paul Burton 2017-08-12  445   * @cpu: the other CPU whose register we want to access
68923cdc2eb341 Paul Burton 2017-08-12  446   *
68923cdc2eb341 Paul Burton 2017-08-12  447   * Configure the redirect/other region for the local core/VP (depending upon
68923cdc2eb341 Paul Burton 2017-08-12  448   * the CM revision) to target the specified @cpu & register @block. This is
68923cdc2eb341 Paul Burton 2017-08-12  449   * equivalent to calling mips_cm_lock_other() but accepts a Linux CPU number
68923cdc2eb341 Paul Burton 2017-08-12  450   * for convenience.
68923cdc2eb341 Paul Burton 2017-08-12  451   */
68923cdc2eb341 Paul Burton 2017-08-12  452  static inline void mips_cm_lock_other_cpu(unsigned int cpu, unsigned int block)
68923cdc2eb341 Paul Burton 2017-08-12  453  {
68923cdc2eb341 Paul Burton 2017-08-12  454  	struct cpuinfo_mips *d = &cpu_data[cpu];
68923cdc2eb341 Paul Burton 2017-08-12  455  
68923cdc2eb341 Paul Burton 2017-08-12 @456  	mips_cm_lock_other(cpu_cluster(d), cpu_core(d), cpu_vpe_id(d), block);
68923cdc2eb341 Paul Burton 2017-08-12  457  }
68923cdc2eb341 Paul Burton 2017-08-12  458  

:::::: The code at line 398 was first introduced by commit
:::::: f875a832d2028523f9b53c261b67e05a359bab8b MIPS: Abstract CPU core & VP(E) ID access through accessor functions

:::::: TO: Paul Burton <paul.burton@...tec.com>
:::::: CC: Ralf Baechle <ralf@...ux-mips.org>

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

Download attachment ".config.gz" of type "application/gzip" (19312 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ