Re: [PATCH] drm/vmwgfx: remove redundant ret variable
by kernel test robot
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm/drm-next]
[also build test WARNING on next-20220112]
[cannot apply to v5.16]
[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/cgel-zte-gmail-com/drm-vmwgfx-re...
base: git://anongit.freedesktop.org/drm/drm drm-next
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220113/202201130145.eexFh3na-lk...)
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/3542ac844ea28aaa8528f5deb3ee52d16...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review cgel-zte-gmail-com/drm-vmwgfx-remove-redundant-ret-variable/20220112-162527
git checkout 3542ac844ea28aaa8528f5deb3ee52d1690f1f8a
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/vmwgfx/
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/vmwgfx/vmwgfx_bo.c: In function 'vmw_dumb_create':
>> drivers/gpu/drm/vmwgfx/vmwgfx_bo.c:794:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
794 | void vmw_bo_swap_notify(struct ttm_buffer_object *bo)
| ^~~~
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c:860:1: error: expected declaration or statement at end of input
860 | }
| ^
At top level:
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c:853:6: warning: 'vmw_bo_is_vmw_bo' defined but not used [-Wunused-function]
853 | bool vmw_bo_is_vmw_bo(struct ttm_buffer_object *bo)
| ^~~~~~~~~~~~~~~~
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c:815:6: warning: 'vmw_bo_move_notify' defined but not used [-Wunused-function]
815 | void vmw_bo_move_notify(struct ttm_buffer_object *bo,
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c:794:6: warning: 'vmw_bo_swap_notify' defined but not used [-Wunused-function]
794 | void vmw_bo_swap_notify(struct ttm_buffer_object *bo)
| ^~~~~~~~~~~~~~~~~~
vim +794 drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
e9431ea5076a91 Thomas Hellstrom 2018-06-19 761
e9431ea5076a91 Thomas Hellstrom 2018-06-19 762
e9431ea5076a91 Thomas Hellstrom 2018-06-19 763 /**
e9431ea5076a91 Thomas Hellstrom 2018-06-19 764 * vmw_dumb_create - Create a dumb kms buffer
e9431ea5076a91 Thomas Hellstrom 2018-06-19 765 *
e9431ea5076a91 Thomas Hellstrom 2018-06-19 766 * @file_priv: Pointer to a struct drm_file identifying the caller.
e9431ea5076a91 Thomas Hellstrom 2018-06-19 767 * @dev: Pointer to the drm device.
e9431ea5076a91 Thomas Hellstrom 2018-06-19 768 * @args: Pointer to a struct drm_mode_create_dumb structure
e9431ea5076a91 Thomas Hellstrom 2018-06-19 769 * Return: Zero on success, negative error code on failure.
e9431ea5076a91 Thomas Hellstrom 2018-06-19 770 *
e9431ea5076a91 Thomas Hellstrom 2018-06-19 771 * This is a driver callback for the core drm create_dumb functionality.
e9431ea5076a91 Thomas Hellstrom 2018-06-19 772 * Note that this is very similar to the vmw_bo_alloc ioctl, except
e9431ea5076a91 Thomas Hellstrom 2018-06-19 773 * that the arguments have a different format.
e9431ea5076a91 Thomas Hellstrom 2018-06-19 774 */
e9431ea5076a91 Thomas Hellstrom 2018-06-19 775 int vmw_dumb_create(struct drm_file *file_priv,
e9431ea5076a91 Thomas Hellstrom 2018-06-19 776 struct drm_device *dev,
e9431ea5076a91 Thomas Hellstrom 2018-06-19 777 struct drm_mode_create_dumb *args)
e9431ea5076a91 Thomas Hellstrom 2018-06-19 778 {
e9431ea5076a91 Thomas Hellstrom 2018-06-19 779 struct vmw_private *dev_priv = vmw_priv(dev);
e9431ea5076a91 Thomas Hellstrom 2018-06-19 780 struct vmw_buffer_object *vbo;
e9431ea5076a91 Thomas Hellstrom 2018-06-19 781
e9431ea5076a91 Thomas Hellstrom 2018-06-19 782 args->pitch = args->width * ((args->bpp + 7) / 8);
8afa13a0583f94 Zack Rusin 2021-12-06 783 args->size = ALIGN(args->pitch * args->height, PAGE_SIZE);
e9431ea5076a91 Thomas Hellstrom 2018-06-19 784
3542ac844ea28a Minghao Chi 2022-01-12 785 return vmw_gem_object_create_with_handle(dev_priv, file_priv,
8afa13a0583f94 Zack Rusin 2021-12-06 786 args->size, &args->handle,
8afa13a0583f94 Zack Rusin 2021-12-06 787 &vbo);
e9431ea5076a91 Thomas Hellstrom 2018-06-19 788
e9431ea5076a91 Thomas Hellstrom 2018-06-19 789 /**
e9431ea5076a91 Thomas Hellstrom 2018-06-19 790 * vmw_bo_swap_notify - swapout notify callback.
e9431ea5076a91 Thomas Hellstrom 2018-06-19 791 *
e9431ea5076a91 Thomas Hellstrom 2018-06-19 792 * @bo: The buffer object to be swapped out.
e9431ea5076a91 Thomas Hellstrom 2018-06-19 793 */
e9431ea5076a91 Thomas Hellstrom 2018-06-19 @794 void vmw_bo_swap_notify(struct ttm_buffer_object *bo)
e9431ea5076a91 Thomas Hellstrom 2018-06-19 795 {
e9431ea5076a91 Thomas Hellstrom 2018-06-19 796 /* Is @bo embedded in a struct vmw_buffer_object? */
8afa13a0583f94 Zack Rusin 2021-12-06 797 if (vmw_bo_is_vmw_bo(bo))
e9431ea5076a91 Thomas Hellstrom 2018-06-19 798 return;
e9431ea5076a91 Thomas Hellstrom 2018-06-19 799
e9431ea5076a91 Thomas Hellstrom 2018-06-19 800 /* Kill any cached kernel maps before swapout */
e9431ea5076a91 Thomas Hellstrom 2018-06-19 801 vmw_bo_unmap(vmw_buffer_object(bo));
e9431ea5076a91 Thomas Hellstrom 2018-06-19 802 }
e9431ea5076a91 Thomas Hellstrom 2018-06-19 803
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
3 weeks, 2 days
Re: [PATCH v7 2/8] media: uvcvideo: Add support for per-device control mapping overrides
by Dan Carpenter
Hi Ricardo,
url: https://github.com/intel-lab-lkp/linux/commits/Ricardo-Ribalda/uvcvideo-F...
base: git://linuxtv.org/media_tree.git master
config: microblaze-randconfig-m031-20220629 (https://download.01.org/0day-ci/archive/20220630/202206301144.r7yv0yk2-lk...)
compiler: microblaze-linux-gcc (GCC) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/media/usb/uvc/uvc_ctrl.c:2459 uvc_ctrl_init_ctrl() error: uninitialized symbol 'mapping'.
vim +/mapping +2459 drivers/media/usb/uvc/uvc_ctrl.c
866c6bdd5663d4 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2021-06-18 2401 static void uvc_ctrl_init_ctrl(struct uvc_video_chain *chain,
866c6bdd5663d4 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2021-06-18 2402 struct uvc_control *ctrl)
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2403 {
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2404 const struct uvc_control_info *info = uvc_ctrls;
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2405 const struct uvc_control_info *iend = info + ARRAY_SIZE(uvc_ctrls);
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2406 const struct uvc_control_mapping *mapping;
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2407 const struct uvc_control_mapping *mend;
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2408
52c58ad6f95ff6 drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-29 2409 /* XU controls initialization requires querying the device for control
52c58ad6f95ff6 drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-29 2410 * information. As some buggy UVC devices will crash when queried
52c58ad6f95ff6 drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-29 2411 * repeatedly in a tight loop, delay XU controls initialization until
52c58ad6f95ff6 drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-29 2412 * first use.
52c58ad6f95ff6 drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-29 2413 */
52c58ad6f95ff6 drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-29 2414 if (UVC_ENTITY_TYPE(ctrl->entity) == UVC_VC_EXTENSION_UNIT)
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2415 return;
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2416
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2417 for (; info < iend; ++info) {
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2418 if (uvc_entity_match_guid(ctrl->entity, info->entity) &&
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2419 ctrl->index == info->index) {
866c6bdd5663d4 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2021-06-18 2420 uvc_ctrl_add_info(chain->dev, ctrl, info);
93df48d37c3f03 drivers/media/usb/uvc/uvc_ctrl.c Hans de Goede 2020-07-28 2421 /*
93df48d37c3f03 drivers/media/usb/uvc/uvc_ctrl.c Hans de Goede 2020-07-28 2422 * Retrieve control flags from the device. Ignore errors
93df48d37c3f03 drivers/media/usb/uvc/uvc_ctrl.c Hans de Goede 2020-07-28 2423 * and work with default flag values from the uvc_ctrl
93df48d37c3f03 drivers/media/usb/uvc/uvc_ctrl.c Hans de Goede 2020-07-28 2424 * array when the device doesn't properly implement
93df48d37c3f03 drivers/media/usb/uvc/uvc_ctrl.c Hans de Goede 2020-07-28 2425 * GET_INFO on standard controls.
93df48d37c3f03 drivers/media/usb/uvc/uvc_ctrl.c Hans de Goede 2020-07-28 2426 */
866c6bdd5663d4 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2021-06-18 2427 uvc_ctrl_get_flags(chain->dev, ctrl, &ctrl->info);
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2428 break;
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2429 }
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2430 }
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2431
071c8bb827c80a drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-29 2432 if (!ctrl->initialized)
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2433 return;
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2434
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2435 /*
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2436 * First check if the device provides a custom mapping for this control,
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2437 * used to override standard mappings for non-conformant devices. Don't
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2438 * process standard mappings if a custom mapping is found. This
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2439 * mechanism doesn't support combining standard and custom mappings for
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2440 * a single control.
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2441 */
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2442 if (chain->dev->info->mappings) {
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2443 bool custom = false;
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2444 unsigned int i;
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2445
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2446 for (i = 0; (mapping = chain->dev->info->mappings[i]); ++i) {
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2447 if (uvc_entity_match_guid(ctrl->entity, mapping->entity) &&
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2448 ctrl->info.selector == mapping->selector) {
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2449 __uvc_ctrl_add_mapping(chain, ctrl, mapping);
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2450 custom = true;
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2451 }
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2452 }
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2453
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2454 if (custom)
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2455 return;
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2456 }
"mapping" uninitialized if chain->dev->info->mappings is NULL.
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2457
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2458 /* Process common mappings next. */
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 @2459 mend = mapping + ARRAY_SIZE(uvc_ctrl_mappings);
^^^^^^^
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2460 for (mapping = uvc_ctrl_mappings; mapping < mend; ++mapping) {
I'm surprised this made it through testing... Anyway, the easier way to
to iterate through an array of structs is just say:
for (i = 0; i < ARRAY_SIZE(uvc_ctrl_mappings); i++) {
mapping = &uvc_ctrl_mappings[i];
87c205087585a0 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2461 if (uvc_entity_match_guid(ctrl->entity, mapping->entity) &&
87c205087585a0 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2462 ctrl->info.selector == mapping->selector)
87c205087585a0 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2463 __uvc_ctrl_add_mapping(chain, ctrl, mapping);
87c205087585a0 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2464 }
87c205087585a0 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2465
10bdca4191d7a8 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2466 /* Finally process version-specific mappings. */
87c205087585a0 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2467 if (chain->dev->uvc_version < 0x0150) {
87c205087585a0 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2468 mapping = uvc_ctrl_mappings_uvc11;
87c205087585a0 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2469 mend = mapping + ARRAY_SIZE(uvc_ctrl_mappings_uvc11);
87c205087585a0 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2470 } else {
87c205087585a0 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2471 mapping = uvc_ctrl_mappings_uvc15;
87c205087585a0 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2472 mend = mapping + ARRAY_SIZE(uvc_ctrl_mappings_uvc15);
87c205087585a0 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2473 }
87c205087585a0 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2022-06-17 2474
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2475 for (; mapping < mend; ++mapping) {
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2476 if (uvc_entity_match_guid(ctrl->entity, mapping->entity) &&
071c8bb827c80a drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-29 2477 ctrl->info.selector == mapping->selector)
866c6bdd5663d4 drivers/media/usb/uvc/uvc_ctrl.c Ricardo Ribalda 2021-06-18 2478 __uvc_ctrl_add_mapping(chain, ctrl, mapping);
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2479 }
ba2fa99668bb9b drivers/media/video/uvc/uvc_ctrl.c Laurent Pinchart 2010-09-20 2480 }
--
0-DAY CI Kernel Test Service
https://01.org/lkp
1 month, 1 week
Re: [linux-next:master 4040/7019] arch/powerpc/kernel/interrupt.c:542:55: error: suggest braces around empty body in an 'if' statement
by Paul E. McKenney
On Fri, Jul 01, 2022 at 02:23:30AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 6cc11d2a1759275b856e464265823d94aabd5eaf
> commit: 408c74a2d8f01262e152b7eb09500033fbe6bafe [4040/7019] context_tracking: Convert state to atomic_t
> config: powerpc-amigaone_defconfig (https://download.01.org/0day-ci/archive/20220701/202207010213.PDJ0d9Vj-lk...)
> compiler: powerpc-linux-gcc (GCC) 11.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/next/linux-next.git/commi...
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout 408c74a2d8f01262e152b7eb09500033fbe6bafe
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp(a)intel.com>
Good catch! Does the updated commit 344e00943785 ("context_tracking:
Convert state to atomic_t") address this issue?
Thanx, Paul
> All errors (new ones prefixed by >>):
>
> arch/powerpc/kernel/interrupt.c: In function 'interrupt_exit_kernel_prepare':
> >> arch/powerpc/kernel/interrupt.c:542:55: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
> 542 | CT_WARN_ON(ct_state() == CONTEXT_USER);
> | ^
> cc1: all warnings being treated as errors
>
>
> vim +/if +542 arch/powerpc/kernel/interrupt.c
>
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 527
> bf9155f1970c4d arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 528 notrace unsigned long interrupt_exit_kernel_prepare(struct pt_regs *regs)
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 529 {
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 530 unsigned long flags;
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 531 unsigned long ret = 0;
> ad2d2344771dab arch/powerpc/kernel/interrupt.c Christophe Leroy 2021-03-12 532 unsigned long kuap;
> 985faa78687de6 arch/powerpc/kernel/interrupt.c Mark Rutland 2021-11-29 533 bool stack_store = read_thread_flags() & _TIF_EMULATE_STACK_STORE;
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 534
> 806c0e6e7e97ad arch/powerpc/kernel/interrupt.c Christophe Leroy 2021-08-23 535 if (regs_is_unrecoverable(regs))
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 536 unrecoverable_exception(regs);
> f821bc97dee4f3 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2021-01-30 537 /*
> f821bc97dee4f3 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2021-01-30 538 * CT_WARN_ON comes here via program_check_exception,
> f821bc97dee4f3 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2021-01-30 539 * so avoid recursion.
> f821bc97dee4f3 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2021-01-30 540 */
> 7153d4bf0b3734 arch/powerpc/kernel/interrupt.c Xiongwei Song 2021-04-14 541 if (TRAP(regs) != INTERRUPT_PROGRAM)
> f821bc97dee4f3 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2021-01-30 @542 CT_WARN_ON(ct_state() == CONTEXT_USER);
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 543
> ad2d2344771dab arch/powerpc/kernel/interrupt.c Christophe Leroy 2021-03-12 544 kuap = kuap_get_and_assert_locked();
> c0d7dcf89e5151 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-04-29 545
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 546 local_irq_save(flags);
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 547
> 344bb20b159dd0 arch/powerpc/kernel/interrupt.c Christophe Leroy 2021-02-08 548 if (!arch_irq_disabled_regs(regs)) {
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 549 /* Returning to a kernel context with local irqs enabled. */
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 550 WARN_ON_ONCE(!(regs->msr & MSR_EE));
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 551 again:
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 552 if (IS_ENABLED(CONFIG_PREEMPT)) {
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 553 /* Return to preemptible kernel context */
> 985faa78687de6 arch/powerpc/kernel/interrupt.c Mark Rutland 2021-11-29 554 if (unlikely(read_thread_flags() & _TIF_NEED_RESCHED)) {
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 555 if (preempt_count() == 0)
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 556 preempt_schedule_irq();
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 557 }
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 558 }
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 559
> 6eaaf9de359986 arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-22 560 check_return_regs_valid(regs);
> 6eaaf9de359986 arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-22 561
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 562 /*
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 563 * Stack store exit can't be restarted because the interrupt
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 564 * stack frame might have been clobbered.
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 565 */
> 61eece2d170779 arch/powerpc/kernel/interrupt.c Christophe Leroy 2021-06-18 566 if (!prep_irq_for_enabled_exit(unlikely(stack_store))) {
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 567 /*
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 568 * Replay pending soft-masked interrupts now. Don't
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 569 * just local_irq_enabe(); local_irq_disable(); because
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 570 * if we are returning from an asynchronous interrupt
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 571 * here, another one might hit after irqs are enabled,
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 572 * and it would exit via this same path allowing
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 573 * another to fire, and so on unbounded.
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 574 */
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 575 hard_irq_disable();
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 576 replay_soft_interrupts();
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 577 /* Took an interrupt, may have more exit work to do. */
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 578 goto again;
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 579 }
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 580 #ifdef CONFIG_PPC64
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 581 /*
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 582 * An interrupt may clear MSR[EE] and set this concurrently,
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 583 * but it will be marked pending and the exit will be retried.
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 584 * This leaves a racy window where MSR[EE]=0 and HARD_DIS is
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 585 * clear, until interrupt_exit_kernel_restart() calls
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 586 * hard_irq_disable(), which will set HARD_DIS again.
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 587 */
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 588 local_paca->irq_happened &= ~PACA_IRQ_HARD_DIS;
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 589
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 590 } else {
> 6eaaf9de359986 arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-22 591 check_return_regs_valid(regs);
> 6eaaf9de359986 arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-22 592
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 593 if (unlikely(stack_store))
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 594 __hard_EE_RI_disable();
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 595 /*
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 596 * Returning to a kernel context with local irqs disabled.
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 597 * Here, if EE was enabled in the interrupted context, enable
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 598 * it on return as well. A problem exists here where a soft
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 599 * masked interrupt may have cleared MSR[EE] and set HARD_DIS
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 600 * here, and it will still exist on return to the caller. This
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 601 * will be resolved by the masked interrupt firing again.
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 602 */
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 603 if (regs->msr & MSR_EE)
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 604 local_paca->irq_happened &= ~PACA_IRQ_HARD_DIS;
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 605 #endif /* CONFIG_PPC64 */
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 606 }
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 607
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 608 if (unlikely(stack_store)) {
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 609 clear_bits(_TIF_EMULATE_STACK_STORE, ¤t_thread_info()->flags);
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 610 ret = 1;
> 13799748b957bc arch/powerpc/kernel/interrupt.c Nicholas Piggin 2021-06-18 611 }
> 6cc0c16d82f889 arch/powerpc/kernel/syscall_64.c Nicholas Piggin 2020-02-26 612
>
> :::::: The code at line 542 was first introduced by commit
> :::::: f821bc97dee4f3ee92c3668d495af49dfd720fe0 powerpc/64s: move context tracking exit to interrupt exit path
>
> :::::: TO: Nicholas Piggin <npiggin(a)gmail.com>
> :::::: CC: Michael Ellerman <mpe(a)ellerman.id.au>
>
> --
> 0-DAY CI Kernel Test Service
> https://01.org/lkp
1 month, 1 week
Re: [PATCH vfio 08/13] vfio: Introduce the DMA logging feature support
by Jason Gunthorpe
On Thu, Jun 30, 2022 at 09:40:01PM +0800, kernel test robot wrote:
> 1636 nnodes = control.num_ranges;
> 1637 if (!nnodes || nnodes > LOG_MAX_RANGES)
> 1638 return -EINVAL;
> 1639
> > 1640 ranges = (struct vfio_device_feature_dma_logging_range __user *)
> 1641 control.ranges;
Things like this should always use u64_to_user_ptr()
Jason
1 month, 1 week
Re: drivers/gpu/drm/kmb/kmb_dsi.c:812:2: warning: unused function 'set_test_mode_src_osc_freq_target_low_bits'
by Geert Uytterhoeven
Hi Kernel Test Robot,
On Wed, Jun 29, 2022 at 7:57 PM kernel test robot <lkp(a)intel.com> wrote:
> First bad commit (maybe != root cause):
Definitely not introduced by my patch.
Looks like these functions were never used at all.
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: d9b2ba67917c18822c6a09af41c32fa161f1606b
> commit: ade896460e4a62f5e4a892a98d254937f6f5b64c drm: DRM_KMB_DISPLAY should depend on ARCH_KEEMBAY
> date: 1 year, 8 months ago
> config: mips-randconfig-r016-20220629 (https://download.01.org/0day-ci/archive/20220630/202206300147.qdDDrtfw-lk...)
> compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a774ba7f60d1fef403b5507b1b1a7475d3684d71)
> 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-mipsel-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout ade896460e4a62f5e4a892a98d254937f6f5b64c
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/gpu/drm/kmb/ drivers/net/ethernet/mellanox/mlxsw/ drivers/scsi/ufs/ drivers/staging/ fs/xfs/
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp(a)intel.com>
>
> All warnings (new ones prefixed by >>):
>
> >> drivers/gpu/drm/kmb/kmb_dsi.c:812:2: warning: unused function 'set_test_mode_src_osc_freq_target_low_bits'
> set_test_mode_src_osc_freq_target_low_bits(struct kmb_dsi
> ^
> >> drivers/gpu/drm/kmb/kmb_dsi.c:824:2: warning: unused function 'set_test_mode_src_osc_freq_target_hi_bits'
> set_test_mode_src_osc_freq_target_hi_bits(struct kmb_dsi
> ^
> fatal error: error in backend: Nested variants found in inline asm string: '.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/barrier.h", .line = 16, $); 0x00 ) != -1)) : $))) ) && ( (1 << 0) ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif'
> clang-15: error: clang frontend command failed with exit code 70 (use -v to see invocation)
> clang version 15.0.0 (git://gitmirror/llvm_project a774ba7f60d1fef403b5507b1b1a7475d3684d71)
> Target: mipsel-unknown-linux
> Thread model: posix
> InstalledDir: /opt/cross/clang-a774ba7f60/bin
> clang-15: note: diagnostic msg:
> Makefile arch drivers fs include kernel mm nr_bisected scripts source usr
>
>
> vim +/set_test_mode_src_osc_freq_target_low_bits +812 drivers/gpu/drm/kmb/kmb_dsi.c
>
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 810
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 811 static inline void
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 @812 set_test_mode_src_osc_freq_target_low_bits(struct kmb_dsi *kmb_dsi,
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 813 u32 dphy_no,
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 814 u32 freq)
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 815 {
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 816 /* Typical rise/fall time=166, refer Table 1207 databook,
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 817 * sr_osc_freq_target[7:0]
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 818 */
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 819 test_mode_send(kmb_dsi, dphy_no, TEST_CODE_SLEW_RATE_DDL_CYCLES,
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 820 (freq & 0x7f));
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 821 }
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 822
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 823 static inline void
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 @824 set_test_mode_src_osc_freq_target_hi_bits(struct kmb_dsi *kmb_dsi,
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 825 u32 dphy_no,
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 826 u32 freq)
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 827 {
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 828 u32 data;
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 829
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 830 /* Flag this as high nibble */
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 831 data = ((freq >> 6) & 0x1f) | (1 << 7);
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 832
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 833 /* Typical rise/fall time=166, refer Table 1207 databook,
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 834 * sr_osc_freq_target[11:7]
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 835 */
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 836 test_mode_send(kmb_dsi, dphy_no, TEST_CODE_SLEW_RATE_DDL_CYCLES, data);
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 837 }
> 98521f4d4b4cb2 Anitha Chrisanthus 2020-11-04 838
>
> :::::: The code at line 812 was first introduced by commit
> :::::: 98521f4d4b4cb265374a4b1e13b41287a1960243 drm/kmb: Mipi DSI part of the display driver
>
> :::::: TO: Anitha Chrisanthus <anitha.chrisanthus(a)intel.com>
> :::::: CC: Sam Ravnborg <sam(a)ravnborg.org>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert(a)linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
1 month, 1 week
Re: [RFC PATCH V4 1/1] swiotlb: Split up single swiotlb lock
by Dan Carpenter
Hi Tianyu,
url: https://github.com/intel-lab-lkp/linux/commits/Tianyu-Lan/swiotlb-Split-u...
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
config: x86_64-randconfig-m001-20220627 (https://download.01.org/0day-ci/archive/20220629/202206290648.EDU4wqJI-lk...)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
kernel/dma/swiotlb.c:956 rmem_swiotlb_device_init() error: dereferencing freed memory 'mem'
vim +/mem +956 kernel/dma/swiotlb.c
0b84e4f8b793eb4 Claire Chang 2021-06-19 927 static int rmem_swiotlb_device_init(struct reserved_mem *rmem,
0b84e4f8b793eb4 Claire Chang 2021-06-19 928 struct device *dev)
0b84e4f8b793eb4 Claire Chang 2021-06-19 929 {
0b84e4f8b793eb4 Claire Chang 2021-06-19 930 struct io_tlb_mem *mem = rmem->priv;
0b84e4f8b793eb4 Claire Chang 2021-06-19 931 unsigned long nslabs = rmem->size >> IO_TLB_SHIFT;
0b84e4f8b793eb4 Claire Chang 2021-06-19 932
47bb420a6670ad3 Tianyu Lan 2022-06-17 933 /* Set Per-device io tlb area to one */
47bb420a6670ad3 Tianyu Lan 2022-06-17 934 unsigned int nareas = 1;
47bb420a6670ad3 Tianyu Lan 2022-06-17 935
0b84e4f8b793eb4 Claire Chang 2021-06-19 936 /*
0b84e4f8b793eb4 Claire Chang 2021-06-19 937 * Since multiple devices can share the same pool, the private data,
0b84e4f8b793eb4 Claire Chang 2021-06-19 938 * io_tlb_mem struct, will be initialized by the first device attached
0b84e4f8b793eb4 Claire Chang 2021-06-19 939 * to it.
0b84e4f8b793eb4 Claire Chang 2021-06-19 940 */
0b84e4f8b793eb4 Claire Chang 2021-06-19 941 if (!mem) {
463e862ac63ef27 Will Deacon 2021-07-20 942 mem = kzalloc(sizeof(*mem), GFP_KERNEL);
0b84e4f8b793eb4 Claire Chang 2021-06-19 943 if (!mem)
0b84e4f8b793eb4 Claire Chang 2021-06-19 944 return -ENOMEM;
0b84e4f8b793eb4 Claire Chang 2021-06-19 945
404f9373c4e5c94 Robin Murphy 2022-01-24 946 mem->slots = kcalloc(nslabs, sizeof(*mem->slots), GFP_KERNEL);
463e862ac63ef27 Will Deacon 2021-07-20 947 if (!mem->slots) {
463e862ac63ef27 Will Deacon 2021-07-20 948 kfree(mem);
463e862ac63ef27 Will Deacon 2021-07-20 949 return -ENOMEM;
463e862ac63ef27 Will Deacon 2021-07-20 950 }
463e862ac63ef27 Will Deacon 2021-07-20 951
47bb420a6670ad3 Tianyu Lan 2022-06-17 952 mem->areas = kcalloc(nareas, sizeof(*mem->areas),
47bb420a6670ad3 Tianyu Lan 2022-06-17 953 GFP_KERNEL);
47bb420a6670ad3 Tianyu Lan 2022-06-17 954 if (!mem->areas) {
47bb420a6670ad3 Tianyu Lan 2022-06-17 955 kfree(mem);
^^^^
47bb420a6670ad3 Tianyu Lan 2022-06-17 @956 kfree(mem->slots);
^^^^^^^^^^
This free needs to be done first.
47bb420a6670ad3 Tianyu Lan 2022-06-17 957 return -ENOMEM;
47bb420a6670ad3 Tianyu Lan 2022-06-17 958 }
47bb420a6670ad3 Tianyu Lan 2022-06-17 959
0b84e4f8b793eb4 Claire Chang 2021-06-19 960 set_memory_decrypted((unsigned long)phys_to_virt(rmem->base),
0b84e4f8b793eb4 Claire Chang 2021-06-19 961 rmem->size >> PAGE_SHIFT);
e15db62bc5648ab Christoph Hellwig 2022-06-01 962 swiotlb_init_io_tlb_mem(mem, rmem->base, nslabs, SWIOTLB_FORCE,
47bb420a6670ad3 Tianyu Lan 2022-06-17 963 false, nareas);
0b84e4f8b793eb4 Claire Chang 2021-06-19 964 mem->for_alloc = true;
0b84e4f8b793eb4 Claire Chang 2021-06-19 965
0b84e4f8b793eb4 Claire Chang 2021-06-19 966 rmem->priv = mem;
0b84e4f8b793eb4 Claire Chang 2021-06-19 967
35265899acef135 Robin Murphy 2022-01-24 968 swiotlb_create_debugfs_files(mem, rmem->name);
0b84e4f8b793eb4 Claire Chang 2021-06-19 969 }
0b84e4f8b793eb4 Claire Chang 2021-06-19 970
0b84e4f8b793eb4 Claire Chang 2021-06-19 971 dev->dma_io_tlb_mem = mem;
0b84e4f8b793eb4 Claire Chang 2021-06-19 972
0b84e4f8b793eb4 Claire Chang 2021-06-19 973 return 0;
0b84e4f8b793eb4 Claire Chang 2021-06-19 974 }
--
0-DAY CI Kernel Test Service
https://01.org/lkp
1 month, 1 week
[Patch v6 0/9] CBB driver for Tegra194, Tegra234 & Tegra-Grace
by Sumit Gupta
The patch series adds Control BackBone(CBB) error handling
driver for Tegra194, Tegra234 and Tegra-Grace SOC's.
Tegra194 is using CBB version 1.0. Tegra234 and Tegra-Grace
are using CBB version 2.0. Both CBB1.0 and CBB2.0 have
different internal architecture. So, separate drivers are
required.
Tegra194 and Tegra234 are using Device Tree. Tegra-Grace is
using ACPI.
Request to queue the patch series for 5.19.
---
v5 -> v6:
- Minor changes in yaml files in patch number 2 and 6.
v4 -> v5:
- fix warnings on diabling CONFIG_ACPI reported by kernel test robot.
v3 -> v4:
- rebased patches on 5.18-rc5.
v2 -> v3:
- fixed warnings with GCC 11.2 and W=1 reported by kernel test robot.
- changed some function names to make consistent with tegra_cbb_*.
v1 -> v2:
- moved err-notifier-base and off-mask-erd from DT to driver.
- yaml fixes by Thierry.
Sumit Gupta (9):
soc: tegra: set ERD bit to mask inband errors
dt-bindings: arm: tegra: Add NVIDIA Tegra194 CBB1.0 binding
dt-bindings: arm: tegra: Add NVIDIA Tegra194 axi2apb binding
arm64: tegra: Add node for CBB1.0 in Tegra194 SOC
soc: tegra: cbb: Add CBB1.0 driver for Tegra194
dt-bindings: arm: tegra: Add NVIDIA Tegra234 CBB2.0 binding
arm64: tegra: Add node for CBB2.0 in Tegra234 SOC
soc: tegra: cbb: Add driver for Tegra234 CBB2.0
soc: tegra: cbb: Add support for tegra-grace SOC
.../arm/tegra/nvidia,tegra194-axi2apb.yaml | 40 +
.../arm/tegra/nvidia,tegra194-cbb.yaml | 98 +
.../arm/tegra/nvidia,tegra234-cbb.yaml | 74 +
arch/arm64/boot/dts/nvidia/tegra194.dtsi | 62 +-
arch/arm64/boot/dts/nvidia/tegra234.dtsi | 42 +
drivers/soc/tegra/Kconfig | 9 +
drivers/soc/tegra/Makefile | 1 +
drivers/soc/tegra/cbb/Makefile | 9 +
drivers/soc/tegra/cbb/tegra-cbb.c | 198 ++
drivers/soc/tegra/cbb/tegra194-cbb.c | 2261 +++++++++++++++++
drivers/soc/tegra/cbb/tegra234-cbb.c | 833 ++++++
drivers/soc/tegra/fuse/tegra-apbmisc.c | 29 +-
include/soc/tegra/fuse.h | 6 +
include/soc/tegra/tegra-cbb.h | 43 +
include/soc/tegra/tegra-grace-cbb.h | 219 ++
include/soc/tegra/tegra194-cbb.h | 158 ++
include/soc/tegra/tegra234-cbb.h | 342 +++
17 files changed, 4421 insertions(+), 3 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/tegra/nvidia,tegra194-axi2apb.yaml
create mode 100644 Documentation/devicetree/bindings/arm/tegra/nvidia,tegra194-cbb.yaml
create mode 100644 Documentation/devicetree/bindings/arm/tegra/nvidia,tegra234-cbb.yaml
create mode 100644 drivers/soc/tegra/cbb/Makefile
create mode 100644 drivers/soc/tegra/cbb/tegra-cbb.c
create mode 100644 drivers/soc/tegra/cbb/tegra194-cbb.c
create mode 100644 drivers/soc/tegra/cbb/tegra234-cbb.c
create mode 100644 include/soc/tegra/tegra-cbb.h
create mode 100644 include/soc/tegra/tegra-grace-cbb.h
create mode 100644 include/soc/tegra/tegra194-cbb.h
create mode 100644 include/soc/tegra/tegra234-cbb.h
--
2.17.1
1 month, 2 weeks