ld.lld: error: main.c:(.text+0x2BC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
by kernel test robot
CC: linux-kernel(a)vger.kernel.org
TO: Alexey Kardashevskiy <aik(a)ozlabs.ru>
CC: "Steven Rostedt (VMware)" <rostedt(a)goodmis.org>
Hi Alexey,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 89698becf06d341a700913c3d89ce2a914af69a2
commit: c8b186a8d54d7e12d28e9f9686cb00ff18fc2ab2 tracepoint: Fix race between tracing and removing tracepoint
date: 10 weeks ago
config: riscv-randconfig-r006-20210412 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# 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 c8b186a8d54d7e12d28e9f9686cb00ff18fc2ab2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
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 >>):
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0xE4): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x1C8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>> ld.lld: error: main.c:(.text+0x2BC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x550): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x758): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x970): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x151C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x15BC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x16B0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x17A0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x1894): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x191C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x1990): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x1A5C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x1B44): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x1CC4): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x1DB8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.init.text+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: Subject: [PATCH] staging: media: meson: vdec: declare u32 as static const
by kernel test robot
Hi Mitali,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Mitali-Borkar/Subject-PATCH-stag...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git f2f560e1bdc055a6a306e6b7823ba589794e6564
config: mips-randconfig-r013-20210412 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/0day-ci/linux/commit/c9873622761b42d977b48804bb0b4b9a7...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mitali-Borkar/Subject-PATCH-staging-media-meson-vdec-declare-u32-as-static-const/20210412-222025
git checkout c9873622761b42d977b48804bb0b4b9a7fbcd6b3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
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/staging/media/meson/vdec/codec_h264.c:290:28: error: brackets are not allowed here; to declare an array, place the brackets after the identifier
static const u32[] canvas3 = { ANCO_CANVAS_ADDR, 0 };
~~ ^
[]
>> drivers/staging/media/meson/vdec/codec_h264.c:290:33: error: use of undeclared identifier 'ANCO_CANVAS_ADDR'
static const u32[] canvas3 = { ANCO_CANVAS_ADDR, 0 };
^
drivers/staging/media/meson/vdec/codec_h264.c:291:28: error: brackets are not allowed here; to declare an array, place the brackets after the identifier
static const u32[] canvas4 = { 24, 0 };
~~ ^
[]
>> drivers/staging/media/meson/vdec/codec_h264.c:293:28: error: passing 'const u32 []' to parameter of type 'u32 *' (aka 'unsigned int *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
amvdec_set_canvases(sess, canvas3, canvas4);
^~~~~~~
drivers/staging/media/meson/vdec/vdec_helpers.h:20:8: note: passing argument to parameter 'reg_base' here
u32 reg_base[], u32 reg_num[]);
^
drivers/staging/media/meson/vdec/codec_h264.c:293:37: error: passing 'const u32 [2]' to parameter of type 'u32 *' (aka 'unsigned int *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
amvdec_set_canvases(sess, canvas3, canvas4);
^~~~~~~
drivers/staging/media/meson/vdec/vdec_helpers.h:20:24: note: passing argument to parameter 'reg_num' here
u32 reg_base[], u32 reg_num[]);
^
5 errors generated.
vim +290 drivers/staging/media/meson/vdec/codec_h264.c
284
285 static void codec_h264_resume(struct amvdec_session *sess)
286 {
287 struct amvdec_core *core = sess->core;
288 struct codec_h264 *h264 = sess->priv;
289 u32 mb_width, mb_height, mb_total;
> 290 static const u32[] canvas3 = { ANCO_CANVAS_ADDR, 0 };
291 static const u32[] canvas4 = { 24, 0 };
292
> 293 amvdec_set_canvases(sess, canvas3, canvas4);
294
295 dev_dbg(core->dev, "max_refs = %u; actual_dpb_size = %u\n",
296 h264->max_refs, sess->num_dst_bufs);
297
298 /* Align to a multiple of 4 macroblocks */
299 mb_width = ALIGN(h264->mb_width, 4);
300 mb_height = ALIGN(h264->mb_height, 4);
301 mb_total = mb_width * mb_height;
302
303 h264->ref_size = mb_total * MB_MV_SIZE * h264->max_refs;
304 h264->ref_vaddr = dma_alloc_coherent(core->dev, h264->ref_size,
305 &h264->ref_paddr, GFP_KERNEL);
306 if (!h264->ref_vaddr) {
307 amvdec_abort(sess);
308 return;
309 }
310
311 /* Address to store the references' MVs */
312 amvdec_write_dos(core, AV_SCRATCH_1, h264->ref_paddr);
313 /* End of ref MV */
314 amvdec_write_dos(core, AV_SCRATCH_4, h264->ref_paddr + h264->ref_size);
315
316 amvdec_write_dos(core, AV_SCRATCH_0, (h264->max_refs << 24) |
317 (sess->num_dst_bufs << 16) |
318 ((h264->max_refs - 1) << 8));
319 }
320
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v2] KVM: SVM: Add support for KVM_SEV_SEND_CANCEL command
by kernel test robot
Hi Steve,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on kvm/queue]
[also build test ERROR on vhost/linux-next cryptodev/master linux/master linus/master v5.12-rc6 next-20210409]
[cannot apply to crypto/master]
[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/Steve-Rutherford/KVM-SVM-Add-sup...
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
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/0day-ci/linux/commit/16f9122ec5c3ee772f1edb80c2c252665...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Steve-Rutherford/KVM-SVM-Add-support-for-KVM_SEV_SEND_CANCEL-command/20210410-060941
git checkout 16f9122ec5c3ee772f1edb80c2c2526650b60868
# 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 >>):
drivers/crypto/ccp/sev-dev.c: In function 'sev_cmd_buffer_len':
>> drivers/crypto/ccp/sev-dev.c:132:7: error: 'SEV_SEND_CANCEL' undeclared (first use in this function); did you mean 'SEV_CMD_SEND_CANCEL'?
132 | case SEV_SEND_CANCEL: return sizeof(struct sev_data_send_cancel);
| ^~~~~~~~~~~~~~~
| SEV_CMD_SEND_CANCEL
drivers/crypto/ccp/sev-dev.c:132:7: note: each undeclared identifier is reported only once for each function it appears in
vim +132 drivers/crypto/ccp/sev-dev.c
100
101 static int sev_cmd_buffer_len(int cmd)
102 {
103 switch (cmd) {
104 case SEV_CMD_INIT: return sizeof(struct sev_data_init);
105 case SEV_CMD_PLATFORM_STATUS: return sizeof(struct sev_user_data_status);
106 case SEV_CMD_PEK_CSR: return sizeof(struct sev_data_pek_csr);
107 case SEV_CMD_PEK_CERT_IMPORT: return sizeof(struct sev_data_pek_cert_import);
108 case SEV_CMD_PDH_CERT_EXPORT: return sizeof(struct sev_data_pdh_cert_export);
109 case SEV_CMD_LAUNCH_START: return sizeof(struct sev_data_launch_start);
110 case SEV_CMD_LAUNCH_UPDATE_DATA: return sizeof(struct sev_data_launch_update_data);
111 case SEV_CMD_LAUNCH_UPDATE_VMSA: return sizeof(struct sev_data_launch_update_vmsa);
112 case SEV_CMD_LAUNCH_FINISH: return sizeof(struct sev_data_launch_finish);
113 case SEV_CMD_LAUNCH_MEASURE: return sizeof(struct sev_data_launch_measure);
114 case SEV_CMD_ACTIVATE: return sizeof(struct sev_data_activate);
115 case SEV_CMD_DEACTIVATE: return sizeof(struct sev_data_deactivate);
116 case SEV_CMD_DECOMMISSION: return sizeof(struct sev_data_decommission);
117 case SEV_CMD_GUEST_STATUS: return sizeof(struct sev_data_guest_status);
118 case SEV_CMD_DBG_DECRYPT: return sizeof(struct sev_data_dbg);
119 case SEV_CMD_DBG_ENCRYPT: return sizeof(struct sev_data_dbg);
120 case SEV_CMD_SEND_START: return sizeof(struct sev_data_send_start);
121 case SEV_CMD_SEND_UPDATE_DATA: return sizeof(struct sev_data_send_update_data);
122 case SEV_CMD_SEND_UPDATE_VMSA: return sizeof(struct sev_data_send_update_vmsa);
123 case SEV_CMD_SEND_FINISH: return sizeof(struct sev_data_send_finish);
124 case SEV_CMD_RECEIVE_START: return sizeof(struct sev_data_receive_start);
125 case SEV_CMD_RECEIVE_FINISH: return sizeof(struct sev_data_receive_finish);
126 case SEV_CMD_RECEIVE_UPDATE_DATA: return sizeof(struct sev_data_receive_update_data);
127 case SEV_CMD_RECEIVE_UPDATE_VMSA: return sizeof(struct sev_data_receive_update_vmsa);
128 case SEV_CMD_LAUNCH_UPDATE_SECRET: return sizeof(struct sev_data_launch_secret);
129 case SEV_CMD_DOWNLOAD_FIRMWARE: return sizeof(struct sev_data_download_firmware);
130 case SEV_CMD_GET_ID: return sizeof(struct sev_data_get_id);
131 case SEV_CMD_ATTESTATION_REPORT: return sizeof(struct sev_data_attestation_report);
> 132 case SEV_SEND_CANCEL: return sizeof(struct sev_data_send_cancel);
133 default: return 0;
134 }
135
136 return 0;
137 }
138
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[arm-integrator:kernel-in-vmalloc-v5.11-rc1 4/4] arch/arm/mm/init.c:229:8: error: use of undeclared identifier 'SECTION_SIZE'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git kernel-in-vmalloc-v5.11-rc1
head: 11e0a781454290894392dc9dbdde64ba756cbdaa
commit: 11e0a781454290894392dc9dbdde64ba756cbdaa [4/4] First stab
config: arm-randconfig-r013-20210412 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.g...
git remote add arm-integrator https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
git fetch --no-tags arm-integrator kernel-in-vmalloc-v5.11-rc1
git checkout 11e0a781454290894392dc9dbdde64ba756cbdaa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
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 >>):
arch/arm/mm/init.c:97:13: warning: no previous prototype for function 'setup_dma_zone' [-Wmissing-prototypes]
void __init setup_dma_zone(const struct machine_desc *mdesc)
^
arch/arm/mm/init.c:97:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init setup_dma_zone(const struct machine_desc *mdesc)
^
static
>> arch/arm/mm/init.c:229:8: error: use of undeclared identifier 'SECTION_SIZE'
SECTION_SIZE));
^
arch/arm/mm/init.c:309:13: warning: no previous prototype for function 'mem_init_print_arm_info' [-Wmissing-prototypes]
void __init mem_init_print_arm_info(void)
^
arch/arm/mm/init.c:309:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init mem_init_print_arm_info(void)
^
static
2 warnings and 1 error generated.
--
>> mm/gup.c:1495:28: warning: incompatible integer to pointer conversion passing 'unsigned long' to parameter of type 'const void *' [-Wint-conversion]
pages[i] = virt_to_page(start);
^~~~~
arch/arm/include/asm/memory.h:449:53: note: expanded from macro 'virt_to_page'
#define virt_to_page(kaddr) pfn_to_page(virt_to_pfn(kaddr))
^~~~~
include/asm-generic/memory_model.h:33:41: note: expanded from macro '__pfn_to_page'
#define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
^~~
arch/arm/include/asm/memory.h:331:53: note: passing argument to parameter 'kaddr' here
static inline unsigned long virt_to_pfn(const void *kaddr)
^
1 warning generated.
--
>> mm/nommu.c:512:36: warning: incompatible integer to pointer conversion passing 'unsigned long' to parameter of type 'const void *' [-Wint-conversion]
struct page *page = virt_to_page(from);
^~~~
arch/arm/include/asm/memory.h:449:53: note: expanded from macro 'virt_to_page'
#define virt_to_page(kaddr) pfn_to_page(virt_to_pfn(kaddr))
^~~~~
include/asm-generic/memory_model.h:33:41: note: expanded from macro '__pfn_to_page'
#define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
^~~
arch/arm/include/asm/memory.h:331:53: note: passing argument to parameter 'kaddr' here
static inline unsigned long virt_to_pfn(const void *kaddr)
^
mm/nommu.c:1658:15: warning: no previous prototype for function 'arch_get_unmapped_area' [-Wmissing-prototypes]
unsigned long arch_get_unmapped_area(struct file *file, unsigned long addr,
^
mm/nommu.c:1658:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
unsigned long arch_get_unmapped_area(struct file *file, unsigned long addr,
^
static
2 warnings generated.
vim +/SECTION_SIZE +229 arch/arm/mm/init.c
96
> 97 void __init setup_dma_zone(const struct machine_desc *mdesc)
98 {
99 #ifdef CONFIG_ZONE_DMA
100 if (mdesc->dma_zone_size) {
101 arm_dma_zone_size = mdesc->dma_zone_size;
102 arm_dma_limit = PHYS_OFFSET + arm_dma_zone_size - 1;
103 } else
104 arm_dma_limit = 0xffffffff;
105 arm_dma_pfn_limit = arm_dma_limit >> PAGE_SHIFT;
106 #endif
107 }
108
109 static void __init zone_sizes_init(unsigned long min, unsigned long max_low,
110 unsigned long max_high)
111 {
112 unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0 };
113
114 #ifdef CONFIG_ZONE_DMA
115 max_zone_pfn[ZONE_DMA] = min(arm_dma_pfn_limit, max_low);
116 #endif
117 max_zone_pfn[ZONE_NORMAL] = max_low;
118 #ifdef CONFIG_HIGHMEM
119 max_zone_pfn[ZONE_HIGHMEM] = max_high;
120 #endif
121 free_area_init(max_zone_pfn);
122 }
123
124 #ifdef CONFIG_HAVE_ARCH_PFN_VALID
125 int pfn_valid(unsigned long pfn)
126 {
127 phys_addr_t addr = __pfn_to_phys(pfn);
128
129 if (__phys_to_pfn(addr) != pfn)
130 return 0;
131
132 return memblock_is_map_memory(addr);
133 }
134 EXPORT_SYMBOL(pfn_valid);
135 #endif
136
137 static bool arm_memblock_steal_permitted = true;
138
139 phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align)
140 {
141 phys_addr_t phys;
142
143 BUG_ON(!arm_memblock_steal_permitted);
144
145 phys = memblock_phys_alloc(size, align);
146 if (!phys)
147 panic("Failed to steal %pa bytes at %pS\n",
148 &size, (void *)_RET_IP_);
149
150 memblock_free(phys, size);
151 memblock_remove(phys, size);
152
153 return phys;
154 }
155
156 static void __init arm_initrd_init(void)
157 {
158 #ifdef CONFIG_BLK_DEV_INITRD
159 phys_addr_t start;
160 unsigned long size;
161
162 initrd_start = initrd_end = 0;
163
164 if (!phys_initrd_size)
165 return;
166
167 /*
168 * Round the memory region to page boundaries as per free_initrd_mem()
169 * This allows us to detect whether the pages overlapping the initrd
170 * are in use, but more importantly, reserves the entire set of pages
171 * as we don't want these pages allocated for other purposes.
172 */
173 start = round_down(phys_initrd_start, PAGE_SIZE);
174 size = phys_initrd_size + (phys_initrd_start - start);
175 size = round_up(size, PAGE_SIZE);
176
177 if (!memblock_is_region_memory(start, size)) {
178 pr_err("INITRD: 0x%08llx+0x%08lx is not a memory region - disabling initrd\n",
179 (u64)start, size);
180 return;
181 }
182
183 if (memblock_is_region_reserved(start, size)) {
184 pr_err("INITRD: 0x%08llx+0x%08lx overlaps in-use memory region - disabling initrd\n",
185 (u64)start, size);
186 return;
187 }
188
189 memblock_reserve(start, size);
190
191 /* Now convert initrd to virtual addresses */
192 initrd_start = __phys_to_virt(phys_initrd_start);
193 initrd_end = initrd_start + phys_initrd_size;
194 #endif
195 }
196
197 #ifdef CONFIG_CPU_ICACHE_MISMATCH_WORKAROUND
198 void check_cpu_icache_size(int cpuid)
199 {
200 u32 size, ctr;
201
202 asm("mrc p15, 0, %0, c0, c0, 1" : "=r" (ctr));
203
204 size = 1 << ((ctr & 0xf) + 2);
205 if (cpuid != 0 && icache_size != size)
206 pr_info("CPU%u: detected I-Cache line size mismatch, workaround enabled\n",
207 cpuid);
208 if (icache_size > size)
209 icache_size = size;
210 }
211 #endif
212
213 void __init arm_memblock_init(const struct machine_desc *mdesc)
214 {
215 /*
216 * Register the kernel text, kernel data and initrd with memblock.
217 *
218 * When using kernel in vmalloc, we have to round up to the closest
219 * section size, or the temporary section mapping of the tail of the
220 * kernel will be overwritten by memblock allocations. This is not
221 * a problem with the linear kernel map, since the allocations can
222 * use the 1:1 map in that case.
223 */
224 if (!IS_ENABLED(CONFIG_ARM_KERNEL_IN_VMALLOC))
225 memblock_reserve(__pa(KERNEL_START), KERNEL_END - KERNEL_START);
226 else
227 memblock_reserve(__pa(KERNEL_START),
228 round_up(KERNEL_END - KERNEL_START,
> 229 SECTION_SIZE));
230
231 arm_initrd_init();
232
233 arm_mm_memblock_reserve();
234
235 /* reserve any platform specific memblock areas */
236 if (mdesc->reserve)
237 mdesc->reserve();
238
239 early_init_fdt_scan_reserved_mem();
240
241 /* reserve memory for DMA contiguous allocations */
242 dma_contiguous_reserve(arm_dma_limit);
243
244 arm_memblock_steal_permitted = false;
245 memblock_dump_all();
246 }
247
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
ld.lld: error: main.c:(.text+0x1A8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
by kernel test robot
CC: linux-kernel(a)vger.kernel.org
TO: Alexey Kardashevskiy <aik(a)ozlabs.ru>
CC: "Steven Rostedt (VMware)" <rostedt(a)goodmis.org>
Hi Alexey,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d434405aaab7d0ebc516b68a8fc4100922d7f5ef
commit: c8b186a8d54d7e12d28e9f9686cb00ff18fc2ab2 tracepoint: Fix race between tracing and removing tracepoint
date: 10 weeks ago
config: riscv-randconfig-r031-20210412 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# 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 c8b186a8d54d7e12d28e9f9686cb00ff18fc2ab2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
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 >>):
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0xD4): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>> ld.lld: error: main.c:(.text+0x1A8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x28C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x54C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x70C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x990): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0xAE4): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0xD78): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0xEDC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x1264): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x1630): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x1A0C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x1A6C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x1B6C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x1C68): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x1D68): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x1DD0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x1E24): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH] mm/compaction:let proactive compaction order configurable
by kernel test robot
Hi chukaiping,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on kees/for-next/pstore]
[also build test ERROR on linus/master v5.12-rc7 next-20210412]
[cannot apply to hnaz-linux-mm/master]
[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/chukaiping/mm-compaction-let-pro...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/pstore
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.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/a203321bf356e9514ca678c96119df72d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review chukaiping/mm-compaction-let-proactive-compaction-order-configurable/20210412-172336
git checkout a203321bf356e9514ca678c96119df72d6bfa803
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
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 >>):
In file included from arch/ia64/include/asm/ptrace.h:46,
from arch/ia64/include/asm/processor.h:20,
from arch/ia64/include/asm/thread_info.h:12,
from include/linux/thread_info.h:58,
from include/asm-generic/preempt.h:5,
from ./arch/ia64/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/node.h:18,
from include/linux/cpu.h:17,
from mm/compaction.c:11:
>> arch/ia64/include/asm/page.h:153:29: error: initializer element is not constant
153 | # define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
| ^
mm/compaction.c:66:32: note: in expansion of macro 'HUGETLB_PAGE_ORDER'
66 | #define COMPACTION_HPAGE_ORDER HUGETLB_PAGE_ORDER
| ^~~~~~~~~~~~~~~~~~
mm/compaction.c:2669:54: note: in expansion of macro 'COMPACTION_HPAGE_ORDER'
2669 | unsigned int __read_mostly sysctl_compaction_order = COMPACTION_HPAGE_ORDER;
| ^~~~~~~~~~~~~~~~~~~~~~
vim +153 arch/ia64/include/asm/page.h
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 149
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 150 #ifdef CONFIG_HUGETLB_PAGE
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 151 # define htlbpage_to_page(x) (((unsigned long) REGION_NUMBER(x) << 61) \
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 152 | (REGION_OFFSET(x) >> (HPAGE_SHIFT-PAGE_SHIFT)))
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 @153 # define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 154 extern unsigned int hpage_shift;
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 155 #endif
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 156
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[jpirko-mlxsw:linecards 2/84] drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1467:4: warning: variable 'mlxsw_sp_port' is uninitialized when used here
by kernel test robot
tree: https://github.com/jpirko/linux_mlxsw linecards
head: 2e31b790e3ce7f8f51e24d5e26b4faff7e7de330
commit: b2cc947307eceabed71ba5b2df31dfb839451c8d [2/84] mlxsw: spectrum: Move port SWID set before core port init
config: x86_64-randconfig-a001-20210412 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/jpirko/linux_mlxsw/commit/b2cc947307eceabed71ba5b2df31...
git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
git fetch --no-tags jpirko-mlxsw linecards
git checkout b2cc947307eceabed71ba5b2df31dfb839451c8d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 >>):
>> drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1467:4: warning: variable 'mlxsw_sp_port' is uninitialized when used here [-Wuninitialized]
mlxsw_sp_port->local_port);
^~~~~~~~~~~~~
include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1451:37: note: initialize the variable 'mlxsw_sp_port' to silence this warning
struct mlxsw_sp_port *mlxsw_sp_port;
^
= NULL
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:110:1: warning: unused function 'mlxsw_tx_hdr_version_get' [-Wunused-function]
MLXSW_ITEM32(tx, hdr, version, 0x00, 28, 4);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf) \
^
<scratch space>:11:1: note: expanded from here
mlxsw_tx_hdr_version_get
^
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:117:1: warning: unused function 'mlxsw_tx_hdr_ctl_get' [-Wunused-function]
MLXSW_ITEM32(tx, hdr, ctl, 0x00, 26, 2);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf) \
^
<scratch space>:44:1: note: expanded from here
mlxsw_tx_hdr_ctl_get
^
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:122:1: warning: unused function 'mlxsw_tx_hdr_proto_get' [-Wunused-function]
MLXSW_ITEM32(tx, hdr, proto, 0x00, 21, 3);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf) \
^
<scratch space>:77:1: note: expanded from here
mlxsw_tx_hdr_proto_get
^
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:127:1: warning: unused function 'mlxsw_tx_hdr_rx_is_router_get' [-Wunused-function]
MLXSW_ITEM32(tx, hdr, rx_is_router, 0x00, 19, 1);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf) \
^
<scratch space>:110:1: note: expanded from here
mlxsw_tx_hdr_rx_is_router_get
^
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:127:1: warning: unused function 'mlxsw_tx_hdr_rx_is_router_set' [-Wunused-function]
drivers/net/ethernet/mellanox/mlxsw/item.h:359:20: note: expanded from macro 'MLXSW_ITEM32'
static inline void mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u32 val)\
^
<scratch space>:122:1: note: expanded from here
mlxsw_tx_hdr_rx_is_router_set
^
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:133:1: warning: unused function 'mlxsw_tx_hdr_fid_valid_get' [-Wunused-function]
MLXSW_ITEM32(tx, hdr, fid_valid, 0x00, 16, 1);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf) \
^
<scratch space>:143:1: note: expanded from here
mlxsw_tx_hdr_fid_valid_get
^
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:133:1: warning: unused function 'mlxsw_tx_hdr_fid_valid_set' [-Wunused-function]
drivers/net/ethernet/mellanox/mlxsw/item.h:359:20: note: expanded from macro 'MLXSW_ITEM32'
static inline void mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u32 val)\
^
<scratch space>:155:1: note: expanded from here
mlxsw_tx_hdr_fid_valid_set
^
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:138:1: warning: unused function 'mlxsw_tx_hdr_swid_get' [-Wunused-function]
MLXSW_ITEM32(tx, hdr, swid, 0x00, 12, 3);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf) \
^
<scratch space>:176:1: note: expanded from here
mlxsw_tx_hdr_swid_get
^
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:144:1: warning: unused function 'mlxsw_tx_hdr_control_tclass_get' [-Wunused-function]
MLXSW_ITEM32(tx, hdr, control_tclass, 0x00, 6, 1);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf) \
^
<scratch space>:209:1: note: expanded from here
mlxsw_tx_hdr_control_tclass_get
^
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:149:1: warning: unused function 'mlxsw_tx_hdr_etclass_get' [-Wunused-function]
MLXSW_ITEM32(tx, hdr, etclass, 0x00, 0, 4);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf) \
^
<scratch space>:242:1: note: expanded from here
mlxsw_tx_hdr_etclass_get
^
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:149:1: warning: unused function 'mlxsw_tx_hdr_etclass_set' [-Wunused-function]
drivers/net/ethernet/mellanox/mlxsw/item.h:359:20: note: expanded from macro 'MLXSW_ITEM32'
static inline void mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u32 val)\
^
<scratch space>:254:1: note: expanded from here
vim +/mlxsw_sp_port +1467 drivers/net/ethernet/mellanox/mlxsw/spectrum.c
1444
1445 static int mlxsw_sp_port_create(struct mlxsw_sp *mlxsw_sp, u8 local_port,
1446 u8 split_base_local_port,
1447 struct mlxsw_sp_port_mapping *port_mapping)
1448 {
1449 struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan;
1450 bool split = !!split_base_local_port;
1451 struct mlxsw_sp_port *mlxsw_sp_port;
1452 u32 lanes = port_mapping->width;
1453 struct net_device *dev;
1454 bool splittable;
1455 int err;
1456
1457 err = mlxsw_sp_port_module_map(mlxsw_sp, local_port, port_mapping);
1458 if (err) {
1459 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to map module\n",
1460 local_port);
1461 return err;
1462 }
1463
1464 err = mlxsw_sp_port_swid_set(mlxsw_sp, local_port, 0);
1465 if (err) {
1466 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to set SWID\n",
> 1467 mlxsw_sp_port->local_port);
1468 goto err_port_swid_set;
1469 }
1470
1471 splittable = lanes > 1 && !split;
1472 err = mlxsw_core_port_init(mlxsw_sp->core, local_port,
1473 port_mapping->module + 1, split,
1474 port_mapping->lane / lanes,
1475 splittable, lanes,
1476 mlxsw_sp->base_mac,
1477 sizeof(mlxsw_sp->base_mac));
1478 if (err) {
1479 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to init core port\n",
1480 local_port);
1481 goto err_core_port_init;
1482 }
1483
1484 dev = alloc_etherdev(sizeof(struct mlxsw_sp_port));
1485 if (!dev) {
1486 err = -ENOMEM;
1487 goto err_alloc_etherdev;
1488 }
1489 SET_NETDEV_DEV(dev, mlxsw_sp->bus_info->dev);
1490 dev_net_set(dev, mlxsw_sp_net(mlxsw_sp));
1491 mlxsw_sp_port = netdev_priv(dev);
1492 mlxsw_sp_port->dev = dev;
1493 mlxsw_sp_port->mlxsw_sp = mlxsw_sp;
1494 mlxsw_sp_port->local_port = local_port;
1495 mlxsw_sp_port->pvid = MLXSW_SP_DEFAULT_VID;
1496 mlxsw_sp_port->split = split;
1497 mlxsw_sp_port->split_base_local_port = split_base_local_port;
1498 mlxsw_sp_port->mapping = *port_mapping;
1499 mlxsw_sp_port->link.autoneg = 1;
1500 INIT_LIST_HEAD(&mlxsw_sp_port->vlans_list);
1501
1502 mlxsw_sp_port->pcpu_stats =
1503 netdev_alloc_pcpu_stats(struct mlxsw_sp_port_pcpu_stats);
1504 if (!mlxsw_sp_port->pcpu_stats) {
1505 err = -ENOMEM;
1506 goto err_alloc_stats;
1507 }
1508
1509 INIT_DELAYED_WORK(&mlxsw_sp_port->periodic_hw_stats.update_dw,
1510 &update_stats_cache);
1511
1512 dev->netdev_ops = &mlxsw_sp_port_netdev_ops;
1513 dev->ethtool_ops = &mlxsw_sp_port_ethtool_ops;
1514
1515 err = mlxsw_sp_port_dev_addr_init(mlxsw_sp_port);
1516 if (err) {
1517 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Unable to init port mac address\n",
1518 mlxsw_sp_port->local_port);
1519 goto err_dev_addr_init;
1520 }
1521
1522 netif_carrier_off(dev);
1523
1524 dev->features |= NETIF_F_NETNS_LOCAL | NETIF_F_LLTX | NETIF_F_SG |
1525 NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_HW_TC;
1526 dev->hw_features |= NETIF_F_HW_TC | NETIF_F_LOOPBACK;
1527
1528 dev->min_mtu = 0;
1529 dev->max_mtu = ETH_MAX_MTU;
1530
1531 /* Each packet needs to have a Tx header (metadata) on top all other
1532 * headers.
1533 */
1534 dev->needed_headroom = MLXSW_TXHDR_LEN;
1535
1536 err = mlxsw_sp_port_system_port_mapping_set(mlxsw_sp_port);
1537 if (err) {
1538 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to set system port mapping\n",
1539 mlxsw_sp_port->local_port);
1540 goto err_port_system_port_mapping_set;
1541 }
1542
1543 err = mlxsw_sp_port_speed_by_width_set(mlxsw_sp_port);
1544 if (err) {
1545 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to enable speeds\n",
1546 mlxsw_sp_port->local_port);
1547 goto err_port_speed_by_width_set;
1548 }
1549
1550 err = mlxsw_sp->port_type_speed_ops->ptys_max_speed(mlxsw_sp_port,
1551 &mlxsw_sp_port->max_speed);
1552 if (err) {
1553 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to get maximum speed\n",
1554 mlxsw_sp_port->local_port);
1555 goto err_max_speed_get;
1556 }
1557
1558 err = mlxsw_sp_port_max_mtu_get(mlxsw_sp_port, &mlxsw_sp_port->max_mtu);
1559 if (err) {
1560 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to get maximum MTU\n",
1561 mlxsw_sp_port->local_port);
1562 goto err_port_max_mtu_get;
1563 }
1564
1565 err = mlxsw_sp_port_mtu_set(mlxsw_sp_port, ETH_DATA_LEN);
1566 if (err) {
1567 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to set MTU\n",
1568 mlxsw_sp_port->local_port);
1569 goto err_port_mtu_set;
1570 }
1571
1572 err = mlxsw_sp_port_admin_status_set(mlxsw_sp_port, false);
1573 if (err)
1574 goto err_port_admin_status_set;
1575
1576 err = mlxsw_sp_port_buffers_init(mlxsw_sp_port);
1577 if (err) {
1578 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to initialize buffers\n",
1579 mlxsw_sp_port->local_port);
1580 goto err_port_buffers_init;
1581 }
1582
1583 err = mlxsw_sp_port_ets_init(mlxsw_sp_port);
1584 if (err) {
1585 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to initialize ETS\n",
1586 mlxsw_sp_port->local_port);
1587 goto err_port_ets_init;
1588 }
1589
1590 err = mlxsw_sp_port_tc_mc_mode_set(mlxsw_sp_port, true);
1591 if (err) {
1592 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to initialize TC MC mode\n",
1593 mlxsw_sp_port->local_port);
1594 goto err_port_tc_mc_mode;
1595 }
1596
1597 /* ETS and buffers must be initialized before DCB. */
1598 err = mlxsw_sp_port_dcb_init(mlxsw_sp_port);
1599 if (err) {
1600 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to initialize DCB\n",
1601 mlxsw_sp_port->local_port);
1602 goto err_port_dcb_init;
1603 }
1604
1605 err = mlxsw_sp_port_fids_init(mlxsw_sp_port);
1606 if (err) {
1607 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to initialize FIDs\n",
1608 mlxsw_sp_port->local_port);
1609 goto err_port_fids_init;
1610 }
1611
1612 err = mlxsw_sp_tc_qdisc_init(mlxsw_sp_port);
1613 if (err) {
1614 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to initialize TC qdiscs\n",
1615 mlxsw_sp_port->local_port);
1616 goto err_port_qdiscs_init;
1617 }
1618
1619 err = mlxsw_sp_port_vlan_set(mlxsw_sp_port, 0, VLAN_N_VID - 1, false,
1620 false);
1621 if (err) {
1622 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to clear VLAN filter\n",
1623 mlxsw_sp_port->local_port);
1624 goto err_port_vlan_clear;
1625 }
1626
1627 err = mlxsw_sp_port_nve_init(mlxsw_sp_port);
1628 if (err) {
1629 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to initialize NVE\n",
1630 mlxsw_sp_port->local_port);
1631 goto err_port_nve_init;
1632 }
1633
1634 err = mlxsw_sp_port_pvid_set(mlxsw_sp_port, MLXSW_SP_DEFAULT_VID,
1635 ETH_P_8021Q);
1636 if (err) {
1637 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to set PVID\n",
1638 mlxsw_sp_port->local_port);
1639 goto err_port_pvid_set;
1640 }
1641
1642 mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_create(mlxsw_sp_port,
1643 MLXSW_SP_DEFAULT_VID);
1644 if (IS_ERR(mlxsw_sp_port_vlan)) {
1645 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to create VID 1\n",
1646 mlxsw_sp_port->local_port);
1647 err = PTR_ERR(mlxsw_sp_port_vlan);
1648 goto err_port_vlan_create;
1649 }
1650 mlxsw_sp_port->default_vlan = mlxsw_sp_port_vlan;
1651
1652 /* Set SPVC.et0=true and SPVC.et1=false to make the local port to treat
1653 * only packets with 802.1q header as tagged packets.
1654 */
1655 err = mlxsw_sp_port_vlan_classification_set(mlxsw_sp_port, false, true);
1656 if (err) {
1657 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to set default VLAN classification\n",
1658 local_port);
1659 goto err_port_vlan_classification_set;
1660 }
1661
1662 INIT_DELAYED_WORK(&mlxsw_sp_port->ptp.shaper_dw,
1663 mlxsw_sp->ptp_ops->shaper_work);
1664
1665 mlxsw_sp->ports[local_port] = mlxsw_sp_port;
1666
1667 err = mlxsw_sp_port_overheat_init_val_set(mlxsw_sp_port);
1668 if (err) {
1669 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to set overheat initial value\n",
1670 mlxsw_sp_port->local_port);
1671 goto err_port_overheat_init_val_set;
1672 }
1673
1674 err = register_netdev(dev);
1675 if (err) {
1676 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to register netdev\n",
1677 mlxsw_sp_port->local_port);
1678 goto err_register_netdev;
1679 }
1680
1681 mlxsw_core_port_eth_set(mlxsw_sp->core, mlxsw_sp_port->local_port,
1682 mlxsw_sp_port, dev);
1683 mlxsw_core_schedule_dw(&mlxsw_sp_port->periodic_hw_stats.update_dw, 0);
1684 return 0;
1685
1686 err_register_netdev:
1687 err_port_overheat_init_val_set:
1688 mlxsw_sp_port_vlan_classification_set(mlxsw_sp_port, true, true);
1689 err_port_vlan_classification_set:
1690 mlxsw_sp->ports[local_port] = NULL;
1691 mlxsw_sp_port_vlan_destroy(mlxsw_sp_port_vlan);
1692 err_port_vlan_create:
1693 err_port_pvid_set:
1694 mlxsw_sp_port_nve_fini(mlxsw_sp_port);
1695 err_port_nve_init:
1696 err_port_vlan_clear:
1697 mlxsw_sp_tc_qdisc_fini(mlxsw_sp_port);
1698 err_port_qdiscs_init:
1699 mlxsw_sp_port_fids_fini(mlxsw_sp_port);
1700 err_port_fids_init:
1701 mlxsw_sp_port_dcb_fini(mlxsw_sp_port);
1702 err_port_dcb_init:
1703 mlxsw_sp_port_tc_mc_mode_set(mlxsw_sp_port, false);
1704 err_port_tc_mc_mode:
1705 err_port_ets_init:
1706 mlxsw_sp_port_buffers_fini(mlxsw_sp_port);
1707 err_port_buffers_init:
1708 err_port_admin_status_set:
1709 err_port_mtu_set:
1710 err_port_max_mtu_get:
1711 err_max_speed_get:
1712 err_port_speed_by_width_set:
1713 err_port_system_port_mapping_set:
1714 err_dev_addr_init:
1715 free_percpu(mlxsw_sp_port->pcpu_stats);
1716 err_alloc_stats:
1717 free_netdev(dev);
1718 err_alloc_etherdev:
1719 mlxsw_core_port_fini(mlxsw_sp->core, local_port);
1720 err_core_port_init:
1721 mlxsw_sp_port_swid_set(mlxsw_sp, local_port,
1722 MLXSW_PORT_SWID_DISABLED_PORT);
1723 err_port_swid_set:
1724 mlxsw_sp_port_module_unmap(mlxsw_sp, local_port);
1725 return err;
1726 }
1727
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[linux-next:master 12059/12188] kernel/gcov/clang.c:371:21: error: implicit declaration of function 'vmalloc'
by kernel test robot
CC: Linux Memory Management List <linux-mm(a)kvack.org>
TO: Johannes Berg <johannes.berg(a)intel.com>
CC: Andrew Morton <akpm(a)linux-foundation.org>
CC: Linux Memory Management List <linux-mm(a)kvack.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 5df924d19629975d565da37eb7268c7bf4d491fe
commit: 3e09dd7690da513de18a1abdabaaf206fd9972e1 [12059/12188] gcov: use kvmalloc()
config: powerpc64-randconfig-r031-20210412 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 3e09dd7690da513de18a1abdabaaf206fd9972e1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
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/gcov/clang.c:88:6: warning: no previous prototype for function 'llvm_gcov_init' [-Wmissing-prototypes]
void llvm_gcov_init(llvm_gcov_callback writeout, llvm_gcov_callback flush)
^
kernel/gcov/clang.c:88:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void llvm_gcov_init(llvm_gcov_callback writeout, llvm_gcov_callback flush)
^
static
kernel/gcov/clang.c:121:6: warning: no previous prototype for function 'llvm_gcda_start_file' [-Wmissing-prototypes]
void llvm_gcda_start_file(const char *orig_filename, u32 version, u32 checksum)
^
kernel/gcov/clang.c:121:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void llvm_gcda_start_file(const char *orig_filename, u32 version, u32 checksum)
^
static
kernel/gcov/clang.c:150:6: warning: no previous prototype for function 'llvm_gcda_emit_function' [-Wmissing-prototypes]
void llvm_gcda_emit_function(u32 ident, u32 func_checksum, u32 cfg_checksum)
^
kernel/gcov/clang.c:150:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void llvm_gcda_emit_function(u32 ident, u32 func_checksum, u32 cfg_checksum)
^
static
kernel/gcov/clang.c:166:6: warning: no previous prototype for function 'llvm_gcda_emit_arcs' [-Wmissing-prototypes]
void llvm_gcda_emit_arcs(u32 num_counters, u64 *counters)
^
kernel/gcov/clang.c:166:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void llvm_gcda_emit_arcs(u32 num_counters, u64 *counters)
^
static
kernel/gcov/clang.c:176:6: warning: no previous prototype for function 'llvm_gcda_summary_info' [-Wmissing-prototypes]
void llvm_gcda_summary_info(void)
^
kernel/gcov/clang.c:176:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void llvm_gcda_summary_info(void)
^
static
kernel/gcov/clang.c:181:6: warning: no previous prototype for function 'llvm_gcda_end_file' [-Wmissing-prototypes]
void llvm_gcda_end_file(void)
^
kernel/gcov/clang.c:181:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void llvm_gcda_end_file(void)
^
static
>> kernel/gcov/clang.c:371:21: error: implicit declaration of function 'vmalloc' [-Werror,-Wimplicit-function-declaration]
fn_dup->counters = vmalloc(cv_size);
^
kernel/gcov/clang.c:371:19: warning: incompatible integer to pointer conversion assigning to 'u64 *' (aka 'unsigned long long *') from 'int' [-Wint-conversion]
fn_dup->counters = vmalloc(cv_size);
^ ~~~~~~~~~~~~~~~~
7 warnings and 1 error generated.
vim +/vmalloc +371 kernel/gcov/clang.c
e178a5beb36960 Greg Hackmann 2019-05-14 331
60bcf728ee7c60 Nick Desaulniers 2021-03-24 332 #if CONFIG_CLANG_VERSION < 110000
e178a5beb36960 Greg Hackmann 2019-05-14 333 static struct gcov_fn_info *gcov_fn_info_dup(struct gcov_fn_info *fn)
e178a5beb36960 Greg Hackmann 2019-05-14 334 {
e178a5beb36960 Greg Hackmann 2019-05-14 335 size_t cv_size; /* counter values size */
3e09dd7690da51 Johannes Berg 2021-04-12 336 struct gcov_fn_info *fn_dup = kmemdup(fn, sizeof(*fn), GFP_KERNEL);
3e09dd7690da51 Johannes Berg 2021-04-12 337
e178a5beb36960 Greg Hackmann 2019-05-14 338 if (!fn_dup)
e178a5beb36960 Greg Hackmann 2019-05-14 339 return NULL;
e178a5beb36960 Greg Hackmann 2019-05-14 340 INIT_LIST_HEAD(&fn_dup->head);
e178a5beb36960 Greg Hackmann 2019-05-14 341
e178a5beb36960 Greg Hackmann 2019-05-14 342 fn_dup->function_name = kstrdup(fn->function_name, GFP_KERNEL);
e178a5beb36960 Greg Hackmann 2019-05-14 343 if (!fn_dup->function_name)
e178a5beb36960 Greg Hackmann 2019-05-14 344 goto err_name;
e178a5beb36960 Greg Hackmann 2019-05-14 345
e178a5beb36960 Greg Hackmann 2019-05-14 346 cv_size = fn->num_counters * sizeof(fn->counters[0]);
3e09dd7690da51 Johannes Berg 2021-04-12 347 fn_dup->counters = kvmalloc(cv_size, GFP_KERNEL);
e178a5beb36960 Greg Hackmann 2019-05-14 348 if (!fn_dup->counters)
e178a5beb36960 Greg Hackmann 2019-05-14 349 goto err_counters;
e178a5beb36960 Greg Hackmann 2019-05-14 350 memcpy(fn_dup->counters, fn->counters, cv_size);
e178a5beb36960 Greg Hackmann 2019-05-14 351
e178a5beb36960 Greg Hackmann 2019-05-14 352 return fn_dup;
e178a5beb36960 Greg Hackmann 2019-05-14 353
e178a5beb36960 Greg Hackmann 2019-05-14 354 err_counters:
e178a5beb36960 Greg Hackmann 2019-05-14 355 kfree(fn_dup->function_name);
e178a5beb36960 Greg Hackmann 2019-05-14 356 err_name:
e178a5beb36960 Greg Hackmann 2019-05-14 357 kfree(fn_dup);
e178a5beb36960 Greg Hackmann 2019-05-14 358 return NULL;
e178a5beb36960 Greg Hackmann 2019-05-14 359 }
60bcf728ee7c60 Nick Desaulniers 2021-03-24 360 #else
60bcf728ee7c60 Nick Desaulniers 2021-03-24 361 static struct gcov_fn_info *gcov_fn_info_dup(struct gcov_fn_info *fn)
60bcf728ee7c60 Nick Desaulniers 2021-03-24 362 {
60bcf728ee7c60 Nick Desaulniers 2021-03-24 363 size_t cv_size; /* counter values size */
60bcf728ee7c60 Nick Desaulniers 2021-03-24 364 struct gcov_fn_info *fn_dup = kmemdup(fn, sizeof(*fn),
60bcf728ee7c60 Nick Desaulniers 2021-03-24 365 GFP_KERNEL);
60bcf728ee7c60 Nick Desaulniers 2021-03-24 366 if (!fn_dup)
60bcf728ee7c60 Nick Desaulniers 2021-03-24 367 return NULL;
60bcf728ee7c60 Nick Desaulniers 2021-03-24 368 INIT_LIST_HEAD(&fn_dup->head);
60bcf728ee7c60 Nick Desaulniers 2021-03-24 369
60bcf728ee7c60 Nick Desaulniers 2021-03-24 370 cv_size = fn->num_counters * sizeof(fn->counters[0]);
60bcf728ee7c60 Nick Desaulniers 2021-03-24 @371 fn_dup->counters = vmalloc(cv_size);
60bcf728ee7c60 Nick Desaulniers 2021-03-24 372 if (!fn_dup->counters) {
60bcf728ee7c60 Nick Desaulniers 2021-03-24 373 kfree(fn_dup);
60bcf728ee7c60 Nick Desaulniers 2021-03-24 374 return NULL;
60bcf728ee7c60 Nick Desaulniers 2021-03-24 375 }
60bcf728ee7c60 Nick Desaulniers 2021-03-24 376
60bcf728ee7c60 Nick Desaulniers 2021-03-24 377 memcpy(fn_dup->counters, fn->counters, cv_size);
60bcf728ee7c60 Nick Desaulniers 2021-03-24 378
60bcf728ee7c60 Nick Desaulniers 2021-03-24 379 return fn_dup;
60bcf728ee7c60 Nick Desaulniers 2021-03-24 380 }
60bcf728ee7c60 Nick Desaulniers 2021-03-24 381 #endif
e178a5beb36960 Greg Hackmann 2019-05-14 382
:::::: The code at line 371 was first introduced by commit
:::::: 60bcf728ee7c60ac2a1f9a0eaceb3a7b3954cd2b gcov: fix clang-11+ support
:::::: TO: Nick Desaulniers <ndesaulniers(a)google.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months