arch/csky/mm/tcm.c:9:2: error: #error "You should define ITCM_RAM_BASE"
by kernel test robot
Hi Guo,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 89698becf06d341a700913c3d89ce2a914af69a2
commit: 18c07d23da5a48525b2955aa269b8bb108c19300 csky: Fixup calltrace panic
date: 11 months ago
config: csky-randconfig-r005-20210412 (attached as .config)
compiler: csky-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://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 18c07d23da5a48525b2955aa269b8bb108c19300
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=csky
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 >>):
>> arch/csky/mm/tcm.c:9:2: error: #error "You should define ITCM_RAM_BASE"
9 | #error "You should define ITCM_RAM_BASE"
| ^~~~~
arch/csky/mm/tcm.c:109:7: warning: no previous prototype for 'tcm_alloc' [-Wmissing-prototypes]
109 | void *tcm_alloc(size_t len)
| ^~~~~~~~~
arch/csky/mm/tcm.c:124:6: warning: no previous prototype for 'tcm_free' [-Wmissing-prototypes]
124 | void tcm_free(void *addr, size_t len)
| ^~~~~~~~
vim +9 arch/csky/mm/tcm.c
f525bb2c9e7cf1 Guo Ren 2019-11-27 7
f525bb2c9e7cf1 Guo Ren 2019-11-27 8 #if (CONFIG_ITCM_RAM_BASE == 0xffffffff)
f525bb2c9e7cf1 Guo Ren 2019-11-27 @9 #error "You should define ITCM_RAM_BASE"
f525bb2c9e7cf1 Guo Ren 2019-11-27 10 #endif
f525bb2c9e7cf1 Guo Ren 2019-11-27 11
:::::: The code at line 9 was first introduced by commit
:::::: f525bb2c9e7cf1e3c43ab57704c9e1c836d30b34 csky: Tightly-Coupled Memory or Sram support
:::::: TO: Guo Ren <guoren(a)linux.alibaba.com>
:::::: CC: Guo Ren <guoren(a)linux.alibaba.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[PATCH] drm/i915/oprom: fix memdup.cocci warnings
by kernel test robot
From: kernel test robot <lkp(a)intel.com>
drivers/gpu/drm/i915/display/intel_bios.c:2274:7-14: WARNING opportunity for kmemdup
Use kmemdup rather than duplicating its implementation
Generated by: scripts/coccinelle/api/memdup.cocci
CC: Anshuman Gupta <anshuman.gupta(a)intel.com>
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
url: https://github.com/0day-ci/linux/commits/Matthew-Auld/More-DG1-enabling/2...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
intel_bios.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -2271,14 +2271,13 @@ static struct vbt_header *spi_oprom_get_
parse_ptr = (u8 *)oprom_opreg + found;
vbt_size = ((struct vbt_header *)parse_ptr)->vbt_size;
- vbt = kzalloc(vbt_size, GFP_KERNEL);
+ vbt = kmemdup(parse_ptr, vbt_size, GFP_KERNEL);
if (!vbt) {
DRM_ERROR("Unable to allocate %u bytes for VBT storage\n",
vbt_size);
goto err_not_found;
}
- memcpy(vbt, parse_ptr, vbt_size);
if (!intel_bios_is_valid_vbt(vbt, vbt_size))
goto err_free_vbt;
1 year, 5 months
drivers/scsi/fnic/vnic_dev.c:332:32: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 89698becf06d341a700913c3d89ce2a914af69a2
commit: 8f28ca6bd8211214faf717677bbffe375c2a6072 iomap: constify ioreadX() iomem argument (as in generic implementation)
date: 8 months ago
config: x86_64-randconfig-s021-20210413 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-280-g2cd6d34e-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 8f28ca6bd8211214faf717677bbffe375c2a6072
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/scsi/fnic/vnic_dev.c:332:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@
drivers/scsi/fnic/vnic_dev.c:332:32: sparse: expected void const [noderef] __iomem *
drivers/scsi/fnic/vnic_dev.c:332:32: sparse: got unsigned int *
drivers/scsi/fnic/vnic_dev.c:333:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@
drivers/scsi/fnic/vnic_dev.c:333:37: sparse: expected void const [noderef] __iomem *
drivers/scsi/fnic/vnic_dev.c:333:37: sparse: got unsigned int *
drivers/scsi/fnic/vnic_dev.c:373:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/scsi/fnic/vnic_dev.c:373:36: sparse: expected void [noderef] __iomem *
drivers/scsi/fnic/vnic_dev.c:373:36: sparse: got unsigned int *
drivers/scsi/fnic/vnic_dev.c:469:32: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct vnic_wq_ctrl *wq_ctrl @@ got struct vnic_wq_ctrl [noderef] __iomem *ctrl @@
drivers/scsi/fnic/vnic_dev.c:469:32: sparse: expected struct vnic_wq_ctrl *wq_ctrl
drivers/scsi/fnic/vnic_dev.c:469:32: sparse: got struct vnic_wq_ctrl [noderef] __iomem *ctrl
drivers/scsi/fnic/vnic_dev.c:943:11: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *p @@ got void [noderef] __iomem * @@
drivers/scsi/fnic/vnic_dev.c:943:11: sparse: expected void *p
drivers/scsi/fnic/vnic_dev.c:943:11: sparse: got void [noderef] __iomem *
vim +332 drivers/scsi/fnic/vnic_dev.c
5df6d737dd4b0f Abhijeet Joglekar 2009-04-17 318
363f4d937501ba Jason Yan 2020-04-15 319 static int vnic_dev_cmd2(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd,
0a2fdd2215e1fa Satish Kharat 2019-01-18 320 int wait)
0a2fdd2215e1fa Satish Kharat 2019-01-18 321 {
0a2fdd2215e1fa Satish Kharat 2019-01-18 322 struct devcmd2_controller *dc2c = vdev->devcmd2;
0a2fdd2215e1fa Satish Kharat 2019-01-18 323 struct devcmd2_result *result;
0a2fdd2215e1fa Satish Kharat 2019-01-18 324 u8 color;
0a2fdd2215e1fa Satish Kharat 2019-01-18 325 unsigned int i;
0a2fdd2215e1fa Satish Kharat 2019-01-18 326 int delay;
0a2fdd2215e1fa Satish Kharat 2019-01-18 327 int err;
0a2fdd2215e1fa Satish Kharat 2019-01-18 328 u32 fetch_index;
0a2fdd2215e1fa Satish Kharat 2019-01-18 329 u32 posted;
0a2fdd2215e1fa Satish Kharat 2019-01-18 330 u32 new_posted;
0a2fdd2215e1fa Satish Kharat 2019-01-18 331
0a2fdd2215e1fa Satish Kharat 2019-01-18 @332 posted = ioread32(&dc2c->wq_ctrl->posted_index);
0a2fdd2215e1fa Satish Kharat 2019-01-18 333 fetch_index = ioread32(&dc2c->wq_ctrl->fetch_index);
0a2fdd2215e1fa Satish Kharat 2019-01-18 334
0a2fdd2215e1fa Satish Kharat 2019-01-18 335 if (posted == 0xFFFFFFFF || fetch_index == 0xFFFFFFFF) {
0a2fdd2215e1fa Satish Kharat 2019-01-18 336 /* Hardware surprise removal: return error */
0a2fdd2215e1fa Satish Kharat 2019-01-18 337 pr_err("%s: devcmd2 invalid posted or fetch index on cmd %d\n",
0a2fdd2215e1fa Satish Kharat 2019-01-18 338 pci_name(vdev->pdev), _CMD_N(cmd));
0a2fdd2215e1fa Satish Kharat 2019-01-18 339 pr_err("%s: fetch index: %u, posted index: %u\n",
0a2fdd2215e1fa Satish Kharat 2019-01-18 340 pci_name(vdev->pdev), fetch_index, posted);
0a2fdd2215e1fa Satish Kharat 2019-01-18 341
0a2fdd2215e1fa Satish Kharat 2019-01-18 342 return -ENODEV;
0a2fdd2215e1fa Satish Kharat 2019-01-18 343
0a2fdd2215e1fa Satish Kharat 2019-01-18 344 }
0a2fdd2215e1fa Satish Kharat 2019-01-18 345
0a2fdd2215e1fa Satish Kharat 2019-01-18 346 new_posted = (posted + 1) % DEVCMD2_RING_SIZE;
0a2fdd2215e1fa Satish Kharat 2019-01-18 347
0a2fdd2215e1fa Satish Kharat 2019-01-18 348 if (new_posted == fetch_index) {
0a2fdd2215e1fa Satish Kharat 2019-01-18 349 pr_err("%s: devcmd2 wq full while issuing cmd %d\n",
0a2fdd2215e1fa Satish Kharat 2019-01-18 350 pci_name(vdev->pdev), _CMD_N(cmd));
0a2fdd2215e1fa Satish Kharat 2019-01-18 351 pr_err("%s: fetch index: %u, posted index: %u\n",
0a2fdd2215e1fa Satish Kharat 2019-01-18 352 pci_name(vdev->pdev), fetch_index, posted);
0a2fdd2215e1fa Satish Kharat 2019-01-18 353 return -EBUSY;
0a2fdd2215e1fa Satish Kharat 2019-01-18 354
0a2fdd2215e1fa Satish Kharat 2019-01-18 355 }
0a2fdd2215e1fa Satish Kharat 2019-01-18 356 dc2c->cmd_ring[posted].cmd = cmd;
0a2fdd2215e1fa Satish Kharat 2019-01-18 357 dc2c->cmd_ring[posted].flags = 0;
0a2fdd2215e1fa Satish Kharat 2019-01-18 358
0a2fdd2215e1fa Satish Kharat 2019-01-18 359 if ((_CMD_FLAGS(cmd) & _CMD_FLAGS_NOWAIT))
0a2fdd2215e1fa Satish Kharat 2019-01-18 360 dc2c->cmd_ring[posted].flags |= DEVCMD2_FNORESULT;
0a2fdd2215e1fa Satish Kharat 2019-01-18 361 if (_CMD_DIR(cmd) & _CMD_DIR_WRITE) {
0a2fdd2215e1fa Satish Kharat 2019-01-18 362 for (i = 0; i < VNIC_DEVCMD_NARGS; i++)
0a2fdd2215e1fa Satish Kharat 2019-01-18 363 dc2c->cmd_ring[posted].args[i] = vdev->args[i];
0a2fdd2215e1fa Satish Kharat 2019-01-18 364
0a2fdd2215e1fa Satish Kharat 2019-01-18 365 }
0a2fdd2215e1fa Satish Kharat 2019-01-18 366
0a2fdd2215e1fa Satish Kharat 2019-01-18 367 /* Adding write memory barrier prevents compiler and/or CPU
0a2fdd2215e1fa Satish Kharat 2019-01-18 368 * reordering, thus avoiding descriptor posting before
0a2fdd2215e1fa Satish Kharat 2019-01-18 369 * descriptor is initialized. Otherwise, hardware can read
0a2fdd2215e1fa Satish Kharat 2019-01-18 370 * stale descriptor fields.
0a2fdd2215e1fa Satish Kharat 2019-01-18 371 */
0a2fdd2215e1fa Satish Kharat 2019-01-18 372 wmb();
0a2fdd2215e1fa Satish Kharat 2019-01-18 373 iowrite32(new_posted, &dc2c->wq_ctrl->posted_index);
0a2fdd2215e1fa Satish Kharat 2019-01-18 374
0a2fdd2215e1fa Satish Kharat 2019-01-18 375 if (dc2c->cmd_ring[posted].flags & DEVCMD2_FNORESULT)
0a2fdd2215e1fa Satish Kharat 2019-01-18 376 return 0;
0a2fdd2215e1fa Satish Kharat 2019-01-18 377
0a2fdd2215e1fa Satish Kharat 2019-01-18 378 result = dc2c->result + dc2c->next_result;
0a2fdd2215e1fa Satish Kharat 2019-01-18 379 color = dc2c->color;
0a2fdd2215e1fa Satish Kharat 2019-01-18 380
0a2fdd2215e1fa Satish Kharat 2019-01-18 381 dc2c->next_result++;
0a2fdd2215e1fa Satish Kharat 2019-01-18 382 if (dc2c->next_result == dc2c->result_size) {
0a2fdd2215e1fa Satish Kharat 2019-01-18 383 dc2c->next_result = 0;
0a2fdd2215e1fa Satish Kharat 2019-01-18 384 dc2c->color = dc2c->color ? 0 : 1;
0a2fdd2215e1fa Satish Kharat 2019-01-18 385 }
0a2fdd2215e1fa Satish Kharat 2019-01-18 386
0a2fdd2215e1fa Satish Kharat 2019-01-18 387 for (delay = 0; delay < wait; delay++) {
0a2fdd2215e1fa Satish Kharat 2019-01-18 388 udelay(100);
0a2fdd2215e1fa Satish Kharat 2019-01-18 389 if (result->color == color) {
0a2fdd2215e1fa Satish Kharat 2019-01-18 390 if (result->error) {
0a2fdd2215e1fa Satish Kharat 2019-01-18 391 err = -(int) result->error;
0a2fdd2215e1fa Satish Kharat 2019-01-18 392 if (err != ERR_ECMDUNKNOWN ||
0a2fdd2215e1fa Satish Kharat 2019-01-18 393 cmd != CMD_CAPABILITY)
0a2fdd2215e1fa Satish Kharat 2019-01-18 394 pr_err("%s:Error %d devcmd %d\n",
0a2fdd2215e1fa Satish Kharat 2019-01-18 395 pci_name(vdev->pdev),
0a2fdd2215e1fa Satish Kharat 2019-01-18 396 err, _CMD_N(cmd));
0a2fdd2215e1fa Satish Kharat 2019-01-18 397 return err;
0a2fdd2215e1fa Satish Kharat 2019-01-18 398 }
0a2fdd2215e1fa Satish Kharat 2019-01-18 399 if (_CMD_DIR(cmd) & _CMD_DIR_READ) {
0a2fdd2215e1fa Satish Kharat 2019-01-18 400 rmb(); /*prevent reorder while reding result*/
0a2fdd2215e1fa Satish Kharat 2019-01-18 401 for (i = 0; i < VNIC_DEVCMD_NARGS; i++)
0a2fdd2215e1fa Satish Kharat 2019-01-18 402 vdev->args[i] = result->results[i];
0a2fdd2215e1fa Satish Kharat 2019-01-18 403 }
0a2fdd2215e1fa Satish Kharat 2019-01-18 404 return 0;
0a2fdd2215e1fa Satish Kharat 2019-01-18 405 }
0a2fdd2215e1fa Satish Kharat 2019-01-18 406 }
0a2fdd2215e1fa Satish Kharat 2019-01-18 407
0a2fdd2215e1fa Satish Kharat 2019-01-18 408 pr_err("%s:Timed out devcmd %d\n", pci_name(vdev->pdev), _CMD_N(cmd));
0a2fdd2215e1fa Satish Kharat 2019-01-18 409
0a2fdd2215e1fa Satish Kharat 2019-01-18 410 return -ETIMEDOUT;
0a2fdd2215e1fa Satish Kharat 2019-01-18 411 }
0a2fdd2215e1fa Satish Kharat 2019-01-18 412
:::::: The code at line 332 was first introduced by commit
:::::: 0a2fdd2215e1fa3b417792bd6e9cb719822cbfb6 scsi: fnic: Adding devcmd2 init and posting interfaces
:::::: TO: Satish Kharat <satishkh(a)cisco.com>
:::::: CC: Martin K. Petersen <martin.petersen(a)oracle.com>
---
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.12-rc1 6/6] lib/test_free_pages.c:20:36: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git kernel-in-vmalloc-v5.12-rc1
head: 7b99ca2d1494c9431f36164db472b70852ad9bf6
commit: 7b99ca2d1494c9431f36164db472b70852ad9bf6 [6/6] ARM: kernel in vmalloc
config: arm-randconfig-r005-20210412 (attached as .config)
compiler: arm-linux-gnueabi-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://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.12-rc1
git checkout 7b99ca2d1494c9431f36164db472b70852ad9bf6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 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 warnings (new ones prefixed by >>):
In file included from arch/arm/include/asm/memory.h:455,
from arch/arm/include/asm/page.h:160,
from arch/arm/include/asm/thread_info.h:14,
from include/linux/thread_info.h:58,
from include/asm-generic/preempt.h:5,
from ./arch/arm/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from lib/test_free_pages.c:10:
lib/test_free_pages.c: In function 'test_free_pages':
>> lib/test_free_pages.c:20:36: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion]
20 | struct page *page = virt_to_page(addr);
| ^~~~
| |
| long unsigned int
include/asm-generic/memory_model.h:33:41: note: in definition of macro '__pfn_to_page'
33 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~
lib/test_free_pages.c:20:23: note: in expansion of macro 'virt_to_page'
20 | struct page *page = virt_to_page(addr);
| ^~~~~~~~~~~~
In file included from arch/arm/include/asm/page.h:160,
from arch/arm/include/asm/thread_info.h:14,
from include/linux/thread_info.h:58,
from include/asm-generic/preempt.h:5,
from ./arch/arm/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from lib/test_free_pages.c:10:
arch/arm/include/asm/memory.h:331:53: note: expected 'const void *' but argument is of type 'long unsigned int'
331 | static inline unsigned long virt_to_pfn(const void *kaddr)
| ~~~~~~~~~~~~^~~~~
vim +/virt_to_pfn +20 lib/test_free_pages.c
e320d3012d25b1 Matthew Wilcox (Oracle 2020-10-13 13)
e320d3012d25b1 Matthew Wilcox (Oracle 2020-10-13 14) static void test_free_pages(gfp_t gfp)
e320d3012d25b1 Matthew Wilcox (Oracle 2020-10-13 15) {
e320d3012d25b1 Matthew Wilcox (Oracle 2020-10-13 16) unsigned int i;
e320d3012d25b1 Matthew Wilcox (Oracle 2020-10-13 17)
e320d3012d25b1 Matthew Wilcox (Oracle 2020-10-13 18) for (i = 0; i < 1000 * 1000; i++) {
e320d3012d25b1 Matthew Wilcox (Oracle 2020-10-13 19) unsigned long addr = __get_free_pages(gfp, 3);
e320d3012d25b1 Matthew Wilcox (Oracle 2020-10-13 @20) struct page *page = virt_to_page(addr);
e320d3012d25b1 Matthew Wilcox (Oracle 2020-10-13 21)
e320d3012d25b1 Matthew Wilcox (Oracle 2020-10-13 22) /* Simulate page cache getting a speculative reference */
e320d3012d25b1 Matthew Wilcox (Oracle 2020-10-13 23) get_page(page);
e320d3012d25b1 Matthew Wilcox (Oracle 2020-10-13 24) free_pages(addr, 3);
e320d3012d25b1 Matthew Wilcox (Oracle 2020-10-13 25) put_page(page);
e320d3012d25b1 Matthew Wilcox (Oracle 2020-10-13 26) }
e320d3012d25b1 Matthew Wilcox (Oracle 2020-10-13 27) }
e320d3012d25b1 Matthew Wilcox (Oracle 2020-10-13 28)
:::::: The code at line 20 was first introduced by commit
:::::: e320d3012d25b1fb5f3df4edb7bd44a1c362ec10 mm/page_alloc.c: fix freeing non-compound pages
:::::: TO: Matthew Wilcox (Oracle) <willy(a)infradead.org>
:::::: 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
arch/arm/mach-omap2/board-generic.c:44:6: warning: no previous prototype for 'tick_broadcast'
by kernel test robot
Hi Tony,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 89698becf06d341a700913c3d89ce2a914af69a2
commit: d86ad463d6706d35167418660ae3293207ee9d1c ARM: OMAP2+: Fix regression for using local timer on non-SMP SoCs
date: 11 months ago
config: arm-randconfig-c004-20210412 (attached as .config)
compiler: arm-linux-gnueabi-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://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 d86ad463d6706d35167418660ae3293207ee9d1c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 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 warnings (new ones prefixed by >>):
arch/arm/mach-omap2/board-generic.c:36:28: warning: no previous prototype for 'omap_init_time_of' [-Wmissing-prototypes]
36 | void __init __maybe_unused omap_init_time_of(void)
| ^~~~~~~~~~~~~~~~~
>> arch/arm/mach-omap2/board-generic.c:44:6: warning: no previous prototype for 'tick_broadcast' [-Wmissing-prototypes]
44 | void tick_broadcast(const struct cpumask *mask)
| ^~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for TEGRA20_APB_DMA
Depends on DMADEVICES && (ARCH_TEGRA || COMPILE_TEST
Selected by
- SOC_TEGRA_FUSE && ARCH_TEGRA && ARCH_TEGRA_2x_SOC
vim +/tick_broadcast +44 arch/arm/mach-omap2/board-generic.c
41
42 /* Used by am437x for ARM timer in non-SMP configurations */
43 #if !defined(CONFIG_SMP) && defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST)
> 44 void tick_broadcast(const struct cpumask *mask)
45 {
46 }
47 #endif
48
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[s390:features 40/44] drivers/gpu/drm/drm_lock.c:75:10: error: passing 'typeof (lock)' (aka 'volatile unsigned int *') to parameter of type 'void *' discards qualifiers
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
head: 9d42a4d3e27db3cabad82483ed876d4c8b8bed65
commit: 000174233b91340ca52a9eca905d029a9a2aefd9 [40/44] s390/atomic,cmpxchg: switch to use atomic-instrumented.h
config: s390-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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git/commit/?id...
git remote add s390 https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git
git fetch --no-tags s390 features
git checkout 000174233b91340ca52a9eca905d029a9a2aefd9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
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 drivers/gpu/drm/drm_lock.c:41:
In file included from include/drm/drm_file.h:39:
In file included from include/drm/drm_prime.h:37:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
In file included from drivers/gpu/drm/drm_lock.c:41:
In file included from include/drm/drm_file.h:39:
In file included from include/drm/drm_prime.h:37:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
^
In file included from drivers/gpu/drm/drm_lock.c:41:
In file included from include/drm/drm_file.h:39:
In file included from include/drm/drm_prime.h:37:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> drivers/gpu/drm/drm_lock.c:75:10: error: passing 'typeof (lock)' (aka 'volatile unsigned int *') to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
prev = cmpxchg(lock, old, new);
^~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/atomic-instrumented.h:1685:2: note: expanded from macro 'cmpxchg'
arch_cmpxchg(__ai_ptr, __VA_ARGS__); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/s390/include/asm/cmpxchg.h:162:13: note: expanded from macro 'arch_cmpxchg'
__cmpxchg((ptr), (unsigned long)(o), \
^~~~~
arch/s390/include/asm/cmpxchg.h:87:45: note: passing argument to parameter 'ptr' here
static inline unsigned long __cmpxchg(void *ptr, unsigned long old,
^
drivers/gpu/drm/drm_lock.c:118:10: error: passing 'typeof (lock)' (aka 'volatile unsigned int *') to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
prev = cmpxchg(lock, old, new);
^~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/atomic-instrumented.h:1685:2: note: expanded from macro 'cmpxchg'
arch_cmpxchg(__ai_ptr, __VA_ARGS__); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/s390/include/asm/cmpxchg.h:162:13: note: expanded from macro 'arch_cmpxchg'
__cmpxchg((ptr), (unsigned long)(o), \
^~~~~
arch/s390/include/asm/cmpxchg.h:87:45: note: passing argument to parameter 'ptr' here
static inline unsigned long __cmpxchg(void *ptr, unsigned long old,
^
drivers/gpu/drm/drm_lock.c:141:10: error: passing 'typeof (lock)' (aka 'volatile unsigned int *') to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
prev = cmpxchg(lock, old, new);
^~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/atomic-instrumented.h:1685:2: note: expanded from macro 'cmpxchg'
arch_cmpxchg(__ai_ptr, __VA_ARGS__); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/s390/include/asm/cmpxchg.h:162:13: note: expanded from macro 'arch_cmpxchg'
__cmpxchg((ptr), (unsigned long)(o), \
^~~~~
arch/s390/include/asm/cmpxchg.h:87:45: note: passing argument to parameter 'ptr' here
static inline unsigned long __cmpxchg(void *ptr, unsigned long old,
^
drivers/gpu/drm/drm_lock.c:319:12: error: passing 'typeof (lock)' (aka 'volatile unsigned int *') to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
prev = cmpxchg(lock, old, DRM_KERNEL_CONTEXT);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/atomic-instrumented.h:1685:2: note: expanded from macro 'cmpxchg'
arch_cmpxchg(__ai_ptr, __VA_ARGS__); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/s390/include/asm/cmpxchg.h:162:13: note: expanded from macro 'arch_cmpxchg'
__cmpxchg((ptr), (unsigned long)(o), \
^~~~~
arch/s390/include/asm/cmpxchg.h:87:45: note: passing argument to parameter 'ptr' here
static inline unsigned long __cmpxchg(void *ptr, unsigned long old,
^
12 warnings and 4 errors generated.
vim +75 drivers/gpu/drm/drm_lock.c
4ac5ec40ec7002 Daniel Vetter 2010-08-23 48
bd50d4a2168370 Benjamin Gaignard 2020-03-06 49 /*
1a75a222f5ca10 Daniel Vetter 2016-06-14 50 * Take the heavyweight lock.
1a75a222f5ca10 Daniel Vetter 2016-06-14 51 *
1a75a222f5ca10 Daniel Vetter 2016-06-14 52 * \param lock lock pointer.
1a75a222f5ca10 Daniel Vetter 2016-06-14 53 * \param context locking context.
1a75a222f5ca10 Daniel Vetter 2016-06-14 54 * \return one if the lock is held, or zero otherwise.
1a75a222f5ca10 Daniel Vetter 2016-06-14 55 *
1a75a222f5ca10 Daniel Vetter 2016-06-14 56 * Attempt to mark the lock as held by the given context, via the \p cmpxchg instruction.
1a75a222f5ca10 Daniel Vetter 2016-06-14 57 */
1a75a222f5ca10 Daniel Vetter 2016-06-14 58 static
1a75a222f5ca10 Daniel Vetter 2016-06-14 59 int drm_lock_take(struct drm_lock_data *lock_data,
1a75a222f5ca10 Daniel Vetter 2016-06-14 60 unsigned int context)
1a75a222f5ca10 Daniel Vetter 2016-06-14 61 {
1a75a222f5ca10 Daniel Vetter 2016-06-14 62 unsigned int old, new, prev;
1a75a222f5ca10 Daniel Vetter 2016-06-14 63 volatile unsigned int *lock = &lock_data->hw_lock->lock;
1a75a222f5ca10 Daniel Vetter 2016-06-14 64
1a75a222f5ca10 Daniel Vetter 2016-06-14 65 spin_lock_bh(&lock_data->spinlock);
1a75a222f5ca10 Daniel Vetter 2016-06-14 66 do {
1a75a222f5ca10 Daniel Vetter 2016-06-14 67 old = *lock;
1a75a222f5ca10 Daniel Vetter 2016-06-14 68 if (old & _DRM_LOCK_HELD)
1a75a222f5ca10 Daniel Vetter 2016-06-14 69 new = old | _DRM_LOCK_CONT;
1a75a222f5ca10 Daniel Vetter 2016-06-14 70 else {
1a75a222f5ca10 Daniel Vetter 2016-06-14 71 new = context | _DRM_LOCK_HELD |
1a75a222f5ca10 Daniel Vetter 2016-06-14 72 ((lock_data->user_waiters + lock_data->kernel_waiters > 1) ?
1a75a222f5ca10 Daniel Vetter 2016-06-14 73 _DRM_LOCK_CONT : 0);
1a75a222f5ca10 Daniel Vetter 2016-06-14 74 }
1a75a222f5ca10 Daniel Vetter 2016-06-14 @75 prev = cmpxchg(lock, old, new);
1a75a222f5ca10 Daniel Vetter 2016-06-14 76 } while (prev != old);
1a75a222f5ca10 Daniel Vetter 2016-06-14 77 spin_unlock_bh(&lock_data->spinlock);
1a75a222f5ca10 Daniel Vetter 2016-06-14 78
1a75a222f5ca10 Daniel Vetter 2016-06-14 79 if (_DRM_LOCKING_CONTEXT(old) == context) {
1a75a222f5ca10 Daniel Vetter 2016-06-14 80 if (old & _DRM_LOCK_HELD) {
1a75a222f5ca10 Daniel Vetter 2016-06-14 81 if (context != DRM_KERNEL_CONTEXT) {
1a75a222f5ca10 Daniel Vetter 2016-06-14 82 DRM_ERROR("%d holds heavyweight lock\n",
1a75a222f5ca10 Daniel Vetter 2016-06-14 83 context);
1a75a222f5ca10 Daniel Vetter 2016-06-14 84 }
1a75a222f5ca10 Daniel Vetter 2016-06-14 85 return 0;
1a75a222f5ca10 Daniel Vetter 2016-06-14 86 }
1a75a222f5ca10 Daniel Vetter 2016-06-14 87 }
1a75a222f5ca10 Daniel Vetter 2016-06-14 88
1a75a222f5ca10 Daniel Vetter 2016-06-14 89 if ((_DRM_LOCKING_CONTEXT(new)) == context && (new & _DRM_LOCK_HELD)) {
1a75a222f5ca10 Daniel Vetter 2016-06-14 90 /* Have lock */
1a75a222f5ca10 Daniel Vetter 2016-06-14 91 return 1;
1a75a222f5ca10 Daniel Vetter 2016-06-14 92 }
1a75a222f5ca10 Daniel Vetter 2016-06-14 93 return 0;
1a75a222f5ca10 Daniel Vetter 2016-06-14 94 }
1a75a222f5ca10 Daniel Vetter 2016-06-14 95
:::::: The code at line 75 was first introduced by commit
:::::: 1a75a222f5ca1063249b5c92972d32dcc3c8966e drm: Hide hw.lock cleanup in filp->release better
:::::: TO: Daniel Vetter <daniel.vetter(a)ffwll.ch>
:::::: CC: Daniel Vetter <daniel.vetter(a)ffwll.ch>
---
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 2/2] powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto
by kernel test robot
Hi Christophe,
I love your patch! Yet something to improve:
[auto build test ERROR on powerpc/next]
[also build test ERROR on kbuild/for-next v5.12-rc7 next-20210412]
[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/Christophe-Leroy/powerpc-bug-Rem...
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-randconfig-r035-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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/0day-ci/linux/commit/398ea05a716b58d231d62d20083a10148...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Christophe-Leroy/powerpc-bug-Remove-specific-powerpc-BUG_ON-and-WARN_ON-on-PPC32/20210413-002741
git checkout 398ea05a716b58d231d62d20083a101488d155b4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
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 >>):
arch/powerpc/kernel/misc_32.S: Assembler messages:
>> arch/powerpc/kernel/misc_32.S:240: Error: unrecognized opcode: `emit_warn_entry'
clang-13: error: assembler command failed with exit code 1 (use -v to see invocation)
vim +240 arch/powerpc/kernel/misc_32.S
218
219 /*
220 * Copy a whole page. We use the dcbz instruction on the destination
221 * to reduce memory traffic (it eliminates the unnecessary reads of
222 * the destination into cache). This requires that the destination
223 * is cacheable.
224 */
225 #define COPY_16_BYTES \
226 lwz r6,4(r4); \
227 lwz r7,8(r4); \
228 lwz r8,12(r4); \
229 lwzu r9,16(r4); \
230 stw r6,4(r3); \
231 stw r7,8(r3); \
232 stw r8,12(r3); \
233 stwu r9,16(r3)
234
235 _GLOBAL(copy_page)
236 rlwinm r5, r3, 0, L1_CACHE_BYTES - 1
237 addi r3,r3,-4
238
239 0: twnei r5, 0 /* WARN if r3 is not cache aligned */
> 240 EMIT_WARN_ENTRY 0b,__FILE__,__LINE__, BUGFLAG_WARNING
241
242 addi r4,r4,-4
243
244 li r5,4
245
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months