[freescale-fslc:pr/490 8696/15241] drivers/soc/imx/busfreq-imx8mq.c:304:6: error: redefinition of 'request_bus_freq'
by kernel test robot
Hi Jindong,
First bad commit (maybe != root cause):
tree: https://github.com/Freescale/linux-fslc pr/490
head: e1744bcfc0ba973d84a580a510206e682c10cfcb
commit: 5c690f143dd1d4a1c4fcbd013ee3d7d8388e1e6b [8696/15241] MA-17911 soc: imx: Allow IMX8M_BUSFREQ to be loadable as module
config: sh-allmodconfig (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://github.com/Freescale/linux-fslc/commit/5c690f143dd1d4a1c4fcbd013e...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/490
git checkout 5c690f143dd1d4a1c4fcbd013ee3d7d8388e1e6b
# 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=sh 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 >>):
>> drivers/soc/imx/busfreq-imx8mq.c:304:6: error: redefinition of 'request_bus_freq'
304 | void request_bus_freq(enum bus_freq_mode mode)
| ^~~~~~~~~~~~~~~~
In file included from drivers/soc/imx/busfreq-imx8mq.c:16:
include/linux/busfreq-imx.h:58:20: note: previous definition of 'request_bus_freq' with type 'void(enum bus_freq_mode)'
58 | static inline void request_bus_freq(enum bus_freq_mode mode)
| ^~~~~~~~~~~~~~~~
>> drivers/soc/imx/busfreq-imx8mq.c:340:6: error: redefinition of 'release_bus_freq'
340 | void release_bus_freq(enum bus_freq_mode mode)
| ^~~~~~~~~~~~~~~~
In file included from drivers/soc/imx/busfreq-imx8mq.c:16:
include/linux/busfreq-imx.h:61:20: note: previous definition of 'release_bus_freq' with type 'void(enum bus_freq_mode)'
61 | static inline void release_bus_freq(enum bus_freq_mode mode)
| ^~~~~~~~~~~~~~~~
>> drivers/soc/imx/busfreq-imx8mq.c:393:5: error: redefinition of 'get_bus_freq_mode'
393 | int get_bus_freq_mode(void)
| ^~~~~~~~~~~~~~~~~
In file included from drivers/soc/imx/busfreq-imx8mq.c:16:
include/linux/busfreq-imx.h:72:19: note: previous definition of 'get_bus_freq_mode' with type 'int(void)'
72 | static inline int get_bus_freq_mode(void)
| ^~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for RPMSG_VIRTIO
Depends on HAS_DMA
Selected by
- HAVE_IMX_RPMSG && IMX_MBOX
WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC
Depends on SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && HAS_DMA
Selected by
- SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC
- SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && ATMEL_SSC
vim +/request_bus_freq +304 drivers/soc/imx/busfreq-imx8mq.c
43e127d4a2ffa1 Bai Ping 2017-10-30 303
43e127d4a2ffa1 Bai Ping 2017-10-30 @304 void request_bus_freq(enum bus_freq_mode mode)
43e127d4a2ffa1 Bai Ping 2017-10-30 305 {
43e127d4a2ffa1 Bai Ping 2017-10-30 306 mutex_lock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 307
43e127d4a2ffa1 Bai Ping 2017-10-30 308 if (mode == BUS_FREQ_HIGH)
43e127d4a2ffa1 Bai Ping 2017-10-30 309 high_bus_count++;
43e127d4a2ffa1 Bai Ping 2017-10-30 310 else if (mode == BUS_FREQ_AUDIO)
43e127d4a2ffa1 Bai Ping 2017-10-30 311 audio_bus_count++;
43e127d4a2ffa1 Bai Ping 2017-10-30 312 else if (mode == BUS_FREQ_LOW)
43e127d4a2ffa1 Bai Ping 2017-10-30 313 low_bus_count++;
43e127d4a2ffa1 Bai Ping 2017-10-30 314
43e127d4a2ffa1 Bai Ping 2017-10-30 315 if (busfreq_suspended || !bus_freq_scaling_initialized ||
43e127d4a2ffa1 Bai Ping 2017-10-30 316 !bus_freq_scaling_is_active) {
43e127d4a2ffa1 Bai Ping 2017-10-30 317 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 318 return;
43e127d4a2ffa1 Bai Ping 2017-10-30 319 }
43e127d4a2ffa1 Bai Ping 2017-10-30 320
43e127d4a2ffa1 Bai Ping 2017-10-30 321 cancel_low_bus_freq_handler();
43e127d4a2ffa1 Bai Ping 2017-10-30 322
43e127d4a2ffa1 Bai Ping 2017-10-30 323 if ((mode == BUS_FREQ_HIGH) && (!high_bus_freq_mode)) {
43e127d4a2ffa1 Bai Ping 2017-10-30 324 set_high_bus_freq(1);
43e127d4a2ffa1 Bai Ping 2017-10-30 325 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 326 return;
43e127d4a2ffa1 Bai Ping 2017-10-30 327 }
43e127d4a2ffa1 Bai Ping 2017-10-30 328
43e127d4a2ffa1 Bai Ping 2017-10-30 329 if ((mode == BUS_FREQ_AUDIO) && (!high_bus_freq_mode) &&
43e127d4a2ffa1 Bai Ping 2017-10-30 330 (!audio_bus_freq_mode)) {
43e127d4a2ffa1 Bai Ping 2017-10-30 331 set_low_bus_freq();
43e127d4a2ffa1 Bai Ping 2017-10-30 332 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 333 return;
43e127d4a2ffa1 Bai Ping 2017-10-30 334 }
43e127d4a2ffa1 Bai Ping 2017-10-30 335
43e127d4a2ffa1 Bai Ping 2017-10-30 336 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 337 }
43e127d4a2ffa1 Bai Ping 2017-10-30 338 EXPORT_SYMBOL(request_bus_freq);
43e127d4a2ffa1 Bai Ping 2017-10-30 339
43e127d4a2ffa1 Bai Ping 2017-10-30 @340 void release_bus_freq(enum bus_freq_mode mode)
43e127d4a2ffa1 Bai Ping 2017-10-30 341 {
43e127d4a2ffa1 Bai Ping 2017-10-30 342 mutex_lock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 343 if (mode == BUS_FREQ_HIGH) {
43e127d4a2ffa1 Bai Ping 2017-10-30 344 if (high_bus_count == 0) {
43e127d4a2ffa1 Bai Ping 2017-10-30 345 dev_err(busfreq_dev, "high bus count mismatch!\n");
43e127d4a2ffa1 Bai Ping 2017-10-30 346 dump_stack();
43e127d4a2ffa1 Bai Ping 2017-10-30 347 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 348 return;
43e127d4a2ffa1 Bai Ping 2017-10-30 349 }
43e127d4a2ffa1 Bai Ping 2017-10-30 350 high_bus_count--;
43e127d4a2ffa1 Bai Ping 2017-10-30 351 } else if (mode == BUS_FREQ_AUDIO) {
43e127d4a2ffa1 Bai Ping 2017-10-30 352 if (audio_bus_count == 0) {
43e127d4a2ffa1 Bai Ping 2017-10-30 353 dev_err(busfreq_dev, "audio bus count mismatch!\n");
43e127d4a2ffa1 Bai Ping 2017-10-30 354 dump_stack();
43e127d4a2ffa1 Bai Ping 2017-10-30 355 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 356 return;
43e127d4a2ffa1 Bai Ping 2017-10-30 357 }
43e127d4a2ffa1 Bai Ping 2017-10-30 358 audio_bus_count--;
43e127d4a2ffa1 Bai Ping 2017-10-30 359 } else if (mode == BUS_FREQ_LOW) {
43e127d4a2ffa1 Bai Ping 2017-10-30 360 if (low_bus_count == 0) {
43e127d4a2ffa1 Bai Ping 2017-10-30 361 dev_err(busfreq_dev, "low bus count mismatch!\n");
43e127d4a2ffa1 Bai Ping 2017-10-30 362 dump_stack();
43e127d4a2ffa1 Bai Ping 2017-10-30 363 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 364 return;
43e127d4a2ffa1 Bai Ping 2017-10-30 365 }
43e127d4a2ffa1 Bai Ping 2017-10-30 366 low_bus_count--;
43e127d4a2ffa1 Bai Ping 2017-10-30 367 }
43e127d4a2ffa1 Bai Ping 2017-10-30 368
43e127d4a2ffa1 Bai Ping 2017-10-30 369 if (busfreq_suspended || !bus_freq_scaling_initialized ||
43e127d4a2ffa1 Bai Ping 2017-10-30 370 !bus_freq_scaling_is_active) {
43e127d4a2ffa1 Bai Ping 2017-10-30 371 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 372 return;
43e127d4a2ffa1 Bai Ping 2017-10-30 373 }
43e127d4a2ffa1 Bai Ping 2017-10-30 374
43e127d4a2ffa1 Bai Ping 2017-10-30 375 if ((!audio_bus_freq_mode) && (high_bus_count == 0) &&
43e127d4a2ffa1 Bai Ping 2017-10-30 376 (audio_bus_count != 0)) {
43e127d4a2ffa1 Bai Ping 2017-10-30 377 set_low_bus_freq();
43e127d4a2ffa1 Bai Ping 2017-10-30 378 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 379 return;
43e127d4a2ffa1 Bai Ping 2017-10-30 380 }
43e127d4a2ffa1 Bai Ping 2017-10-30 381
43e127d4a2ffa1 Bai Ping 2017-10-30 382 if ((!low_bus_freq_mode) && (high_bus_count == 0) &&
43e127d4a2ffa1 Bai Ping 2017-10-30 383 (audio_bus_count == 0)) {
43e127d4a2ffa1 Bai Ping 2017-10-30 384 set_low_bus_freq();
43e127d4a2ffa1 Bai Ping 2017-10-30 385 mutex_unlock(&bus_freq_mutex);
0e73ee47110db0 Bai Ping 2018-01-08 386 return;
43e127d4a2ffa1 Bai Ping 2017-10-30 387 }
43e127d4a2ffa1 Bai Ping 2017-10-30 388
43e127d4a2ffa1 Bai Ping 2017-10-30 389 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 390 }
43e127d4a2ffa1 Bai Ping 2017-10-30 391 EXPORT_SYMBOL(release_bus_freq);
43e127d4a2ffa1 Bai Ping 2017-10-30 392
43e127d4a2ffa1 Bai Ping 2017-10-30 @393 int get_bus_freq_mode(void)
43e127d4a2ffa1 Bai Ping 2017-10-30 394 {
43e127d4a2ffa1 Bai Ping 2017-10-30 395 return cur_bus_freq_mode;
43e127d4a2ffa1 Bai Ping 2017-10-30 396 }
43e127d4a2ffa1 Bai Ping 2017-10-30 397 EXPORT_SYMBOL(get_bus_freq_mode);
43e127d4a2ffa1 Bai Ping 2017-10-30 398
:::::: The code at line 304 was first introduced by commit
:::::: 43e127d4a2ffa1fdad45da32c320035719feff90 MLK-16689-03 driver: soc: Add busfreq driver for imx8mq
:::::: TO: Bai Ping <ping.bai(a)nxp.com>
:::::: CC: Dong Aisheng <aisheng.dong(a)nxp.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
arch/x86/hyperv/irqdomain.c:27:18: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 66f4beaa6c1d28161f534471484b2daa2de1dce0
commit: e39397d1fd6851bef4dfb63a631b8e15d1f43329 x86/hyperv: implement an MSI domain for root partition
date: 9 months ago
config: i386-randconfig-s002-20211109 (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://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 e39397d1fd6851bef4dfb63a631b8e15d1f43329
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
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 >>)
>> arch/x86/hyperv/irqdomain.c:27:18: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void [noderef] __percpu ** @@
arch/x86/hyperv/irqdomain.c:27:18: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/hyperv/irqdomain.c:27:18: sparse: got void [noderef] __percpu **
>> arch/x86/hyperv/irqdomain.c:27:15: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct hv_input_map_device_interrupt *input @@ got void [noderef] __percpu * @@
arch/x86/hyperv/irqdomain.c:27:15: sparse: expected struct hv_input_map_device_interrupt *input
arch/x86/hyperv/irqdomain.c:27:15: sparse: got void [noderef] __percpu *
arch/x86/hyperv/irqdomain.c:28:19: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void [noderef] __percpu ** @@
arch/x86/hyperv/irqdomain.c:28:19: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/hyperv/irqdomain.c:28:19: sparse: got void [noderef] __percpu **
>> arch/x86/hyperv/irqdomain.c:28:16: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct hv_output_map_device_interrupt *output @@ got void [noderef] __percpu * @@
arch/x86/hyperv/irqdomain.c:28:16: sparse: expected struct hv_output_map_device_interrupt *output
arch/x86/hyperv/irqdomain.c:28:16: sparse: got void [noderef] __percpu *
arch/x86/hyperv/irqdomain.c:80:18: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void [noderef] __percpu ** @@
arch/x86/hyperv/irqdomain.c:80:18: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/hyperv/irqdomain.c:80:18: sparse: got void [noderef] __percpu **
>> arch/x86/hyperv/irqdomain.c:80:15: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct hv_input_unmap_device_interrupt *input @@ got void [noderef] __percpu * @@
arch/x86/hyperv/irqdomain.c:80:15: sparse: expected struct hv_input_unmap_device_interrupt *input
arch/x86/hyperv/irqdomain.c:80:15: sparse: got void [noderef] __percpu *
>> arch/x86/hyperv/irqdomain.c:124:30: sparse: sparse: invalid access past the end of 'dev_id' (4 8)
vim +27 arch/x86/hyperv/irqdomain.c
14
15 static int hv_map_interrupt(union hv_device_id device_id, bool level,
16 int cpu, int vector, struct hv_interrupt_entry *entry)
17 {
18 struct hv_input_map_device_interrupt *input;
19 struct hv_output_map_device_interrupt *output;
20 struct hv_device_interrupt_descriptor *intr_desc;
21 unsigned long flags;
22 u64 status;
23 int nr_bank, var_size;
24
25 local_irq_save(flags);
26
> 27 input = *this_cpu_ptr(hyperv_pcpu_input_arg);
> 28 output = *this_cpu_ptr(hyperv_pcpu_output_arg);
29
30 intr_desc = &input->interrupt_descriptor;
31 memset(input, 0, sizeof(*input));
32 input->partition_id = hv_current_partition_id;
33 input->device_id = device_id.as_uint64;
34 intr_desc->interrupt_type = HV_X64_INTERRUPT_TYPE_FIXED;
35 intr_desc->vector_count = 1;
36 intr_desc->target.vector = vector;
37
38 if (level)
39 intr_desc->trigger_mode = HV_INTERRUPT_TRIGGER_MODE_LEVEL;
40 else
41 intr_desc->trigger_mode = HV_INTERRUPT_TRIGGER_MODE_EDGE;
42
43 intr_desc->target.vp_set.valid_bank_mask = 0;
44 intr_desc->target.vp_set.format = HV_GENERIC_SET_SPARSE_4K;
45 nr_bank = cpumask_to_vpset(&(intr_desc->target.vp_set), cpumask_of(cpu));
46 if (nr_bank < 0) {
47 local_irq_restore(flags);
48 pr_err("%s: unable to generate VP set\n", __func__);
49 return EINVAL;
50 }
51 intr_desc->target.flags = HV_DEVICE_INTERRUPT_TARGET_PROCESSOR_SET;
52
53 /*
54 * var-sized hypercall, var-size starts after vp_mask (thus
55 * vp_set.format does not count, but vp_set.valid_bank_mask
56 * does).
57 */
58 var_size = nr_bank + 1;
59
60 status = hv_do_rep_hypercall(HVCALL_MAP_DEVICE_INTERRUPT, 0, var_size,
61 input, output);
62 *entry = output->interrupt_entry;
63
64 local_irq_restore(flags);
65
66 if ((status & HV_HYPERCALL_RESULT_MASK) != HV_STATUS_SUCCESS)
67 pr_err("%s: hypercall failed, status %lld\n", __func__, status);
68
69 return status & HV_HYPERCALL_RESULT_MASK;
70 }
71
72 static int hv_unmap_interrupt(u64 id, struct hv_interrupt_entry *old_entry)
73 {
74 unsigned long flags;
75 struct hv_input_unmap_device_interrupt *input;
76 struct hv_interrupt_entry *intr_entry;
77 u64 status;
78
79 local_irq_save(flags);
> 80 input = *this_cpu_ptr(hyperv_pcpu_input_arg);
81
82 memset(input, 0, sizeof(*input));
83 intr_entry = &input->interrupt_entry;
84 input->partition_id = hv_current_partition_id;
85 input->device_id = id;
86 *intr_entry = *old_entry;
87
88 status = hv_do_hypercall(HVCALL_UNMAP_DEVICE_INTERRUPT, input, NULL);
89 local_irq_restore(flags);
90
91 return status & HV_HYPERCALL_RESULT_MASK;
92 }
93
94 #ifdef CONFIG_PCI_MSI
95 struct rid_data {
96 struct pci_dev *bridge;
97 u32 rid;
98 };
99
100 static int get_rid_cb(struct pci_dev *pdev, u16 alias, void *data)
101 {
102 struct rid_data *rd = data;
103 u8 bus = PCI_BUS_NUM(rd->rid);
104
105 if (pdev->bus->number != bus || PCI_BUS_NUM(alias) != bus) {
106 rd->bridge = pdev;
107 rd->rid = alias;
108 }
109
110 return 0;
111 }
112
113 static union hv_device_id hv_build_pci_dev_id(struct pci_dev *dev)
114 {
115 union hv_device_id dev_id;
116 struct rid_data data = {
117 .bridge = NULL,
118 .rid = PCI_DEVID(dev->bus->number, dev->devfn)
119 };
120
121 pci_for_each_dma_alias(dev, get_rid_cb, &data);
122
123 dev_id.as_uint64 = 0;
> 124 dev_id.device_type = HV_DEVICE_TYPE_PCI;
125 dev_id.pci.segment = pci_domain_nr(dev->bus);
126
127 dev_id.pci.bdf.bus = PCI_BUS_NUM(data.rid);
128 dev_id.pci.bdf.device = PCI_SLOT(data.rid);
129 dev_id.pci.bdf.function = PCI_FUNC(data.rid);
130 dev_id.pci.source_shadow = HV_SOURCE_SHADOW_NONE;
131
132 if (data.bridge) {
133 int pos;
134
135 /*
136 * Microsoft Hypervisor requires a bus range when the bridge is
137 * running in PCI-X mode.
138 *
139 * To distinguish conventional vs PCI-X bridge, we can check
140 * the bridge's PCI-X Secondary Status Register, Secondary Bus
141 * Mode and Frequency bits. See PCI Express to PCI/PCI-X Bridge
142 * Specification Revision 1.0 5.2.2.1.3.
143 *
144 * Value zero means it is in conventional mode, otherwise it is
145 * in PCI-X mode.
146 */
147
148 pos = pci_find_capability(data.bridge, PCI_CAP_ID_PCIX);
149 if (pos) {
150 u16 status;
151
152 pci_read_config_word(data.bridge, pos +
153 PCI_X_BRIDGE_SSTATUS, &status);
154
155 if (status & PCI_X_SSTATUS_FREQ) {
156 /* Non-zero, PCI-X mode */
157 u8 sec_bus, sub_bus;
158
159 dev_id.pci.source_shadow = HV_SOURCE_SHADOW_BRIDGE_BUS_RANGE;
160
161 pci_read_config_byte(data.bridge, PCI_SECONDARY_BUS, &sec_bus);
162 dev_id.pci.shadow_bus_range.secondary_bus = sec_bus;
163 pci_read_config_byte(data.bridge, PCI_SUBORDINATE_BUS, &sub_bus);
164 dev_id.pci.shadow_bus_range.subordinate_bus = sub_bus;
165 }
166 }
167 }
168
169 return dev_id;
170 }
171
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[android-goldfish:android-3.18 17430/19089] sound/pci/hda/hda_intel.c:2008:8: error: 'power_save' undeclared
by kernel test robot
tree: https://android.googlesource.com/kernel/goldfish android-3.18
head: 839523fca2efc7b0ccdc24fba1b28c4a67bc1c7d
commit: 43d4b9958d3eb75bcce2502455e5f599dda27e07 [17430/19089] ALSA: hda: Add a power_save blacklist
config: alpha-randconfig-r015-20211019 (attached as .config)
compiler: alpha-linux-gcc (GCC) 5.5.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
git remote add android-goldfish https://android.googlesource.com/kernel/goldfish
git fetch --no-tags android-goldfish android-3.18
git checkout 43d4b9958d3eb75bcce2502455e5f599dda27e07
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-5.5.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash sound/pci/hda/
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 >>):
In file included from sound/pci/hda/hda_codec.h:26:0,
from sound/pci/hda/hda_intel.c:63:
include/sound/pcm.h: In function 'snd_pcm_chmap_substream':
include/sound/pcm.h:1243:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (s->number == idx)
^
sound/pci/hda/hda_intel.c: In function 'azx_get_delay_from_lpib':
sound/pci/hda/hda_intel.c:531:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (delay >= azx_dev->period_bytes) {
^
sound/pci/hda/hda_intel.c: In function 'azx_probe_continue':
>> sound/pci/hda/hda_intel.c:2008:8: error: 'power_save' undeclared (first use in this function)
val = power_save;
^
sound/pci/hda/hda_intel.c:2008:8: note: each undeclared identifier is reported only once for each function it appears in
>> sound/pci/hda/hda_intel.c:1935:6: warning: variable 'val' set but not used [-Wunused-but-set-variable]
int val;
^
vim +/power_save +2008 sound/pci/hda/hda_intel.c
1929
1930 static int azx_probe_continue(struct azx *chip)
1931 {
1932 struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
1933 struct pci_dev *pci = chip->pci;
1934 int dev = chip->dev_index;
> 1935 int val;
1936 int err;
1937
1938 /* Request power well for Haswell HDA controller and codec */
1939 if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) {
1940 #ifdef CONFIG_SND_HDA_I915
1941 err = hda_i915_init();
1942 if (err < 0) {
1943 dev_err(chip->card->dev,
1944 "Error request power-well from i915\n");
1945 goto out_free;
1946 }
1947 err = hda_display_power(true);
1948 if (err < 0) {
1949 dev_err(chip->card->dev,
1950 "Cannot turn on display power on i915\n");
1951 goto out_free;
1952 }
1953 #endif
1954 }
1955
1956 err = azx_first_init(chip);
1957 if (err < 0)
1958 goto out_free;
1959
1960 #ifdef CONFIG_SND_HDA_INPUT_BEEP
1961 chip->beep_mode = beep_mode[dev];
1962 #endif
1963
1964 /* create codec instances */
1965 err = azx_codec_create(chip, model[dev],
1966 azx_max_codecs[chip->driver_type],
1967 power_save_addr);
1968
1969 if (err < 0)
1970 goto out_free;
1971 #ifdef CONFIG_SND_HDA_PATCH_LOADER
1972 if (chip->fw) {
1973 err = snd_hda_load_patch(chip->bus, chip->fw->size,
1974 chip->fw->data);
1975 if (err < 0)
1976 goto out_free;
1977 #ifndef CONFIG_PM
1978 release_firmware(chip->fw); /* no longer needed */
1979 chip->fw = NULL;
1980 #endif
1981 }
1982 #endif
1983 if ((probe_only[dev] & 1) == 0) {
1984 err = azx_codec_configure(chip);
1985 if (err < 0)
1986 goto out_free;
1987 }
1988
1989 /* create PCM streams */
1990 err = snd_hda_build_pcms(chip->bus);
1991 if (err < 0)
1992 goto out_free;
1993
1994 /* create mixer controls */
1995 err = azx_mixer_create(chip);
1996 if (err < 0)
1997 goto out_free;
1998
1999 err = snd_card_register(chip->card);
2000 if (err < 0)
2001 goto out_free;
2002
2003 chip->running = 1;
2004 power_down_all_codecs(chip);
2005 azx_notifier_register(chip);
2006 azx_add_card_list(chip);
2007
> 2008 val = power_save;
2009 #ifdef CONFIG_PM
2010 if (val == -1) {
2011 const struct snd_pci_quirk *q;
2012
2013 val = CONFIG_SND_HDA_POWER_SAVE_DEFAULT;
2014 q = snd_pci_quirk_lookup(chip->pci, power_save_blacklist);
2015 if (q && val) {
2016 dev_info(chip->card->dev, "device %04x:%04x is on the power_save blacklist, forcing power_save to 0\n",
2017 q->subvendor, q->subdevice);
2018 val = 0;
2019 }
2020 }
2021 #endif /* CONFIG_PM */
2022 if ((chip->driver_caps & AZX_DCAPS_PM_RUNTIME) || hda->use_vga_switcheroo)
2023 pm_runtime_put_noidle(&pci->dev);
2024
2025 out_free:
2026 if (err < 0)
2027 hda->init_failed = 1;
2028 complete_all(&hda->probe_wait);
2029 return err;
2030 }
2031
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[hverkuil-media-tree:zoran 37/59] arc-elf-ld: max96712.c:undefined reference to `v4l2_async_unregister_subdev'
by kernel test robot
tree: git://linuxtv.org/hverkuil/media_tree.git zoran
head: 7ce0d221dbb77d82ce789984dcee1fcc27d8f8f0
commit: 118658ed37664dddbc8c0cd8006edc160528b6f7 [37/59] media: staging: max96712: Add basic support for MAX96712 GMSL2 deserializer
config: arc-randconfig-r004-20211104 (attached as .config)
compiler: arc-elf-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
git remote add hverkuil-media-tree git://linuxtv.org/hverkuil/media_tree.git
git fetch --no-tags hverkuil-media-tree zoran
git checkout 118658ed37664dddbc8c0cd8006edc160528b6f7
# 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=arc 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 >>):
`.exit.text' referenced in section `__jump_table' of drivers/media/common/siano/smscoreapi.o: defined in discarded section `.exit.text' of drivers/media/common/siano/smscoreapi.o
`.exit.text' referenced in section `__jump_table' of drivers/media/common/siano/smscoreapi.o: defined in discarded section `.exit.text' of drivers/media/common/siano/smscoreapi.o
arc-elf-ld: drivers/staging/media/max96712/max96712.o: in function `max96712_remove':
max96712.c:(.text+0x24): undefined reference to `v4l2_async_unregister_subdev'
>> arc-elf-ld: max96712.c:(.text+0x24): undefined reference to `v4l2_async_unregister_subdev'
arc-elf-ld: drivers/staging/media/max96712/max96712.o: in function `max96712_probe':
max96712.c:(.text+0x1a0): undefined reference to `v4l2_fwnode_endpoint_parse'
>> arc-elf-ld: max96712.c:(.text+0x1a0): undefined reference to `v4l2_fwnode_endpoint_parse'
>> arc-elf-ld: max96712.c:(.text+0x2b4): undefined reference to `v4l2_ctrl_handler_init_class'
>> arc-elf-ld: max96712.c:(.text+0x2b4): undefined reference to `v4l2_ctrl_handler_init_class'
>> arc-elf-ld: max96712.c:(.text+0x2ea): undefined reference to `v4l2_ctrl_new_std'
>> arc-elf-ld: max96712.c:(.text+0x2ea): undefined reference to `v4l2_ctrl_new_std'
>> arc-elf-ld: max96712.c:(.text+0x308): undefined reference to `v4l2_ctrl_new_std_menu_items'
>> arc-elf-ld: max96712.c:(.text+0x308): undefined reference to `v4l2_ctrl_new_std_menu_items'
>> arc-elf-ld: max96712.c:(.text+0x338): undefined reference to `v4l2_async_register_subdev'
>> arc-elf-ld: max96712.c:(.text+0x338): undefined reference to `v4l2_async_register_subdev'
>> arc-elf-ld: max96712.c:(.text+0x356): undefined reference to `v4l2_ctrl_handler_free'
>> arc-elf-ld: max96712.c:(.text+0x356): undefined reference to `v4l2_ctrl_handler_free'
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for VIDEO_V4L2_SUBDEV_API
Depends on MEDIA_SUPPORT && VIDEO_DEV && MEDIA_CONTROLLER
Selected by
- VIDEO_MAX96712 && STAGING && STAGING_MEDIA && MEDIA_SUPPORT && I2C && OF_GPIO
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/bluetooth/btqca.c:493:24: sparse: sparse: restricted __le32 degrades to integer
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 66f4beaa6c1d28161f534471484b2daa2de1dce0
commit: 059924fdf6c1c31a7c1aa1915884e23f4313dde2 Bluetooth: btqca: Use NVM files based on SoC ID for WCN3991
date: 11 months ago
config: riscv-randconfig-s031-20211109 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# 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 059924fdf6c1c31a7c1aa1915884e23f4313dde2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash block/ drivers/bluetooth/ drivers/hid/ drivers/hwmon/ drivers/i2c/busses/ drivers/message/fusion/ drivers/net/ethernet/ drivers/net/wireless/intel/iwlwifi/ drivers/pci/ drivers/remoteproc/ drivers/rtc/ drivers/staging/rts5208/ drivers/staging/vc04_services/ drivers/tty/serial/ drivers/vdpa/ drivers/video/fbdev/ net/qrtr/ net/sched/
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/bluetooth/btqca.c:493:24: sparse: sparse: restricted __le32 degrades to integer
vim +493 drivers/bluetooth/btqca.c
440
441 int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
442 enum qca_btsoc_type soc_type, struct qca_btsoc_version ver,
443 const char *firmware_name)
444 {
445 struct qca_fw_config config;
446 int err;
447 u8 rom_ver = 0;
448 u32 soc_ver;
449
450 bt_dev_dbg(hdev, "QCA setup on UART");
451
452 soc_ver = get_soc_ver(ver.soc_id, ver.rom_ver);
453
454 bt_dev_info(hdev, "QCA controller version 0x%08x", soc_ver);
455
456 config.user_baud_rate = baudrate;
457
458 /* Download rampatch file */
459 config.type = TLV_TYPE_PATCH;
460 if (qca_is_wcn399x(soc_type)) {
461 /* Firmware files to download are based on ROM version.
462 * ROM version is derived from last two bytes of soc_ver.
463 */
464 rom_ver = ((soc_ver & 0x00000f00) >> 0x04) |
465 (soc_ver & 0x0000000f);
466 snprintf(config.fwname, sizeof(config.fwname),
467 "qca/crbtfw%02x.tlv", rom_ver);
468 } else if (soc_type == QCA_QCA6390) {
469 rom_ver = ((soc_ver & 0x00000f00) >> 0x04) |
470 (soc_ver & 0x0000000f);
471 snprintf(config.fwname, sizeof(config.fwname),
472 "qca/htbtfw%02x.tlv", rom_ver);
473 } else {
474 snprintf(config.fwname, sizeof(config.fwname),
475 "qca/rampatch_%08x.bin", soc_ver);
476 }
477
478 err = qca_download_firmware(hdev, &config, soc_type);
479 if (err < 0) {
480 bt_dev_err(hdev, "QCA Failed to download patch (%d)", err);
481 return err;
482 }
483
484 /* Give the controller some time to get ready to receive the NVM */
485 msleep(10);
486
487 /* Download NVM configuration */
488 config.type = TLV_TYPE_NVM;
489 if (firmware_name)
490 snprintf(config.fwname, sizeof(config.fwname),
491 "qca/%s", firmware_name);
492 else if (qca_is_wcn399x(soc_type)) {
> 493 if (ver.soc_id == QCA_WCN3991_SOC_ID) {
494 snprintf(config.fwname, sizeof(config.fwname),
495 "qca/crnv%02xu.bin", rom_ver);
496 } else {
497 snprintf(config.fwname, sizeof(config.fwname),
498 "qca/crnv%02x.bin", rom_ver);
499 }
500 }
501 else if (soc_type == QCA_QCA6390)
502 snprintf(config.fwname, sizeof(config.fwname),
503 "qca/htnv%02x.bin", rom_ver);
504 else
505 snprintf(config.fwname, sizeof(config.fwname),
506 "qca/nvm_%08x.bin", soc_ver);
507
508 err = qca_download_firmware(hdev, &config, soc_type);
509 if (err < 0) {
510 bt_dev_err(hdev, "QCA Failed to download NVM (%d)", err);
511 return err;
512 }
513
514 if (soc_type >= QCA_WCN3991) {
515 err = qca_disable_soc_logging(hdev);
516 if (err < 0)
517 return err;
518 }
519
520 /* Perform HCI reset */
521 err = qca_send_reset(hdev);
522 if (err < 0) {
523 bt_dev_err(hdev, "QCA Failed to run HCI_RESET (%d)", err);
524 return err;
525 }
526
527 bt_dev_info(hdev, "QCA setup on UART is completed");
528
529 return 0;
530 }
531 EXPORT_SYMBOL_GPL(qca_uart_setup);
532
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[android-common:android-4.14-stable 16583/25399] kernel/bpf/core.c:1500:31: sparse: sparse: incorrect type in return expression (different address spaces)
by kernel test robot
tree: https://android.googlesource.com/kernel/common android-4.14-stable
head: 608fa6223455f800d8752a8a8ca18c05a9a14057
commit: 9e61c87b1f47b4dc3d48de83d85e9f17c320f91e [16583/25399] UPSTREAM: bpf: multi program support for cgroup+bpf
config: i386-randconfig-s001-20211019 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-4.14-stable
git checkout 9e61c87b1f47b4dc3d48de83d85e9f17c320f91e
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
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 >>)
kernel/bpf/core.c:1095:43: sparse: sparse: arithmetics on pointers to functions
>> kernel/bpf/core.c:1500:31: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected struct bpf_prog_array [noderef] <asn:4> * @@ got void * @@
kernel/bpf/core.c:1500:31: sparse: expected struct bpf_prog_array [noderef] <asn:4> *
kernel/bpf/core.c:1500:31: sparse: got void *
>> kernel/bpf/core.c:1504:17: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected struct bpf_prog_array [noderef] <asn:4> * @@ got struct bpf_prog_array * @@
kernel/bpf/core.c:1504:17: sparse: expected struct bpf_prog_array [noderef] <asn:4> *
kernel/bpf/core.c:1504:17: sparse: got struct bpf_prog_array *
kernel/bpf/core.c:1512:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct callback_head *head @@ got struct callback_head [noderef] <asn:4> * @@
kernel/bpf/core.c:1512:9: sparse: expected struct callback_head *head
kernel/bpf/core.c:1512:9: sparse: got struct callback_head [noderef] <asn:4> *
vim +1500 kernel/bpf/core.c
1496
1497 struct bpf_prog_array __rcu *bpf_prog_array_alloc(u32 prog_cnt, gfp_t flags)
1498 {
1499 if (prog_cnt)
> 1500 return kzalloc(sizeof(struct bpf_prog_array) +
1501 sizeof(struct bpf_prog *) * (prog_cnt + 1),
1502 flags);
1503
> 1504 return &empty_prog_array.hdr;
1505 }
1506
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[android-common:android12-5.10 12636/13765] kernel/sched/pelt.c:35:5: warning: no previous prototype for 'get_pelt_halflife'
by kernel test robot
tree: https://android.googlesource.com/kernel/common android12-5.10
head: fa9c9074531e448cf3647d6984b3122619c1834a
commit: 1efc36b815769cb8c7dae1d53373b190c017f5d1 [12636/13765] ANDROID: sched: add a helper function to change PELT half-life
config: i386-buildonly-randconfig-r002-20211014 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout 1efc36b815769cb8c7dae1d53373b190c017f5d1
# 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 >>):
>> kernel/sched/pelt.c:35:5: warning: no previous prototype for 'get_pelt_halflife' [-Wmissing-prototypes]
35 | int get_pelt_halflife(void)
| ^~~~~~~~~~~~~~~~~
>> kernel/sched/pelt.c:68:5: warning: no previous prototype for 'set_pelt_halflife' [-Wmissing-prototypes]
68 | int set_pelt_halflife(int num)
| ^~~~~~~~~~~~~~~~~
vim +/get_pelt_halflife +35 kernel/sched/pelt.c
34
> 35 int get_pelt_halflife(void)
36 {
37 return pelt_load_avg_period;
38 }
39 EXPORT_SYMBOL_GPL(get_pelt_halflife);
40
41 static int __set_pelt_halflife(void *data)
42 {
43 int rc = 0;
44 int num = *(int *)data;
45
46 switch (num) {
47 case PELT8_LOAD_AVG_PERIOD:
48 pelt_load_avg_period = PELT8_LOAD_AVG_PERIOD;
49 pelt_load_avg_max = PELT8_LOAD_AVG_MAX;
50 pelt_runnable_avg_yN_inv = pelt8_runnable_avg_yN_inv;
51 pr_info("PELT half life is set to %dms\n", num);
52 break;
53 case PELT32_LOAD_AVG_PERIOD:
54 pelt_load_avg_period = PELT32_LOAD_AVG_PERIOD;
55 pelt_load_avg_max = PELT32_LOAD_AVG_MAX;
56 pelt_runnable_avg_yN_inv = pelt32_runnable_avg_yN_inv;
57 pr_info("PELT half life is set to %dms\n", num);
58 break;
59 default:
60 rc = -EINVAL;
61 pr_err("Failed to set PELT half life to %dms, the current value is %dms\n",
62 num, pelt_load_avg_period);
63 }
64
65 return rc;
66 }
67
> 68 int set_pelt_halflife(int num)
69 {
70 return stop_machine(__set_pelt_halflife, &num, NULL);
71 }
72 EXPORT_SYMBOL_GPL(set_pelt_halflife);
73
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[freescale-fslc:pr/490 8447/15241] drivers/net/imx-shmem-net.c:1175:9: error: implicit declaration of function 'imx_scu_irq_unregister_notifier'; did you mean 'netlink_unregister_notifier'?
by kernel test robot
tree: https://github.com/Freescale/linux-fslc pr/490
head: e1744bcfc0ba973d84a580a510206e682c10cfcb
commit: 1730a5e196055cef89fe50dd63852ebc32cce135 [8447/15241] MLK-25346: net: add imx-shmem-net driver
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-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/Freescale/linux-fslc/commit/1730a5e196055cef89fe50dd63...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/490
git checkout 1730a5e196055cef89fe50dd63852ebc32cce135
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=sparc
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/net/imx-shmem-net.c: In function 'mu_enable_reset_irq':
drivers/net/imx-shmem-net.c:993:13: warning: unused variable 'sciErr' [-Wunused-variable]
993 | int sciErr;
| ^~~~~~
drivers/net/imx-shmem-net.c: In function 'imx_shm_net_probe':
>> drivers/net/imx-shmem-net.c:1175:9: error: implicit declaration of function 'imx_scu_irq_unregister_notifier'; did you mean 'netlink_unregister_notifier'? [-Werror=implicit-function-declaration]
1175 | imx_scu_irq_unregister_notifier(&in->pnotifier);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| netlink_unregister_notifier
At top level:
drivers/net/imx-shmem-net.c:887:12: warning: 'imx_shm_partition_notify' defined but not used [-Wunused-function]
887 | static int imx_shm_partition_notify(struct notifier_block *nb,
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +1175 drivers/net/imx-shmem-net.c
989
990 /* enable reset notification MU */
991 static int mu_enable_reset_irq(struct net_device *ndev)
992 {
> 993 int sciErr;
994 struct imx_shm_net *isndev;
995 struct device_node *np;
996
997 isndev = netdev_priv(ndev);
998 np = isndev->pdev->dev.of_node;
999
1000 /* Get muB partition id and enable irq in SCFW then */
1001 if (of_property_read_u32(np, "mub-partition",
1002 &isndev->mub_partition))
1003 isndev->mub_partition = IMX_SHM_NET_DEFAULT_PART;
1004 dev_dbg(&isndev->pdev->dev, "watching reset from partition %d\n",
1005 isndev->mub_partition);
1006
1007 #ifdef CONFIG_IMX_SCU
1008 /* Request for the partition reset interrupt. */
1009 sciErr = imx_scu_irq_group_enable(SC_IRQ_GROUP_REBOOTED,
1010 BIT(isndev->mub_partition), true);
1011 if (sciErr)
1012 dev_warn(&isndev->pdev->dev, "Cannot request partition reset interrupt\n");
1013
1014 isndev->pnotifier.notifier_call = imx_shm_partition_notify;
1015 sciErr = imx_scu_irq_register_notifier(&isndev->pnotifier);
1016 if (sciErr) {
1017 imx_scu_irq_group_enable(SC_IRQ_GROUP_REBOOTED,
1018 BIT(isndev->mub_partition), false);
1019 dev_warn(&isndev->pdev->dev, "Failed to register partition reset notifier\n");
1020 }
1021 #endif
1022 return 0;
1023 }
1024
1025 static const struct ethtool_ops imx_shm_net_ethtool_ops = {
1026 .get_sset_count = imx_shm_net_get_sset_count,
1027 .get_strings = imx_shm_net_get_strings,
1028 .get_ethtool_stats = imx_shm_net_get_ethtool_stats,
1029 .get_regs_len = imx_shm_net_get_regs_len,
1030 .get_regs = imx_shm_net_get_regs,
1031 };
1032
1033 static int imx_shm_net_probe(struct platform_device *pdev)
1034 {
1035 struct net_device *ndev = NULL;
1036 struct imx_shm_net *in;
1037 resource_size_t shmaddr;
1038 resource_size_t shmlen;
1039 char *device_name;
1040 void *shm = NULL;
1041 u32 ivpos;
1042 int ret;
1043
1044 /* check if 1st probe or another attempt after EAGAIN */
1045 if (pdev->dev.driver_data) {
1046 dev_dbg(&pdev->dev, "Retrying connection...\n");
1047 in = netdev_priv(platform_get_drvdata(pdev));
1048 goto retry;
1049 }
1050
1051 if (of_property_read_bool(pdev->dev.of_node, "rxfirst")) {
1052 ivpos = 1;
1053 dev_info(&pdev->dev, "queue position is RX first\n");
1054 } else {
1055 ivpos = 0;
1056 dev_info(&pdev->dev, "queue position is TX first\n");
1057 }
1058
1059 /* get shared coherent memory for buffers */
1060 if (of_reserved_mem_device_init(&pdev->dev)) {
1061 dev_err(&pdev->dev,
1062 "dev doesn't have specific DMA pool.\n");
1063 return -ENOMEM;
1064 }
1065 shmlen = IMX_SHM_NET_DMA_SIZE;
1066 shm = dma_alloc_coherent(&pdev->dev, IMX_SHM_NET_DMA_SIZE,
1067 &shmaddr, GFP_KERNEL);
1068 if (!shm || !shmaddr)
1069 return -ENOMEM;
1070
1071 dev_info(&pdev->dev, "allocated %d bytes in coherent mem @ 0x%x\n",
1072 (uint)shmlen, (uint)shmaddr);
1073
1074 device_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s[%s]", DRV_NAME,
1075 dev_name(&pdev->dev));
1076 if (!device_name) {
1077 ret = -ENOMEM;
1078 goto err_free_dma;
1079 }
1080
1081 ndev = alloc_etherdev(sizeof(*in));
1082 if (!ndev) {
1083 ret = -ENOMEM;
1084 goto err_free_dma;
1085 }
1086 dev_info(&pdev->dev, "allocated ethernet device %s\n", ndev->name);
1087
1088 platform_set_drvdata(pdev, ndev);
1089 SET_NETDEV_DEV(ndev, &pdev->dev);
1090
1091 /* get struct 'imx_shm_net' stored as private data in ndev */
1092 in = netdev_priv(ndev);
1093
1094 list_add(&in->isn_node, &imx_shm_net_head);
1095
1096 in->shm = shm;
1097 in->shmaddr = shmaddr;
1098 in->shmlen = shmlen;
1099 in->pdev = pdev;
1100 in->regs.ivpos = ivpos;
1101 in->regs.rstate = IMX_SHM_NET_STATE_RESET;
1102 in->remote_message = IMX_SHM_NET_STATE_RESET;
1103 spin_lock_init(&in->tx_free_lock);
1104 spin_lock_init(&in->tx_clean_lock);
1105 mutex_init(&in->state_lock);
1106
1107 /* enable peer's reset notification */
1108 ret = mu_enable_reset_irq(ndev);
1109 if (ret)
1110 goto err_free;
1111
1112 ret = imx_shm_net_calc_qsize(ndev);
1113 if (ret)
1114 goto err_reset_irq;
1115
1116 in->state_wq = alloc_ordered_workqueue(device_name, 0);
1117 if (!in->state_wq) {
1118 ret = -ENOMEM;
1119 goto err_reset_irq;
1120 }
1121
1122 INIT_WORK(&in->state_work, imx_shm_net_state_change);
1123
1124 eth_random_addr(ndev->dev_addr);
1125 ndev->netdev_ops = &imx_shm_net_ops;
1126 ndev->ethtool_ops = &imx_shm_net_ethtool_ops;
1127 ndev->mtu = min_t(u32, IMX_SHM_NET_MTU_DEF, in->qsize / 16);
1128 ndev->hw_features = NETIF_F_HW_CSUM | NETIF_F_SG;
1129 ndev->features = ndev->hw_features;
1130
1131 netif_carrier_off(ndev);
1132 netif_napi_add(ndev, &in->napi, imx_shm_net_poll, NAPI_POLL_WEIGHT);
1133
1134 ret = register_netdev(ndev);
1135 if (ret)
1136 goto err_wq;
1137
1138 /* initialize Mailbox for RX/TX */
1139 ret = imx_shm_xtr_channel_init(in);
1140 if (ret) {
1141 dev_err(&in->pdev->dev, "unable to initialize Mailbox.\n");
1142 /* MU may not be ready yet, need to try later on */
1143 ret = -EPROBE_DEFER;
1144 goto err_unregister;
1145 }
1146 dev_info(&in->pdev->dev,
1147 "Mailbox is ready for cross core communication!\n");
1148
1149 retry:
1150 /* notify reset */
1151 mutex_lock(&in->state_lock);
1152 in->regs.lstate = IMX_SHM_NET_STATE_RESET;
1153 in->message_state = MESS_STATE_NEW;
1154 mutex_unlock(&in->state_lock);
1155
1156 /* only device with queue position TXfirst sends the first message */
1157 if (!ivpos) {
1158 ret = mbox_send_message(in->tx_ch, &in->regs.lstate);
1159 if (ret < 0)
1160 dev_err(&pdev->dev, "%s first message error=%d!\n",
1161 __func__, ret);
1162
1163 dev_dbg(&pdev->dev, "%s sent first message\n", __func__);
1164 }
1165
1166 return 0;
1167
1168 err_unregister:
1169 unregister_netdev(ndev);
1170
1171 err_wq:
1172 destroy_workqueue(in->state_wq);
1173
1174 err_reset_irq:
> 1175 imx_scu_irq_unregister_notifier(&in->pnotifier);
1176
1177 err_free:
1178 list_del(&in->isn_node);
1179 free_netdev(ndev);
1180
1181 err_free_dma:
1182 dma_free_coherent(&pdev->dev, shmlen, shm, shmaddr);
1183
1184 return ret;
1185 }
1186
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[zen:5.15/prjc 93/237] kernel/sched/alt_core.c:5867:5: error: no previous prototype for 'sched_cpu_wait_empty'
by kernel test robot
Hi Alfred,
FYI, the error/warning still remains.
tree: https://github.com/zen-kernel/zen-kernel 5.15/prjc
head: 09b9774798f91c4747ee3266e910eb8aebf2118c
commit: b0e39e1ae101c8d2492c21132d91e1103ca585dd [93/237] sched/alt: Sync up missing new interfaces.
config: x86_64-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/zen-kernel/zen-kernel/commit/b0e39e1ae101c8d2492c21132...
git remote add zen https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen 5.15/prjc
git checkout b0e39e1ae101c8d2492c21132d91e1103ca585dd
# save the attached .config to linux build tree
make 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 errors (new ones prefixed by >>):
| __state
kernel/sched/alt_core.c: In function '__schedule':
kernel/sched/alt_core.c:3726:21: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
3726 | prev_state = prev->state;
| ^~~~~
| __state
kernel/sched/alt_core.c:3727:52: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
3727 | if (!preempt && prev_state && prev_state == prev->state) {
| ^~~~~
| __state
kernel/sched/alt_core.c:3729:10: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
3729 | prev->state = TASK_RUNNING;
| ^~~~~
| __state
kernel/sched/alt_core.c: In function 'sched_submit_work':
kernel/sched/alt_core.c:3828:12: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
3828 | if (!tsk->state)
| ^~~~~
| __state
In file included from arch/x86/include/asm/bug.h:84,
from include/linux/bug.h:5,
from arch/x86/include/asm/paravirt.h:15,
from arch/x86/include/asm/irqflags.h:63,
from include/linux/irqflags.h:16,
from include/linux/rcupdate.h:26,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/kthread.h:6,
from include/trace/events/sched.h:8,
from kernel/sched/alt_core.c:15:
kernel/sched/alt_core.c: In function 'schedule_idle':
kernel/sched/alt_core.c:3903:24: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
3903 | WARN_ON_ONCE(current->state);
| ^~~~~
include/asm-generic/bug.h:104:25: note: in definition of macro 'WARN_ON_ONCE'
104 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
kernel/sched/alt_core.c: In function '__sched_setscheduler':
kernel/sched/alt_core.c:4425:39: error: 'MAX_USER_RT_PRIO' undeclared (first use in this function); did you mean 'MAX_RT_PRIO'?
4425 | (p->mm && attr->sched_priority > MAX_USER_RT_PRIO - 1) ||
| ^~~~~~~~~~~~~~~~
| MAX_RT_PRIO
kernel/sched/alt_core.c: At top level:
kernel/sched/alt_core.c:5183:13: error: redefinition of '_cond_resched'
5183 | int __sched _cond_resched(void)
| ^~~~~~~~~~~~~
In file included from include/linux/kthread.h:6,
from include/trace/events/sched.h:8,
from kernel/sched/alt_core.c:15:
include/linux/sched.h:2065:19: note: previous definition of '_cond_resched' was here
2065 | static inline int _cond_resched(void)
| ^~~~~~~~~~~~~
kernel/sched/alt_core.c: In function '__do_sys_sched_get_priority_max':
kernel/sched/alt_core.c:5336:9: error: 'MAX_USER_RT_PRIO' undeclared (first use in this function); did you mean 'MAX_RT_PRIO'?
5336 | ret = MAX_USER_RT_PRIO-1;
| ^~~~~~~~~~~~~~~~
| MAX_RT_PRIO
kernel/sched/alt_core.c: In function 'sched_show_task':
kernel/sched/alt_core.c:5446:9: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
5446 | if (p->state == TASK_RUNNING)
| ^~~~~
| __state
kernel/sched/alt_core.c: In function 'state_filter_match':
kernel/sched/alt_core.c:5475:11: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
5475 | if (!(p->state & state_filter))
| ^~~~~
| __state
kernel/sched/alt_core.c:5482:49: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
5482 | if (state_filter == TASK_UNINTERRUPTIBLE && p->state == TASK_IDLE)
| ^~~~~
| __state
kernel/sched/alt_core.c: At top level:
kernel/sched/alt_core.c:5489:6: error: conflicting types for 'show_state_filter'
5489 | void show_state_filter(unsigned long state_filter)
| ^~~~~~~~~~~~~~~~~
In file included from kernel/sched/alt_sched.h:9,
from kernel/sched/sched.h:6,
from kernel/sched/alt_core.c:18:
include/linux/sched/debug.h:17:13: note: previous declaration of 'show_state_filter' was here
17 | extern void show_state_filter(unsigned int state_filter);
| ^~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c: In function 'init_idle':
kernel/sched/alt_core.c:5548:8: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
5548 | idle->state = TASK_RUNNING;
| ^~~~~
| __state
kernel/sched/alt_core.c: At top level:
kernel/sched/alt_core.c:5622:6: error: no previous prototype for 'idle_task_exit' [-Werror=missing-prototypes]
5622 | void idle_task_exit(void)
| ^~~~~~~~~~~~~~
kernel/sched/alt_core.c:5771:5: error: no previous prototype for 'sched_cpu_activate' [-Werror=missing-prototypes]
5771 | int sched_cpu_activate(unsigned int cpu)
| ^~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:5804:5: error: no previous prototype for 'sched_cpu_deactivate' [-Werror=missing-prototypes]
5804 | int sched_cpu_deactivate(unsigned int cpu)
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:5847:5: error: no previous prototype for 'sched_cpu_starting' [-Werror=missing-prototypes]
5847 | int sched_cpu_starting(unsigned int cpu)
| ^~~~~~~~~~~~~~~~~~
>> kernel/sched/alt_core.c:5867:5: error: no previous prototype for 'sched_cpu_wait_empty' [-Werror=missing-prototypes]
5867 | int sched_cpu_wait_empty(unsigned int cpu)
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:5872:5: error: no previous prototype for 'sched_cpu_dying' [-Werror=missing-prototypes]
5872 | int sched_cpu_dying(unsigned int cpu)
| ^~~~~~~~~~~~~~~
In file included from include/linux/printk.h:11,
from include/linux/kernel.h:19,
from arch/x86/include/asm/percpu.h:27,
from arch/x86/include/asm/current.h:6,
from include/linux/sched.h:12,
from include/linux/kthread.h:6,
from include/trace/events/sched.h:8,
from kernel/sched/alt_core.c:15:
kernel/sched/alt_core.c: In function '__might_sleep':
kernel/sched/alt_core.c:6101:21: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
6101 | WARN_ONCE(current->state != TASK_RUNNING && current->task_state_change,
| ^~~~~
include/linux/once_lite.h:15:27: note: in definition of macro 'DO_ONCE_LITE_IF'
15 | bool __ret_do_once = !!(condition); \
| ^~~~~~~~~
kernel/sched/alt_core.c:6101:2: note: in expansion of macro 'WARN_ONCE'
6101 | WARN_ONCE(current->state != TASK_RUNNING && current->task_state_change,
| ^~~~~~~~~
In file included from arch/x86/include/asm/bug.h:84,
from include/linux/bug.h:5,
from arch/x86/include/asm/paravirt.h:15,
from arch/x86/include/asm/irqflags.h:63,
from include/linux/irqflags.h:16,
from include/linux/rcupdate.h:26,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/kthread.h:6,
from include/trace/events/sched.h:8,
from kernel/sched/alt_core.c:15:
kernel/sched/alt_core.c:6104:13: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
6104 | current->state,
| ^~~~~
include/asm-generic/bug.h:99:17: note: in definition of macro '__WARN_printf'
99 | __warn_printk(arg); \
| ^~~
include/linux/once_lite.h:19:4: note: in expansion of macro 'WARN'
19 | func(__VA_ARGS__); \
| ^~~~
include/asm-generic/bug.h:150:2: note: in expansion of macro 'DO_ONCE_LITE_IF'
150 | DO_ONCE_LITE_IF(condition, WARN, 1, format)
| ^~~~~~~~~~~~~~~
kernel/sched/alt_core.c:6101:2: note: in expansion of macro 'WARN_ONCE'
6101 | WARN_ONCE(current->state != TASK_RUNNING && current->task_state_change,
| ^~~~~~~~~
kernel/sched/alt_core.c: In function '___might_sleep':
kernel/sched/alt_core.c:6117:16: error: variable 'preempt_disable_ip' set but not used [-Werror=unused-but-set-variable]
6117 | unsigned long preempt_disable_ip;
| ^~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c: At top level:
kernel/sched/alt_core.c:6283:20: error: no previous prototype for 'sched_create_group' [-Werror=missing-prototypes]
6283 | struct task_group *sched_create_group(struct task_group *parent)
| ^~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:6294:6: error: no previous prototype for 'sched_online_group' [-Werror=missing-prototypes]
6294 | void sched_online_group(struct task_group *tg, struct task_group *parent)
| ^~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:6305:6: error: no previous prototype for 'sched_destroy_group' [-Werror=missing-prototypes]
6305 | void sched_destroy_group(struct task_group *tg)
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:6311:6: error: no previous prototype for 'sched_offline_group' [-Werror=missing-prototypes]
6311 | void sched_offline_group(struct task_group *tg)
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:6403:20: error: initialized field overwritten [-Werror=override-init]
6403 | .legacy_cftypes = cpu_legacy_files,
| ^~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:6403:20: note: (near initialization for 'cpu_cgrp_subsys.legacy_cftypes')
In file included from kernel/sched/alt_core.c:134:
kernel/sched/pds_imp.h: In function 'normal_prio':
kernel/sched/pds_imp.h:42:1: error: control reaches end of non-void function [-Werror=return-type]
42 | }
| ^
cc1: all warnings being treated as errors
vim +/sched_cpu_wait_empty +5867 kernel/sched/alt_core.c
5855
5856 /*
5857 * Invoked immediately before the stopper thread is invoked to bring the
5858 * CPU down completely. At this point all per CPU kthreads except the
5859 * hotplug thread (current) and the stopper thread (inactive) have been
5860 * either parked or have been unbound from the outgoing CPU. Ensure that
5861 * any of those which might be on the way out are gone.
5862 *
5863 * If after this point a bound task is being woken on this CPU then the
5864 * responsible hotplug callback has failed to do it's job.
5865 * sched_cpu_dying() will catch it with the appropriate fireworks.
5866 */
> 5867 int sched_cpu_wait_empty(unsigned int cpu)
5868 {
5869 return 0;
5870 }
5871
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
vmlinux.o: warning: objtool: kvm_spurious_fault()+0x22: call to ftrace_likely_update() leaves .noinstr.text section
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 66f4beaa6c1d28161f534471484b2daa2de1dce0
commit: 63b3f96e1a989846a5a521d4fbef4bc86406929d kvm: Select SCHED_INFO instead of TASK_DELAY_ACCT
date: 6 months ago
config: x86_64-buildonly-randconfig-r002-20211009 (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/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 63b3f96e1a989846a5a521d4fbef4bc86406929d
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
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 >>):
vmlinux.o: warning: objtool: __do_fast_syscall_32()+0xf2: call to trace_hardirqs_off() leaves .noinstr.text section
>> vmlinux.o: warning: objtool: kvm_spurious_fault()+0x22: call to ftrace_likely_update() leaves .noinstr.text section
>> vmlinux.o: warning: objtool: vmx_update_host_rsp()+0x34: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: __svm_vcpu_run()+0xb4: BP used as a scratch register
vmlinux.o: warning: objtool: __svm_sev_es_vcpu_run()+0x1c: BP used as a scratch register
vmlinux.o: warning: objtool: __wrgsbase_inactive()+0x38: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: __rdgsbase_inactive()+0x35: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: fixup_bad_iret()+0x7a: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: noist_exc_debug()+0x38: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: exc_nmi()+0xbb: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: poke_int3_handler()+0x45: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: mce_check_crashing_cpu()+0x19: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: do_machine_check()+0xc41: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: exc_machine_check()+0x63: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: irqentry_nmi_enter()+0x4c: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: irqentry_nmi_exit()+0x38: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: enter_from_user_mode()+0x3d: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: syscall_enter_from_user_mode()+0x46: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: syscall_enter_from_user_mode_prepare()+0x3d: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: irqentry_enter_from_user_mode()+0x3d: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: irqentry_exit()+0x2d: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: context_tracking_recursion_enter()+0x40: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: __context_tracking_enter()+0x2f: call to ftrace_likely_update() leaves .noinstr.text section
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week