All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
Cc: "Thomas Hellstrom" <thellstrom@vmware.com>,
	kbuild-all@lists.01.org,
	"Tomeu Vizoso" <tomeu.vizoso@collabora.com>,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>,
	"Intel Graphics Development" <intel-gfx@lists.freedesktop.org>,
	"DRI Development" <dri-devel@lists.freedesktop.org>,
	"VMware Graphics" <linux-graphics-maintainer@vmware.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Dave Airlie" <airlied@redhat.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Daniel Vetter" <daniel.vetter@intel.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Ben Skeggs" <bskeggs@redhat.com>
Subject: Re: [PATCH 1/3] dma_resv: prime lockdep annotations
Date: Tue, 22 Oct 2019 15:55:54 +0800	[thread overview]
Message-ID: <201910221503.D7vVn5g9%lkp@intel.com> (raw)
In-Reply-To: <20191021145017.17384-2-daniel.vetter@ffwll.ch>

[-- Attachment #1: Type: text/plain, Size: 6716 bytes --]

Hi Daniel,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.4-rc4 next-20191021]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Daniel-Vetter/dma_resv-lockdep-annotations-priming/20191022-015539
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7d194c2100ad2a6dded545887d02754948ca5241
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=sparc64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:6:0,
                    from include/linux/kernel.h:15,
                    from include/asm-generic/bug.h:19,
                    from arch/sparc/include/asm/bug.h:25,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from arch/sparc/include/asm/current.h:15,
                    from include/linux/mutex.h:14,
                    from include/linux/ww_mutex.h:20,
                    from include/linux/dma-resv.h:42,
                    from drivers/dma-buf/dma-resv.c:35:
>> drivers/dma-buf/dma-resv.c:119:17: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    subsys_initcall(dma_resv_lockdep);
                    ^
   include/linux/init.h:197:50: note: in definition of macro '___define_initcall'
      __attribute__((__section__(#__sec ".init"))) = fn;
                                                     ^~
>> include/linux/init.h:224:30: note: in expansion of macro '__define_initcall'
    #define subsys_initcall(fn)  __define_initcall(fn, 4)
                                 ^~~~~~~~~~~~~~~~~
>> drivers/dma-buf/dma-resv.c:119:1: note: in expansion of macro 'subsys_initcall'
    subsys_initcall(dma_resv_lockdep);
    ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from include/linux/printk.h:6:0,
                    from include/linux/kernel.h:15,
                    from include/asm-generic/bug.h:19,
                    from arch/sparc/include/asm/bug.h:25,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from arch/sparc/include/asm/current.h:15,
                    from include/linux/mutex.h:14,
                    from include/linux/ww_mutex.h:20,
                    from include/linux/dma-resv.h:42,
                    from drivers//dma-buf/dma-resv.c:35:
   drivers//dma-buf/dma-resv.c:119:17: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    subsys_initcall(dma_resv_lockdep);
                    ^
   include/linux/init.h:197:50: note: in definition of macro '___define_initcall'
      __attribute__((__section__(#__sec ".init"))) = fn;
                                                     ^~
>> include/linux/init.h:224:30: note: in expansion of macro '__define_initcall'
    #define subsys_initcall(fn)  __define_initcall(fn, 4)
                                 ^~~~~~~~~~~~~~~~~
   drivers//dma-buf/dma-resv.c:119:1: note: in expansion of macro 'subsys_initcall'
    subsys_initcall(dma_resv_lockdep);
    ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +119 drivers/dma-buf/dma-resv.c

  > 35	#include <linux/dma-resv.h>
    36	#include <linux/export.h>
    37	#include <linux/sched/mm.h>
    38	
    39	/**
    40	 * DOC: Reservation Object Overview
    41	 *
    42	 * The reservation object provides a mechanism to manage shared and
    43	 * exclusive fences associated with a buffer.  A reservation object
    44	 * can have attached one exclusive fence (normally associated with
    45	 * write operations) or N shared fences (read operations).  The RCU
    46	 * mechanism is used to protect read access to fences from locked
    47	 * write-side updates.
    48	 */
    49	
    50	DEFINE_WD_CLASS(reservation_ww_class);
    51	EXPORT_SYMBOL(reservation_ww_class);
    52	
    53	struct lock_class_key reservation_seqcount_class;
    54	EXPORT_SYMBOL(reservation_seqcount_class);
    55	
    56	const char reservation_seqcount_string[] = "reservation_seqcount";
    57	EXPORT_SYMBOL(reservation_seqcount_string);
    58	
    59	/**
    60	 * dma_resv_list_alloc - allocate fence list
    61	 * @shared_max: number of fences we need space for
    62	 *
    63	 * Allocate a new dma_resv_list and make sure to correctly initialize
    64	 * shared_max.
    65	 */
    66	static struct dma_resv_list *dma_resv_list_alloc(unsigned int shared_max)
    67	{
    68		struct dma_resv_list *list;
    69	
    70		list = kmalloc(offsetof(typeof(*list), shared[shared_max]), GFP_KERNEL);
    71		if (!list)
    72			return NULL;
    73	
    74		list->shared_max = (ksize(list) - offsetof(typeof(*list), shared)) /
    75			sizeof(*list->shared);
    76	
    77		return list;
    78	}
    79	
    80	/**
    81	 * dma_resv_list_free - free fence list
    82	 * @list: list to free
    83	 *
    84	 * Free a dma_resv_list and make sure to drop all references.
    85	 */
    86	static void dma_resv_list_free(struct dma_resv_list *list)
    87	{
    88		unsigned int i;
    89	
    90		if (!list)
    91			return;
    92	
    93		for (i = 0; i < list->shared_count; ++i)
    94			dma_fence_put(rcu_dereference_protected(list->shared[i], true));
    95	
    96		kfree_rcu(list, rcu);
    97	}
    98	
    99	#if IS_ENABLED(CONFIG_LOCKDEP)
   100	static void __init dma_resv_lockdep(void)
   101	{
   102		struct mm_struct *mm = mm_alloc();
   103		struct dma_resv obj;
   104	
   105		if (!mm)
   106			return;
   107	
   108		dma_resv_init(&obj);
   109	
   110		down_read(&mm->mmap_sem);
   111		ww_mutex_lock(&obj.lock, NULL);
   112		fs_reclaim_acquire(GFP_KERNEL);
   113		fs_reclaim_release(GFP_KERNEL);
   114		ww_mutex_unlock(&obj.lock);
   115		up_read(&mm->mmap_sem);
   116		
   117		mmput(mm);
   118	}
 > 119	subsys_initcall(dma_resv_lockdep);
   120	#endif
   121	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 59103 bytes --]

[-- Attachment #3: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 1/3] dma_resv: prime lockdep annotations
Date: Tue, 22 Oct 2019 15:55:54 +0800	[thread overview]
Message-ID: <201910221503.D7vVn5g9%lkp@intel.com> (raw)
In-Reply-To: <20191021145017.17384-2-daniel.vetter@ffwll.ch>

[-- Attachment #1: Type: text/plain, Size: 6884 bytes --]

Hi Daniel,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.4-rc4 next-20191021]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Daniel-Vetter/dma_resv-lockdep-annotations-priming/20191022-015539
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7d194c2100ad2a6dded545887d02754948ca5241
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=sparc64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:6:0,
                    from include/linux/kernel.h:15,
                    from include/asm-generic/bug.h:19,
                    from arch/sparc/include/asm/bug.h:25,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from arch/sparc/include/asm/current.h:15,
                    from include/linux/mutex.h:14,
                    from include/linux/ww_mutex.h:20,
                    from include/linux/dma-resv.h:42,
                    from drivers/dma-buf/dma-resv.c:35:
>> drivers/dma-buf/dma-resv.c:119:17: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    subsys_initcall(dma_resv_lockdep);
                    ^
   include/linux/init.h:197:50: note: in definition of macro '___define_initcall'
      __attribute__((__section__(#__sec ".init"))) = fn;
                                                     ^~
>> include/linux/init.h:224:30: note: in expansion of macro '__define_initcall'
    #define subsys_initcall(fn)  __define_initcall(fn, 4)
                                 ^~~~~~~~~~~~~~~~~
>> drivers/dma-buf/dma-resv.c:119:1: note: in expansion of macro 'subsys_initcall'
    subsys_initcall(dma_resv_lockdep);
    ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from include/linux/printk.h:6:0,
                    from include/linux/kernel.h:15,
                    from include/asm-generic/bug.h:19,
                    from arch/sparc/include/asm/bug.h:25,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from arch/sparc/include/asm/current.h:15,
                    from include/linux/mutex.h:14,
                    from include/linux/ww_mutex.h:20,
                    from include/linux/dma-resv.h:42,
                    from drivers//dma-buf/dma-resv.c:35:
   drivers//dma-buf/dma-resv.c:119:17: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    subsys_initcall(dma_resv_lockdep);
                    ^
   include/linux/init.h:197:50: note: in definition of macro '___define_initcall'
      __attribute__((__section__(#__sec ".init"))) = fn;
                                                     ^~
>> include/linux/init.h:224:30: note: in expansion of macro '__define_initcall'
    #define subsys_initcall(fn)  __define_initcall(fn, 4)
                                 ^~~~~~~~~~~~~~~~~
   drivers//dma-buf/dma-resv.c:119:1: note: in expansion of macro 'subsys_initcall'
    subsys_initcall(dma_resv_lockdep);
    ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +119 drivers/dma-buf/dma-resv.c

  > 35	#include <linux/dma-resv.h>
    36	#include <linux/export.h>
    37	#include <linux/sched/mm.h>
    38	
    39	/**
    40	 * DOC: Reservation Object Overview
    41	 *
    42	 * The reservation object provides a mechanism to manage shared and
    43	 * exclusive fences associated with a buffer.  A reservation object
    44	 * can have attached one exclusive fence (normally associated with
    45	 * write operations) or N shared fences (read operations).  The RCU
    46	 * mechanism is used to protect read access to fences from locked
    47	 * write-side updates.
    48	 */
    49	
    50	DEFINE_WD_CLASS(reservation_ww_class);
    51	EXPORT_SYMBOL(reservation_ww_class);
    52	
    53	struct lock_class_key reservation_seqcount_class;
    54	EXPORT_SYMBOL(reservation_seqcount_class);
    55	
    56	const char reservation_seqcount_string[] = "reservation_seqcount";
    57	EXPORT_SYMBOL(reservation_seqcount_string);
    58	
    59	/**
    60	 * dma_resv_list_alloc - allocate fence list
    61	 * @shared_max: number of fences we need space for
    62	 *
    63	 * Allocate a new dma_resv_list and make sure to correctly initialize
    64	 * shared_max.
    65	 */
    66	static struct dma_resv_list *dma_resv_list_alloc(unsigned int shared_max)
    67	{
    68		struct dma_resv_list *list;
    69	
    70		list = kmalloc(offsetof(typeof(*list), shared[shared_max]), GFP_KERNEL);
    71		if (!list)
    72			return NULL;
    73	
    74		list->shared_max = (ksize(list) - offsetof(typeof(*list), shared)) /
    75			sizeof(*list->shared);
    76	
    77		return list;
    78	}
    79	
    80	/**
    81	 * dma_resv_list_free - free fence list
    82	 * @list: list to free
    83	 *
    84	 * Free a dma_resv_list and make sure to drop all references.
    85	 */
    86	static void dma_resv_list_free(struct dma_resv_list *list)
    87	{
    88		unsigned int i;
    89	
    90		if (!list)
    91			return;
    92	
    93		for (i = 0; i < list->shared_count; ++i)
    94			dma_fence_put(rcu_dereference_protected(list->shared[i], true));
    95	
    96		kfree_rcu(list, rcu);
    97	}
    98	
    99	#if IS_ENABLED(CONFIG_LOCKDEP)
   100	static void __init dma_resv_lockdep(void)
   101	{
   102		struct mm_struct *mm = mm_alloc();
   103		struct dma_resv obj;
   104	
   105		if (!mm)
   106			return;
   107	
   108		dma_resv_init(&obj);
   109	
   110		down_read(&mm->mmap_sem);
   111		ww_mutex_lock(&obj.lock, NULL);
   112		fs_reclaim_acquire(GFP_KERNEL);
   113		fs_reclaim_release(GFP_KERNEL);
   114		ww_mutex_unlock(&obj.lock);
   115		up_read(&mm->mmap_sem);
   116		
   117		mmput(mm);
   118	}
 > 119	subsys_initcall(dma_resv_lockdep);
   120	#endif
   121	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 59103 bytes --]

  parent reply	other threads:[~2019-10-22  7:55 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21 14:50 [PATCH 0/3] dma_resv lockdep annotations/priming Daniel Vetter
2019-10-21 14:50 ` [PATCH 1/3] dma_resv: prime lockdep annotations Daniel Vetter
2019-10-21 16:56   ` Thomas Hellstrom
2019-10-22  7:55   ` kbuild test robot [this message]
2019-10-22  7:55     ` kbuild test robot
     [not found] ` <20191021145017.17384-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
2019-10-21 14:50   ` [PATCH 2/3] drm/nouveau: slowpath for pushbuf ioctl Daniel Vetter
2019-10-24  9:04     ` Daniel Vetter
2019-10-24  9:04       ` [Intel-gfx] " Daniel Vetter
2019-10-24  9:04       ` Daniel Vetter
2019-10-21 14:50 ` [PATCH 3/3] drm/ttm: remove ttm_bo_wait_unreserved Daniel Vetter
2019-10-21 15:26 ` ✗ Fi.CI.CHECKPATCH: warning for dma_resv lockdep annotations/priming Patchwork
2019-10-21 15:51 ` ✓ Fi.CI.BAT: success " Patchwork
2019-10-21 21:26 ` ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-11-04 17:37 [PATCH 1/3] dma_resv: prime lockdep annotations Daniel Vetter
2019-11-04 17:37 ` Daniel Vetter
2019-11-04 17:48 ` Daniel Vetter
2019-11-04 17:48   ` Daniel Vetter
2019-11-04 20:01 ` Koenig, Christian
2019-11-04 20:01   ` Koenig, Christian
2019-11-04 20:55   ` Daniel Vetter
2019-11-04 20:55     ` Daniel Vetter
2019-11-11 13:11 ` Steven Price
2019-11-11 15:42   ` Daniel Vetter
2019-11-11 15:42     ` Daniel Vetter
2019-11-14 11:50     ` Steven Price
2019-11-14 11:50       ` Steven Price
2019-11-20 10:51       ` Daniel Vetter
2019-08-21 21:50 Daniel Vetter
2019-08-21 22:20 ` Chris Wilson
2019-08-21 18:31 Koenig, Christian
2019-08-20 14:53 [PATCH 0/3] RFC/T: dma_resv vs. mmap_sem Daniel Vetter
2019-08-20 14:53 ` [PATCH 1/3] dma_resv: prime lockdep annotations Daniel Vetter
2019-08-20 14:56   ` Koenig, Christian
2019-08-21 15:44     ` Daniel Vetter
2019-08-20 14:58   ` Chris Wilson
2019-08-21 15:54   ` Thomas Hellström (VMware)
2019-08-21 16:34     ` Daniel Vetter
2019-08-21 17:06       ` Thomas Hellström (VMware)
2019-08-21 18:11         ` Daniel Vetter
2019-08-21 18:27           ` Thomas Hellström (VMware)
2019-08-21 19:51             ` Daniel Vetter
2019-08-22  6:42               ` Thomas Hellström (VMware)
2019-08-22  6:47                 ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201910221503.D7vVn5g9%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=airlied@redhat.com \
    --cc=alexander.deucher@amd.com \
    --cc=bskeggs@redhat.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kraxel@redhat.com \
    --cc=linux-graphics-maintainer@vmware.com \
    --cc=thellstrom@vmware.com \
    --cc=tomeu.vizoso@collabora.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.