From: kernel test robot <lkp@intel.com>
To: Iouri Tarassov <iourit@linux.microsoft.com>,
kys@microsoft.com, haiyangz@microsoft.com,
sthemmin@microsoft.com, wei.liu@kernel.org,
linux-hyperv@vger.kernel.org
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
spronovo@microsoft.com, gregkh@linuxfoundation.org
Subject: Re: [PATCH v1 1/9] drivers: hv: dxgkrnl: Driver initialization and creation of dxgadapter
Date: Thu, 13 Jan 2022 09:49:05 +0800 [thread overview]
Message-ID: <202201130941.ZVnyqikS-lkp@intel.com> (raw)
In-Reply-To: <1b26482b50832b95a9d8532c493cee6c97323b87.1641937419.git.iourit@linux.microsoft.com>
Hi Iouri,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.16 next-20220112]
[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/Iouri-Tarassov/drivers-hv-dxgkrnl-Driver-overview/20220113-035836
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git e3084ed48fd6b661fe434da0cb36d7d6706cf27f
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220113/202201130941.ZVnyqikS-lkp@intel.com/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/00f97c12e2cf0ba4ba1108e2fce9a3d0e287cc8c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Iouri-Tarassov/drivers-hv-dxgkrnl-Driver-overview/20220113-035836
git checkout 00f97c12e2cf0ba4ba1108e2fce9a3d0e287cc8c
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/hv/dxgkrnl/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/hv/dxgkrnl/dxgmodule.c:79:20: warning: no previous prototype for 'find_pci_adapter' [-Wmissing-prototypes]
79 | struct dxgadapter *find_pci_adapter(struct pci_dev *dev)
| ^~~~~~~~~~~~~~~~
>> drivers/hv/dxgkrnl/dxgmodule.c:135:6: warning: no previous prototype for 'signal_host_cpu_event' [-Wmissing-prototypes]
135 | void signal_host_cpu_event(struct dxghostevent *eventhdr)
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/hv/dxgkrnl/dxgmodule.c:219:5: warning: no previous prototype for 'dxgglobal_create_adapter' [-Wmissing-prototypes]
219 | int dxgglobal_create_adapter(struct pci_dev *dev, guid_t *guid,
| ^~~~~~~~~~~~~~~~~~~~~~~~
--
>> drivers/hv/dxgkrnl/dxgvmbus.c:116:5: warning: no previous prototype for 'ntstatus2int' [-Wmissing-prototypes]
116 | int ntstatus2int(struct ntstatus status)
| ^~~~~~~~~~~~
>> drivers/hv/dxgkrnl/dxgvmbus.c:219:6: warning: no previous prototype for 'process_inband_packet' [-Wmissing-prototypes]
219 | void process_inband_packet(struct dxgvmbuschannel *channel,
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/hv/dxgkrnl/dxgvmbus.c:237:6: warning: no previous prototype for 'process_completion_packet' [-Wmissing-prototypes]
237 | void process_completion_packet(struct dxgvmbuschannel *channel,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/hv/dxgkrnl/dxgvmbus.c:363:5: warning: no previous prototype for 'dxgvmb_send_async_msg' [-Wmissing-prototypes]
363 | int dxgvmb_send_async_msg(struct dxgvmbuschannel *channel,
| ^~~~~~~~~~~~~~~~~~~~~
vim +/find_pci_adapter +79 drivers/hv/dxgkrnl/dxgmodule.c
78
> 79 struct dxgadapter *find_pci_adapter(struct pci_dev *dev)
80 {
81 struct dxgadapter *entry;
82 struct dxgadapter *adapter = NULL;
83
84 dxgglobal_acquire_adapter_list_lock(DXGLOCK_EXCL);
85
86 list_for_each_entry(entry, &dxgglobal->adapter_list_head,
87 adapter_list_entry) {
88 if (dev == entry->pci_dev) {
89 adapter = entry;
90 break;
91 }
92 }
93
94 dxgglobal_release_adapter_list_lock(DXGLOCK_EXCL);
95 return adapter;
96 }
97
98 static struct dxgadapter *find_adapter(struct winluid *luid)
99 {
100 struct dxgadapter *entry;
101 struct dxgadapter *adapter = NULL;
102
103 dxgglobal_acquire_adapter_list_lock(DXGLOCK_EXCL);
104
105 list_for_each_entry(entry, &dxgglobal->adapter_list_head,
106 adapter_list_entry) {
107 if (memcmp(luid, &entry->luid, sizeof(struct winluid)) == 0) {
108 adapter = entry;
109 break;
110 }
111 }
112
113 dxgglobal_release_adapter_list_lock(DXGLOCK_EXCL);
114 return adapter;
115 }
116
117 void dxgglobal_add_host_event(struct dxghostevent *event)
118 {
119 spin_lock_irq(&dxgglobal->host_event_list_mutex);
120 list_add_tail(&event->host_event_list_entry,
121 &dxgglobal->host_event_list_head);
122 spin_unlock_irq(&dxgglobal->host_event_list_mutex);
123 }
124
125 void dxgglobal_remove_host_event(struct dxghostevent *event)
126 {
127 spin_lock_irq(&dxgglobal->host_event_list_mutex);
128 if (event->host_event_list_entry.next != NULL) {
129 list_del(&event->host_event_list_entry);
130 event->host_event_list_entry.next = NULL;
131 }
132 spin_unlock_irq(&dxgglobal->host_event_list_mutex);
133 }
134
> 135 void signal_host_cpu_event(struct dxghostevent *eventhdr)
136 {
137 struct dxghosteventcpu *event = (struct dxghosteventcpu *)eventhdr;
138
139 if (event->remove_from_list ||
140 event->destroy_after_signal) {
141 list_del(&eventhdr->host_event_list_entry);
142 eventhdr->host_event_list_entry.next = NULL;
143 }
144 if (event->cpu_event) {
145 dev_dbg(dxgglobaldev, "signal cpu event\n");
146 eventfd_signal(event->cpu_event, 1);
147 if (event->destroy_after_signal)
148 eventfd_ctx_put(event->cpu_event);
149 } else {
150 dev_dbg(dxgglobaldev, "signal completion\n");
151 complete(event->completion_event);
152 }
153 if (event->destroy_after_signal) {
154 dev_dbg(dxgglobaldev, "destroying event %p\n",
155 event);
156 vfree(event);
157 }
158 }
159
160 void dxgglobal_signal_host_event(u64 event_id)
161 {
162 struct dxghostevent *event;
163 unsigned long flags;
164
165 dev_dbg(dxgglobaldev, "%s %lld\n", __func__, event_id);
166
167 spin_lock_irqsave(&dxgglobal->host_event_list_mutex, flags);
168 list_for_each_entry(event, &dxgglobal->host_event_list_head,
169 host_event_list_entry) {
170 if (event->event_id == event_id) {
171 dev_dbg(dxgglobaldev, "found event to signal %lld\n",
172 event_id);
173 if (event->event_type == dxghostevent_cpu_event)
174 signal_host_cpu_event(event);
175 else
176 pr_err("Unknown host event type");
177 break;
178 }
179 }
180 spin_unlock_irqrestore(&dxgglobal->host_event_list_mutex, flags);
181 dev_dbg(dxgglobaldev, "dxgglobal_signal_host_event_end %lld\n",
182 event_id);
183 }
184
185 struct dxghostevent *dxgglobal_get_host_event(u64 event_id)
186 {
187 struct dxghostevent *entry;
188 struct dxghostevent *event = NULL;
189
190 spin_lock_irq(&dxgglobal->host_event_list_mutex);
191 list_for_each_entry(entry, &dxgglobal->host_event_list_head,
192 host_event_list_entry) {
193 if (entry->event_id == event_id) {
194 list_del(&entry->host_event_list_entry);
195 entry->host_event_list_entry.next = NULL;
196 event = entry;
197 break;
198 }
199 }
200 spin_unlock_irq(&dxgglobal->host_event_list_mutex);
201 return event;
202 }
203
204 u64 dxgglobal_new_host_event_id(void)
205 {
206 return atomic64_inc_return(&dxgglobal->host_event_id);
207 }
208
209 void dxgglobal_acquire_process_adapter_lock(void)
210 {
211 mutex_lock(&dxgglobal->process_adapter_mutex);
212 }
213
214 void dxgglobal_release_process_adapter_lock(void)
215 {
216 mutex_unlock(&dxgglobal->process_adapter_mutex);
217 }
218
> 219 int dxgglobal_create_adapter(struct pci_dev *dev, guid_t *guid,
220 struct winluid host_vgpu_luid)
221 {
222 struct dxgadapter *adapter;
223 int ret = 0;
224
225 adapter = vzalloc(sizeof(struct dxgadapter));
226 if (adapter == NULL) {
227 ret = -ENOMEM;
228 goto cleanup;
229 }
230
231 adapter->adapter_state = DXGADAPTER_STATE_WAITING_VMBUS;
232 adapter->host_vgpu_luid = host_vgpu_luid;
233 kref_init(&adapter->adapter_kref);
234 init_rwsem(&adapter->core_lock);
235
236 INIT_LIST_HEAD(&adapter->adapter_process_list_head);
237 INIT_LIST_HEAD(&adapter->shared_resource_list_head);
238 INIT_LIST_HEAD(&adapter->adapter_shared_syncobj_list_head);
239 INIT_LIST_HEAD(&adapter->syncobj_list_head);
240 init_rwsem(&adapter->shared_resource_list_lock);
241 adapter->pci_dev = dev;
242 guid_to_luid(guid, &adapter->luid);
243
244 dxgglobal_acquire_adapter_list_lock(DXGLOCK_EXCL);
245
246 list_add_tail(&adapter->adapter_list_entry,
247 &dxgglobal->adapter_list_head);
248 dxgglobal->num_adapters++;
249 dxgglobal_release_adapter_list_lock(DXGLOCK_EXCL);
250
251 dev_dbg(dxgglobaldev, "new adapter added %p %x-%x\n", adapter,
252 adapter->luid.a, adapter->luid.b);
253 cleanup:
254 dev_dbg(dxgglobaldev, "%s end: %d", __func__, ret);
255 return ret;
256 }
257
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next prev parent reply other threads:[~2022-01-13 1:49 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 19:55 [PATCH v1 0/9] drivers: hv: dxgkrnl: Driver overview Iouri Tarassov
2022-01-12 19:55 ` [PATCH v1 2/9] drivers: hv: dxgkrnl: Open device object, adapter enumeration, dxgdevice, dxgcontext creation Iouri Tarassov
2022-01-13 7:41 ` Greg KH
2022-01-13 7:44 ` kernel test robot
2022-01-12 19:55 ` [PATCH v1 3/9] drivers: hv: dxgkrnl: Implement creation/destruction of GPU allocations/resources Iouri Tarassov
2022-01-13 8:56 ` kernel test robot
2022-01-12 19:55 ` [PATCH v1 4/9] drivers: hv: dxgkrnl: Implement operations with GPU sync objects Iouri Tarassov
2022-01-12 19:55 ` [PATCH v1 5/9] drivers: hv: dxgkrnl: Implement sharing resources and " Iouri Tarassov
2022-01-12 19:55 ` [PATCH v1 6/9] drivers: hv: dxgkrnl: Seal the shared resource object when dxgk_share_objects is called Iouri Tarassov
2022-01-12 19:55 ` [PATCH v1 7/9] drivers: hv: dxgkrnl: Implementation of submit command, paging and hardware queue Iouri Tarassov
2022-01-12 19:55 ` [PATCH v1 8/9] drivers: hv: dxgkrnl: Implement various WDDM ioctls Iouri Tarassov
2022-01-13 7:47 ` Greg KH
2022-01-14 0:19 ` Iouri Tarassov
2022-01-14 5:38 ` Greg KH
2022-01-15 2:16 ` Iouri Tarassov
2022-01-12 19:55 ` [PATCH v1 9/9] drivers: hv: dxgkrnl: Implement DXGSYNCFILE Iouri Tarassov
2022-01-13 7:41 ` Greg KH
2022-01-14 22:26 ` Iouri Tarassov
2022-01-14 18:03 ` Daniel Vetter
2022-01-14 18:52 ` Iouri Tarassov
2022-01-17 9:35 ` Daniel Vetter
2022-02-05 0:35 ` Iouri Tarassov
2022-02-08 12:28 ` Daniel Vetter
2022-01-12 22:12 ` [PATCH v1 0/9] drivers: hv: dxgkrnl: Driver overview Nathan Chancellor
2022-01-12 23:39 ` Iouri Tarassov
2022-01-26 0:27 ` Nathan Chancellor
2022-02-05 0:31 ` Iouri Tarassov
[not found] ` <1b26482b50832b95a9d8532c493cee6c97323b87.1641937419.git.iourit@linux.microsoft.com>
2022-01-13 1:49 ` kernel test robot [this message]
2022-01-13 6:42 ` [PATCH v1 1/9] drivers: hv: dxgkrnl: Driver initialization and creation of dxgadapter kernel test robot
2022-01-13 7:43 ` Greg KH
2022-01-13 7:46 ` Greg KH
2022-01-14 0:08 ` Iouri Tarassov
2022-01-14 5:40 ` Greg KH
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=202201130941.ZVnyqikS-lkp@intel.com \
--to=lkp@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=haiyangz@microsoft.com \
--cc=iourit@linux.microsoft.com \
--cc=kbuild-all@lists.01.org \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=spronovo@microsoft.com \
--cc=sthemmin@microsoft.com \
--cc=wei.liu@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).