Re: [PATCHv4 2/2] arm64/io: Add a header for mmio access instrumentation
by kernel test robot
Hi Sai,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on rostedt-trace/for-next]
[also build test WARNING on arm64/for-next/core arm-perf/for-next/perf v5.16-rc1 next-20211118]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Sai-Prakash-Ranjan/tracing-rwmmi...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git for-next
config: csky-randconfig-r005-20211118 (attached as .config)
compiler: csky-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/0day-ci/linux/commit/b3765baa5dcf19d695332a310cf29d7ab...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sai-Prakash-Ranjan/tracing-rwmmio-arm64-Add-support-to-trace-register-reads-writes/20211115-193645
git checkout b3765baa5dcf19d695332a310cf29d7abd39ad73
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=csky SHELL=/bin/bash kernel/trace/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/bitops.h:33,
from include/linux/kernel.h:12,
from include/linux/interrupt.h:6,
from include/linux/trace_recursion.h:5,
from include/linux/ftrace.h:10,
from kernel/trace/trace_readwrite.c:8:
arch/csky/include/asm/bitops.h:77: warning: "__clear_bit" redefined
77 | #define __clear_bit(nr, vaddr) clear_bit(nr, vaddr)
|
In file included from arch/csky/include/asm/bitops.h:76,
from include/linux/bitops.h:33,
from include/linux/kernel.h:12,
from include/linux/interrupt.h:6,
from include/linux/trace_recursion.h:5,
from include/linux/ftrace.h:10,
from kernel/trace/trace_readwrite.c:8:
include/asm-generic/bitops/non-atomic.h:34: note: this is the location of the previous definition
34 | #define __clear_bit arch___clear_bit
|
In file included from kernel/trace/trace_readwrite.c:9:
>> include/linux/mmio-instrumented.h:32: warning: "__raw_writeb" redefined
32 | #define __raw_writeb(v, a) __raw_write((v), a, b)
|
In file included from arch/csky/include/asm/io.h:42,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:17,
from ./arch/csky/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:11,
from include/linux/interrupt.h:11,
from include/linux/trace_recursion.h:5,
from include/linux/ftrace.h:10,
from kernel/trace/trace_readwrite.c:8:
include/asm-generic/io.h:108: note: this is the location of the previous definition
108 | #define __raw_writeb __raw_writeb
|
In file included from kernel/trace/trace_readwrite.c:9:
>> include/linux/mmio-instrumented.h:33: warning: "__raw_writew" redefined
33 | #define __raw_writew(v, a) __raw_write((v), a, w)
|
In file included from arch/csky/include/asm/io.h:42,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:17,
from ./arch/csky/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:11,
from include/linux/interrupt.h:11,
from include/linux/trace_recursion.h:5,
from include/linux/ftrace.h:10,
from kernel/trace/trace_readwrite.c:8:
include/asm-generic/io.h:116: note: this is the location of the previous definition
116 | #define __raw_writew __raw_writew
|
In file included from kernel/trace/trace_readwrite.c:9:
>> include/linux/mmio-instrumented.h:34: warning: "__raw_writel" redefined
34 | #define __raw_writel(v, a) __raw_write((v), a, l)
|
In file included from arch/csky/include/asm/io.h:42,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:17,
from ./arch/csky/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:11,
from include/linux/interrupt.h:11,
from include/linux/trace_recursion.h:5,
from include/linux/ftrace.h:10,
from kernel/trace/trace_readwrite.c:8:
include/asm-generic/io.h:124: note: this is the location of the previous definition
124 | #define __raw_writel __raw_writel
|
In file included from kernel/trace/trace_readwrite.c:9:
>> include/linux/mmio-instrumented.h:46: warning: "__raw_readb" redefined
46 | #define __raw_readb(a) __raw_read((a), b, u8)
|
In file included from arch/csky/include/asm/io.h:42,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:17,
from ./arch/csky/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:11,
from include/linux/interrupt.h:11,
from include/linux/trace_recursion.h:5,
from include/linux/ftrace.h:10,
from kernel/trace/trace_readwrite.c:8:
include/asm-generic/io.h:74: note: this is the location of the previous definition
74 | #define __raw_readb __raw_readb
|
In file included from kernel/trace/trace_readwrite.c:9:
>> include/linux/mmio-instrumented.h:47: warning: "__raw_readw" redefined
47 | #define __raw_readw(a) __raw_read((a), w, u16)
|
In file included from arch/csky/include/asm/io.h:42,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:17,
from ./arch/csky/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:11,
from include/linux/interrupt.h:11,
from include/linux/trace_recursion.h:5,
from include/linux/ftrace.h:10,
from kernel/trace/trace_readwrite.c:8:
include/asm-generic/io.h:82: note: this is the location of the previous definition
82 | #define __raw_readw __raw_readw
|
In file included from kernel/trace/trace_readwrite.c:9:
>> include/linux/mmio-instrumented.h:48: warning: "__raw_readl" redefined
48 | #define __raw_readl(a) __raw_read((a), l, u32)
|
In file included from arch/csky/include/asm/io.h:42,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:17,
from ./arch/csky/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:11,
from include/linux/interrupt.h:11,
from include/linux/trace_recursion.h:5,
from include/linux/ftrace.h:10,
from kernel/trace/trace_readwrite.c:8:
include/asm-generic/io.h:90: note: this is the location of the previous definition
90 | #define __raw_readl __raw_readl
|
In file included from include/trace/define_trace.h:102,
from include/trace/events/rwmmio.h:59,
from kernel/trace/trace_readwrite.c:13:
include/trace/events/rwmmio.h: In function 'trace_event_raw_event_rwmmio_write':
>> include/trace/events/rwmmio.h:27:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
27 | __entry->addr = (u64)(void *)addr;
| ^
include/trace/trace_events.h:743:11: note: in definition of macro 'DECLARE_EVENT_CLASS'
743 | { assign; } \
| ^~~~~~
include/trace/trace_events.h:79:30: note: in expansion of macro 'PARAMS'
79 | PARAMS(assign), \
| ^~~~~~
include/trace/events/rwmmio.h:13:1: note: in expansion of macro 'TRACE_EVENT'
13 | TRACE_EVENT(rwmmio_write,
| ^~~~~~~~~~~
include/trace/events/rwmmio.h:25:9: note: in expansion of macro 'TP_fast_assign'
25 | TP_fast_assign(
| ^~~~~~~~~~~~~~
include/trace/events/rwmmio.h: In function 'trace_event_raw_event_rwmmio_read':
include/trace/events/rwmmio.h:49:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
49 | __entry->addr = (u64)(void *)addr;
| ^
include/trace/trace_events.h:743:11: note: in definition of macro 'DECLARE_EVENT_CLASS'
743 | { assign; } \
| ^~~~~~
include/trace/trace_events.h:79:30: note: in expansion of macro 'PARAMS'
79 | PARAMS(assign), \
| ^~~~~~
include/trace/events/rwmmio.h:35:1: note: in expansion of macro 'TRACE_EVENT'
35 | TRACE_EVENT(rwmmio_read,
| ^~~~~~~~~~~
include/trace/events/rwmmio.h:47:9: note: in expansion of macro 'TP_fast_assign'
47 | TP_fast_assign(
| ^~~~~~~~~~~~~~
vim +/__raw_writeb +32 include/linux/mmio-instrumented.h
24
25 #define __raw_write(v, a, _l) ({ \
26 volatile void __iomem *_a = (a); \
27 if (tracepoint_enabled(rwmmio_write)) \
28 log_write_mmio(__stringify(write##_l), _a); \
29 arch_raw_write##_l((v), _a); \
30 })
31
> 32 #define __raw_writeb(v, a) __raw_write((v), a, b)
> 33 #define __raw_writew(v, a) __raw_write((v), a, w)
> 34 #define __raw_writel(v, a) __raw_write((v), a, l)
35 #define __raw_writeq(v, a) __raw_write((v), a, q)
36
37 #define __raw_read(a, _l, _t) ({ \
38 _t __a; \
39 const volatile void __iomem *_a = (a); \
40 if (tracepoint_enabled(rwmmio_read)) \
41 log_read_mmio(__stringify(read##_l), _a); \
42 __a = arch_raw_read##_l(_a); \
43 __a; \
44 })
45
> 46 #define __raw_readb(a) __raw_read((a), b, u8)
> 47 #define __raw_readw(a) __raw_read((a), w, u16)
> 48 #define __raw_readl(a) __raw_read((a), l, u32)
49 #define __raw_readq(a) __raw_read((a), q, u64)
50
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[intel-lts:5.4/yocto 18529/18530] drivers/tcc/tcc_buffer.c:1145:45: warning: cast from pointer to integer of different size
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 10c3d69bc60059b194dcfa816cbc1240ffb0431d
commit: 33d67f3ba68c9eb1dbeb3a1f97a7a3fbe6260426 [18529/18530] Support RPL in measurement function.
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/linux-intel-lts/commit/33d67f3ba68c9eb1dbeb3a1f9...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.4/yocto
git checkout 33d67f3ba68c9eb1dbeb3a1f97a7a3fbe6260426
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/module.h:9,
from drivers/tcc/tcc_buffer.c:58:
drivers/tcc/tcc_buffer.c: In function 'tcc_free_memslot':
>> drivers/tcc/tcc_buffer.c:1145:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1145 | dprintk("p_memslot->vaddr @ %016llx\n", (u64)(p_memslot->vaddr));
| ^
include/linux/printk.h:306:34: note: in definition of macro 'pr_info'
306 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/tcc/tcc_buffer.c:1145:2: note: in expansion of macro 'dprintk'
1145 | dprintk("p_memslot->vaddr @ %016llx\n", (u64)(p_memslot->vaddr));
| ^~~~~~~
drivers/tcc/tcc_buffer.c: In function 'tcc_perf_fn':
drivers/tcc/tcc_buffer.c:496:1: warning: unsupported size for integer register
496 | }
| ^
vim +1145 drivers/tcc/tcc_buffer.c
1129
1130 static void tcc_free_memslot(struct memory_slot_info *p_memslot)
1131 {
1132 struct memory_slot_info *pre_slot;
1133 struct memory_slot_info *next_slot;
1134 struct mem_s mem_info;
1135 struct psram *p_psram;
1136 u32 is_first = 0, is_last = 0;
1137
1138 mutex_lock(&tccbuffer_mutex);
1139 device_destroy(tcc_buffer_class, MKDEV(tcc_buffer_device_major, p_memslot->minor));
1140 __set_bit(p_memslot->minor, &tcc_buffer_device_minor_avail[0]);
1141 p_memslot->status = MEM_FREE;
1142 p_memslot->minor = UNDEFINED_DEVNODE;
1143 dprintk("%s\n", "tcc_free_memslot()");
1144 dprintk("p_memslot->paddr @ %016llx\n", (u64)(p_memslot->paddr));
> 1145 dprintk("p_memslot->vaddr @ %016llx\n", (u64)(p_memslot->vaddr));
1146 dprintk("p_memslot->size @ %016llx\n", (u64)(p_memslot->size));
1147 mem_info.vaddr = p_memslot->vaddr;
1148 mem_info.size = p_memslot->size;
1149 smp_call_function_any(&(p_memslot->cpumask), clear_mem, &mem_info, 1);
1150
1151 list_for_each_entry(p_psram, &p_tcc_config->psrams, node) {
1152 if (p_psram->config.size > 0) {
1153 if (list_is_first(&p_memslot->node, &p_psram->memslots))
1154 is_first = 1;
1155 if (list_is_last(&p_memslot->node, &p_psram->memslots))
1156 is_last = 1;
1157 }
1158 }
1159
1160 if (!is_first)
1161 pre_slot = list_prev_entry(p_memslot, node);
1162
1163 if (!is_last)
1164 next_slot = list_next_entry(p_memslot, node);
1165
1166 if ((!is_first) && (pre_slot->status == MEM_FREE)) {
1167 dprintk("%s\n", "This is not FIRST slot, and pre_slot is FREE to merge");
1168 pre_slot->size += p_memslot->size;
1169 if ((!is_last) && (next_slot->status == MEM_FREE)) {
1170 dprintk("%s\n", "AND this is not LAST slot, and next_slot is also FREE to merge");
1171 pre_slot->size += next_slot->size;
1172 list_del(&next_slot->node);
1173 kfree(next_slot);
1174 }
1175 dprintk("paddr @ %016llx\n", (u64)(pre_slot->paddr));
1176 dprintk("size @ %016llx (extended)\n", (u64)(pre_slot->size));
1177 list_del(&p_memslot->node);
1178 kfree(p_memslot);
1179 } else if ((!is_last) && (next_slot->status == MEM_FREE)) {
1180 dprintk("%s\n", "This is not LAST slot, and next_slot is FREE to merge");
1181 p_memslot->size += next_slot->size;
1182 dprintk("paddr @ %016llx\n", (u64)(p_memslot->paddr));
1183 dprintk("size @ %016llx (extended)\n", (u64)(p_memslot->size));
1184 list_del(&next_slot->node);
1185 kfree(next_slot);
1186 } else {
1187 dprintk("%s\n", "No other attributes need to set.");
1188 }
1189
1190 mutex_unlock(&tccbuffer_mutex);
1191 }
1192
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[ragnatech:media-next 115/155] drivers/staging/media/atomisp//pci/isp2400_input_system_local.h:32:40: warning: redefinition of typedef 'input_system_cfg2400_t' is a C11 feature
by kernel test robot
tree: git://git.ragnatech.se/linux media-next
head: 999ed03518cb01aa9ef55c025db79567eec6268c
commit: 4005ecee616a51cb0305d8e3664af45376e7cf65 [115/155] media: atomisp: shift some structs from input_system_local
config: x86_64-buildonly-randconfig-r001-20211118 (attached as .config)
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
git remote add ragnatech git://git.ragnatech.se/linux
git fetch --no-tags ragnatech media-next
git checkout 4005ecee616a51cb0305d8e3664af45376e7cf65
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/staging/media/atomisp/pci/atomisp_cmd.c:44:
In file included from drivers/staging/media/atomisp//pci/atomisp_tables.h:23:
In file included from drivers/staging/media/atomisp//pci/sh_css_params.h:30:
In file included from drivers/staging/media/atomisp//pci/runtime/pipeline/interface/ia_css_pipeline.h:19:
In file included from drivers/staging/media/atomisp//pci/sh_css_internal.h:28:
In file included from drivers/staging/media/atomisp//pci/hive_isp_css_include/input_system.h:34:
In file included from drivers/staging/media/atomisp//pci/input_system_local.h:144:
>> drivers/staging/media/atomisp//pci/isp2400_input_system_local.h:32:40: warning: redefinition of typedef 'input_system_cfg2400_t' is a C11 feature [-Wtypedef-redefinition]
typedef struct input_system_cfg2400_s input_system_cfg2400_t;
^
drivers/staging/media/atomisp//pci/input_system_local.h:22:40: note: previous definition is here
typedef struct input_system_cfg2400_s input_system_cfg2400_t;
^
1 warning generated.
vim +/input_system_cfg2400_t +32 drivers/staging/media/atomisp//pci/isp2400_input_system_local.h
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system_local.h Mauro Carvalho Chehab 2020-04-19 31
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system_local.h Mauro Carvalho Chehab 2020-04-19 @32 typedef struct input_system_cfg2400_s input_system_cfg2400_t;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system_local.h Mauro Carvalho Chehab 2020-04-19 33
:::::: The code at line 32 was first introduced by commit
:::::: ad85094b293e40e7a2f831b0311a389d952ebd5e Revert "media: staging: atomisp: Remove driver"
:::::: TO: Mauro Carvalho Chehab <mchehab+huawei(a)kernel.org>
:::::: CC: Mauro Carvalho Chehab <mchehab+huawei(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[jolsa-perf:bpf/batch 10/29] kernel/bpf/syscall.c:2769:8: error: implicit declaration of function 'bpf_tramp_id_alloc'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/batch
head: 5f1f613266bf58f8424a93e1f8b99c4ac8fa6c2b
commit: cbe393beb391564c3571b19dc56e28873904f48e [10/29] bpf: Add bpf_trampoline_id object
config: hexagon-randconfig-r035-20211118 (attached as .config)
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://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id...
git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
git fetch --no-tags jolsa-perf bpf/batch
git checkout cbe393beb391564c3571b19dc56e28873904f48e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> kernel/bpf/syscall.c:2769:8: error: implicit declaration of function 'bpf_tramp_id_alloc' [-Werror,-Wimplicit-function-declaration]
id = bpf_tramp_id_alloc();
^
kernel/bpf/syscall.c:2769:8: note: did you mean 'bpf_map_kzalloc'?
kernel/bpf/syscall.c:425:7: note: 'bpf_map_kzalloc' declared here
void *bpf_map_kzalloc(const struct bpf_map *map, size_t size, gfp_t flags)
^
>> kernel/bpf/syscall.c:2769:6: warning: incompatible integer to pointer conversion assigning to 'struct bpf_tramp_id *' from 'int' [-Wint-conversion]
id = bpf_tramp_id_alloc();
^ ~~~~~~~~~~~~~~~~~~~~
kernel/bpf/syscall.c:2782:3: error: implicit declaration of function 'bpf_tramp_id_init' [-Werror,-Wimplicit-function-declaration]
bpf_tramp_id_init(id, tgt_prog, NULL, btf_id);
^
kernel/bpf/syscall.c:2782:3: note: did you mean 'bpf_tramp_id_alloc'?
kernel/bpf/syscall.c:2769:8: note: 'bpf_tramp_id_alloc' declared here
id = bpf_tramp_id_alloc();
^
kernel/bpf/syscall.c:2832:8: error: implicit declaration of function 'bpf_tramp_id_alloc' [-Werror,-Wimplicit-function-declaration]
id = bpf_tramp_id_alloc();
^
kernel/bpf/syscall.c:2832:6: warning: incompatible integer to pointer conversion assigning to 'struct bpf_tramp_id *' from 'int' [-Wint-conversion]
id = bpf_tramp_id_alloc();
^ ~~~~~~~~~~~~~~~~~~~~
kernel/bpf/syscall.c:2839:3: error: implicit declaration of function 'bpf_tramp_id_init' [-Werror,-Wimplicit-function-declaration]
bpf_tramp_id_init(id, NULL, prog->aux->attach_btf, btf_id);
^
>> kernel/bpf/syscall.c:2843:8: error: implicit declaration of function 'bpf_tramp_id_is_empty' [-Werror,-Wimplicit-function-declaration]
(!bpf_tramp_id_is_empty(id) &&
^
>> kernel/bpf/syscall.c:2844:8: error: implicit declaration of function 'bpf_tramp_id_is_equal' [-Werror,-Wimplicit-function-declaration]
bpf_tramp_id_is_equal(id, prog->aux->dst_trampoline->id))) {
^
kernel/bpf/syscall.c:2844:8: note: did you mean 'bpf_tramp_id_is_empty'?
kernel/bpf/syscall.c:2843:8: note: 'bpf_tramp_id_is_empty' declared here
(!bpf_tramp_id_is_empty(id) &&
^
kernel/bpf/syscall.c:2916:2: error: implicit declaration of function 'bpf_tramp_id_free' [-Werror,-Wimplicit-function-declaration]
bpf_tramp_id_free(id);
^
2 warnings and 7 errors generated.
--
kernel/bpf/verifier.c:13998:7: error: implicit declaration of function 'bpf_tramp_id_alloc' [-Werror,-Wimplicit-function-declaration]
id = bpf_tramp_id_alloc();
^
kernel/bpf/verifier.c:13998:7: note: did you mean 'bpf_map_kzalloc'?
include/linux/bpf.h:1457:7: note: 'bpf_map_kzalloc' declared here
void *bpf_map_kzalloc(const struct bpf_map *map, size_t size, gfp_t flags);
^
>> kernel/bpf/verifier.c:13998:5: warning: incompatible integer to pointer conversion assigning to 'struct bpf_tramp_id *' from 'int' [-Wint-conversion]
id = bpf_tramp_id_alloc();
^ ~~~~~~~~~~~~~~~~~~~~
kernel/bpf/verifier.c:14002:2: error: implicit declaration of function 'bpf_tramp_id_init' [-Werror,-Wimplicit-function-declaration]
bpf_tramp_id_init(id, tgt_prog, prog->aux->attach_btf, btf_id);
^
kernel/bpf/verifier.c:14002:2: note: did you mean 'bpf_tramp_id_alloc'?
kernel/bpf/verifier.c:13998:7: note: 'bpf_tramp_id_alloc' declared here
id = bpf_tramp_id_alloc();
^
kernel/bpf/verifier.c:14005:3: error: implicit declaration of function 'bpf_tramp_id_free' [-Werror,-Wimplicit-function-declaration]
bpf_tramp_id_free(id);
^
kernel/bpf/verifier.c:14005:3: note: did you mean 'bpf_tramp_id_init'?
kernel/bpf/verifier.c:14002:2: note: 'bpf_tramp_id_init' declared here
bpf_tramp_id_init(id, tgt_prog, prog->aux->attach_btf, btf_id);
^
1 warning and 3 errors generated.
vim +/bpf_tramp_id_alloc +2769 kernel/bpf/syscall.c
2718
2719 static int bpf_tracing_prog_attach(struct bpf_prog *prog,
2720 int tgt_prog_fd,
2721 u32 btf_id)
2722 {
2723 bool prog_extension = prog->type == BPF_PROG_TYPE_EXT;
2724 struct bpf_link_primer link_primer;
2725 struct bpf_prog *tgt_prog = NULL;
2726 struct bpf_trampoline *tr = NULL;
2727 struct bpf_tracing_link *link;
2728 struct bpf_tramp_id *id = NULL;
2729 int err;
2730
2731 switch (prog->type) {
2732 case BPF_PROG_TYPE_TRACING:
2733 if (prog->expected_attach_type != BPF_TRACE_FENTRY &&
2734 prog->expected_attach_type != BPF_TRACE_FEXIT &&
2735 prog->expected_attach_type != BPF_MODIFY_RETURN) {
2736 err = -EINVAL;
2737 goto out_put_prog;
2738 }
2739 break;
2740 case BPF_PROG_TYPE_EXT:
2741 if (prog->expected_attach_type != 0) {
2742 err = -EINVAL;
2743 goto out_put_prog;
2744 }
2745 break;
2746 case BPF_PROG_TYPE_LSM:
2747 if (prog->expected_attach_type != BPF_LSM_MAC) {
2748 err = -EINVAL;
2749 goto out_put_prog;
2750 }
2751 break;
2752 default:
2753 err = -EINVAL;
2754 goto out_put_prog;
2755 }
2756
2757 if (!!tgt_prog_fd != !!btf_id) {
2758 err = -EINVAL;
2759 goto out_put_prog;
2760 }
2761
2762 if (tgt_prog_fd) {
2763 /* For now we only allow new targets for BPF_PROG_TYPE_EXT */
2764 if (prog->type != BPF_PROG_TYPE_EXT) {
2765 err = -EINVAL;
2766 goto out_put_prog;
2767 }
2768
> 2769 id = bpf_tramp_id_alloc();
2770 if (!id) {
2771 err = -ENOMEM;
2772 goto out_put_prog;
2773 }
2774
2775 tgt_prog = bpf_prog_get(tgt_prog_fd);
2776 if (IS_ERR(tgt_prog)) {
2777 err = PTR_ERR(tgt_prog);
2778 tgt_prog = NULL;
2779 goto out_put_prog;
2780 }
2781
2782 bpf_tramp_id_init(id, tgt_prog, NULL, btf_id);
2783 }
2784
2785 link = kzalloc(sizeof(*link), GFP_USER);
2786 if (!link) {
2787 err = -ENOMEM;
2788 goto out_put_prog;
2789 }
2790 bpf_link_init(&link->link, BPF_LINK_TYPE_TRACING,
2791 &bpf_tracing_link_lops, prog);
2792 link->attach_type = prog->expected_attach_type;
2793
2794 mutex_lock(&prog->aux->dst_mutex);
2795
2796 if (!prog_extension && prog->aux->trampoline) {
2797 err = -EBUSY;
2798 goto out_unlock;
2799 }
2800
2801 /* There are a few possible cases here:
2802 *
2803 * - if prog->aux->dst_trampoline is set, the program was just loaded
2804 * and not yet attached to anything, so we can use the values stored
2805 * in prog->aux
2806 *
2807 * - if prog->aux->dst_trampoline is NULL, the program has already been
2808 * attached to a target and its initial target was cleared (below)
2809 *
2810 * - if tgt_prog != NULL, the caller specified tgt_prog_fd +
2811 * target_btf_id using the link_create API.
2812 *
2813 * - if tgt_prog == NULL when this function was called using the old
2814 * raw_tracepoint_open API, and we need a target from prog->aux
2815 *
2816 * - if prog->aux->dst_trampoline and tgt_prog is NULL, the program
2817 * was detached and is going for re-attachment.
2818 */
2819 if (!prog->aux->dst_trampoline && !tgt_prog) {
2820 /*
2821 * Allow re-attach for TRACING and LSM programs. If it's
2822 * currently linked, bpf_trampoline_link_prog will fail.
2823 * EXT programs need to specify tgt_prog_fd, so they
2824 * re-attach in separate code path.
2825 */
2826 if (prog->type != BPF_PROG_TYPE_TRACING &&
2827 prog->type != BPF_PROG_TYPE_LSM) {
2828 err = -EINVAL;
2829 goto out_unlock;
2830 }
2831
2832 id = bpf_tramp_id_alloc();
2833 if (!id) {
2834 err = -ENOMEM;
2835 goto out_unlock;
2836 }
2837
2838 btf_id = prog->aux->attach_btf_id;
2839 bpf_tramp_id_init(id, NULL, prog->aux->attach_btf, btf_id);
2840 }
2841
2842 if (!prog->aux->dst_trampoline ||
> 2843 (!bpf_tramp_id_is_empty(id) &&
> 2844 bpf_tramp_id_is_equal(id, prog->aux->dst_trampoline->id))) {
2845 /* If there is no saved target, or the specified target is
2846 * different from the destination specified at load time, we
2847 * need a new trampoline and a check for compatibility
2848 */
2849 struct bpf_attach_target_info tgt_info = {};
2850
2851 err = bpf_check_attach_target(NULL, prog, tgt_prog, btf_id,
2852 &tgt_info);
2853 if (err)
2854 goto out_unlock;
2855
2856 tr = bpf_trampoline_get(id, &tgt_info);
2857 if (!tr) {
2858 err = -ENOMEM;
2859 goto out_unlock;
2860 }
2861 } else {
2862 /* The caller didn't specify a target, or the target was the
2863 * same as the destination supplied during program load. This
2864 * means we can reuse the trampoline and reference from program
2865 * load time, and there is no need to allocate a new one. This
2866 * can only happen once for any program, as the saved values in
2867 * prog->aux are cleared below.
2868 */
2869 tr = prog->aux->dst_trampoline;
2870 tgt_prog = prog->aux->dst_prog;
2871 }
2872
2873 err = bpf_link_prime(&link->link, &link_primer);
2874 if (err)
2875 goto out_unlock;
2876
2877 err = bpf_trampoline_link_prog(prog, tr);
2878 if (err) {
2879 bpf_link_cleanup(&link_primer);
2880 link = NULL;
2881 goto out_unlock;
2882 }
2883
2884 link->tgt_prog = tgt_prog;
2885
2886 if (prog_extension)
2887 link->trampoline = tr;
2888 else
2889 prog->aux->trampoline = tr;
2890
2891 /* Always clear the trampoline and target prog from prog->aux to make
2892 * sure the original attach destination is not kept alive after a
2893 * program is (re-)attached to another target.
2894 */
2895 if (prog->aux->dst_prog &&
2896 (tgt_prog_fd || tr != prog->aux->dst_trampoline))
2897 /* got extra prog ref from syscall, or attaching to different prog */
2898 bpf_prog_put(prog->aux->dst_prog);
2899 if (prog->aux->dst_trampoline && tr != prog->aux->dst_trampoline)
2900 /* we allocated a new trampoline, so free the old one */
2901 bpf_trampoline_put(prog->aux->dst_trampoline);
2902
2903 prog->aux->dst_prog = NULL;
2904 prog->aux->dst_trampoline = NULL;
2905 mutex_unlock(&prog->aux->dst_mutex);
2906
2907 return bpf_link_settle(&link_primer);
2908 out_unlock:
2909 if (tr && tr != prog->aux->dst_trampoline)
2910 bpf_trampoline_put(tr);
2911 mutex_unlock(&prog->aux->dst_mutex);
2912 kfree(link);
2913 out_put_prog:
2914 if (tgt_prog_fd && tgt_prog)
2915 bpf_prog_put(tgt_prog);
2916 bpf_tramp_id_free(id);
2917 return err;
2918 }
2919
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[jolsa-perf:bpf/batch 10/29] kernel/bpf/syscall.c:2769:20: warning: assignment to 'struct bpf_tramp_id *' from 'int' makes pointer from integer without a cast
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/batch
head: 5f1f613266bf58f8424a93e1f8b99c4ac8fa6c2b
commit: cbe393beb391564c3571b19dc56e28873904f48e [10/29] bpf: Add bpf_trampoline_id object
config: sh-randconfig-r025-20211118 (attached as .config)
compiler: sh4-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://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id...
git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
git fetch --no-tags jolsa-perf bpf/batch
git checkout cbe393beb391564c3571b19dc56e28873904f48e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
cc1: warning: arch/sh/include/mach-rsk: No such file or directory [-Wmissing-include-dirs]
cc1: warning: arch/sh/include/mach-rsk: No such file or directory [-Wmissing-include-dirs]
kernel/bpf/syscall.c: In function 'bpf_tracing_prog_attach':
kernel/bpf/syscall.c:2769:22: error: implicit declaration of function 'bpf_tramp_id_alloc'; did you mean 'bpf_map_kzalloc'? [-Werror=implicit-function-declaration]
2769 | id = bpf_tramp_id_alloc();
| ^~~~~~~~~~~~~~~~~~
| bpf_map_kzalloc
>> kernel/bpf/syscall.c:2769:20: warning: assignment to 'struct bpf_tramp_id *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
2769 | id = bpf_tramp_id_alloc();
| ^
kernel/bpf/syscall.c:2782:17: error: implicit declaration of function 'bpf_tramp_id_init' [-Werror=implicit-function-declaration]
2782 | bpf_tramp_id_init(id, tgt_prog, NULL, btf_id);
| ^~~~~~~~~~~~~~~~~
kernel/bpf/syscall.c:2832:20: warning: assignment to 'struct bpf_tramp_id *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
2832 | id = bpf_tramp_id_alloc();
| ^
kernel/bpf/syscall.c:2843:15: error: implicit declaration of function 'bpf_tramp_id_is_empty' [-Werror=implicit-function-declaration]
2843 | (!bpf_tramp_id_is_empty(id) &&
| ^~~~~~~~~~~~~~~~~~~~~
kernel/bpf/syscall.c:2844:15: error: implicit declaration of function 'bpf_tramp_id_is_equal' [-Werror=implicit-function-declaration]
2844 | bpf_tramp_id_is_equal(id, prog->aux->dst_trampoline->id))) {
| ^~~~~~~~~~~~~~~~~~~~~
kernel/bpf/syscall.c:2916:9: error: implicit declaration of function 'bpf_tramp_id_free' [-Werror=implicit-function-declaration]
2916 | bpf_tramp_id_free(id);
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
cc1: warning: arch/sh/include/mach-rsk: No such file or directory [-Wmissing-include-dirs]
cc1: warning: arch/sh/include/mach-rsk: No such file or directory [-Wmissing-include-dirs]
kernel/bpf/verifier.c: In function 'check_attach_btf_id':
kernel/bpf/verifier.c:13998:14: error: implicit declaration of function 'bpf_tramp_id_alloc'; did you mean 'bpf_map_kzalloc'? [-Werror=implicit-function-declaration]
13998 | id = bpf_tramp_id_alloc();
| ^~~~~~~~~~~~~~~~~~
| bpf_map_kzalloc
>> kernel/bpf/verifier.c:13998:12: warning: assignment to 'struct bpf_tramp_id *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
13998 | id = bpf_tramp_id_alloc();
| ^
kernel/bpf/verifier.c:14002:9: error: implicit declaration of function 'bpf_tramp_id_init' [-Werror=implicit-function-declaration]
14002 | bpf_tramp_id_init(id, tgt_prog, prog->aux->attach_btf, btf_id);
| ^~~~~~~~~~~~~~~~~
kernel/bpf/verifier.c:14005:17: error: implicit declaration of function 'bpf_tramp_id_free' [-Werror=implicit-function-declaration]
14005 | bpf_tramp_id_free(id);
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +2769 kernel/bpf/syscall.c
2718
2719 static int bpf_tracing_prog_attach(struct bpf_prog *prog,
2720 int tgt_prog_fd,
2721 u32 btf_id)
2722 {
2723 bool prog_extension = prog->type == BPF_PROG_TYPE_EXT;
2724 struct bpf_link_primer link_primer;
2725 struct bpf_prog *tgt_prog = NULL;
2726 struct bpf_trampoline *tr = NULL;
2727 struct bpf_tracing_link *link;
2728 struct bpf_tramp_id *id = NULL;
2729 int err;
2730
2731 switch (prog->type) {
2732 case BPF_PROG_TYPE_TRACING:
2733 if (prog->expected_attach_type != BPF_TRACE_FENTRY &&
2734 prog->expected_attach_type != BPF_TRACE_FEXIT &&
2735 prog->expected_attach_type != BPF_MODIFY_RETURN) {
2736 err = -EINVAL;
2737 goto out_put_prog;
2738 }
2739 break;
2740 case BPF_PROG_TYPE_EXT:
2741 if (prog->expected_attach_type != 0) {
2742 err = -EINVAL;
2743 goto out_put_prog;
2744 }
2745 break;
2746 case BPF_PROG_TYPE_LSM:
2747 if (prog->expected_attach_type != BPF_LSM_MAC) {
2748 err = -EINVAL;
2749 goto out_put_prog;
2750 }
2751 break;
2752 default:
2753 err = -EINVAL;
2754 goto out_put_prog;
2755 }
2756
2757 if (!!tgt_prog_fd != !!btf_id) {
2758 err = -EINVAL;
2759 goto out_put_prog;
2760 }
2761
2762 if (tgt_prog_fd) {
2763 /* For now we only allow new targets for BPF_PROG_TYPE_EXT */
2764 if (prog->type != BPF_PROG_TYPE_EXT) {
2765 err = -EINVAL;
2766 goto out_put_prog;
2767 }
2768
> 2769 id = bpf_tramp_id_alloc();
2770 if (!id) {
2771 err = -ENOMEM;
2772 goto out_put_prog;
2773 }
2774
2775 tgt_prog = bpf_prog_get(tgt_prog_fd);
2776 if (IS_ERR(tgt_prog)) {
2777 err = PTR_ERR(tgt_prog);
2778 tgt_prog = NULL;
2779 goto out_put_prog;
2780 }
2781
2782 bpf_tramp_id_init(id, tgt_prog, NULL, btf_id);
2783 }
2784
2785 link = kzalloc(sizeof(*link), GFP_USER);
2786 if (!link) {
2787 err = -ENOMEM;
2788 goto out_put_prog;
2789 }
2790 bpf_link_init(&link->link, BPF_LINK_TYPE_TRACING,
2791 &bpf_tracing_link_lops, prog);
2792 link->attach_type = prog->expected_attach_type;
2793
2794 mutex_lock(&prog->aux->dst_mutex);
2795
2796 if (!prog_extension && prog->aux->trampoline) {
2797 err = -EBUSY;
2798 goto out_unlock;
2799 }
2800
2801 /* There are a few possible cases here:
2802 *
2803 * - if prog->aux->dst_trampoline is set, the program was just loaded
2804 * and not yet attached to anything, so we can use the values stored
2805 * in prog->aux
2806 *
2807 * - if prog->aux->dst_trampoline is NULL, the program has already been
2808 * attached to a target and its initial target was cleared (below)
2809 *
2810 * - if tgt_prog != NULL, the caller specified tgt_prog_fd +
2811 * target_btf_id using the link_create API.
2812 *
2813 * - if tgt_prog == NULL when this function was called using the old
2814 * raw_tracepoint_open API, and we need a target from prog->aux
2815 *
2816 * - if prog->aux->dst_trampoline and tgt_prog is NULL, the program
2817 * was detached and is going for re-attachment.
2818 */
2819 if (!prog->aux->dst_trampoline && !tgt_prog) {
2820 /*
2821 * Allow re-attach for TRACING and LSM programs. If it's
2822 * currently linked, bpf_trampoline_link_prog will fail.
2823 * EXT programs need to specify tgt_prog_fd, so they
2824 * re-attach in separate code path.
2825 */
2826 if (prog->type != BPF_PROG_TYPE_TRACING &&
2827 prog->type != BPF_PROG_TYPE_LSM) {
2828 err = -EINVAL;
2829 goto out_unlock;
2830 }
2831
2832 id = bpf_tramp_id_alloc();
2833 if (!id) {
2834 err = -ENOMEM;
2835 goto out_unlock;
2836 }
2837
2838 btf_id = prog->aux->attach_btf_id;
2839 bpf_tramp_id_init(id, NULL, prog->aux->attach_btf, btf_id);
2840 }
2841
2842 if (!prog->aux->dst_trampoline ||
2843 (!bpf_tramp_id_is_empty(id) &&
2844 bpf_tramp_id_is_equal(id, prog->aux->dst_trampoline->id))) {
2845 /* If there is no saved target, or the specified target is
2846 * different from the destination specified at load time, we
2847 * need a new trampoline and a check for compatibility
2848 */
2849 struct bpf_attach_target_info tgt_info = {};
2850
2851 err = bpf_check_attach_target(NULL, prog, tgt_prog, btf_id,
2852 &tgt_info);
2853 if (err)
2854 goto out_unlock;
2855
2856 tr = bpf_trampoline_get(id, &tgt_info);
2857 if (!tr) {
2858 err = -ENOMEM;
2859 goto out_unlock;
2860 }
2861 } else {
2862 /* The caller didn't specify a target, or the target was the
2863 * same as the destination supplied during program load. This
2864 * means we can reuse the trampoline and reference from program
2865 * load time, and there is no need to allocate a new one. This
2866 * can only happen once for any program, as the saved values in
2867 * prog->aux are cleared below.
2868 */
2869 tr = prog->aux->dst_trampoline;
2870 tgt_prog = prog->aux->dst_prog;
2871 }
2872
2873 err = bpf_link_prime(&link->link, &link_primer);
2874 if (err)
2875 goto out_unlock;
2876
2877 err = bpf_trampoline_link_prog(prog, tr);
2878 if (err) {
2879 bpf_link_cleanup(&link_primer);
2880 link = NULL;
2881 goto out_unlock;
2882 }
2883
2884 link->tgt_prog = tgt_prog;
2885
2886 if (prog_extension)
2887 link->trampoline = tr;
2888 else
2889 prog->aux->trampoline = tr;
2890
2891 /* Always clear the trampoline and target prog from prog->aux to make
2892 * sure the original attach destination is not kept alive after a
2893 * program is (re-)attached to another target.
2894 */
2895 if (prog->aux->dst_prog &&
2896 (tgt_prog_fd || tr != prog->aux->dst_trampoline))
2897 /* got extra prog ref from syscall, or attaching to different prog */
2898 bpf_prog_put(prog->aux->dst_prog);
2899 if (prog->aux->dst_trampoline && tr != prog->aux->dst_trampoline)
2900 /* we allocated a new trampoline, so free the old one */
2901 bpf_trampoline_put(prog->aux->dst_trampoline);
2902
2903 prog->aux->dst_prog = NULL;
2904 prog->aux->dst_trampoline = NULL;
2905 mutex_unlock(&prog->aux->dst_mutex);
2906
2907 return bpf_link_settle(&link_primer);
2908 out_unlock:
2909 if (tr && tr != prog->aux->dst_trampoline)
2910 bpf_trampoline_put(tr);
2911 mutex_unlock(&prog->aux->dst_mutex);
2912 kfree(link);
2913 out_put_prog:
2914 if (tgt_prog_fd && tgt_prog)
2915 bpf_prog_put(tgt_prog);
2916 bpf_tramp_id_free(id);
2917 return err;
2918 }
2919
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[zen:5.15/zen-sauce 7/28] riscv64-linux-ld: undefined reference to `fb_deferred_io_cleanup'
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.15/zen-sauce
head: 81ba2917231b206b7b6b9b160e456c5452c4f62e
commit: 4398d18270d5391b13d108a79b8ec235e0ffa10a [7/28] ZEN: Initialize ata before graphics
config: riscv-randconfig-r042-20211118 (attached as .config)
compiler: riscv64-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/zen-kernel/zen-kernel/commit/4398d18270d5391b13d108a79...
git remote add zen https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen 5.15/zen-sauce
git checkout 4398d18270d5391b13d108a79b8ec235e0ffa10a
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=riscv SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_set_suspend':
(.text+0x266): undefined reference to `fb_set_suspend'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_resume_worker':
drm_fb_helper.c:(.text+0x29c): undefined reference to `fb_set_suspend'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_unregister_fbi':
(.text+0x3e0): undefined reference to `unregister_framebuffer'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_read':
(.text+0x424): undefined reference to `fb_sys_read'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `.L262':
drm_fb_helper.c:(.text+0xf70): undefined reference to `framebuffer_release'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `.L267':
drm_fb_helper.c:(.text+0xffc): undefined reference to `fb_dealloc_cmap'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `.L291':
drm_fb_helper.c:(.text+0x1140): undefined reference to `framebuffer_alloc'
riscv64-linux-ld: drm_fb_helper.c:(.text+0x1158): undefined reference to `fb_alloc_cmap'
riscv64-linux-ld: drm_fb_helper.c:(.text+0x1166): undefined reference to `framebuffer_release'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_alloc_fbi':
(.text+0x11cc): undefined reference to `fb_dealloc_cmap'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `.L303':
drm_fb_helper.c:(.text+0x129c): undefined reference to `fb_deferred_io_init'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `.L321':
drm_fb_helper.c:(.text+0x13ba): undefined reference to `register_framebuffer'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `.L375':
drm_fb_helper.c:(.text+0x1956): undefined reference to `fb_set_suspend'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `.L488':
drm_fb_helper.c:(.text+0x1e00): undefined reference to `fb_sys_write'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_deferred_io':
(.text+0x1e52): undefined reference to `sys_fillrect'
riscv64-linux-ld: (.text+0x1e88): undefined reference to `sys_copyarea'
riscv64-linux-ld: (.text+0x1ebe): undefined reference to `sys_imageblit'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_write':
(.text+0x1ef4): undefined reference to `cfb_fillrect'
riscv64-linux-ld: (.text+0x1f2a): undefined reference to `cfb_copyarea'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_fillrect':
(.text+0x1f60): undefined reference to `cfb_imageblit'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_copyarea':
(.text+0x1f9e): undefined reference to `cfb_fillrect'
riscv64-linux-ld: (.text+0x1fbc): undefined reference to `sys_fillrect'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_imageblit':
(.text+0x1fe8): undefined reference to `cfb_copyarea'
riscv64-linux-ld: (.text+0x2006): undefined reference to `sys_copyarea'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_cfb_fillrect':
(.text+0x2032): undefined reference to `cfb_imageblit'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_cfb_copyarea':
(.text+0x2050): undefined reference to `sys_imageblit'
>> riscv64-linux-ld: (.text+0x207e): undefined reference to `fb_deferred_io_cleanup'
riscv64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fbdev_fb_copyarea':
drm_fb_helper.c:(.text+0x2110): undefined reference to `unregister_framebuffer'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
Re: [PATCH net-next 5/9] net: constify netdev->dev_addr
by kernel test robot
Hi Jakub,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Jakub-Kicinski/net-constify-netd...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 75082e7f46809432131749f4ecea66864d0f7438
config: x86_64-randconfig-s032-20211118 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/ea5373ba01c0915c0dceb67e2df2b0534...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jakub-Kicinski/net-constify-netdev-dev_addr/20211118-121649
git checkout ea5373ba01c0915c0dceb67e2df2b05343642b84
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c:2820:55: sparse: sparse: incorrect type in argument 2 (different modifiers) @@ expected unsigned char [usertype] *addr @@ got unsigned char const *dev_addr @@
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c:2820:55: sparse: expected unsigned char [usertype] *addr
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c:2820:55: sparse: got unsigned char const *dev_addr
--
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:121:25: sparse: sparse: symbol 'bnx2x_iov_wq' was not declared. Should it be static?
>> drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:8555:57: sparse: sparse: incorrect type in argument 2 (different modifiers) @@ expected unsigned char [usertype] *addr @@ got unsigned char const *dev_addr @@
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:8555:57: sparse: expected unsigned char [usertype] *addr
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:8555:57: sparse: got unsigned char const *dev_addr
vim +2820 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2626
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2627 bp->state = BNX2X_STATE_OPENING_WAIT4_LOAD;
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2628
16a5fd9265e757 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2013-06-02 2629 /* zero the structure w/o any lock, before SP handler is initialized */
2ae17f666099c9 drivers/net/bnx2x/bnx2x_cmn.c Vladislav Zolotarov 2011-05-04 2630 memset(&bp->last_reported_link, 0, sizeof(bp->last_reported_link));
2ae17f666099c9 drivers/net/bnx2x/bnx2x_cmn.c Vladislav Zolotarov 2011-05-04 2631 __set_bit(BNX2X_LINK_REPORT_LINK_DOWN,
2ae17f666099c9 drivers/net/bnx2x/bnx2x_cmn.c Vladislav Zolotarov 2011-05-04 2632 &bp->last_reported_link.link_report_flags);
2ae17f666099c9 drivers/net/bnx2x/bnx2x_cmn.c Vladislav Zolotarov 2011-05-04 2633
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2634 if (IS_PF(bp))
523224a3b3cd40 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-10-06 2635 /* must be called before memory allocation and HW init */
523224a3b3cd40 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-10-06 2636 bnx2x_ilt_set_info(bp);
523224a3b3cd40 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-10-06 2637
6383c0b35b48bf drivers/net/bnx2x/bnx2x_cmn.c Ariel Elior 2011-07-14 2638 /*
6383c0b35b48bf drivers/net/bnx2x/bnx2x_cmn.c Ariel Elior 2011-07-14 2639 * Zero fastpath structures preserving invariants like napi, which are
6383c0b35b48bf drivers/net/bnx2x/bnx2x_cmn.c Ariel Elior 2011-07-14 2640 * allocated only once, fp index, max_cos, bp pointer.
7e6b4d440b0ae9 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Michal Schmidt 2015-04-28 2641 * Also set fp->mode and txdata_ptr.
b3b83c3f3c640b drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2011-05-04 2642 */
51c1a580b1e07d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-03-18 2643 DP(NETIF_MSG_IFUP, "num queues: %d", bp->num_queues);
b3b83c3f3c640b drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2011-05-04 2644 for_each_queue(bp, i)
b3b83c3f3c640b drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2011-05-04 2645 bnx2x_bz_fp(bp, i);
55c11941e382cb drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-11-07 2646 memset(bp->bnx2x_txq, 0, (BNX2X_MAX_RSS_COUNT(bp) * BNX2X_MULTI_TX_COS +
55c11941e382cb drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-11-07 2647 bp->num_cnic_queues) *
65565884fba67d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-06-19 2648 sizeof(struct bnx2x_fp_txdata));
b3b83c3f3c640b drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2011-05-04 2649
55c11941e382cb drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-11-07 2650 bp->fcoe_init = false;
6383c0b35b48bf drivers/net/bnx2x/bnx2x_cmn.c Ariel Elior 2011-07-14 2651
a8c94b9188bf60 drivers/net/bnx2x/bnx2x_cmn.c Vladislav Zolotarov 2011-02-06 2652 /* Set the receive queues buffer size */
a8c94b9188bf60 drivers/net/bnx2x/bnx2x_cmn.c Vladislav Zolotarov 2011-02-06 2653 bnx2x_set_rx_buf_size(bp);
a8c94b9188bf60 drivers/net/bnx2x/bnx2x_cmn.c Vladislav Zolotarov 2011-02-06 2654
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2655 if (IS_PF(bp)) {
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2656 rc = bnx2x_alloc_mem(bp);
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2657 if (rc) {
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2658 BNX2X_ERR("Unable to allocate bp memory\n");
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2659 return rc;
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2660 }
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2661 }
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2662
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2663 /* need to be done after alloc mem, since it's self adjusting to amount
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2664 * of memory available for RSS queues
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2665 */
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2666 rc = bnx2x_alloc_fp_mem(bp);
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2667 if (rc) {
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2668 BNX2X_ERR("Unable to allocate memory for fps\n");
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2669 LOAD_ERROR_EXIT(bp, load_error0);
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2670 }
d6214d7aaa9a82 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-10-06 2671
e3ed4eaef4932f drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2013-10-27 2672 /* Allocated memory for FW statistics */
fb653827c75872 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Dan Carpenter 2021-08-05 2673 rc = bnx2x_alloc_fw_stats_mem(bp);
fb653827c75872 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Dan Carpenter 2021-08-05 2674 if (rc)
e3ed4eaef4932f drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2013-10-27 2675 LOAD_ERROR_EXIT(bp, load_error0);
e3ed4eaef4932f drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2013-10-27 2676
8d9ac297d18dbe drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2677 /* request pf to initialize status blocks */
8d9ac297d18dbe drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2678 if (IS_VF(bp)) {
8d9ac297d18dbe drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2679 rc = bnx2x_vfpf_init(bp);
8d9ac297d18dbe drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2680 if (rc)
8d9ac297d18dbe drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2681 LOAD_ERROR_EXIT(bp, load_error0);
8d9ac297d18dbe drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2682 }
8d9ac297d18dbe drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2683
b3b83c3f3c640b drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2011-05-04 2684 /* As long as bnx2x_alloc_mem() may possibly update
b3b83c3f3c640b drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2011-05-04 2685 * bp->num_queues, bnx2x_set_real_num_queues() should always
55c11941e382cb drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-11-07 2686 * come after it. At this stage cnic queues are not counted.
b3b83c3f3c640b drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2011-05-04 2687 */
55c11941e382cb drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-11-07 2688 rc = bnx2x_set_real_num_queues(bp, 0);
d6214d7aaa9a82 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-10-06 2689 if (rc) {
ec6ba945211b1c drivers/net/bnx2x/bnx2x_cmn.c Vladislav Zolotarov 2010-12-13 2690 BNX2X_ERR("Unable to set real_num_queues\n");
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2691 LOAD_ERROR_EXIT(bp, load_error0);
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2692 }
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2693
6383c0b35b48bf drivers/net/bnx2x/bnx2x_cmn.c Ariel Elior 2011-07-14 2694 /* configure multi cos mappings in kernel.
16a5fd9265e757 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2013-06-02 2695 * this configuration may be overridden by a multi class queue
16a5fd9265e757 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2013-06-02 2696 * discipline or by a dcbx negotiation result.
6383c0b35b48bf drivers/net/bnx2x/bnx2x_cmn.c Ariel Elior 2011-07-14 2697 */
6383c0b35b48bf drivers/net/bnx2x/bnx2x_cmn.c Ariel Elior 2011-07-14 2698 bnx2x_setup_tc(bp->dev, bp->max_cos);
6383c0b35b48bf drivers/net/bnx2x/bnx2x_cmn.c Ariel Elior 2011-07-14 2699
26614ba5445fe3 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-08-27 2700 /* Add all NAPI objects */
26614ba5445fe3 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-08-27 2701 bnx2x_add_all_napi(bp);
55c11941e382cb drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-11-07 2702 DP(NETIF_MSG_IFUP, "napi added\n");
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2703 bnx2x_napi_enable(bp);
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2704
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2705 if (IS_PF(bp)) {
889b9af34f9861 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2012-01-26 2706 /* set pf load just before approaching the MCP */
889b9af34f9861 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2012-01-26 2707 bnx2x_set_pf_load(bp);
889b9af34f9861 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2012-01-26 2708
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2709 /* if mcp exists send load request and analyze response */
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2710 if (!BP_NOMCP(bp)) {
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2711 /* attempt to load pf */
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2712 rc = bnx2x_nic_load_request(bp, &load_code);
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2713 if (rc)
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2714 LOAD_ERROR_EXIT(bp, load_error1);
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2715
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2716 /* what did mcp say? */
91ebb929b6f802 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2013-12-26 2717 rc = bnx2x_compare_fw_ver(bp, load_code, true);
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2718 if (rc) {
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2719 bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_DONE, 0);
d1e2d9660e6bca drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2012-01-26 2720 LOAD_ERROR_EXIT(bp, load_error2);
d1e2d9660e6bca drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2012-01-26 2721 }
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2722 } else {
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2723 load_code = bnx2x_nic_load_no_mcp(bp, port);
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2724 }
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2725
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2726 /* mark pmf if applicable */
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2727 bnx2x_nic_load_pmf(bp, load_code);
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2728
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2729 /* Init Function state controlling object */
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2730 bnx2x__init_func_obj(bp);
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2731
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2732 /* Initialize HW */
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2733 rc = bnx2x_init_hw(bp, load_code);
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2734 if (rc) {
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2735 BNX2X_ERR("HW init failed, aborting\n");
a22f078867ef36 drivers/net/bnx2x/bnx2x_cmn.c Yaniv Rosner 2010-09-07 2736 bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_DONE, 0);
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2737 LOAD_ERROR_EXIT(bp, load_error2);
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2738 }
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2739 }
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2740
ecf01c22be0346 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2013-04-22 2741 bnx2x_pre_irq_nic_init(bp);
ecf01c22be0346 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2013-04-22 2742
d6214d7aaa9a82 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-10-06 2743 /* Connect to IRQs */
d6214d7aaa9a82 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-10-06 2744 rc = bnx2x_setup_irqs(bp);
523224a3b3cd40 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-10-06 2745 if (rc) {
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2746 BNX2X_ERR("setup irqs failed\n");
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2747 if (IS_PF(bp))
523224a3b3cd40 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-10-06 2748 bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_DONE, 0);
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2749 LOAD_ERROR_EXIT(bp, load_error2);
523224a3b3cd40 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-10-06 2750 }
523224a3b3cd40 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-10-06 2751
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2752 /* Init per-function objects */
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2753 if (IS_PF(bp)) {
ecf01c22be0346 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2013-04-22 2754 /* Setup NIC internals and enable interrupts */
ecf01c22be0346 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2013-04-22 2755 bnx2x_post_irq_nic_init(bp, load_code);
ecf01c22be0346 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2013-04-22 2756
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2757 bnx2x_init_bp_objs(bp);
b56e9670ffa4de drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2758 bnx2x_iov_nic_init(bp);
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2759
a334872224a67b drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Barak Witkowski 2012-04-23 2760 /* Set AFEX default VLAN tag to an invalid value */
a334872224a67b drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Barak Witkowski 2012-04-23 2761 bp->afex_def_vlan_tag = -1;
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2762 bnx2x_nic_load_afex_dcc(bp, load_code);
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2763 bp->state = BNX2X_STATE_OPENING_WAIT4_PORT;
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2764 rc = bnx2x_func_start(bp);
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2765 if (rc) {
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2766 BNX2X_ERR("Function start failed!\n");
c636322b24eb69 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2011-07-19 2767 bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_DONE, 0);
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2768
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2769 LOAD_ERROR_EXIT(bp, load_error3);
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2770 }
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2771
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2772 /* Send LOAD_DONE command to MCP */
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2773 if (!BP_NOMCP(bp)) {
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2774 load_code = bnx2x_fw_command(bp,
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2775 DRV_MSG_CODE_LOAD_DONE, 0);
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2776 if (!load_code) {
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2777 BNX2X_ERR("MCP response failure, aborting\n");
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2778 rc = -EBUSY;
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2779 LOAD_ERROR_EXIT(bp, load_error3);
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2780 }
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2781 }
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2782
0c14e5ced26462 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-04-17 2783 /* initialize FW coalescing state machines in RAM */
0c14e5ced26462 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-04-17 2784 bnx2x_update_coalesce(bp);
60cad4e67bd6ff drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-09-04 2785 }
0c14e5ced26462 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-04-17 2786
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2787 /* setup the leading queue */
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2788 rc = bnx2x_setup_leading(bp);
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2789 if (rc) {
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2790 BNX2X_ERR("Setup leading failed!\n");
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2791 LOAD_ERROR_EXIT(bp, load_error3);
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2792 }
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2793
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2794 /* set up the rest of the queues */
55c11941e382cb drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-11-07 2795 for_each_nondefault_eth_queue(bp, i) {
60cad4e67bd6ff drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-09-04 2796 if (IS_PF(bp))
60cad4e67bd6ff drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-09-04 2797 rc = bnx2x_setup_queue(bp, &bp->fp[i], false);
60cad4e67bd6ff drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-09-04 2798 else /* VF */
60cad4e67bd6ff drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-09-04 2799 rc = bnx2x_vfpf_setup_q(bp, &bp->fp[i], false);
51c1a580b1e07d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-03-18 2800 if (rc) {
60cad4e67bd6ff drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-09-04 2801 BNX2X_ERR("Queue %d setup failed\n", i);
55c11941e382cb drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-11-07 2802 LOAD_ERROR_EXIT(bp, load_error3);
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2803 }
51c1a580b1e07d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-03-18 2804 }
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2805
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2806 /* setup rss */
60cad4e67bd6ff drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-09-04 2807 rc = bnx2x_init_rss(bp);
51c1a580b1e07d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-03-18 2808 if (rc) {
51c1a580b1e07d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-03-18 2809 BNX2X_ERR("PF RSS init failed\n");
55c11941e382cb drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-11-07 2810 LOAD_ERROR_EXIT(bp, load_error3);
51c1a580b1e07d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-03-18 2811 }
8d9ac297d18dbe drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2812
523224a3b3cd40 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-10-06 2813 /* Now when Clients are configured we are ready to work */
523224a3b3cd40 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-10-06 2814 bp->state = BNX2X_STATE_OPEN;
523224a3b3cd40 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-10-06 2815
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2816 /* Configure a ucast MAC */
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2817 if (IS_PF(bp))
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2818 rc = bnx2x_set_eth_mac(bp, true);
8d9ac297d18dbe drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2819 else /* vf */
f8f4f61a5a3588 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2013-04-24 @2820 rc = bnx2x_vfpf_config_mac(bp, bp->dev->dev_addr, bp->fp->index,
f8f4f61a5a3588 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2013-04-24 2821 true);
51c1a580b1e07d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-03-18 2822 if (rc) {
51c1a580b1e07d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-03-18 2823 BNX2X_ERR("Setting Ethernet MAC failed\n");
55c11941e382cb drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-11-07 2824 LOAD_ERROR_EXIT(bp, load_error3);
51c1a580b1e07d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-03-18 2825 }
6e30dd4e3935dd drivers/net/bnx2x/bnx2x_cmn.c Vladislav Zolotarov 2011-02-06 2826
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2827 if (IS_PF(bp) && bp->pending_max) {
e3835b99333eb3 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2011-03-06 2828 bnx2x_update_max_mf_config(bp, bp->pending_max);
e3835b99333eb3 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2011-03-06 2829 bp->pending_max = 0;
e3835b99333eb3 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2011-03-06 2830 }
e3835b99333eb3 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2011-03-06 2831
484c016d939278 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Sudarsana Reddy Kalluru 2018-06-28 2832 bp->force_link_down = false;
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2833 if (bp->port.pmf) {
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2834 rc = bnx2x_initial_phy_init(bp, load_mode);
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2835 if (rc)
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2836 LOAD_ERROR_EXIT(bp, load_error3);
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2837 }
c63da990cd6315 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Barak Witkowski 2012-12-05 2838 bp->link_params.feature_config_flags &= ~FEATURE_CONFIG_BOOT_FROM_SAN;
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2839
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2840 /* Start fast path */
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2841
05cc5a39ddb74d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2015-07-29 2842 /* Re-configure vlan filters */
05cc5a39ddb74d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2015-07-29 2843 rc = bnx2x_vlan_reconfigure_vid(bp);
05cc5a39ddb74d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2015-07-29 2844 if (rc)
05cc5a39ddb74d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2015-07-29 2845 LOAD_ERROR_EXIT(bp, load_error3);
05cc5a39ddb74d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2015-07-29 2846
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2847 /* Initialize Rx filter. */
8b09be5f173759 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2013-08-01 2848 bnx2x_set_rx_mode_inner(bp);
6e30dd4e3935dd drivers/net/bnx2x/bnx2x_cmn.c Vladislav Zolotarov 2011-02-06 2849
eeed018cbfa30c drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Michal Kalderon 2014-08-17 2850 if (bp->flags & PTP_SUPPORTED) {
07f12622a66320 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Sudarsana Reddy Kalluru 2018-12-12 2851 bnx2x_register_phc(bp);
eeed018cbfa30c drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Michal Kalderon 2014-08-17 2852 bnx2x_init_ptp(bp);
eeed018cbfa30c drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Michal Kalderon 2014-08-17 2853 bnx2x_configure_ptp_filters(bp);
eeed018cbfa30c drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Michal Kalderon 2014-08-17 2854 }
eeed018cbfa30c drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Michal Kalderon 2014-08-17 2855 /* Start Tx */
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2856 switch (load_mode) {
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2857 case LOAD_NORMAL:
16a5fd9265e757 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2013-06-02 2858 /* Tx queue should be only re-enabled */
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2859 netif_tx_wake_all_queues(bp->dev);
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2860 break;
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2861
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2862 case LOAD_OPEN:
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2863 netif_tx_start_all_queues(bp->dev);
4e857c58efeb99 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Peter Zijlstra 2014-03-17 2864 smp_mb__after_atomic();
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2865 break;
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2866
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2867 case LOAD_DIAG:
8970b2e4393a34 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-06-19 2868 case LOAD_LOOPBACK_EXT:
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2869 bp->state = BNX2X_STATE_DIAG;
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2870 break;
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2871
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2872 default:
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2873 break;
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2874 }
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2875
00253a8cf3119a drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2011-11-13 2876 if (bp->port.pmf)
4c704899328bcb drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Barak Witkowski 2012-12-02 2877 bnx2x_update_drv_flags(bp, 1 << DRV_FLAGS_PORT_MASK, 0);
00253a8cf3119a drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2011-11-13 2878 else
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2879 bnx2x__link_status_update(bp);
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2880
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2881 /* start the timer */
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2882 mod_timer(&bp->timer, jiffies + bp->current_interval);
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2883
55c11941e382cb drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-11-07 2884 if (CNIC_ENABLED(bp))
55c11941e382cb drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-11-07 2885 bnx2x_load_cnic(bp);
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2886
42f8277f56cf4a drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2014-03-23 2887 if (IS_PF(bp))
42f8277f56cf4a drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2014-03-23 2888 bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_GET_DRV_VERSION, 0);
42f8277f56cf4a drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2014-03-23 2889
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2890 if (IS_PF(bp) && SHMEM2_HAS(bp, drv_capabilities_flag)) {
9ce392d4fa43c3 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2012-03-12 2891 /* mark driver is loaded in shmem2 */
9ce392d4fa43c3 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2012-03-12 2892 u32 val;
9ce392d4fa43c3 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2012-03-12 2893 val = SHMEM2_RD(bp, drv_capabilities_flag[BP_FW_MB_IDX(bp)]);
230d00eb4bfe0d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2015-07-22 2894 val &= ~DRV_FLAGS_MTU_MASK;
230d00eb4bfe0d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2015-07-22 2895 val |= (bp->dev->mtu << DRV_FLAGS_MTU_SHIFT);
9ce392d4fa43c3 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2012-03-12 2896 SHMEM2_WR(bp, drv_capabilities_flag[BP_FW_MB_IDX(bp)],
9ce392d4fa43c3 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2012-03-12 2897 val | DRV_FLAGS_CAPABILITIES_LOADED_SUPPORTED |
9ce392d4fa43c3 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2012-03-12 2898 DRV_FLAGS_CAPABILITIES_LOADED_L2);
9ce392d4fa43c3 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2012-03-12 2899 }
9ce392d4fa43c3 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2012-03-12 2900
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2901 /* Wait for all pending SP commands to complete */
ad5afc89365e98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Ariel Elior 2013-01-01 2902 if (IS_PF(bp) && !bnx2x_wait_sp_comp(bp, ~0x0UL)) {
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2903 BNX2X_ERR("Timeout waiting for SP elements to complete\n");
5d07d8680692a2 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2012-09-13 2904 bnx2x_nic_unload(bp, UNLOAD_CLOSE, false);
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2905 return -EBUSY;
619c5cb6885b93 drivers/net/bnx2x/bnx2x_cmn.c Vlad Zolotarov 2011-06-14 2906 }
6891dd25d3f82e drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-08-03 2907
c48f350ff5e75a drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2015-07-22 2908 /* Update driver data for On-Chip MFW dump. */
c48f350ff5e75a drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2015-07-22 2909 if (IS_PF(bp))
c48f350ff5e75a drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2015-07-22 2910 bnx2x_update_mfw_dump(bp);
c48f350ff5e75a drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2015-07-22 2911
9876879fce3081 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Barak Witkowski 2012-06-19 2912 /* If PMF - send ADMIN DCBX msg to MFW to initiate DCBX FSM */
9876879fce3081 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Barak Witkowski 2012-06-19 2913 if (bp->port.pmf && (bp->state != BNX2X_STATE_DIAG))
9876879fce3081 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Barak Witkowski 2012-06-19 2914 bnx2x_dcbx_init(bp, false);
9876879fce3081 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Barak Witkowski 2012-06-19 2915
230d00eb4bfe0d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2015-07-22 2916 if (!IS_MF_SD_STORAGE_PERSONALITY_ONLY(bp))
230d00eb4bfe0d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2015-07-22 2917 bnx2x_set_os_driver_state(bp, OS_DRIVER_STATE_ACTIVE);
230d00eb4bfe0d drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Yuval Mintz 2015-07-22 2918
55c11941e382cb drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-11-07 2919 DP(NETIF_MSG_IFUP, "Ending successfully NIC load\n");
55c11941e382cb drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Merav Sicron 2012-11-07 2920
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2921 return 0;
9f6c925889ad92 drivers/net/bnx2x/bnx2x_cmn.c Dmitry Kravkov 2010-07-27 2922
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
fs/xfs/xfs_iwalk.c:355:42: warning: variable 'irec' set but not used
by kernel test robot
Hi Darrick,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 42eb8fdac2fc5d62392dcfcf0253753e821a97b0
commit: 27c14b5daa82861220d6fa6e27b51f05f21ffaa7 xfs: ensure inobt record walks always make forward progress
date: 1 year ago
config: h8300-randconfig-r014-20210927 (attached as .config)
compiler: h8300-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 27c14b5daa82861220d6fa6e27b51f05f21ffaa7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=h8300
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
fs/xfs/xfs_iwalk.c: In function 'xfs_iwalk_run_callbacks':
>> fs/xfs/xfs_iwalk.c:355:42: warning: variable 'irec' set but not used [-Wunused-but-set-variable]
355 | struct xfs_inobt_rec_incore *irec;
| ^~~~
vim +/irec +355 fs/xfs/xfs_iwalk.c
a211432c27ffa3 Darrick J. Wong 2019-07-02 336
a211432c27ffa3 Darrick J. Wong 2019-07-02 337 /*
a211432c27ffa3 Darrick J. Wong 2019-07-02 338 * The inobt record cache is full, so preserve the inobt cursor state and
a211432c27ffa3 Darrick J. Wong 2019-07-02 339 * run callbacks on the cached inobt records. When we're done, restore the
a211432c27ffa3 Darrick J. Wong 2019-07-02 340 * cursor state to wherever the cursor would have been had the cache not been
a211432c27ffa3 Darrick J. Wong 2019-07-02 341 * full (and therefore we could've just incremented the cursor) if *@has_more
a211432c27ffa3 Darrick J. Wong 2019-07-02 342 * is true. On exit, *@has_more will indicate whether or not the caller should
a211432c27ffa3 Darrick J. Wong 2019-07-02 343 * try for more inode records.
a211432c27ffa3 Darrick J. Wong 2019-07-02 344 */
a211432c27ffa3 Darrick J. Wong 2019-07-02 345 STATIC int
a211432c27ffa3 Darrick J. Wong 2019-07-02 346 xfs_iwalk_run_callbacks(
a211432c27ffa3 Darrick J. Wong 2019-07-02 347 struct xfs_iwalk_ag *iwag,
a211432c27ffa3 Darrick J. Wong 2019-07-02 348 xfs_agnumber_t agno,
a211432c27ffa3 Darrick J. Wong 2019-07-02 349 struct xfs_btree_cur **curpp,
a211432c27ffa3 Darrick J. Wong 2019-07-02 350 struct xfs_buf **agi_bpp,
a211432c27ffa3 Darrick J. Wong 2019-07-02 351 int *has_more)
a211432c27ffa3 Darrick J. Wong 2019-07-02 352 {
a211432c27ffa3 Darrick J. Wong 2019-07-02 353 struct xfs_mount *mp = iwag->mp;
a211432c27ffa3 Darrick J. Wong 2019-07-02 354 struct xfs_trans *tp = iwag->tp;
a211432c27ffa3 Darrick J. Wong 2019-07-02 @355 struct xfs_inobt_rec_incore *irec;
27c14b5daa8286 Darrick J. Wong 2020-11-14 356 xfs_agino_t next_agino;
a211432c27ffa3 Darrick J. Wong 2019-07-02 357 int error;
a211432c27ffa3 Darrick J. Wong 2019-07-02 358
27c14b5daa8286 Darrick J. Wong 2020-11-14 359 next_agino = XFS_INO_TO_AGINO(mp, iwag->lastino) + 1;
27c14b5daa8286 Darrick J. Wong 2020-11-14 360
a211432c27ffa3 Darrick J. Wong 2019-07-02 361 ASSERT(iwag->nr_recs > 0);
a211432c27ffa3 Darrick J. Wong 2019-07-02 362
a211432c27ffa3 Darrick J. Wong 2019-07-02 363 /* Delete cursor but remember the last record we cached... */
a211432c27ffa3 Darrick J. Wong 2019-07-02 364 xfs_iwalk_del_inobt(tp, curpp, agi_bpp, 0);
a211432c27ffa3 Darrick J. Wong 2019-07-02 365 irec = &iwag->recs[iwag->nr_recs - 1];
27c14b5daa8286 Darrick J. Wong 2020-11-14 366 ASSERT(next_agino == irec->ir_startino + XFS_INODES_PER_CHUNK);
a211432c27ffa3 Darrick J. Wong 2019-07-02 367
a211432c27ffa3 Darrick J. Wong 2019-07-02 368 error = xfs_iwalk_ag_recs(iwag);
a211432c27ffa3 Darrick J. Wong 2019-07-02 369 if (error)
a211432c27ffa3 Darrick J. Wong 2019-07-02 370 return error;
a211432c27ffa3 Darrick J. Wong 2019-07-02 371
a211432c27ffa3 Darrick J. Wong 2019-07-02 372 /* ...empty the cache... */
a211432c27ffa3 Darrick J. Wong 2019-07-02 373 iwag->nr_recs = 0;
a211432c27ffa3 Darrick J. Wong 2019-07-02 374
a211432c27ffa3 Darrick J. Wong 2019-07-02 375 if (!has_more)
a211432c27ffa3 Darrick J. Wong 2019-07-02 376 return 0;
a211432c27ffa3 Darrick J. Wong 2019-07-02 377
a211432c27ffa3 Darrick J. Wong 2019-07-02 378 /* ...and recreate the cursor just past where we left off. */
a211432c27ffa3 Darrick J. Wong 2019-07-02 379 error = xfs_inobt_cur(mp, tp, agno, XFS_BTNUM_INO, curpp, agi_bpp);
a211432c27ffa3 Darrick J. Wong 2019-07-02 380 if (error)
a211432c27ffa3 Darrick J. Wong 2019-07-02 381 return error;
a211432c27ffa3 Darrick J. Wong 2019-07-02 382
27c14b5daa8286 Darrick J. Wong 2020-11-14 383 return xfs_inobt_lookup(*curpp, next_agino, XFS_LOOKUP_GE, has_more);
a211432c27ffa3 Darrick J. Wong 2019-07-02 384 }
a211432c27ffa3 Darrick J. Wong 2019-07-02 385
:::::: The code at line 355 was first introduced by commit
:::::: a211432c27ffa32d9978f6c18f5af0c3f8ad2ad1 xfs: create simplified inode walk function
:::::: TO: Darrick J. Wong <darrick.wong(a)oracle.com>
:::::: CC: Darrick J. Wong <darrick.wong(a)oracle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[jolsa-perf:bpf/batch 13/29] kernel/bpf/core.c:2287:3: error: implicit declaration of function 'bpf_tramp_detach'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/batch
head: 5f1f613266bf58f8424a93e1f8b99c4ac8fa6c2b
commit: c04eb2ad90ed0981f4dc7d04249a9c84726f9ef0 [13/29] bpf: Add bpf_tramp_attach layer for trampoline attachment
config: um-i386_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/jolsa/perf.git/commit/?id...
git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
git fetch --no-tags jolsa-perf bpf/batch
git checkout c04eb2ad90ed0981f4dc7d04249a9c84726f9ef0
# save the attached .config to linux build tree
make W=1 ARCH=um SUBARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
kernel/bpf/core.c:1368:12: warning: no previous prototype for 'bpf_probe_read_kernel' [-Wmissing-prototypes]
1368 | u64 __weak bpf_probe_read_kernel(void *dst, u32 size, const void *unsafe_ptr)
| ^~~~~~~~~~~~~~~~~~~~~
kernel/bpf/core.c:1811:6: warning: no previous prototype for 'bpf_patch_call_args' [-Wmissing-prototypes]
1811 | void bpf_patch_call_args(struct bpf_insn *insn, u32 stack_depth)
| ^~~~~~~~~~~~~~~~~~~
kernel/bpf/core.c: In function 'bpf_prog_free_deferred':
>> kernel/bpf/core.c:2287:3: error: implicit declaration of function 'bpf_tramp_detach' [-Werror=implicit-function-declaration]
2287 | bpf_tramp_detach(aux->dst_attach);
| ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/bpf_tramp_detach +2287 kernel/bpf/core.c
2268
2269 static void bpf_prog_free_deferred(struct work_struct *work)
2270 {
2271 struct bpf_prog_aux *aux;
2272 int i;
2273
2274 aux = container_of(work, struct bpf_prog_aux, work);
2275 #ifdef CONFIG_BPF_SYSCALL
2276 bpf_free_kfunc_btf_tab(aux->kfunc_btf_tab);
2277 #endif
2278 bpf_free_used_maps(aux);
2279 bpf_free_used_btfs(aux);
2280 if (bpf_prog_is_dev_bound(aux))
2281 bpf_prog_offload_destroy(aux->prog);
2282 #ifdef CONFIG_PERF_EVENTS
2283 if (aux->prog->has_callchain_buf)
2284 put_callchain_buffers();
2285 #endif
2286 if (aux->dst_attach)
> 2287 bpf_tramp_detach(aux->dst_attach);
2288 for (i = 0; i < aux->func_cnt; i++) {
2289 /* We can just unlink the subprog poke descriptor table as
2290 * it was originally linked to the main program and is also
2291 * released along with it.
2292 */
2293 aux->func[i]->aux->poke_tab = NULL;
2294 bpf_jit_free(aux->func[i]);
2295 }
2296 if (aux->func_cnt) {
2297 kfree(aux->func);
2298 bpf_prog_unlock_free(aux->prog);
2299 } else {
2300 bpf_jit_free(aux->prog);
2301 }
2302 }
2303
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[brgl:gpio/for-next 2/2] drivers/gpio/gpio-xlp.c:300:23: error: 'GPIO_VARIANT_VULCAN' undeclared here (not in a function)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next
head: ea708ac5bf419d9735354f9deada384c1059700f
commit: ea708ac5bf419d9735354f9deada384c1059700f [2/2] gpio: xlp: Remove Netlogic XLP variants
config: ia64-randconfig-r011-20211117 (attached as .config)
compiler: ia64-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://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git/commit/?id...
git remote add brgl https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git
git fetch --no-tags brgl gpio/for-next
git checkout ea708ac5bf419d9735354f9deada384c1059700f
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/gpio/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpio/gpio-xlp.c:300:23: error: 'GPIO_VARIANT_VULCAN' undeclared here (not in a function)
300 | { "BRCM9006", GPIO_VARIANT_VULCAN },
| ^~~~~~~~~~~~~~~~~~~
vim +/GPIO_VARIANT_VULCAN +300 drivers/gpio/gpio-xlp.c
ff718800067952 Kamlakant Patel 2015-04-28 297
baa1b920a84081 Kamlakant Patel 2016-06-05 298 #ifdef CONFIG_ACPI
baa1b920a84081 Kamlakant Patel 2016-06-05 299 static const struct acpi_device_id xlp_gpio_acpi_match[] = {
baa1b920a84081 Kamlakant Patel 2016-06-05 @300 { "BRCM9006", GPIO_VARIANT_VULCAN },
529f75d8ca214a Jayachandran C 2017-03-12 301 { "CAV9006", GPIO_VARIANT_VULCAN },
baa1b920a84081 Kamlakant Patel 2016-06-05 302 {},
baa1b920a84081 Kamlakant Patel 2016-06-05 303 };
baa1b920a84081 Kamlakant Patel 2016-06-05 304 MODULE_DEVICE_TABLE(acpi, xlp_gpio_acpi_match);
baa1b920a84081 Kamlakant Patel 2016-06-05 305 #endif
baa1b920a84081 Kamlakant Patel 2016-06-05 306
:::::: The code at line 300 was first introduced by commit
:::::: baa1b920a8408134e4ab117e4bdb216cb09b1869 gpio: Add ACPI support for XLP GPIO controller
:::::: TO: Kamlakant Patel <kamlakant.patel(a)broadcom.com>
:::::: CC: Linus Walleij <linus.walleij(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months