tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: 4bd8020d6c753ab56df4d7bd75833fd880e1995a
commit: 45102484256d341921bf68bdbee0a16141afd9a9 [42/120] drm/sched: Use completion to
wait for sched->thread idle v2.
config: powerpc64-randconfig-r006-20210320 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
436c6c9c20cc522c92a923440a5fc509c342a7db)
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/sashal/linux-stable.git/c...
git remote add sashal-linux-stable
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.4
git checkout 45102484256d341921bf68bdbee0a16141afd9a9
# 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 >>):
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c:29:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ctx.h:26:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ring.h:28:
> include/drm/gpu_scheduler.h:98:21: error: field has incomplete
type 'struct completion'
struct completion
entity_idle;
^
include/linux/kernel.h:200:8: note: forward declaration of 'struct completion'
struct completion;
^
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c:40:
In file included from include/linux/pci.h:1794:
In file included from arch/powerpc/include/asm/pci.h:12:
include/linux/dma-mapping.h:742:9: warning: implicit conversion from 'unsigned long
long' to 'unsigned long' changes value from 18446744073709551615 to 4294967295
[-Wconstant-conversion]
return DMA_BIT_MASK(32);
~~~~~~ ^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:142:40: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^~~~~
1 warning and 1 error generated.
--
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c:28:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ctx.h:26:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ring.h:28:
> include/drm/gpu_scheduler.h:98:21: error: field has incomplete
type 'struct completion'
struct completion
entity_idle;
^
include/linux/kernel.h:200:8: note: forward declaration of 'struct completion'
struct completion;
^
1 error generated.
--
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:34:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ctx.h:26:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ring.h:28:
> include/drm/gpu_scheduler.h:98:21: error: field has incomplete
type 'struct completion'
struct completion
entity_idle;
^
include/linux/kernel.h:200:8: note: forward declaration of 'struct completion'
struct completion;
^
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:38:
In file included from include/linux/dma-buf.h:20:
include/linux/dma-mapping.h:742:9: warning: implicit conversion from 'unsigned long
long' to 'unsigned long' changes value from 18446744073709551615 to 4294967295
[-Wconstant-conversion]
return DMA_BIT_MASK(32);
~~~~~~ ^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:142:40: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:49:18: warning: no previous prototype for
function 'amdgpu_gem_prime_get_sg_table' [-Wmissing-prototypes]
struct sg_table *amdgpu_gem_prime_get_sg_table(struct drm_gem_object *obj)
^
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:49:1: note: declare 'static' if the
function is not intended to be used outside of this translation unit
struct sg_table *amdgpu_gem_prime_get_sg_table(struct drm_gem_object *obj)
^
static
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:66:7: warning: no previous prototype for
function 'amdgpu_gem_prime_vmap' [-Wmissing-prototypes]
void *amdgpu_gem_prime_vmap(struct drm_gem_object *obj)
^
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:66:1: note: declare 'static' if the
function is not intended to be used outside of this translation unit
void *amdgpu_gem_prime_vmap(struct drm_gem_object *obj)
^
static
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:86:6: warning: no previous prototype for
function 'amdgpu_gem_prime_vunmap' [-Wmissing-prototypes]
void amdgpu_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
^
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:86:1: note: declare 'static' if the
function is not intended to be used outside of this translation unit
void amdgpu_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
^
static
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:104:5: warning: no previous prototype for
function 'amdgpu_gem_prime_mmap' [-Wmissing-prototypes]
int amdgpu_gem_prime_mmap(struct drm_gem_object *obj,
^
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:104:1: note: declare 'static' if
the function is not intended to be used outside of this translation unit
int amdgpu_gem_prime_mmap(struct drm_gem_object *obj,
^
static
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:333:17: warning: no previous prototype for
function 'amdgpu_gem_prime_export' [-Wmissing-prototypes]
struct dma_buf *amdgpu_gem_prime_export(struct drm_gem_object *gobj,
^
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:333:1: note: declare 'static' if
the function is not intended to be used outside of this translation unit
struct dma_buf *amdgpu_gem_prime_export(struct drm_gem_object *gobj,
^
static
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:366:1: warning: no previous prototype for
function 'amdgpu_gem_prime_import_sg_table' [-Wmissing-prototypes]
amdgpu_gem_prime_import_sg_table(struct drm_device *dev,
^
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:365:1: note: declare 'static' if
the function is not intended to be used outside of this translation unit
struct drm_gem_object *
^
static
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:414:24: warning: no previous prototype for
function 'amdgpu_gem_prime_import' [-Wmissing-prototypes]
struct drm_gem_object *amdgpu_gem_prime_import(struct drm_device *dev,
^
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:414:1: note: declare 'static' if
the function is not intended to be used outside of this translation unit
struct drm_gem_object *amdgpu_gem_prime_import(struct drm_device *dev,
^
static
8 warnings and 1 error generated.
--
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:25:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ctx.h:26:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ring.h:28:
> include/drm/gpu_scheduler.h:98:21: error: field has incomplete
type 'struct completion'
struct completion
entity_idle;
^
include/linux/kernel.h:200:8: note: forward declaration of 'struct completion'
struct completion;
^
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:38:7: warning: no previous prototype for
function 'amdgpu_xgmi_hive_try_lock' [-Wmissing-prototypes]
void *amdgpu_xgmi_hive_try_lock(struct amdgpu_hive_info *hive)
^
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:38:1: note: declare 'static' if the
function is not intended to be used outside of this translation unit
void *amdgpu_xgmi_hive_try_lock(struct amdgpu_hive_info *hive)
^
static
1 warning and 1 error generated.
--
In file included from drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c:23:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ctx.h:26:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ring.h:28:
> include/drm/gpu_scheduler.h:98:21: error: field has incomplete
type 'struct completion'
struct completion
entity_idle;
^
include/linux/kernel.h:200:8: note: forward declaration of 'struct completion'
struct completion;
^
drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c:56:6: warning: no previous prototype for
function 'mmhub_v9_4_setup_vm_pt_regs' [-Wmissing-prototypes]
void mmhub_v9_4_setup_vm_pt_regs(struct amdgpu_device *adev, int hubid,
^
drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c:56:1: note: declare 'static' if the
function is not intended to be used outside of this translation unit
void mmhub_v9_4_setup_vm_pt_regs(struct amdgpu_device *adev, int hubid,
^
static
1 warning and 1 error generated.
vim +98 include/drm/gpu_scheduler.h
46
47 /**
48 * struct drm_sched_entity - A wrapper around a job queue (typically
49 * attached to the DRM file_priv).
50 *
51 * @list: used to append this struct to the list of entities in the
52 * runqueue.
53 * @rq: runqueue on which this entity is currently scheduled.
54 * @rq_list: a list of run queues on which jobs from this entity can
55 * be scheduled
56 * @num_rq_list: number of run queues in the rq_list
57 * @rq_lock: lock to modify the runqueue to which this entity belongs.
58 * @job_queue: the list of jobs of this entity.
59 * @fence_seq: a linearly increasing seqno incremented with each
60 * new &drm_sched_fence which is part of the entity.
61 * @fence_context: a unique context for all the fences which belong
62 * to this entity.
63 * The &drm_sched_fence.scheduled uses the
64 * fence_context but &drm_sched_fence.finished uses
65 * fence_context + 1.
66 * @dependency: the dependency fence of the job which is on the top
67 * of the job queue.
68 * @cb: callback for the dependency fence above.
69 * @guilty: points to ctx's guilty.
70 * @fini_status: contains the exit status in case the process was signalled.
71 * @last_scheduled: points to the finished fence of the last scheduled job.
72 * @last_user: last group leader pushing a job into the entity.
73 * @stopped: Marks the enity as removed from rq and destined for termination.
74 * @entity_idle: Signals when enityt is not in use
75 *
76 * Entities will emit jobs in order to their corresponding hardware
77 * ring, and the scheduler will alternate between entities based on
78 * scheduling policy.
79 */
80 struct drm_sched_entity {
81 struct list_head list;
82 struct drm_sched_rq *rq;
83 struct drm_sched_rq **rq_list;
84 unsigned int num_rq_list;
85 spinlock_t rq_lock;
86
87 struct spsc_queue job_queue;
88
89 atomic_t fence_seq;
90 uint64_t fence_context;
91
92 struct dma_fence *dependency;
93 struct dma_fence_cb cb;
94 atomic_t *guilty;
95 struct dma_fence *last_scheduled;
96 struct task_struct *last_user;
97 bool stopped;
98 struct completion entity_idle;
99 };
100
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org