2022-06-25 03:26:29

by kernel test robot

[permalink] [raw]
Subject: drivers/infiniband/hw/qib/qib_wc_x86_64.c:149:29: error: 'struct cpuinfo_um' has no member named 'x86_vendor'

Hi Johannes,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 92f20ff72066d8d7e2ffb655c2236259ac9d1c5d
commit: 68f5d3f3b6543266b29e047cfaf9842333019b4c um: add PCI over virtio emulation driver
date: 1 year ago
config: um-allmodconfig
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=68f5d3f3b6543266b29e047cfaf9842333019b4c
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 68f5d3f3b6543266b29e047cfaf9842333019b4c
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=um SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

In file included from include/linux/mm.h:33,
from include/linux/scatterlist.h:8,
from include/linux/dmapool.h:14,
from include/linux/pci.h:1463,
from drivers/infiniband/hw/qib/qib_wc_x86_64.c:40:
arch/x86/include/asm/pgtable_types.h:286:43: error: expected ')' before 'prot'
286 | static inline pgprot_t pgprot_nx(pgprot_t prot)
| ^~~~
include/linux/pgtable.h:896:26: note: in definition of macro 'pgprot_nx'
896 | #define pgprot_nx(prot) (prot)
| ^~~~
In file included from arch/x86/include/asm/memtype.h:6,
from arch/x86/include/asm/mtrr.h:27,
from drivers/infiniband/hw/qib/qib_wc_x86_64.c:41:
arch/x86/include/asm/pgtable_types.h:290: warning: "pgprot_nx" redefined
290 | #define pgprot_nx pgprot_nx
|
In file included from include/linux/mm.h:33,
from include/linux/scatterlist.h:8,
from include/linux/dmapool.h:14,
from include/linux/pci.h:1463,
from drivers/infiniband/hw/qib/qib_wc_x86_64.c:40:
include/linux/pgtable.h:896: note: this is the location of the previous definition
896 | #define pgprot_nx(prot) (prot)
|
In file included from arch/x86/include/asm/memtype.h:6,
from arch/x86/include/asm/mtrr.h:27,
from drivers/infiniband/hw/qib/qib_wc_x86_64.c:41:
arch/x86/include/asm/pgtable_types.h: In function 'native_make_p4d':
arch/x86/include/asm/pgtable_types.h:347:33: error: incompatible types when initializing type 'long unsigned int' using type 'pgd_t'
347 | return (p4d_t) { .pgd = native_make_pgd((pgdval_t)val) };
| ^~~~~~~~~~~~~~~
arch/x86/include/asm/pgtable_types.h: In function 'native_p4d_val':
arch/x86/include/asm/pgtable_types.h:352:34: error: incompatible type for argument 1 of 'native_pgd_val'
352 | return native_pgd_val(p4d.pgd);
| ~~~^~~~
| |
| pgd_t
arch/x86/include/asm/pgtable_types.h:320:45: note: expected 'pgd_t' but argument is of type 'pgd_t'
320 | static inline pgdval_t native_pgd_val(pgd_t pgd)
| ~~~~~~^~~
arch/x86/include/asm/pgtable_types.h: In function 'native_make_pud':
arch/x86/include/asm/pgtable_types.h:373:37: error: incompatible types when initializing type 'long unsigned int' using type 'pgd_t'
373 | return (pud_t) { .p4d.pgd = native_make_pgd(val) };
| ^~~~~~~~~~~~~~~
arch/x86/include/asm/pgtable_types.h: In function 'native_pud_val':
arch/x86/include/asm/pgtable_types.h:378:38: error: incompatible type for argument 1 of 'native_pgd_val'
378 | return native_pgd_val(pud.p4d.pgd);
| ~~~~~~~^~~~
| |
| pgd_t
arch/x86/include/asm/pgtable_types.h:320:45: note: expected 'pgd_t' but argument is of type 'pgd_t'
320 | static inline pgdval_t native_pgd_val(pgd_t pgd)
| ~~~~~~^~~
arch/x86/include/asm/pgtable_types.h: At top level:
arch/x86/include/asm/pgtable_types.h:383:34: error: conflicting types for 'pmd_t'; have 'struct <anonymous>'
383 | typedef struct { pmdval_t pmd; } pmd_t;
| ^~~~~
In file included from arch/um/include/asm/thread_info.h:15,
from include/linux/thread_info.h:59,
from include/asm-generic/current.h:5,
from ./arch/um/include/generated/asm/current.h:1,
from include/linux/mutex.h:14,
from include/linux/kernfs.h:12,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/pci.h:35,
from drivers/infiniband/hw/qib/qib_wc_x86_64.c:40:
arch/um/include/asm/page.h:61:39: note: previous declaration of 'pmd_t' with type 'pmd_t'
61 | typedef struct { unsigned long pmd; } pmd_t;
| ^~~~~
In file included from arch/x86/include/asm/memtype.h:6,
from arch/x86/include/asm/mtrr.h:27,
from drivers/infiniband/hw/qib/qib_wc_x86_64.c:41:
arch/x86/include/asm/pgtable_types.h:514: warning: "pgprot_writecombine" redefined
514 | #define pgprot_writecombine pgprot_writecombine
|
In file included from include/linux/mm.h:33,
from include/linux/scatterlist.h:8,
from include/linux/dmapool.h:14,
from include/linux/pci.h:1463,
from drivers/infiniband/hw/qib/qib_wc_x86_64.c:40:
include/linux/pgtable.h:904: note: this is the location of the previous definition
904 | #define pgprot_writecombine pgprot_noncached
|
In file included from arch/x86/include/asm/memtype.h:6,
from arch/x86/include/asm/mtrr.h:27,
from drivers/infiniband/hw/qib/qib_wc_x86_64.c:41:
arch/x86/include/asm/pgtable_types.h:517: warning: "pgprot_writethrough" redefined
517 | #define pgprot_writethrough pgprot_writethrough
|
In file included from include/linux/mm.h:33,
from include/linux/scatterlist.h:8,
from include/linux/dmapool.h:14,
from include/linux/pci.h:1463,
from drivers/infiniband/hw/qib/qib_wc_x86_64.c:40:
include/linux/pgtable.h:908: note: this is the location of the previous definition
908 | #define pgprot_writethrough pgprot_noncached
|
drivers/infiniband/hw/qib/qib_wc_x86_64.c: In function 'qib_unordered_wc':
>> drivers/infiniband/hw/qib/qib_wc_x86_64.c:149:29: error: 'struct cpuinfo_um' has no member named 'x86_vendor'
149 | return boot_cpu_data.x86_vendor != X86_VENDOR_AMD;
| ^
>> drivers/infiniband/hw/qib/qib_wc_x86_64.c:149:44: error: 'X86_VENDOR_AMD' undeclared (first use in this function); did you mean 'X86_VENDOR_ANY'?
149 | return boot_cpu_data.x86_vendor != X86_VENDOR_AMD;
| ^~~~~~~~~~~~~~
| X86_VENDOR_ANY
drivers/infiniband/hw/qib/qib_wc_x86_64.c:149:44: note: each undeclared identifier is reported only once for each function it appears in
drivers/infiniband/hw/qib/qib_wc_x86_64.c:150:1: error: control reaches end of non-void function [-Werror=return-type]
150 | }
| ^
cc1: some warnings being treated as errors
--
drivers/infiniband/sw/rdmavt/qp.c: In function 'rvt_wss_llc_size':
>> drivers/infiniband/sw/rdmavt/qp.c:130:29: error: 'struct cpuinfo_um' has no member named 'x86_cache_size'
130 | return boot_cpu_data.x86_cache_size;
| ^
drivers/infiniband/sw/rdmavt/qp.c: In function 'cacheless_memcpy':
>> drivers/infiniband/sw/rdmavt/qp.c:142:9: error: implicit declaration of function '__copy_user_nocache'; did you mean 'copy_user_page'? [-Werror=implicit-function-declaration]
142 | __copy_user_nocache(dst, (void __user *)src, n, 0);
| ^~~~~~~~~~~~~~~~~~~
| copy_user_page
drivers/infiniband/sw/rdmavt/qp.c: In function 'rvt_wss_llc_size':
drivers/infiniband/sw/rdmavt/qp.c:131:1: error: control reaches end of non-void function [-Werror=return-type]
131 | }
| ^
cc1: some warnings being treated as errors
--
In file included from arch/x86/um/asm/processor.h:41,
from include/linux/mutex.h:19,
from include/linux/kernfs.h:12,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/pci.h:35,
from drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:25:
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c: In function 'kfd_cpumask_to_apic_id':
>> arch/um/include/asm/processor-generic.h:97:19: error: called object is not a function or function pointer
97 | #define cpu_data (&boot_cpu_data)
| ~^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1500:16: note: in expansion of macro 'cpu_data'
1500 | return cpu_data(first_cpu_of_numa_node).apicid;
| ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1504:1: error: control reaches end of non-void function [-Werror=return-type]
1504 | }
| ^
cc1: some warnings being treated as errors
--
In file included from arch/x86/um/asm/processor.h:41,
from include/linux/mutex.h:19,
from include/linux/kernfs.h:12,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/pci.h:35,
from drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:23:
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c: In function 'kfd_fill_iolink_info_for_cpu':
>> arch/um/include/asm/processor-generic.h:97:19: error: called object is not a function or function pointer
97 | #define cpu_data (&boot_cpu_data)
| ~^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:921:34: note: in expansion of macro 'cpu_data'
921 | struct cpuinfo_x86 *c = &cpu_data(0);
| ^~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:924:14: error: invalid use of undefined type 'struct cpuinfo_x86'
924 | if (c->x86_vendor == X86_VENDOR_AMD)
| ^~
>> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:924:30: error: 'X86_VENDOR_AMD' undeclared (first use in this function); did you mean 'X86_VENDOR_ANY'?
924 | if (c->x86_vendor == X86_VENDOR_AMD)
| ^~~~~~~~~~~~~~
| X86_VENDOR_ANY
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:924:30: note: each undeclared identifier is reported only once for each function it appears in


vim +149 drivers/infiniband/hw/qib/qib_wc_x86_64.c

f931551bafe1f1 Ralph Campbell 2010-05-23 136
f931551bafe1f1 Ralph Campbell 2010-05-23 137 /**
f931551bafe1f1 Ralph Campbell 2010-05-23 138 * qib_unordered_wc - indicate whether write combining is ordered
f931551bafe1f1 Ralph Campbell 2010-05-23 139 *
f931551bafe1f1 Ralph Campbell 2010-05-23 140 * Because our performance depends on our ability to do write combining mmio
f931551bafe1f1 Ralph Campbell 2010-05-23 141 * writes in the most efficient way, we need to know if we are on an Intel
f931551bafe1f1 Ralph Campbell 2010-05-23 142 * or AMD x86_64 processor. AMD x86_64 processors flush WC buffers out in
f931551bafe1f1 Ralph Campbell 2010-05-23 143 * the order completed, and so no special flushing is required to get
f931551bafe1f1 Ralph Campbell 2010-05-23 144 * correct ordering. Intel processors, however, will flush write buffers
f931551bafe1f1 Ralph Campbell 2010-05-23 145 * out in "random" orders, and so explicit ordering is needed at times.
f931551bafe1f1 Ralph Campbell 2010-05-23 146 */
f931551bafe1f1 Ralph Campbell 2010-05-23 147 int qib_unordered_wc(void)
f931551bafe1f1 Ralph Campbell 2010-05-23 148 {
f931551bafe1f1 Ralph Campbell 2010-05-23 @149 return boot_cpu_data.x86_vendor != X86_VENDOR_AMD;

:::::: The code at line 149 was first introduced by commit
:::::: f931551bafe1f10ded7f5282e2aa162c267a2e5d IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters

:::::: TO: Ralph Campbell <[email protected]>
:::::: CC: Roland Dreier <[email protected]>

--
0-DAY CI Kernel Test Service
https://01.org/lkp


Attachments:
(No filename) (13.20 kB)
config (260.83 kB)
Download all attachments