[mark-rutland:atomics/arch-atomic-bitops 3/5] include/linux/atomic/atomic-arch-fallback.h:60:32: error: implicit declaration of function 'arch_cmpxchg64'; did you mean 'arch_cmpxchg'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git atomics/arch-atomic-bitops
head: 7f1fb4dc1cb944e762214419fc8ff3baf29e24f5
commit: 9e9d9f37c6b05b8ca142be00f6ef86831b4a505d [3/5] locking/atomic: centralize generated headers
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-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/mark/linux.git/commit/?id...
git remote add mark-rutland https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
git fetch --no-tags mark-rutland atomics/arch-atomic-bitops
git checkout 9e9d9f37c6b05b8ca142be00f6ef86831b4a505d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
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 include/linux/atomic.h:80,
from drivers/iommu/io-pgtable-arm.c:12:
drivers/iommu/io-pgtable-arm.c: In function 'arm_lpae_install_table':
>> include/linux/atomic/atomic-arch-fallback.h:60:32: error: implicit declaration of function 'arch_cmpxchg64'; did you mean 'arch_cmpxchg'? [-Werror=implicit-function-declaration]
60 | #define arch_cmpxchg64_relaxed arch_cmpxchg64
| ^~~~~~~~~~~~~~
include/linux/atomic/atomic-instrumented.h:1261:2: note: in expansion of macro 'arch_cmpxchg64_relaxed'
1261 | arch_cmpxchg64_relaxed(__ai_ptr, __VA_ARGS__); \
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/io-pgtable-arm.c:320:8: note: in expansion of macro 'cmpxchg64_relaxed'
320 | old = cmpxchg64_relaxed(ptep, curr, new);
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +60 include/linux/atomic/atomic-arch-fallback.h
37f8173dd84936 include/linux/atomic-arch-fallback.h Peter Zijlstra 2020-01-24 56
37f8173dd84936 include/linux/atomic-arch-fallback.h Peter Zijlstra 2020-01-24 57 #ifndef arch_cmpxchg64_relaxed
37f8173dd84936 include/linux/atomic-arch-fallback.h Peter Zijlstra 2020-01-24 58 #define arch_cmpxchg64_acquire arch_cmpxchg64
37f8173dd84936 include/linux/atomic-arch-fallback.h Peter Zijlstra 2020-01-24 59 #define arch_cmpxchg64_release arch_cmpxchg64
29f006fdefe6f8 include/linux/atomic-arch-fallback.h Peter Zijlstra 2020-08-29 @60 #define arch_cmpxchg64_relaxed arch_cmpxchg64
37f8173dd84936 include/linux/atomic-arch-fallback.h Peter Zijlstra 2020-01-24 61 #else /* arch_cmpxchg64_relaxed */
37f8173dd84936 include/linux/atomic-arch-fallback.h Peter Zijlstra 2020-01-24 62
:::::: The code at line 60 was first introduced by commit
:::::: 29f006fdefe6f88abde973a0b0f20d2704e93fd4 asm-generic/atomic: Add try_cmpxchg() fallbacks
:::::: TO: Peter Zijlstra <peterz(a)infradead.org>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [PATCH 3/3] drm/amdgpu: replace dce_virtual with amdgpu_vkms
by kernel test robot
Hi Ryan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on next-20210712]
[cannot apply to drm-intel/for-linux-next drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.14-rc1 v5.13 v5.13-rc7 v5.14-rc1]
[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/Ryan-Taylor/drm-amdgpu-modernize...
base: db503865b9ba6284edfee3825846a464cc4f4c61
config: i386-randconfig-r013-20210712 (attached as .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/da96fc5ec68bb4054ce0f7f1c9c10d330...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ryan-Taylor/drm-amdgpu-modernize-virtual-display-feature/20210713-034827
git checkout da96fc5ec68bb4054ce0f7f1c9c10d3305ba217f
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 >>):
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:165:5: warning: no previous prototype for 'amdgpu_vkms_crtc_init' [-Wmissing-prototypes]
165 | int amdgpu_vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:332:20: error: initialization of 'void (*)(struct drm_plane *, struct drm_atomic_state *)' from incompatible pointer type 'void (*)(struct drm_plane *, struct drm_plane_state *)' [-Werror=incompatible-pointer-types]
332 | .atomic_update = amdgpu_vkms_plane_atomic_update,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:332:20: note: (near initialization for 'amdgpu_vkms_primary_helper_funcs.atomic_update')
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:333:19: error: initialization of 'int (*)(struct drm_plane *, struct drm_atomic_state *)' from incompatible pointer type 'int (*)(struct drm_plane *, struct drm_plane_state *)' [-Werror=incompatible-pointer-types]
333 | .atomic_check = amdgpu_vkms_plane_atomic_check,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:333:19: note: (near initialization for 'amdgpu_vkms_primary_helper_funcs.atomic_check')
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:338:19: warning: no previous prototype for 'amdgpu_vkms_plane_init' [-Wmissing-prototypes]
338 | struct drm_plane *amdgpu_vkms_plane_init(struct drm_device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:363:5: warning: no previous prototype for 'amdgpu_vkms_output_init' [-Wmissing-prototypes]
363 | int amdgpu_vkms_output_init(struct drm_device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/amdgpu_vkms_output_init +363 drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
96f64e3b91a195 Ryan Taylor 2021-07-12 362
96f64e3b91a195 Ryan Taylor 2021-07-12 @363 int amdgpu_vkms_output_init(struct drm_device *dev,
96f64e3b91a195 Ryan Taylor 2021-07-12 364 struct amdgpu_vkms_output *output, int index)
96f64e3b91a195 Ryan Taylor 2021-07-12 365 {
96f64e3b91a195 Ryan Taylor 2021-07-12 366 struct drm_connector *connector = &output->connector;
96f64e3b91a195 Ryan Taylor 2021-07-12 367 struct drm_encoder *encoder = &output->encoder;
96f64e3b91a195 Ryan Taylor 2021-07-12 368 struct drm_crtc *crtc = &output->crtc;
96f64e3b91a195 Ryan Taylor 2021-07-12 369 struct drm_plane *primary, *cursor = NULL;
96f64e3b91a195 Ryan Taylor 2021-07-12 370 int ret;
96f64e3b91a195 Ryan Taylor 2021-07-12 371
96f64e3b91a195 Ryan Taylor 2021-07-12 372 primary = amdgpu_vkms_plane_init(dev, DRM_PLANE_TYPE_PRIMARY, index);
96f64e3b91a195 Ryan Taylor 2021-07-12 373 if (IS_ERR(primary))
96f64e3b91a195 Ryan Taylor 2021-07-12 374 return PTR_ERR(primary);
96f64e3b91a195 Ryan Taylor 2021-07-12 375
96f64e3b91a195 Ryan Taylor 2021-07-12 376 ret = amdgpu_vkms_crtc_init(dev, crtc, primary, cursor);
96f64e3b91a195 Ryan Taylor 2021-07-12 377 if (ret)
96f64e3b91a195 Ryan Taylor 2021-07-12 378 goto err_crtc;
96f64e3b91a195 Ryan Taylor 2021-07-12 379
96f64e3b91a195 Ryan Taylor 2021-07-12 380 ret = drm_connector_init(dev, connector, &amdgpu_vkms_connector_funcs,
96f64e3b91a195 Ryan Taylor 2021-07-12 381 DRM_MODE_CONNECTOR_VIRTUAL);
96f64e3b91a195 Ryan Taylor 2021-07-12 382 if (ret) {
96f64e3b91a195 Ryan Taylor 2021-07-12 383 DRM_ERROR("Failed to init connector\n");
96f64e3b91a195 Ryan Taylor 2021-07-12 384 goto err_connector;
96f64e3b91a195 Ryan Taylor 2021-07-12 385 }
96f64e3b91a195 Ryan Taylor 2021-07-12 386
96f64e3b91a195 Ryan Taylor 2021-07-12 387 drm_connector_helper_add(connector, &amdgpu_vkms_conn_helper_funcs);
96f64e3b91a195 Ryan Taylor 2021-07-12 388
96f64e3b91a195 Ryan Taylor 2021-07-12 389 ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_VIRTUAL);
96f64e3b91a195 Ryan Taylor 2021-07-12 390 if (ret) {
96f64e3b91a195 Ryan Taylor 2021-07-12 391 DRM_ERROR("Failed to init encoder\n");
96f64e3b91a195 Ryan Taylor 2021-07-12 392 goto err_encoder;
96f64e3b91a195 Ryan Taylor 2021-07-12 393 }
96f64e3b91a195 Ryan Taylor 2021-07-12 394 encoder->possible_crtcs = 1 << index;
96f64e3b91a195 Ryan Taylor 2021-07-12 395
96f64e3b91a195 Ryan Taylor 2021-07-12 396 ret = drm_connector_attach_encoder(connector, encoder);
96f64e3b91a195 Ryan Taylor 2021-07-12 397 if (ret) {
96f64e3b91a195 Ryan Taylor 2021-07-12 398 DRM_ERROR("Failed to attach connector to encoder\n");
96f64e3b91a195 Ryan Taylor 2021-07-12 399 goto err_attach;
96f64e3b91a195 Ryan Taylor 2021-07-12 400 }
96f64e3b91a195 Ryan Taylor 2021-07-12 401
96f64e3b91a195 Ryan Taylor 2021-07-12 402 drm_mode_config_reset(dev);
96f64e3b91a195 Ryan Taylor 2021-07-12 403
96f64e3b91a195 Ryan Taylor 2021-07-12 404 return 0;
96f64e3b91a195 Ryan Taylor 2021-07-12 405
96f64e3b91a195 Ryan Taylor 2021-07-12 406 err_attach:
96f64e3b91a195 Ryan Taylor 2021-07-12 407 drm_encoder_cleanup(encoder);
96f64e3b91a195 Ryan Taylor 2021-07-12 408
96f64e3b91a195 Ryan Taylor 2021-07-12 409 err_encoder:
96f64e3b91a195 Ryan Taylor 2021-07-12 410 drm_connector_cleanup(connector);
96f64e3b91a195 Ryan Taylor 2021-07-12 411
96f64e3b91a195 Ryan Taylor 2021-07-12 412 err_connector:
96f64e3b91a195 Ryan Taylor 2021-07-12 413 drm_crtc_cleanup(crtc);
96f64e3b91a195 Ryan Taylor 2021-07-12 414
96f64e3b91a195 Ryan Taylor 2021-07-12 415 err_crtc:
96f64e3b91a195 Ryan Taylor 2021-07-12 416 drm_plane_cleanup(primary);
96f64e3b91a195 Ryan Taylor 2021-07-12 417
96f64e3b91a195 Ryan Taylor 2021-07-12 418 return ret;
96f64e3b91a195 Ryan Taylor 2021-07-12 419 }
da96fc5ec68bb4 Ryan Taylor 2021-07-12 420
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [PATCH 1/3] drm/amdgpu: create amdgpu_vkms
by kernel test robot
Hi Ryan,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20210712]
[also build test ERROR on v5.14-rc1]
[cannot apply to drm-intel/for-linux-next drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.14-rc1 v5.13 v5.13-rc7]
[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/Ryan-Taylor/drm-amdgpu-modernize...
base: db503865b9ba6284edfee3825846a464cc4f4c61
config: x86_64-randconfig-a013-20210712 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8d69635ed9ecf36fd0ca85906bfde17949671cbe)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/96f64e3b91a195cc37720de206b86c3f0...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ryan-Taylor/drm-amdgpu-modernize-virtual-display-feature/20210713-034827
git checkout 96f64e3b91a195cc37720de206b86c3f0378abbb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:156:5: warning: no previous prototype for function 'amdgpu_vkms_crtc_init' [-Wmissing-prototypes]
int amdgpu_vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
^
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:156:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int amdgpu_vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
^
static
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:323:20: error: incompatible function pointer types initializing 'void (*)(struct drm_plane *, struct drm_atomic_state *)' with an expression of type 'void (struct drm_plane *, struct drm_plane_state *)' [-Werror,-Wincompatible-function-pointer-types]
.atomic_update = amdgpu_vkms_plane_atomic_update,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:324:19: error: incompatible function pointer types initializing 'int (*)(struct drm_plane *, struct drm_atomic_state *)' with an expression of type 'int (struct drm_plane *, struct drm_plane_state *)' [-Werror,-Wincompatible-function-pointer-types]
.atomic_check = amdgpu_vkms_plane_atomic_check,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:329:19: warning: no previous prototype for function 'amdgpu_vkms_plane_init' [-Wmissing-prototypes]
struct drm_plane *amdgpu_vkms_plane_init(struct drm_device *dev,
^
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:329:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct drm_plane *amdgpu_vkms_plane_init(struct drm_device *dev,
^
static
2 warnings and 2 errors generated.
vim +323 drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
155
> 156 int amdgpu_vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
157 struct drm_plane *primary, struct drm_plane *cursor)
158 {
159 int ret;
160
161 ret = drm_crtc_init_with_planes(dev, crtc, primary, cursor,
162 &amdgpu_vkms_crtc_funcs, NULL);
163 if (ret) {
164 DRM_ERROR("Failed to init CRTC\n");
165 return ret;
166 }
167
168 drm_crtc_helper_add(crtc, &amdgpu_vkms_crtc_helper_funcs);
169
170 return ret;
171 }
172
173 static const struct drm_connector_funcs amdgpu_vkms_connector_funcs = {
174 .fill_modes = drm_helper_probe_single_connector_modes,
175 .destroy = drm_connector_cleanup,
176 .reset = drm_atomic_helper_connector_reset,
177 .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
178 .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
179 };
180
181 static int amdgpu_vkms_conn_get_modes(struct drm_connector *connector)
182 {
183 int count;
184
185 count = drm_add_modes_noedid(connector, XRES_MAX, YRES_MAX);
186 drm_set_preferred_mode(connector, XRES_DEF, YRES_DEF);
187
188 return count;
189 }
190
191 static const struct drm_connector_helper_funcs amdgpu_vkms_conn_helper_funcs = {
192 .get_modes = amdgpu_vkms_conn_get_modes,
193 };
194
195 static const struct drm_plane_funcs amdgpu_vkms_plane_funcs = {
196 .update_plane = drm_atomic_helper_update_plane,
197 .disable_plane = drm_atomic_helper_disable_plane,
198 .destroy = drm_plane_cleanup,
199 .reset = drm_atomic_helper_plane_reset,
200 .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
201 .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
202 };
203
204 static void amdgpu_vkms_plane_atomic_update(struct drm_plane *plane,
205 struct drm_plane_state *old_state)
206 {
207 return;
208 }
209
210 static int amdgpu_vkms_plane_atomic_check(struct drm_plane *plane,
211 struct drm_plane_state *state)
212 {
213 struct drm_crtc_state *crtc_state;
214 bool can_position = false;
215 int ret;
216
217 if (!state->fb || WARN_ON(!state->crtc))
218 return 0;
219
220 crtc_state = drm_atomic_get_crtc_state(state->state, state->crtc);
221 if (IS_ERR(crtc_state))
222 return PTR_ERR(crtc_state);
223
224 ret = drm_atomic_helper_check_plane_state(state, crtc_state,
225 DRM_PLANE_HELPER_NO_SCALING,
226 DRM_PLANE_HELPER_NO_SCALING,
227 can_position, true);
228 if (ret != 0)
229 return ret;
230
231 /* for now primary plane must be visible and full screen */
232 if (!state->visible && !can_position)
233 return -EINVAL;
234
235 return 0;
236 }
237
238 static int amdgpu_vkms_prepare_fb(struct drm_plane *plane,
239 struct drm_plane_state *new_state)
240 {
241 struct amdgpu_framebuffer *afb;
242 struct drm_gem_object *obj;
243 struct amdgpu_device *adev;
244 struct amdgpu_bo *rbo;
245 struct list_head list;
246 struct ttm_validate_buffer tv;
247 struct ww_acquire_ctx ticket;
248 uint32_t domain;
249 int r;
250
251 if (!new_state->fb) {
252 DRM_DEBUG_KMS("No FB bound\n");
253 return 0;
254 }
255 afb = to_amdgpu_framebuffer(new_state->fb);
256 obj = new_state->fb->obj[0];
257 rbo = gem_to_amdgpu_bo(obj);
258 adev = amdgpu_ttm_adev(rbo->tbo.bdev);
259 INIT_LIST_HEAD(&list);
260
261 tv.bo = &rbo->tbo;
262 tv.num_shared = 1;
263 list_add(&tv.head, &list);
264
265 r = ttm_eu_reserve_buffers(&ticket, &list, false, NULL);
266 if (r) {
267 dev_err(adev->dev, "fail to reserve bo (%d)\n", r);
268 return r;
269 }
270
271 if (plane->type != DRM_PLANE_TYPE_CURSOR)
272 domain = amdgpu_display_supported_domains(adev, rbo->flags);
273 else
274 domain = AMDGPU_GEM_DOMAIN_VRAM;
275
276 r = amdgpu_bo_pin(rbo, domain);
277 if (unlikely(r != 0)) {
278 if (r != -ERESTARTSYS)
279 DRM_ERROR("Failed to pin framebuffer with error %d\n", r);
280 ttm_eu_backoff_reservation(&ticket, &list);
281 return r;
282 }
283
284 r = amdgpu_ttm_alloc_gart(&rbo->tbo);
285 if (unlikely(r != 0)) {
286 amdgpu_bo_unpin(rbo);
287 ttm_eu_backoff_reservation(&ticket, &list);
288 DRM_ERROR("%p bind failed\n", rbo);
289 return r;
290 }
291
292 ttm_eu_backoff_reservation(&ticket, &list);
293
294 afb->address = amdgpu_bo_gpu_offset(rbo);
295
296 amdgpu_bo_ref(rbo);
297
298 return 0;
299 }
300
301 static void amdgpu_vkms_cleanup_fb(struct drm_plane *plane,
302 struct drm_plane_state *old_state)
303 {
304 struct amdgpu_bo *rbo;
305 int r;
306
307 if (!old_state->fb)
308 return;
309
310 rbo = gem_to_amdgpu_bo(old_state->fb->obj[0]);
311 r = amdgpu_bo_reserve(rbo, false);
312 if (unlikely(r)) {
313 DRM_ERROR("failed to reserve rbo before unpin\n");
314 return;
315 }
316
317 amdgpu_bo_unpin(rbo);
318 amdgpu_bo_unreserve(rbo);
319 amdgpu_bo_unref(&rbo);
320 }
321
322 static const struct drm_plane_helper_funcs amdgpu_vkms_primary_helper_funcs = {
> 323 .atomic_update = amdgpu_vkms_plane_atomic_update,
> 324 .atomic_check = amdgpu_vkms_plane_atomic_check,
325 .prepare_fb = amdgpu_vkms_prepare_fb,
326 .cleanup_fb = amdgpu_vkms_cleanup_fb,
327 };
328
> 329 struct drm_plane *amdgpu_vkms_plane_init(struct drm_device *dev,
330 enum drm_plane_type type, int index)
331 {
332 struct drm_plane *plane;
333 int ret;
334
335 plane = kzalloc(sizeof(*plane), GFP_KERNEL);
336 if (!plane)
337 return ERR_PTR(-ENOMEM);
338
339 ret = drm_universal_plane_init(dev, plane, 1 << index,
340 &amdgpu_vkms_plane_funcs,
341 amdgpu_vkms_formats,
342 ARRAY_SIZE(amdgpu_vkms_formats),
343 NULL, type, NULL);
344 if (ret) {
345 kfree(plane);
346 return ERR_PTR(ret);
347 }
348
349 drm_plane_helper_add(plane, &amdgpu_vkms_primary_helper_funcs);
350
351 return plane;
352 }
353
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [PATCH 1/3] drm/amdgpu: create amdgpu_vkms
by kernel test robot
Hi Ryan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on next-20210712]
[also build test WARNING on v5.14-rc1]
[cannot apply to drm-intel/for-linux-next drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.14-rc1 v5.13 v5.13-rc7]
[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/Ryan-Taylor/drm-amdgpu-modernize...
base: db503865b9ba6284edfee3825846a464cc4f4c61
config: i386-randconfig-r013-20210712 (attached as .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/96f64e3b91a195cc37720de206b86c3f0...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ryan-Taylor/drm-amdgpu-modernize-virtual-display-feature/20210713-034827
git checkout 96f64e3b91a195cc37720de206b86c3f0378abbb
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 >>):
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:156:5: warning: no previous prototype for 'amdgpu_vkms_crtc_init' [-Wmissing-prototypes]
156 | int amdgpu_vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:323:20: error: initialization of 'void (*)(struct drm_plane *, struct drm_atomic_state *)' from incompatible pointer type 'void (*)(struct drm_plane *, struct drm_plane_state *)' [-Werror=incompatible-pointer-types]
323 | .atomic_update = amdgpu_vkms_plane_atomic_update,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:323:20: note: (near initialization for 'amdgpu_vkms_primary_helper_funcs.atomic_update')
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:324:19: error: initialization of 'int (*)(struct drm_plane *, struct drm_atomic_state *)' from incompatible pointer type 'int (*)(struct drm_plane *, struct drm_plane_state *)' [-Werror=incompatible-pointer-types]
324 | .atomic_check = amdgpu_vkms_plane_atomic_check,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:324:19: note: (near initialization for 'amdgpu_vkms_primary_helper_funcs.atomic_check')
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:329:19: warning: no previous prototype for 'amdgpu_vkms_plane_init' [-Wmissing-prototypes]
329 | struct drm_plane *amdgpu_vkms_plane_init(struct drm_device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/amdgpu_vkms_crtc_init +156 drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
155
> 156 int amdgpu_vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
157 struct drm_plane *primary, struct drm_plane *cursor)
158 {
159 int ret;
160
161 ret = drm_crtc_init_with_planes(dev, crtc, primary, cursor,
162 &amdgpu_vkms_crtc_funcs, NULL);
163 if (ret) {
164 DRM_ERROR("Failed to init CRTC\n");
165 return ret;
166 }
167
168 drm_crtc_helper_add(crtc, &amdgpu_vkms_crtc_helper_funcs);
169
170 return ret;
171 }
172
173 static const struct drm_connector_funcs amdgpu_vkms_connector_funcs = {
174 .fill_modes = drm_helper_probe_single_connector_modes,
175 .destroy = drm_connector_cleanup,
176 .reset = drm_atomic_helper_connector_reset,
177 .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
178 .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
179 };
180
181 static int amdgpu_vkms_conn_get_modes(struct drm_connector *connector)
182 {
183 int count;
184
185 count = drm_add_modes_noedid(connector, XRES_MAX, YRES_MAX);
186 drm_set_preferred_mode(connector, XRES_DEF, YRES_DEF);
187
188 return count;
189 }
190
191 static const struct drm_connector_helper_funcs amdgpu_vkms_conn_helper_funcs = {
192 .get_modes = amdgpu_vkms_conn_get_modes,
193 };
194
195 static const struct drm_plane_funcs amdgpu_vkms_plane_funcs = {
196 .update_plane = drm_atomic_helper_update_plane,
197 .disable_plane = drm_atomic_helper_disable_plane,
198 .destroy = drm_plane_cleanup,
199 .reset = drm_atomic_helper_plane_reset,
200 .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
201 .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
202 };
203
204 static void amdgpu_vkms_plane_atomic_update(struct drm_plane *plane,
205 struct drm_plane_state *old_state)
206 {
207 return;
208 }
209
210 static int amdgpu_vkms_plane_atomic_check(struct drm_plane *plane,
211 struct drm_plane_state *state)
212 {
213 struct drm_crtc_state *crtc_state;
214 bool can_position = false;
215 int ret;
216
217 if (!state->fb || WARN_ON(!state->crtc))
218 return 0;
219
220 crtc_state = drm_atomic_get_crtc_state(state->state, state->crtc);
221 if (IS_ERR(crtc_state))
222 return PTR_ERR(crtc_state);
223
224 ret = drm_atomic_helper_check_plane_state(state, crtc_state,
225 DRM_PLANE_HELPER_NO_SCALING,
226 DRM_PLANE_HELPER_NO_SCALING,
227 can_position, true);
228 if (ret != 0)
229 return ret;
230
231 /* for now primary plane must be visible and full screen */
232 if (!state->visible && !can_position)
233 return -EINVAL;
234
235 return 0;
236 }
237
238 static int amdgpu_vkms_prepare_fb(struct drm_plane *plane,
239 struct drm_plane_state *new_state)
240 {
241 struct amdgpu_framebuffer *afb;
242 struct drm_gem_object *obj;
243 struct amdgpu_device *adev;
244 struct amdgpu_bo *rbo;
245 struct list_head list;
246 struct ttm_validate_buffer tv;
247 struct ww_acquire_ctx ticket;
248 uint32_t domain;
249 int r;
250
251 if (!new_state->fb) {
252 DRM_DEBUG_KMS("No FB bound\n");
253 return 0;
254 }
255 afb = to_amdgpu_framebuffer(new_state->fb);
256 obj = new_state->fb->obj[0];
257 rbo = gem_to_amdgpu_bo(obj);
258 adev = amdgpu_ttm_adev(rbo->tbo.bdev);
259 INIT_LIST_HEAD(&list);
260
261 tv.bo = &rbo->tbo;
262 tv.num_shared = 1;
263 list_add(&tv.head, &list);
264
265 r = ttm_eu_reserve_buffers(&ticket, &list, false, NULL);
266 if (r) {
267 dev_err(adev->dev, "fail to reserve bo (%d)\n", r);
268 return r;
269 }
270
271 if (plane->type != DRM_PLANE_TYPE_CURSOR)
272 domain = amdgpu_display_supported_domains(adev, rbo->flags);
273 else
274 domain = AMDGPU_GEM_DOMAIN_VRAM;
275
276 r = amdgpu_bo_pin(rbo, domain);
277 if (unlikely(r != 0)) {
278 if (r != -ERESTARTSYS)
279 DRM_ERROR("Failed to pin framebuffer with error %d\n", r);
280 ttm_eu_backoff_reservation(&ticket, &list);
281 return r;
282 }
283
284 r = amdgpu_ttm_alloc_gart(&rbo->tbo);
285 if (unlikely(r != 0)) {
286 amdgpu_bo_unpin(rbo);
287 ttm_eu_backoff_reservation(&ticket, &list);
288 DRM_ERROR("%p bind failed\n", rbo);
289 return r;
290 }
291
292 ttm_eu_backoff_reservation(&ticket, &list);
293
294 afb->address = amdgpu_bo_gpu_offset(rbo);
295
296 amdgpu_bo_ref(rbo);
297
298 return 0;
299 }
300
301 static void amdgpu_vkms_cleanup_fb(struct drm_plane *plane,
302 struct drm_plane_state *old_state)
303 {
304 struct amdgpu_bo *rbo;
305 int r;
306
307 if (!old_state->fb)
308 return;
309
310 rbo = gem_to_amdgpu_bo(old_state->fb->obj[0]);
311 r = amdgpu_bo_reserve(rbo, false);
312 if (unlikely(r)) {
313 DRM_ERROR("failed to reserve rbo before unpin\n");
314 return;
315 }
316
317 amdgpu_bo_unpin(rbo);
318 amdgpu_bo_unreserve(rbo);
319 amdgpu_bo_unref(&rbo);
320 }
321
322 static const struct drm_plane_helper_funcs amdgpu_vkms_primary_helper_funcs = {
323 .atomic_update = amdgpu_vkms_plane_atomic_update,
324 .atomic_check = amdgpu_vkms_plane_atomic_check,
325 .prepare_fb = amdgpu_vkms_prepare_fb,
326 .cleanup_fb = amdgpu_vkms_cleanup_fb,
327 };
328
> 329 struct drm_plane *amdgpu_vkms_plane_init(struct drm_device *dev,
330 enum drm_plane_type type, int index)
331 {
332 struct drm_plane *plane;
333 int ret;
334
335 plane = kzalloc(sizeof(*plane), GFP_KERNEL);
336 if (!plane)
337 return ERR_PTR(-ENOMEM);
338
339 ret = drm_universal_plane_init(dev, plane, 1 << index,
340 &amdgpu_vkms_plane_funcs,
341 amdgpu_vkms_formats,
342 ARRAY_SIZE(amdgpu_vkms_formats),
343 NULL, type, NULL);
344 if (ret) {
345 kfree(plane);
346 return ERR_PTR(ret);
347 }
348
349 drm_plane_helper_add(plane, &amdgpu_vkms_primary_helper_funcs);
350
351 return plane;
352 }
353
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
[android-common:android12-5.10 7529/10575] userfaultfd.c:556:36: error: expected ')' before 'PRId64'
by kernel test robot
Hi Peter,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/common android12-5.10
head: 1f0c32a6679e6346c36c0f45db674600a9e3060a
commit: 606bb053823378adbd12fd8a31af7309250daedb [7529/10575] BACKPORT: FROMGIT: userfaultfd/selftests: unify error handling
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout 606bb053823378adbd12fd8a31af7309250daedb
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash -C tools/testing/selftests/vm install
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 >>):
userfaultfd.c:345:29: error: unknown type name 'uint64_t'; did you mean 'u_int64_t'?
345 | static int userfaultfd_open(uint64_t *features)
| ^~~~~~~~
| u_int64_t
userfaultfd.c:366:35: error: unknown type name 'uint64_t'; did you mean 'u_int64_t'?
366 | static int uffd_test_ctx_init_ext(uint64_t *features)
| ^~~~~~~~
| u_int64_t
userfaultfd.c:411:38: error: unknown type name 'uint64_t'; did you mean 'u_int64_t'?
411 | static inline int uffd_test_ctx_init(uint64_t features)
| ^~~~~~~~
| u_int64_t
userfaultfd.c: In function 'wp_range':
userfaultfd.c:480:37: error: expected ')' before 'PRIx64'
480 | err("clear WP failed: address=0x%"PRIx64, (uint64_t)start);
| ^~~~~~
userfaultfd.c:146:29: note: in definition of macro '_err'
146 | fprintf(stderr, "ERROR: " fmt, ##__VA_ARGS__); \
| ^~~
userfaultfd.c:480:3: note: in expansion of macro 'err'
480 | err("clear WP failed: address=0x%"PRIx64, (uint64_t)start);
| ^~~
userfaultfd.c:146:19: warning: spurious trailing '%' in format [-Wformat=]
146 | fprintf(stderr, "ERROR: " fmt, ##__VA_ARGS__); \
| ^~~~~~~~~
userfaultfd.c:153:3: note: in expansion of macro '_err'
153 | _err(fmt, ##__VA_ARGS__); \
| ^~~~
userfaultfd.c:480:3: note: in expansion of macro 'err'
480 | err("clear WP failed: address=0x%"PRIx64, (uint64_t)start);
| ^~~
userfaultfd.c:480:35: note: format string is defined here
480 | err("clear WP failed: address=0x%"PRIx64, (uint64_t)start);
| ^
userfaultfd.c: In function 'continue_range':
userfaultfd.c:492:48: error: expected ')' before 'PRIx64'
492 | err("UFFDIO_CONTINUE failed for address 0x%" PRIx64,
| ^~~~~~
userfaultfd.c:146:29: note: in definition of macro '_err'
146 | fprintf(stderr, "ERROR: " fmt, ##__VA_ARGS__); \
| ^~~
userfaultfd.c:492:3: note: in expansion of macro 'err'
492 | err("UFFDIO_CONTINUE failed for address 0x%" PRIx64,
| ^~~
userfaultfd.c:146:19: warning: spurious trailing '%' in format [-Wformat=]
146 | fprintf(stderr, "ERROR: " fmt, ##__VA_ARGS__); \
| ^~~~~~~~~
userfaultfd.c:153:3: note: in expansion of macro '_err'
153 | _err(fmt, ##__VA_ARGS__); \
| ^~~~
userfaultfd.c:492:3: note: in expansion of macro 'err'
492 | err("UFFDIO_CONTINUE failed for address 0x%" PRIx64,
| ^~~
userfaultfd.c:492:45: note: format string is defined here
492 | err("UFFDIO_CONTINUE failed for address 0x%" PRIx64,
| ^
userfaultfd.c: In function 'retry_copy_page':
>> userfaultfd.c:556:36: error: expected ')' before 'PRId64'
556 | err("UFFDIO_COPY retry error: %"PRId64,
| ^~~~~~
userfaultfd.c:146:29: note: in definition of macro '_err'
146 | fprintf(stderr, "ERROR: " fmt, ##__VA_ARGS__); \
| ^~~
userfaultfd.c:556:4: note: in expansion of macro 'err'
556 | err("UFFDIO_COPY retry error: %"PRId64,
| ^~~
userfaultfd.c:146:19: warning: spurious trailing '%' in format [-Wformat=]
146 | fprintf(stderr, "ERROR: " fmt, ##__VA_ARGS__); \
| ^~~~~~~~~
userfaultfd.c:153:3: note: in expansion of macro '_err'
153 | _err(fmt, ##__VA_ARGS__); \
| ^~~~
userfaultfd.c:556:4: note: in expansion of macro 'err'
556 | err("UFFDIO_COPY retry error: %"PRId64,
| ^~~
userfaultfd.c:556:34: note: format string is defined here
556 | err("UFFDIO_COPY retry error: %"PRId64,
| ^
userfaultfd.c:559:40: error: expected ')' before 'PRId64'
559 | err("UFFDIO_COPY retry unexpected: %"PRId64,
| ^~~~~~
userfaultfd.c:146:29: note: in definition of macro '_err'
146 | fprintf(stderr, "ERROR: " fmt, ##__VA_ARGS__); \
| ^~~
userfaultfd.c:559:3: note: in expansion of macro 'err'
559 | err("UFFDIO_COPY retry unexpected: %"PRId64,
| ^~~
userfaultfd.c:146:19: warning: spurious trailing '%' in format [-Wformat=]
146 | fprintf(stderr, "ERROR: " fmt, ##__VA_ARGS__); \
| ^~~~~~~~~
userfaultfd.c:153:3: note: in expansion of macro '_err'
153 | _err(fmt, ##__VA_ARGS__); \
| ^~~~
userfaultfd.c:559:3: note: in expansion of macro 'err'
559 | err("UFFDIO_COPY retry unexpected: %"PRId64,
| ^~~
userfaultfd.c:559:38: note: format string is defined here
559 | err("UFFDIO_COPY retry unexpected: %"PRId64,
| ^
userfaultfd.c: In function '__copy_page':
userfaultfd.c:581:30: error: expected ')' before 'PRId64'
581 | err("UFFDIO_COPY error: %"PRId64,
| ^~~~~~
userfaultfd.c:146:29: note: in definition of macro '_err'
146 | fprintf(stderr, "ERROR: " fmt, ##__VA_ARGS__); \
| ^~~
userfaultfd.c:581:4: note: in expansion of macro 'err'
581 | err("UFFDIO_COPY error: %"PRId64,
| ^~~
userfaultfd.c:146:19: warning: spurious trailing '%' in format [-Wformat=]
146 | fprintf(stderr, "ERROR: " fmt, ##__VA_ARGS__); \
| ^~~~~~~~~
userfaultfd.c:153:3: note: in expansion of macro '_err'
153 | _err(fmt, ##__VA_ARGS__); \
| ^~~~
userfaultfd.c:581:4: note: in expansion of macro 'err'
581 | err("UFFDIO_COPY error: %"PRId64,
| ^~~
userfaultfd.c:581:28: note: format string is defined here
581 | err("UFFDIO_COPY error: %"PRId64,
| ^
userfaultfd.c:584:29: error: expected ')' before 'PRId64'
584 | err("UFFDIO_COPY error: %"PRId64, (int64_t)uffdio_copy.copy);
| ^~~~~~
userfaultfd.c:146:29: note: in definition of macro '_err'
146 | fprintf(stderr, "ERROR: " fmt, ##__VA_ARGS__); \
| ^~~
userfaultfd.c:584:3: note: in expansion of macro 'err'
584 | err("UFFDIO_COPY error: %"PRId64, (int64_t)uffdio_copy.copy);
| ^~~
userfaultfd.c:146:19: warning: spurious trailing '%' in format [-Wformat=]
146 | fprintf(stderr, "ERROR: " fmt, ##__VA_ARGS__); \
| ^~~~~~~~~
userfaultfd.c:153:3: note: in expansion of macro '_err'
153 | _err(fmt, ##__VA_ARGS__); \
| ^~~~
userfaultfd.c:584:3: note: in expansion of macro 'err'
584 | err("UFFDIO_COPY error: %"PRId64, (int64_t)uffdio_copy.copy);
| ^~~
userfaultfd.c:584:27: note: format string is defined here
584 | err("UFFDIO_COPY error: %"PRId64, (int64_t)uffdio_copy.copy);
| ^
userfaultfd.c: In function 'uffd_handle_page_fault':
userfaultfd.c:635:3: error: unknown type name 'uint8_t'; did you mean 'u_int8_t'?
635 | uint8_t *area;
| ^~~~~~~
| u_int8_t
userfaultfd.c:650:11: error: 'uint8_t' undeclared (first use in this function); did you mean 'u_int8_t'?
650 | area = (uint8_t *)(area_dst +
| ^~~~~~~
| u_int8_t
userfaultfd.c:650:11: note: each undeclared identifier is reported only once for each function it appears in
userfaultfd.c:650:20: error: expected expression before ')' token
650 | area = (uint8_t *)(area_dst +
| ^
userfaultfd.c: In function 'retry_uffdio_zeropage':
userfaultfd.c:986:34: error: expected ')' before 'PRId64'
986 | err("UFFDIO_ZEROPAGE error: %"PRId64,
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
[ti:ti-linux-5.10.y 6284/6309] net/core/sock.c:3179:28: error: use of undeclared identifier 'SCM_REDUNDANT'
by kernel test robot
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-5.10.y
head: 31b50abb3ee1c8f78cb2d61c6fbbf074c7f5d99f
commit: 89b354a68fd094a218c79af743e60299045f33b5 [6284/6309] net: socket: Pass on redundant net info to sock_recv_errqueue
config: mips-randconfig-r016-20210711 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8d69635ed9ecf36fd0ca85906bfde17949671cbe)
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
git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-linux-5.10.y
git checkout 89b354a68fd094a218c79af743e60299045f33b5
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=mips SHELL=/bin/bash net/
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 net/core/sock.c:91:
In file included from include/linux/errqueue.h:6:
In file included from include/net/ip.h:28:
In file included from include/net/inet_sock.h:22:
include/net/sock.h:2525:29: error: use of undeclared identifier 'SCM_REDUNDANT'
put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
^
>> net/core/sock.c:3179:28: error: use of undeclared identifier 'SCM_REDUNDANT'
put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
^
2 errors generated.
vim +/SCM_REDUNDANT +3179 net/core/sock.c
3153
3154 int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len,
3155 int level, int type)
3156 {
3157 struct sock_exterr_skb *serr;
3158 struct sk_buff *skb;
3159 int copied, err;
3160 struct skb_redundant_info *sred;
3161
3162 err = -EAGAIN;
3163 skb = sock_dequeue_err_skb(sk);
3164 if (skb == NULL)
3165 goto out;
3166
3167 copied = skb->len;
3168 if (copied > len) {
3169 msg->msg_flags |= MSG_TRUNC;
3170 copied = len;
3171 }
3172 err = skb_copy_datagram_msg(skb, 0, msg, copied);
3173 if (err)
3174 goto out_free_skb;
3175
3176 sock_recv_timestamp(msg, sk, skb);
3177
3178 sred = skb_redinfo(skb);
> 3179 put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
3180
3181 serr = SKB_EXT_ERR(skb);
3182 put_cmsg(msg, level, type, sizeof(serr->ee), &serr->ee);
3183
3184 msg->msg_flags |= MSG_ERRQUEUE;
3185 err = copied;
3186
3187 out_free_skb:
3188 kfree_skb(skb);
3189 out:
3190 return err;
3191 }
3192 EXPORT_SYMBOL(sock_recv_errqueue);
3193
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [PATCH 3/3] drm/amdgpu: replace dce_virtual with amdgpu_vkms
by kernel test robot
Hi Ryan,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20210712]
[cannot apply to drm-intel/for-linux-next drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.14-rc1 v5.13 v5.13-rc7 v5.14-rc1]
[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/Ryan-Taylor/drm-amdgpu-modernize...
base: db503865b9ba6284edfee3825846a464cc4f4c61
config: i386-randconfig-a013-20210712 (attached as .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/da96fc5ec68bb4054ce0f7f1c9c10d330...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ryan-Taylor/drm-amdgpu-modernize-virtual-display-feature/20210713-034827
git checkout da96fc5ec68bb4054ce0f7f1c9c10d3305ba217f
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/
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 >>):
>> drivers/gpu/drm/amd/amdgpu/cik.c:73:10: fatal error: dce_virtual.h: No such file or directory
73 | #include "dce_virtual.h"
| ^~~~~~~~~~~~~~~
compilation terminated.
vim +73 drivers/gpu/drm/amd/amdgpu/cik.c
a2e73f56fa6282 Alex Deucher 2015-04-20 70
4562236b3bc0a2 Harry Wentland 2017-09-12 71 #include "amdgpu_dm.h"
130e0371b7d454 Oded Gabbay 2015-06-12 72 #include "amdgpu_amdkfd.h"
e9ed3a67cd1bfd Emily Deng 2016-08-08 @73 #include "dce_virtual.h"
130e0371b7d454 Oded Gabbay 2015-06-12 74
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [PATCH v2 1/8] dt-bindings: display: msm: dsi-controller-main: restore assigned-clocks
by kernel test robot
Hi Dmitry,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on next-20210709]
[cannot apply to robh/for-next v5.13]
[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/Dmitry-Baryshkov/dsi-rework-cloc...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 50be9417e23af5a8ac860d998e1e3f06b8fd79d7
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce: make ARCH=arm dtbs_check
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
dtcheck warnings: (new ones prefixed by >>)
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml: mdss_dsi@4700000: clock-names:3: 'core' was expected
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml: mdss_dsi@4700000: clock-names:4: 'iface' was expected
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml: mdss_dsi@4700000: clock-names:5: 'bus' was expected
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml: mdss_dsi@4700000: clock-names: ['iface_clk', 'bus_clk', 'core_mmss_clk', 'src_clk', 'byte_clk', 'pixel_clk', 'core_clk'] is too long
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml: mdss_dsi@4700000: clock-names: Additional items are not allowed ('core_clk' was unexpected)
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
>> arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml: mdss_dsi@4700000: assigned-clocks: [[66, 83], [66, 87], [66, 56], [66, 105]] is too long
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
>> arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml: mdss_dsi@4700000: assigned-clock-parents: [[69, 0], [69, 0], [69, 1], [69, 1]] is too long
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml: mdss_dsi@4700000: 'phy-names' is a required property
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml: mdss_dsi@4700000: 'power-domains' is a required property
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml: mdss_dsi@4700000: 'operating-points-v2' is a required property
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml: mdss_dsi@4700000: 'label' does not match any of the regexes: 'pinctrl-[0-9]+'
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml: dsi-phy@4700200: clock-names:0: 'iface' was expected
--
arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml: mdss_dsi@4700000: clock-names:3: 'core' was expected
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml: mdss_dsi@4700000: clock-names:4: 'iface' was expected
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml: mdss_dsi@4700000: clock-names:5: 'bus' was expected
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml: mdss_dsi@4700000: clock-names: ['iface_clk', 'bus_clk', 'core_mmss_clk', 'src_clk', 'byte_clk', 'pixel_clk', 'core_clk'] is too long
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml: mdss_dsi@4700000: clock-names: Additional items are not allowed ('core_clk' was unexpected)
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
>> arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml: mdss_dsi@4700000: assigned-clocks: [[69, 83], [69, 87], [69, 56], [69, 105]] is too long
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
>> arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml: mdss_dsi@4700000: assigned-clock-parents: [[72, 0], [72, 0], [72, 1], [72, 1]] is too long
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml: mdss_dsi@4700000: 'phy-names' is a required property
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml: mdss_dsi@4700000: 'power-domains' is a required property
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml: mdss_dsi@4700000: 'operating-points-v2' is a required property
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml: mdss_dsi@4700000: 'label' does not match any of the regexes: 'pinctrl-[0-9]+'
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml: dsi-phy@4700200: clock-names:0: 'iface' was expected
--
arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml: mdss_dsi@4700000: clock-names:3: 'core' was expected
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml: mdss_dsi@4700000: clock-names:4: 'iface' was expected
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml: mdss_dsi@4700000: clock-names:5: 'bus' was expected
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml: mdss_dsi@4700000: clock-names: ['iface_clk', 'bus_clk', 'core_mmss_clk', 'src_clk', 'byte_clk', 'pixel_clk', 'core_clk'] is too long
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml: mdss_dsi@4700000: clock-names: Additional items are not allowed ('core_clk' was unexpected)
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
>> arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml: mdss_dsi@4700000: assigned-clocks: [[65, 83], [65, 87], [65, 56], [65, 105]] is too long
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
>> arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml: mdss_dsi@4700000: assigned-clock-parents: [[68, 0], [68, 0], [68, 1], [68, 1]] is too long
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml: mdss_dsi@4700000: 'phy-names' is a required property
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml: mdss_dsi@4700000: 'power-domains' is a required property
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml: mdss_dsi@4700000: 'operating-points-v2' is a required property
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml: mdss_dsi@4700000: 'label' does not match any of the regexes: 'pinctrl-[0-9]+'
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml: dsi-phy@4700200: clock-names:0: 'iface' was expected
--
arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml: mdss_dsi@4700000: clock-names:3: 'core' was expected
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml: mdss_dsi@4700000: clock-names:4: 'iface' was expected
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml: mdss_dsi@4700000: clock-names:5: 'bus' was expected
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml: mdss_dsi@4700000: clock-names: ['iface_clk', 'bus_clk', 'core_mmss_clk', 'src_clk', 'byte_clk', 'pixel_clk', 'core_clk'] is too long
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml: mdss_dsi@4700000: clock-names: Additional items are not allowed ('core_clk' was unexpected)
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
>> arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml: mdss_dsi@4700000: assigned-clocks: [[63, 83], [63, 87], [63, 56], [63, 105]] is too long
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
>> arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml: mdss_dsi@4700000: assigned-clock-parents: [[66, 0], [66, 0], [66, 1], [66, 1]] is too long
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml: mdss_dsi@4700000: 'phy-names' is a required property
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml: mdss_dsi@4700000: 'power-domains' is a required property
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml: mdss_dsi@4700000: 'operating-points-v2' is a required property
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml: mdss_dsi@4700000: 'avdd-supply', 'label', 'panel@0', 'vcss-supply', 'vdd-supply', 'vdda-supply', 'vddio-supply' do not match any of the regexes: 'pinctrl-[0-9]+'
From schema: Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml: panel@0: 'port' does not match any of the regexes: 'pinctrl-[0-9]+'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [PATCH 14/24] bsg: move bsg_scsi_ops to drivers/scsi/
by kernel test robot
Hi Christoph,
I love your patch! Yet something to improve:
[auto build test ERROR on block/for-next]
[also build test ERROR on v5.14-rc1 next-20210712]
[cannot apply to mkp-scsi/for-next scsi/for-next]
[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/Christoph-Hellwig/bsg-remove-sup...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: powerpc64-randconfig-r005-20210712 (attached as .config)
compiler: powerpc64-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://github.com/0day-ci/linux/commit/7cec3a06b11a61835f2fad5d32a67536a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Christoph-Hellwig/bsg-remove-support-for-SCSI_IOCTL_SEND_COMMAND/20210712-144839
git checkout 7cec3a06b11a61835f2fad5d32a67536aea04a7b
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
block/bsg.c: In function 'bsg_sg_io':
>> block/bsg.c:64:8: error: 'struct request_queue' has no member named 'bsg_dev'
64 | if (!q->bsg_dev.class_dev)
| ^~
block/bsg.c:69:9: error: 'struct request_queue' has no member named 'bsg_dev'
69 | ret = q->bsg_dev.ops->check_proto(&hdr);
| ^~
block/bsg.c:78:9: error: 'struct request_queue' has no member named 'bsg_dev'
78 | ret = q->bsg_dev.ops->fill_hdr(rq, &hdr, mode);
| ^~
block/bsg.c:106:13: error: 'struct request_queue' has no member named 'bsg_dev'
106 | ret = rq->q->bsg_dev.ops->complete_rq(rq, &hdr);
| ^~
block/bsg.c:110:7: error: 'struct request_queue' has no member named 'bsg_dev'
110 | rq->q->bsg_dev.ops->free_rq(rq);
| ^~
block/bsg.c: In function 'bsg_add_device':
block/bsg.c:178:31: error: 'struct request_queue' has no member named 'bsg_dev'
178 | strncpy(bd->name, dev_name(rq->bsg_dev.class_dev), sizeof(bd->name) - 1);
| ^~
block/bsg.c: In function 'bsg_get_device':
>> block/bsg.c:218:42: error: dereferencing pointer to incomplete type 'struct bsg_class_device'
218 | bd = __bsg_get_device(iminor(inode), bcd->queue);
| ^~
block/bsg.c: At top level:
>> block/bsg.c:333:6: error: redefinition of 'bsg_unregister_queue'
333 | void bsg_unregister_queue(struct request_queue *q)
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/blkdev.h:21,
from block/bsg.c:8:
include/linux/bsg.h:30:20: note: previous definition of 'bsg_unregister_queue' was here
30 | static inline void bsg_unregister_queue(struct request_queue *q)
| ^~~~~~~~~~~~~~~~~~~~
block/bsg.c: In function 'bsg_unregister_queue':
block/bsg.c:335:35: error: 'struct request_queue' has no member named 'bsg_dev'
335 | struct bsg_class_device *bcd = &q->bsg_dev;
| ^~
block/bsg.c:337:10: error: dereferencing pointer to incomplete type 'struct bsg_class_device'
337 | if (!bcd->class_dev)
| ^~
block/bsg.c: At top level:
>> block/bsg.c:351:34: warning: 'struct bsg_ops' declared inside parameter list will not be visible outside of this definition or declaration
351 | const char *name, const struct bsg_ops *ops)
| ^~~~~~~
>> block/bsg.c:350:5: warning: no previous prototype for 'bsg_register_queue' [-Wmissing-prototypes]
350 | int bsg_register_queue(struct request_queue *q, struct device *parent,
| ^~~~~~~~~~~~~~~~~~
block/bsg.c: In function 'bsg_register_queue':
block/bsg.c:364:10: error: 'struct request_queue' has no member named 'bsg_dev'
364 | bcd = &q->bsg_dev;
| ^~
block/bsg.c:365:24: error: dereferencing pointer to incomplete type 'struct bsg_class_device'
365 | memset(bcd, 0, sizeof(*bcd));
| ^~~~
vim +64 block/bsg.c
17cb960f29c29e Christoph Hellwig 2018-03-13 53
ccf3209f0044e4 Christoph Hellwig 2018-11-09 54 static int bsg_sg_io(struct request_queue *q, fmode_t mode, void __user *uarg)
3d6392cfbd7dc1 Jens Axboe 2007-07-09 55 {
972248e9111ee6 Christoph Hellwig 2019-01-29 56 struct request *rq;
972248e9111ee6 Christoph Hellwig 2019-01-29 57 struct bio *bio;
ccf3209f0044e4 Christoph Hellwig 2018-11-09 58 struct sg_io_v4 hdr;
aebf526b53aea1 Christoph Hellwig 2017-01-31 59 int ret;
c7a841f3aca469 James Smart 2010-11-14 60
ccf3209f0044e4 Christoph Hellwig 2018-11-09 61 if (copy_from_user(&hdr, uarg, sizeof(hdr)))
ccf3209f0044e4 Christoph Hellwig 2018-11-09 62 return -EFAULT;
3d6392cfbd7dc1 Jens Axboe 2007-07-09 63
ccf3209f0044e4 Christoph Hellwig 2018-11-09 @64 if (!q->bsg_dev.class_dev)
ccf3209f0044e4 Christoph Hellwig 2018-11-09 65 return -ENXIO;
3d6392cfbd7dc1 Jens Axboe 2007-07-09 66
ccf3209f0044e4 Christoph Hellwig 2018-11-09 67 if (hdr.guard != 'Q')
ccf3209f0044e4 Christoph Hellwig 2018-11-09 68 return -EINVAL;
ccf3209f0044e4 Christoph Hellwig 2018-11-09 69 ret = q->bsg_dev.ops->check_proto(&hdr);
3d6392cfbd7dc1 Jens Axboe 2007-07-09 70 if (ret)
ccf3209f0044e4 Christoph Hellwig 2018-11-09 71 return ret;
3d6392cfbd7dc1 Jens Axboe 2007-07-09 72
ccf3209f0044e4 Christoph Hellwig 2018-11-09 73 rq = blk_get_request(q, hdr.dout_xfer_len ?
da6269da4cfe29 Christoph Hellwig 2021-06-24 74 REQ_OP_DRV_OUT : REQ_OP_DRV_IN, 0);
a492f075450f3b Joe Lawrence 2014-08-28 75 if (IS_ERR(rq))
ccf3209f0044e4 Christoph Hellwig 2018-11-09 76 return PTR_ERR(rq);
f27b087b81b705 Jens Axboe 2014-06-06 77
ccf3209f0044e4 Christoph Hellwig 2018-11-09 78 ret = q->bsg_dev.ops->fill_hdr(rq, &hdr, mode);
0f7b4bc6bb1e57 Pan Bian 2021-01-19 79 if (ret) {
0f7b4bc6bb1e57 Pan Bian 2021-01-19 80 blk_put_request(rq);
972248e9111ee6 Christoph Hellwig 2019-01-29 81 return ret;
0f7b4bc6bb1e57 Pan Bian 2021-01-19 82 }
2c9ecdf40af055 FUJITA Tomonori 2007-07-16 83
ccf3209f0044e4 Christoph Hellwig 2018-11-09 84 rq->timeout = msecs_to_jiffies(hdr.timeout);
17cb960f29c29e Christoph Hellwig 2018-03-13 85 if (!rq->timeout)
17cb960f29c29e Christoph Hellwig 2018-03-13 86 rq->timeout = q->sg_timeout;
17cb960f29c29e Christoph Hellwig 2018-03-13 87 if (!rq->timeout)
17cb960f29c29e Christoph Hellwig 2018-03-13 88 rq->timeout = BLK_DEFAULT_SG_TIMEOUT;
17cb960f29c29e Christoph Hellwig 2018-03-13 89 if (rq->timeout < BLK_MIN_SG_TIMEOUT)
17cb960f29c29e Christoph Hellwig 2018-03-13 90 rq->timeout = BLK_MIN_SG_TIMEOUT;
17cb960f29c29e Christoph Hellwig 2018-03-13 91
ccf3209f0044e4 Christoph Hellwig 2018-11-09 92 if (hdr.dout_xfer_len) {
ccf3209f0044e4 Christoph Hellwig 2018-11-09 93 ret = blk_rq_map_user(q, rq, NULL, uptr64(hdr.dout_xferp),
ccf3209f0044e4 Christoph Hellwig 2018-11-09 94 hdr.dout_xfer_len, GFP_KERNEL);
ccf3209f0044e4 Christoph Hellwig 2018-11-09 95 } else if (hdr.din_xfer_len) {
ccf3209f0044e4 Christoph Hellwig 2018-11-09 96 ret = blk_rq_map_user(q, rq, NULL, uptr64(hdr.din_xferp),
ccf3209f0044e4 Christoph Hellwig 2018-11-09 97 hdr.din_xfer_len, GFP_KERNEL);
70e36eceaf897d FUJITA Tomonori 2006-12-20 98 }
c1c201200a359c Boaz Harrosh 2009-02-03 99
17cb960f29c29e Christoph Hellwig 2018-03-13 100 if (ret)
972248e9111ee6 Christoph Hellwig 2019-01-29 101 goto out_free_rq;
17cb960f29c29e Christoph Hellwig 2018-03-13 102
ccf3209f0044e4 Christoph Hellwig 2018-11-09 103 bio = rq->bio;
70e36eceaf897d FUJITA Tomonori 2006-12-20 104
684da7628d93bb Guoqing Jiang 2021-01-25 105 blk_execute_rq(NULL, rq, !(hdr.flags & BSG_FLAG_Q_AT_TAIL));
ccf3209f0044e4 Christoph Hellwig 2018-11-09 106 ret = rq->q->bsg_dev.ops->complete_rq(rq, &hdr);
70e36eceaf897d FUJITA Tomonori 2006-12-20 107 blk_rq_unmap_user(bio);
972248e9111ee6 Christoph Hellwig 2019-01-29 108
972248e9111ee6 Christoph Hellwig 2019-01-29 109 out_free_rq:
17cb960f29c29e Christoph Hellwig 2018-03-13 @110 rq->q->bsg_dev.ops->free_rq(rq);
70e36eceaf897d FUJITA Tomonori 2006-12-20 111 blk_put_request(rq);
972248e9111ee6 Christoph Hellwig 2019-01-29 112 if (!ret && copy_to_user(uarg, &hdr, sizeof(hdr)))
ccf3209f0044e4 Christoph Hellwig 2018-11-09 113 return -EFAULT;
ccf3209f0044e4 Christoph Hellwig 2018-11-09 114 return ret;
70e36eceaf897d FUJITA Tomonori 2006-12-20 115 }
70e36eceaf897d FUJITA Tomonori 2006-12-20 116
3d6392cfbd7dc1 Jens Axboe 2007-07-09 117 static struct bsg_device *bsg_alloc_device(void)
3d6392cfbd7dc1 Jens Axboe 2007-07-09 118 {
3d6392cfbd7dc1 Jens Axboe 2007-07-09 119 struct bsg_device *bd;
3d6392cfbd7dc1 Jens Axboe 2007-07-09 120
3d6392cfbd7dc1 Jens Axboe 2007-07-09 121 bd = kzalloc(sizeof(struct bsg_device), GFP_KERNEL);
3d6392cfbd7dc1 Jens Axboe 2007-07-09 122 if (unlikely(!bd))
3d6392cfbd7dc1 Jens Axboe 2007-07-09 123 return NULL;
3d6392cfbd7dc1 Jens Axboe 2007-07-09 124
3d6392cfbd7dc1 Jens Axboe 2007-07-09 125 spin_lock_init(&bd->lock);
5309cb38de65ed Jens Axboe 2007-01-23 126 bd->max_queue = BSG_DEFAULT_CMDS;
3d6392cfbd7dc1 Jens Axboe 2007-07-09 127 INIT_HLIST_NODE(&bd->dev_list);
3d6392cfbd7dc1 Jens Axboe 2007-07-09 128 return bd;
3d6392cfbd7dc1 Jens Axboe 2007-07-09 129 }
3d6392cfbd7dc1 Jens Axboe 2007-07-09 130
3d6392cfbd7dc1 Jens Axboe 2007-07-09 131 static int bsg_put_device(struct bsg_device *bd)
3d6392cfbd7dc1 Jens Axboe 2007-07-09 132 {
97f46ae45c7085 FUJITA Tomonori 2008-04-19 133 struct request_queue *q = bd->queue;
3d6392cfbd7dc1 Jens Axboe 2007-07-09 134
3d6392cfbd7dc1 Jens Axboe 2007-07-09 135 mutex_lock(&bsg_mutex);
3d6392cfbd7dc1 Jens Axboe 2007-07-09 136
db193954ed9e35 John Pittman 2018-08-27 137 if (!refcount_dec_and_test(&bd->ref_count)) {
3f27e3ed11e67c FUJITA Tomonori 2008-05-29 138 mutex_unlock(&bsg_mutex);
28519c891c5ad5 Christoph Hellwig 2018-07-12 139 return 0;
3f27e3ed11e67c FUJITA Tomonori 2008-05-29 140 }
3f27e3ed11e67c FUJITA Tomonori 2008-05-29 141
3f27e3ed11e67c FUJITA Tomonori 2008-05-29 142 hlist_del(&bd->dev_list);
3f27e3ed11e67c FUJITA Tomonori 2008-05-29 143 mutex_unlock(&bsg_mutex);
3d6392cfbd7dc1 Jens Axboe 2007-07-09 144
3124b65dad946c Johannes Thumshirn 2018-01-24 145 bsg_dbg(bd, "tearing down\n");
3d6392cfbd7dc1 Jens Axboe 2007-07-09 146
3d6392cfbd7dc1 Jens Axboe 2007-07-09 147 /*
3d6392cfbd7dc1 Jens Axboe 2007-07-09 148 * close can always block
3d6392cfbd7dc1 Jens Axboe 2007-07-09 149 */
5309cb38de65ed Jens Axboe 2007-01-23 150 kfree(bd);
97f46ae45c7085 FUJITA Tomonori 2008-04-19 151 blk_put_queue(q);
28519c891c5ad5 Christoph Hellwig 2018-07-12 152 return 0;
3d6392cfbd7dc1 Jens Axboe 2007-07-09 153 }
3d6392cfbd7dc1 Jens Axboe 2007-07-09 154
3d6392cfbd7dc1 Jens Axboe 2007-07-09 155 static struct bsg_device *bsg_add_device(struct inode *inode,
d351af01b93075 FUJITA Tomonori 2007-07-09 156 struct request_queue *rq,
3d6392cfbd7dc1 Jens Axboe 2007-07-09 157 struct file *file)
3d6392cfbd7dc1 Jens Axboe 2007-07-09 158 {
25fd164303cd69 Jens Axboe 2007-07-17 159 struct bsg_device *bd;
3d6392cfbd7dc1 Jens Axboe 2007-07-09 160 unsigned char buf[32];
d9f972644606ec Bart Van Assche 2017-05-31 161
d6c73964f1e2a0 Anatoliy Glagolev 2018-06-13 162 lockdep_assert_held(&bsg_mutex);
d6c73964f1e2a0 Anatoliy Glagolev 2018-06-13 163
09ac46c429464c Tejun Heo 2011-12-14 164 if (!blk_get_queue(rq))
c3ff1b90d8924d FUJITA Tomonori 2008-03-31 165 return ERR_PTR(-ENXIO);
3d6392cfbd7dc1 Jens Axboe 2007-07-09 166
3d6392cfbd7dc1 Jens Axboe 2007-07-09 167 bd = bsg_alloc_device();
c3ff1b90d8924d FUJITA Tomonori 2008-03-31 168 if (!bd) {
c3ff1b90d8924d FUJITA Tomonori 2008-03-31 169 blk_put_queue(rq);
3d6392cfbd7dc1 Jens Axboe 2007-07-09 170 return ERR_PTR(-ENOMEM);
c3ff1b90d8924d FUJITA Tomonori 2008-03-31 171 }
3d6392cfbd7dc1 Jens Axboe 2007-07-09 172
d351af01b93075 FUJITA Tomonori 2007-07-09 173 bd->queue = rq;
0b07de85a76e13 Adel Gadllah 2008-06-26 174
db193954ed9e35 John Pittman 2018-08-27 175 refcount_set(&bd->ref_count, 1);
842ea771c38a3f FUJITA Tomonori 2008-03-31 176 hlist_add_head(&bd->dev_list, bsg_dev_idx_hash(iminor(inode)));
3d6392cfbd7dc1 Jens Axboe 2007-07-09 177
3ada8b7e980dac Kay Sievers 2009-01-06 @178 strncpy(bd->name, dev_name(rq->bsg_dev.class_dev), sizeof(bd->name) - 1);
3124b65dad946c Johannes Thumshirn 2018-01-24 179 bsg_dbg(bd, "bound to <%s>, max queue %d\n",
9e69fbb5373f7c FUJITA Tomonori 2006-12-20 180 format_dev_t(buf, inode->i_rdev), bd->max_queue);
3d6392cfbd7dc1 Jens Axboe 2007-07-09 181
3d6392cfbd7dc1 Jens Axboe 2007-07-09 182 return bd;
3d6392cfbd7dc1 Jens Axboe 2007-07-09 183 }
3d6392cfbd7dc1 Jens Axboe 2007-07-09 184
842ea771c38a3f FUJITA Tomonori 2008-03-31 185 static struct bsg_device *__bsg_get_device(int minor, struct request_queue *q)
3d6392cfbd7dc1 Jens Axboe 2007-07-09 186 {
43ac9e62c4a0a4 FUJITA Tomonori 2008-03-31 187 struct bsg_device *bd;
3d6392cfbd7dc1 Jens Axboe 2007-07-09 188
d6c73964f1e2a0 Anatoliy Glagolev 2018-06-13 189 lockdep_assert_held(&bsg_mutex);
3d6392cfbd7dc1 Jens Axboe 2007-07-09 190
b67bfe0d42cac5 Sasha Levin 2013-02-27 191 hlist_for_each_entry(bd, bsg_dev_idx_hash(minor), dev_list) {
842ea771c38a3f FUJITA Tomonori 2008-03-31 192 if (bd->queue == q) {
db193954ed9e35 John Pittman 2018-08-27 193 refcount_inc(&bd->ref_count);
43ac9e62c4a0a4 FUJITA Tomonori 2008-03-31 194 goto found;
3d6392cfbd7dc1 Jens Axboe 2007-07-09 195 }
3d6392cfbd7dc1 Jens Axboe 2007-07-09 196 }
43ac9e62c4a0a4 FUJITA Tomonori 2008-03-31 197 bd = NULL;
43ac9e62c4a0a4 FUJITA Tomonori 2008-03-31 198 found:
3d6392cfbd7dc1 Jens Axboe 2007-07-09 199 return bd;
3d6392cfbd7dc1 Jens Axboe 2007-07-09 200 }
3d6392cfbd7dc1 Jens Axboe 2007-07-09 201
3d6392cfbd7dc1 Jens Axboe 2007-07-09 202 static struct bsg_device *bsg_get_device(struct inode *inode, struct file *file)
3d6392cfbd7dc1 Jens Axboe 2007-07-09 203 {
598443a2124618 FUJITA Tomonori 2007-07-23 204 struct bsg_device *bd;
598443a2124618 FUJITA Tomonori 2007-07-23 205 struct bsg_class_device *bcd;
3d6392cfbd7dc1 Jens Axboe 2007-07-09 206
3d6392cfbd7dc1 Jens Axboe 2007-07-09 207 /*
3d6392cfbd7dc1 Jens Axboe 2007-07-09 208 * find the class device
3d6392cfbd7dc1 Jens Axboe 2007-07-09 209 */
3d6392cfbd7dc1 Jens Axboe 2007-07-09 210 mutex_lock(&bsg_mutex);
598443a2124618 FUJITA Tomonori 2007-07-23 211 bcd = idr_find(&bsg_minor_idr, iminor(inode));
3d6392cfbd7dc1 Jens Axboe 2007-07-09 212
d6c73964f1e2a0 Anatoliy Glagolev 2018-06-13 213 if (!bcd) {
d6c73964f1e2a0 Anatoliy Glagolev 2018-06-13 214 bd = ERR_PTR(-ENODEV);
d6c73964f1e2a0 Anatoliy Glagolev 2018-06-13 215 goto out_unlock;
d6c73964f1e2a0 Anatoliy Glagolev 2018-06-13 216 }
3d6392cfbd7dc1 Jens Axboe 2007-07-09 217
842ea771c38a3f FUJITA Tomonori 2008-03-31 @218 bd = __bsg_get_device(iminor(inode), bcd->queue);
d6c73964f1e2a0 Anatoliy Glagolev 2018-06-13 219 if (!bd)
d45ac4fa8f277e FUJITA Tomonori 2008-03-31 220 bd = bsg_add_device(inode, bcd->queue, file);
d45ac4fa8f277e FUJITA Tomonori 2008-03-31 221
d6c73964f1e2a0 Anatoliy Glagolev 2018-06-13 222 out_unlock:
d6c73964f1e2a0 Anatoliy Glagolev 2018-06-13 223 mutex_unlock(&bsg_mutex);
d45ac4fa8f277e FUJITA Tomonori 2008-03-31 224 return bd;
3d6392cfbd7dc1 Jens Axboe 2007-07-09 225 }
3d6392cfbd7dc1 Jens Axboe 2007-07-09 226
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months