[linux-next:pending-fixes 81/200] drivers/media/common/videobuf2/videobuf2-core.c:391:12: warning: stack frame size of 1040 bytes in function '__vb2_queue_alloc'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git pending-fixes
head:   c9b6935dc4f4d4ea5d48b6ea96220632c1a5eadf
commit: bac63f1239aceb092e94fee3ef112dbaea79b372 [81/200] media: vb2: set cache sync hints when init buffers
config: mips-randconfig-r026-20201209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1968804ac726e7674d5de22bc2204b45857da344)
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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bac63f1239aceb092e94fee3ef112dbaea79b372
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next pending-fixes
        git checkout bac63f1239aceb092e94fee3ef112dbaea79b372
        # 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@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/media/common/videobuf2/videobuf2-core.c:391:12: warning: stack frame size of 1040 bytes in function '__vb2_queue_alloc'
   static int __vb2_queue_alloc(struct vb2_queue enum vb2_memory memory,
   ^
   fatal error: error in backend: Nested variants found in inline asm string: ' .set push
   .set mips64r2
   .if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/atomic.h", .line = 154, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
   1: ll $0, $1 # atomic_sub
   subu $0, $2
   sc $0, $1
   beqz $0, 1b
   .set pop
   '
   clang-12: error: clang frontend command failed with exit code 70 (use -v to see invocation)
   clang version 12.0.0 (git://gitmirror/llvm_project 1968804ac726e7674d5de22bc2204b45857da344)
   Target: mipsel-unknown-linux-gnu
   Thread model: posix
   InstalledDir: /opt/cross/clang-1968804ac7/bin
   clang-12: note: diagnostic msg:
   Makefile arch drivers include kernel net scripts source usr

vim +/__vb2_queue_alloc +391 drivers/media/common/videobuf2/videobuf2-core.c

e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  383  
2a87af6ba1b9df drivers/media/v4l2-core/videobuf2-core.c        Mauro Carvalho Chehab 2017-11-27  384  /*
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  385   * __vb2_queue_alloc() - allocate videobuf buffer structures and (for MMAP type)
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  386   * video buffer memory for all buffers/planes on the queue and initializes the
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  387   * queue
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  388   *
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  389   * Returns the number of buffers successfully allocated.
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  390   */
bed04f93424737 drivers/media/v4l2-core/videobuf2-core.c        Junghak Sung          2015-10-06 @391  static int __vb2_queue_alloc(struct vb2_queue *q, enum vb2_memory memory,
58e1ba3ce6b2c8 drivers/media/v4l2-core/videobuf2-core.c        Hans Verkuil          2015-11-20  392  			     unsigned int num_buffers, unsigned int num_planes,
58e1ba3ce6b2c8 drivers/media/v4l2-core/videobuf2-core.c        Hans Verkuil          2015-11-20  393  			     const unsigned plane_sizes[VB2_MAX_PLANES])
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  394  {
489648afcd309b drivers/media/v4l2-core/videobuf2-core.c        Hans Verkuil          2015-11-20  395  	unsigned int buffer, plane;
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  396  	struct vb2_buffer *vb;
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  397  	int ret;
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  398  
df93dc61b0d8b1 drivers/media/common/videobuf/videobuf2-core.c  Mauro Carvalho Chehab 2017-12-28  399  	/* Ensure that q->num_buffers+num_buffers is below VB2_MAX_FRAME */
df93dc61b0d8b1 drivers/media/common/videobuf/videobuf2-core.c  Mauro Carvalho Chehab 2017-12-28  400  	num_buffers = min_t(unsigned int, num_buffers,
df93dc61b0d8b1 drivers/media/common/videobuf/videobuf2-core.c  Mauro Carvalho Chehab 2017-12-28  401  			    VB2_MAX_FRAME - q->num_buffers);
df93dc61b0d8b1 drivers/media/common/videobuf/videobuf2-core.c  Mauro Carvalho Chehab 2017-12-28  402  
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  403  	for (buffer = 0; buffer < num_buffers; ++buffer) {
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  404  		/* Allocate videobuf buffer structures */
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  405  		vb = kzalloc(q->buf_struct_size, GFP_KERNEL);
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  406  		if (!vb) {
b820935b35479e drivers/media/common/videobuf2/videobuf2-core.c Laurent Pinchart      2020-06-21  407  			dprintk(q, 1, "memory alloc for buffer struct failed\n");
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  408  			break;
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  409  		}
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  410  
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  411  		vb->state = VB2_BUF_STATE_DEQUEUED;
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  412  		vb->vb2_queue = q;
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  413  		vb->num_planes = num_planes;
2d7007153f0c9b drivers/media/v4l2-core/videobuf2-core.c        Junghak Sung          2015-09-22  414  		vb->index = q->num_buffers + buffer;
2d7007153f0c9b drivers/media/v4l2-core/videobuf2-core.c        Junghak Sung          2015-09-22  415  		vb->type = q->type;
2d7007153f0c9b drivers/media/v4l2-core/videobuf2-core.c        Junghak Sung          2015-09-22  416  		vb->memory = memory;
bac63f1239aceb drivers/media/common/videobuf2/videobuf2-core.c Sergey Senozhatsky    2020-11-30  417  		/*
bac63f1239aceb drivers/media/common/videobuf2/videobuf2-core.c Sergey Senozhatsky    2020-11-30  418  		 * We need to set these flags here so that the videobuf2 core
bac63f1239aceb drivers/media/common/videobuf2/videobuf2-core.c Sergey Senozhatsky    2020-11-30  419  		 * will call ->prepare()/->finish() cache sync/flush on vb2
bac63f1239aceb drivers/media/common/videobuf2/videobuf2-core.c Sergey Senozhatsky    2020-11-30  420  		 * buffers when appropriate. However, we can avoid explicit
bac63f1239aceb drivers/media/common/videobuf2/videobuf2-core.c Sergey Senozhatsky    2020-11-30  421  		 * ->prepare() and ->finish() cache sync for DMABUF buffers,
bac63f1239aceb drivers/media/common/videobuf2/videobuf2-core.c Sergey Senozhatsky    2020-11-30  422  		 * because DMA exporter takes care of it.
bac63f1239aceb drivers/media/common/videobuf2/videobuf2-core.c Sergey Senozhatsky    2020-11-30  423  		 */
bac63f1239aceb drivers/media/common/videobuf2/videobuf2-core.c Sergey Senozhatsky    2020-11-30  424  		if (q->memory != VB2_MEMORY_DMABUF) {
bac63f1239aceb drivers/media/common/videobuf2/videobuf2-core.c Sergey Senozhatsky    2020-11-30  425  			vb->need_cache_sync_on_prepare = 1;
bac63f1239aceb drivers/media/common/videobuf2/videobuf2-core.c Sergey Senozhatsky    2020-11-30  426  			vb->need_cache_sync_on_finish = 1;
bac63f1239aceb drivers/media/common/videobuf2/videobuf2-core.c Sergey Senozhatsky    2020-11-30  427  		}
58e1ba3ce6b2c8 drivers/media/v4l2-core/videobuf2-core.c        Hans Verkuil          2015-11-20  428  		for (plane = 0; plane < num_planes; ++plane) {
58e1ba3ce6b2c8 drivers/media/v4l2-core/videobuf2-core.c        Hans Verkuil          2015-11-20  429  			vb->planes[plane].length = plane_sizes[plane];
58e1ba3ce6b2c8 drivers/media/v4l2-core/videobuf2-core.c        Hans Verkuil          2015-11-20  430  			vb->planes[plane].min_length = plane_sizes[plane];
58e1ba3ce6b2c8 drivers/media/v4l2-core/videobuf2-core.c        Hans Verkuil          2015-11-20  431  		}
8e013700bc1280 drivers/media/common/videobuf2/videobuf2-core.c Hans Verkuil          2018-06-01  432  		call_void_bufop(q, init_buffer, vb);
8e013700bc1280 drivers/media/common/videobuf2/videobuf2-core.c Hans Verkuil          2018-06-01  433  
e32f856ab29e93 drivers/media/v4l2-core/videobuf2-core.c        Hans Verkuil          2015-11-20  434  		q->bufs[vb->index] = vb;
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  435  
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  436  		/* Allocate video buffer memory for the MMAP type */
bed04f93424737 drivers/media/v4l2-core/videobuf2-core.c        Junghak Sung          2015-10-06  437  		if (memory == VB2_MEMORY_MMAP) {
c1426bc727b788 drivers/media/video/videobuf2-core.c            Marek Szyprowski      2011-08-24  438  			ret = __vb2_buf_mem_alloc(vb);
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  439  			if (ret) {
b820935b35479e drivers/media/common/videobuf2/videobuf2-core.c Laurent Pinchart      2020-06-21  440  				dprintk(q, 1, "failed allocating memory for buffer %d\n",
8720427c198b6d drivers/media/v4l2-core/videobuf2-core.c        Mauro Carvalho Chehab 2016-10-18  441  					buffer);
e32f856ab29e93 drivers/media/v4l2-core/videobuf2-core.c        Hans Verkuil          2015-11-20  442  				q->bufs[vb->index] = NULL;
58e1ba3ce6b2c8 drivers/media/v4l2-core/videobuf2-core.c        Hans Verkuil          2015-11-20  443  				kfree(vb);
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  444  				break;
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  445  			}
20eedf0e169180 drivers/media/v4l2-core/videobuf2-core.c        Hans Verkuil          2015-11-20  446  			__setup_offsets(vb);
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  447  			/*
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  448  			 * Call the driver-provided buffer initialization
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  449  			 * callback, if given. An error in initialization
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  450  			 * results in queue setup failure.
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  451  			 */
b5b4541eef8eac drivers/media/v4l2-core/videobuf2-core.c        Hans Verkuil          2014-01-29  452  			ret = call_vb_qop(vb, buf_init, vb);
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  453  			if (ret) {
b820935b35479e drivers/media/common/videobuf2/videobuf2-core.c Laurent Pinchart      2020-06-21  454  				dprintk(q, 1, "buffer %d %p initialization failed\n",
8720427c198b6d drivers/media/v4l2-core/videobuf2-core.c        Mauro Carvalho Chehab 2016-10-18  455  					buffer, vb);
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  456  				__vb2_buf_mem_free(vb);
e32f856ab29e93 drivers/media/v4l2-core/videobuf2-core.c        Hans Verkuil          2015-11-20  457  				q->bufs[vb->index] = NULL;
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  458  				kfree(vb);
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  459  				break;
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  460  			}
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  461  		}
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  462  	}
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  463  
b820935b35479e drivers/media/common/videobuf2/videobuf2-core.c Laurent Pinchart      2020-06-21  464  	dprintk(q, 3, "allocated %d buffers, %d plane(s) each\n",
2d86401c2cbfce drivers/media/video/videobuf2-core.c            Guennadi Liakhovetski 2011-09-28  465  		buffer, num_planes);
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  466  
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  467  	return buffer;
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  468  }
e23ccc0ad92586 drivers/media/video/videobuf2-core.c            Pawel Osciak          2010-10-11  469  

:::::: The code at line 391 was first introduced by commit
:::::: bed04f9342473743fc96b71c3130f645c718bd47 [media] media: videobuf2: Replace v4l2-specific data with vb2 data

:::::: TO: Junghak Sung <jh1009.sung@xxxxxxxxxxx>
:::::: CC: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux