[ti:ti-linux-5.4.y 9992/9999] drivers/tty/serial/8250/8250_pruss.c:131:41: warning: overflow in conversion from 'long unsigned int' to 'int' changes value from '18446744073709551614' to '-2'
by kernel test robot
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-5.4.y
head: eacdd0a4f060e33d46290dec099c5242e58acfa9
commit: 57fe8746100f3f05dd85a6a2e3360532fd67fda3 [9992/9999] serial: 8250: add pruss uart driver
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-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
git checkout 57fe8746100f3f05dd85a6a2e3360532fd67fda3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
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 >>, old ones prefixed by <<):
drivers/tty/serial/8250/8250_pruss.c: In function 'pruss8250_set_divisor':
>> drivers/tty/serial/8250/8250_pruss.c:131:41: warning: overflow in conversion from 'long unsigned int' to 'int' changes value from '18446744073709551614' to '-2' [-Woverflow]
131 | serial_port_out(port, PRUSS_UART_MDR, ~PRUSS_UART_MDR_OSM_SEL);
vim +131 drivers/tty/serial/8250/8250_pruss.c
121
122 static void pruss8250_set_divisor(struct uart_port *port, unsigned int baud,
123 unsigned int quot, unsigned int quot_frac)
124 {
125 serial8250_do_set_divisor(port, baud, quot, quot_frac);
126 if (quot_frac == PRUSS_UART_MDR_13X_MODE)
127 /* set mdr for 13x */
128 serial_port_out(port, PRUSS_UART_MDR, PRUSS_UART_MDR_OSM_SEL);
129 else
130 /* set mdr for 16x */
> 131 serial_port_out(port, PRUSS_UART_MDR, ~PRUSS_UART_MDR_OSM_SEL);
132 }
133
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[chrome-os:chromeos-5.4 46/57] drivers/gpu/arm/valhall/backend/gpu/mali_kbase_devfreq.c:723: undefined reference to `of_devfreq_cooling_register_power'
by kernel test robot
Hi Guenter,
It's probably a bug fix that unveils the link errors.
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: b07d702ddc4dd8b8a383dd1502e04af3cc5ce291
commit: 5f0ed9879934735b49f68a7c53eed625d4980f0a [46/57] FIXUP: CHROMIUM: MALI: Apply Valhall r24p0 EAC release
config: arm64-randconfig-c003-20200618 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
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 >>):
aarch64-linux-ld: drivers/gpu/drm/img-rogue/1.10/pvr_dvfs_device.o: in function `DeinitDVFS':
drivers/gpu/drm/img-rogue/1.10/pvr_dvfs_device.c:538: undefined reference to `devfreq_cooling_unregister'
aarch64-linux-ld: drivers/gpu/drm/img-rogue/1.10/pvr_dvfs_device.o: in function `RegisterCoolingDevice':
drivers/gpu/drm/img-rogue/1.10/pvr_dvfs_device.c:346: undefined reference to `of_devfreq_cooling_register_power'
aarch64-linux-ld: drivers/gpu/arm/valhall/backend/gpu/mali_kbase_devfreq.o: in function `kbase_devfreq_init':
>> drivers/gpu/arm/valhall/backend/gpu/mali_kbase_devfreq.c:723: undefined reference to `of_devfreq_cooling_register_power'
aarch64-linux-ld: drivers/gpu/arm/valhall/backend/gpu/mali_kbase_devfreq.o: in function `kbase_devfreq_term':
>> drivers/gpu/arm/valhall/backend/gpu/mali_kbase_devfreq.c:761: undefined reference to `devfreq_cooling_unregister'
vim +723 drivers/gpu/arm/valhall/backend/gpu/mali_kbase_devfreq.c
2017d46f1e629c Nicolas Boichat 2020-04-18 643
2017d46f1e629c Nicolas Boichat 2020-04-18 644 int kbase_devfreq_init(struct kbase_device *kbdev)
2017d46f1e629c Nicolas Boichat 2020-04-18 645 {
2017d46f1e629c Nicolas Boichat 2020-04-18 646 struct devfreq_dev_profile *dp;
2017d46f1e629c Nicolas Boichat 2020-04-18 647 int err;
2017d46f1e629c Nicolas Boichat 2020-04-18 648 unsigned int i;
2017d46f1e629c Nicolas Boichat 2020-04-18 649
2017d46f1e629c Nicolas Boichat 2020-04-18 650 if (kbdev->nr_clocks == 0) {
2017d46f1e629c Nicolas Boichat 2020-04-18 651 dev_err(kbdev->dev, "Clock not available for devfreq\n");
2017d46f1e629c Nicolas Boichat 2020-04-18 652 return -ENODEV;
2017d46f1e629c Nicolas Boichat 2020-04-18 653 }
2017d46f1e629c Nicolas Boichat 2020-04-18 654
2017d46f1e629c Nicolas Boichat 2020-04-18 655 for (i = 0; i < kbdev->nr_clocks; i++) {
2017d46f1e629c Nicolas Boichat 2020-04-18 656 if (kbdev->clocks[i])
2017d46f1e629c Nicolas Boichat 2020-04-18 657 kbdev->current_freqs[i] =
2017d46f1e629c Nicolas Boichat 2020-04-18 658 clk_get_rate(kbdev->clocks[i]);
2017d46f1e629c Nicolas Boichat 2020-04-18 659 else
2017d46f1e629c Nicolas Boichat 2020-04-18 660 kbdev->current_freqs[i] = 0;
2017d46f1e629c Nicolas Boichat 2020-04-18 661 }
2017d46f1e629c Nicolas Boichat 2020-04-18 662 kbdev->current_nominal_freq = kbdev->current_freqs[0];
2017d46f1e629c Nicolas Boichat 2020-04-18 663
2017d46f1e629c Nicolas Boichat 2020-04-18 664 dp = &kbdev->devfreq_profile;
2017d46f1e629c Nicolas Boichat 2020-04-18 665
2017d46f1e629c Nicolas Boichat 2020-04-18 666 dp->initial_freq = kbdev->current_freqs[0];
2017d46f1e629c Nicolas Boichat 2020-04-18 667 dp->polling_ms = 100;
2017d46f1e629c Nicolas Boichat 2020-04-18 668 dp->target = kbase_devfreq_target;
2017d46f1e629c Nicolas Boichat 2020-04-18 669 dp->get_dev_status = kbase_devfreq_status;
2017d46f1e629c Nicolas Boichat 2020-04-18 670 dp->get_cur_freq = kbase_devfreq_cur_freq;
2017d46f1e629c Nicolas Boichat 2020-04-18 671 dp->exit = kbase_devfreq_exit;
2017d46f1e629c Nicolas Boichat 2020-04-18 672
2017d46f1e629c Nicolas Boichat 2020-04-18 673 if (kbase_devfreq_init_freq_table(kbdev, dp))
2017d46f1e629c Nicolas Boichat 2020-04-18 674 return -EFAULT;
2017d46f1e629c Nicolas Boichat 2020-04-18 675
2017d46f1e629c Nicolas Boichat 2020-04-18 676 if (dp->max_state > 0) {
2017d46f1e629c Nicolas Boichat 2020-04-18 677 /* Record the maximum frequency possible */
2017d46f1e629c Nicolas Boichat 2020-04-18 678 kbdev->gpu_props.props.core_props.gpu_freq_khz_max =
2017d46f1e629c Nicolas Boichat 2020-04-18 679 dp->freq_table[0] / 1000;
2017d46f1e629c Nicolas Boichat 2020-04-18 680 };
2017d46f1e629c Nicolas Boichat 2020-04-18 681
2017d46f1e629c Nicolas Boichat 2020-04-18 682 err = kbase_devfreq_init_core_mask_table(kbdev);
2017d46f1e629c Nicolas Boichat 2020-04-18 683 if (err) {
2017d46f1e629c Nicolas Boichat 2020-04-18 684 kbase_devfreq_term_freq_table(kbdev);
2017d46f1e629c Nicolas Boichat 2020-04-18 685 return err;
2017d46f1e629c Nicolas Boichat 2020-04-18 686 }
2017d46f1e629c Nicolas Boichat 2020-04-18 687
2017d46f1e629c Nicolas Boichat 2020-04-18 688 /* Initialise devfreq suspend/resume workqueue */
2017d46f1e629c Nicolas Boichat 2020-04-18 689 err = kbase_devfreq_work_init(kbdev);
2017d46f1e629c Nicolas Boichat 2020-04-18 690 if (err) {
2017d46f1e629c Nicolas Boichat 2020-04-18 691 kbase_devfreq_term_freq_table(kbdev);
2017d46f1e629c Nicolas Boichat 2020-04-18 692 dev_err(kbdev->dev, "Devfreq initialization failed");
2017d46f1e629c Nicolas Boichat 2020-04-18 693 return err;
2017d46f1e629c Nicolas Boichat 2020-04-18 694 }
2017d46f1e629c Nicolas Boichat 2020-04-18 695
2017d46f1e629c Nicolas Boichat 2020-04-18 696 kbdev->devfreq = devfreq_add_device(kbdev->dev, dp,
2017d46f1e629c Nicolas Boichat 2020-04-18 697 "simple_ondemand", &kbase_ondemand_data);
2017d46f1e629c Nicolas Boichat 2020-04-18 698 if (IS_ERR(kbdev->devfreq)) {
2017d46f1e629c Nicolas Boichat 2020-04-18 699 err = PTR_ERR(kbdev->devfreq);
2017d46f1e629c Nicolas Boichat 2020-04-18 700 kbase_devfreq_work_term(kbdev);
2017d46f1e629c Nicolas Boichat 2020-04-18 701 kbase_devfreq_term_freq_table(kbdev);
2017d46f1e629c Nicolas Boichat 2020-04-18 702 return err;
2017d46f1e629c Nicolas Boichat 2020-04-18 703 }
2017d46f1e629c Nicolas Boichat 2020-04-18 704
2017d46f1e629c Nicolas Boichat 2020-04-18 705 /* devfreq_add_device only copies a few of kbdev->dev's fields, so
2017d46f1e629c Nicolas Boichat 2020-04-18 706 * set drvdata explicitly so IPA models can access kbdev. */
2017d46f1e629c Nicolas Boichat 2020-04-18 707 dev_set_drvdata(&kbdev->devfreq->dev, kbdev);
2017d46f1e629c Nicolas Boichat 2020-04-18 708
2017d46f1e629c Nicolas Boichat 2020-04-18 709 err = devfreq_register_opp_notifier(kbdev->dev, kbdev->devfreq);
2017d46f1e629c Nicolas Boichat 2020-04-18 710 if (err) {
2017d46f1e629c Nicolas Boichat 2020-04-18 711 dev_err(kbdev->dev,
2017d46f1e629c Nicolas Boichat 2020-04-18 712 "Failed to register OPP notifier (%d)\n", err);
2017d46f1e629c Nicolas Boichat 2020-04-18 713 goto opp_notifier_failed;
2017d46f1e629c Nicolas Boichat 2020-04-18 714 }
2017d46f1e629c Nicolas Boichat 2020-04-18 715
2017d46f1e629c Nicolas Boichat 2020-04-18 716 #ifdef CONFIG_DEVFREQ_THERMAL
2017d46f1e629c Nicolas Boichat 2020-04-18 717 err = kbase_ipa_init(kbdev);
2017d46f1e629c Nicolas Boichat 2020-04-18 718 if (err) {
2017d46f1e629c Nicolas Boichat 2020-04-18 719 dev_err(kbdev->dev, "IPA initialization failed\n");
2017d46f1e629c Nicolas Boichat 2020-04-18 720 goto cooling_failed;
2017d46f1e629c Nicolas Boichat 2020-04-18 721 }
2017d46f1e629c Nicolas Boichat 2020-04-18 722
2017d46f1e629c Nicolas Boichat 2020-04-18 @723 kbdev->devfreq_cooling = of_devfreq_cooling_register_power(
2017d46f1e629c Nicolas Boichat 2020-04-18 724 kbdev->dev->of_node,
2017d46f1e629c Nicolas Boichat 2020-04-18 725 kbdev->devfreq,
2017d46f1e629c Nicolas Boichat 2020-04-18 726 &kbase_ipa_power_model_ops);
2017d46f1e629c Nicolas Boichat 2020-04-18 727 if (IS_ERR_OR_NULL(kbdev->devfreq_cooling)) {
2017d46f1e629c Nicolas Boichat 2020-04-18 728 err = PTR_ERR(kbdev->devfreq_cooling);
2017d46f1e629c Nicolas Boichat 2020-04-18 729 dev_err(kbdev->dev,
2017d46f1e629c Nicolas Boichat 2020-04-18 730 "Failed to register cooling device (%d)\n",
2017d46f1e629c Nicolas Boichat 2020-04-18 731 err);
2017d46f1e629c Nicolas Boichat 2020-04-18 732 goto cooling_failed;
2017d46f1e629c Nicolas Boichat 2020-04-18 733 }
2017d46f1e629c Nicolas Boichat 2020-04-18 734 #endif
2017d46f1e629c Nicolas Boichat 2020-04-18 735
2017d46f1e629c Nicolas Boichat 2020-04-18 736 return 0;
2017d46f1e629c Nicolas Boichat 2020-04-18 737
2017d46f1e629c Nicolas Boichat 2020-04-18 738 #ifdef CONFIG_DEVFREQ_THERMAL
2017d46f1e629c Nicolas Boichat 2020-04-18 739 cooling_failed:
2017d46f1e629c Nicolas Boichat 2020-04-18 740 devfreq_unregister_opp_notifier(kbdev->dev, kbdev->devfreq);
2017d46f1e629c Nicolas Boichat 2020-04-18 741 #endif /* CONFIG_DEVFREQ_THERMAL */
2017d46f1e629c Nicolas Boichat 2020-04-18 742 opp_notifier_failed:
2017d46f1e629c Nicolas Boichat 2020-04-18 743 if (devfreq_remove_device(kbdev->devfreq))
2017d46f1e629c Nicolas Boichat 2020-04-18 744 dev_err(kbdev->dev, "Failed to terminate devfreq (%d)\n", err);
2017d46f1e629c Nicolas Boichat 2020-04-18 745 else
2017d46f1e629c Nicolas Boichat 2020-04-18 746 kbdev->devfreq = NULL;
2017d46f1e629c Nicolas Boichat 2020-04-18 747
2017d46f1e629c Nicolas Boichat 2020-04-18 748 kbase_devfreq_work_term(kbdev);
2017d46f1e629c Nicolas Boichat 2020-04-18 749
2017d46f1e629c Nicolas Boichat 2020-04-18 750 return err;
2017d46f1e629c Nicolas Boichat 2020-04-18 751 }
2017d46f1e629c Nicolas Boichat 2020-04-18 752
2017d46f1e629c Nicolas Boichat 2020-04-18 753 void kbase_devfreq_term(struct kbase_device *kbdev)
2017d46f1e629c Nicolas Boichat 2020-04-18 754 {
2017d46f1e629c Nicolas Boichat 2020-04-18 755 int err;
2017d46f1e629c Nicolas Boichat 2020-04-18 756
2017d46f1e629c Nicolas Boichat 2020-04-18 757 dev_dbg(kbdev->dev, "Term Mali devfreq\n");
2017d46f1e629c Nicolas Boichat 2020-04-18 758
2017d46f1e629c Nicolas Boichat 2020-04-18 759 #ifdef CONFIG_DEVFREQ_THERMAL
2017d46f1e629c Nicolas Boichat 2020-04-18 760 if (kbdev->devfreq_cooling)
2017d46f1e629c Nicolas Boichat 2020-04-18 @761 devfreq_cooling_unregister(kbdev->devfreq_cooling);
:::::: The code at line 723 was first introduced by commit
:::::: 2017d46f1e629c7c90f3e12f89694e050d9d65fb CHROMIUM: MALI: Apply Valhall r24p0 EAC release
:::::: TO: Nicolas Boichat <drinkcat(a)chromium.org>
:::::: CC: Commit Bot <commit-bot(a)chromium.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
fs/proc/proc_sysctl.o: warning: objtool: do_sysctl_args()+0xe5: unreachable instruction
by kernel test robot
CC: linux-kernel(a)vger.kernel.org
TO: Vlastimil Babka <vbabka(a)suse.cz>
CC: Andrew Morton <akpm(a)linux-foundation.org>
CC: Linux Memory Management List <linux-mm(a)kvack.org>
CC: Luis Chamberlain <mcgrof(a)kernel.org>
CC: Masami Hiramatsu <mhiramat(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5e857ce6eae7ca21b2055cca4885545e29228fe2
commit: 3db978d480e2843979a2b56f2f7da726f2b295b2 kernel/sysctl: support setting sysctl parameters from kernel command line
date: 10 days ago
config: x86_64-randconfig-r015-20200618 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
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
git checkout 3db978d480e2843979a2b56f2f7da726f2b295b2
# 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 warnings (new ones prefixed by >>, old ones prefixed by <<):
>> fs/proc/proc_sysctl.o: warning: objtool: do_sysctl_args()+0xe5: unreachable instruction
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[ti:ti-linux-5.4.y 9988/9999] drivers/net/ethernet/ti/icss_iep.c:518:5: warning: no previous prototype for 'icss_iep_probe'
by kernel test robot
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-5.4.y
head: eacdd0a4f060e33d46290dec099c5242e58acfa9
commit: 8c2782d9cf8577929a707c0a68e3313bc71f5c23 [9988/9999] net: ethernet: ti: icss-iep: Make icss-iep a separate driver
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-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
git checkout 8c2782d9cf8577929a707c0a68e3313bc71f5c23
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
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 >>, old ones prefixed by <<):
>> drivers/net/ethernet/ti/icss_iep.c:518:5: warning: no previous prototype for 'icss_iep_probe' [-Wmissing-prototypes]
518 | int icss_iep_probe(struct platform_device *pdev)
| ^~~~~~~~~~~~~~
vim +/icss_iep_probe +518 drivers/net/ethernet/ti/icss_iep.c
517
> 518 int icss_iep_probe(struct platform_device *pdev)
519 {
520 struct device *dev = &pdev->dev;
521 struct icss_iep *iep;
522 struct resource *res;
523 struct clk *iep_clk;
524
525 iep = devm_kzalloc(dev, sizeof(*iep), GFP_KERNEL);
526 if (!iep)
527 return -ENOMEM;
528
529 iep->dev = dev;
530 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
531 iep->base = devm_ioremap_resource(dev, res);
532 if (IS_ERR(iep->base))
533 return -ENODEV;
534
535 iep_clk = devm_clk_get(dev, NULL);
536 if (IS_ERR(iep_clk))
537 return PTR_ERR(iep_clk);
538
539 iep->refclk_freq = clk_get_rate(iep_clk);
540
541 iep->plat_data = of_device_get_match_data(dev);
542 if (!iep->plat_data)
543 return -EINVAL;
544
545 iep->map = devm_regmap_init(dev, NULL, iep, iep->plat_data->config);
546 if (IS_ERR(iep->map)) {
547 dev_err(dev, "Failed to create regmap for IEP %ld\n",
548 PTR_ERR(iep->map));
549 return PTR_ERR(iep->map);
550 }
551
552 mutex_init(&iep->ptp_clk_mutex);
553 dev_set_drvdata(dev, iep);
554 icss_iep_disable(iep);
555
556 return 0;
557 }
558
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH 1/2] nvme: remove workarounds for gcc bug wrt unnamed fields in initializers
by kernel test robot
Hi Niklas,
I love your patch! Yet something to improve:
[auto build test ERROR on block/for-next]
[also build test ERROR on linus/master v5.8-rc1 next-20200618]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Niklas-Cassel/nvme-remove-workar...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
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
# 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 errors (new ones prefixed by >>):
>> drivers/nvme/host/rdma.c:1814:20: error: use of undeclared identifier 'priv'
.private_data = &priv,
^
drivers/nvme/host/rdma.c:1815:30: error: use of undeclared identifier 'priv'
.private_data_len = sizeof(priv),
^
2 errors generated.
vim +/priv +1814 drivers/nvme/host/rdma.c
1803
1804 static int nvme_rdma_route_resolved(struct nvme_rdma_queue *queue)
1805 {
1806 struct nvme_rdma_ctrl *ctrl = queue->ctrl;
1807 struct rdma_conn_param param = {
1808 .qp_num = queue->qp->qp_num,
1809 .flow_control = 1,
1810 .responder_resources = queue->device->dev->attrs.max_qp_rd_atom,
1811 /* maximum retry count */
1812 .retry_count = 7,
1813 .rnr_retry_count = 7,
> 1814 .private_data = &priv,
1815 .private_data_len = sizeof(priv),
1816 };
1817 struct nvme_rdma_cm_req priv = {
1818 .recfmt = cpu_to_le16(NVME_RDMA_CM_FMT_1_0),
1819 .qid = cpu_to_le16(nvme_rdma_queue_idx(queue)),
1820 };
1821 int ret;
1822
1823 /*
1824 * set the admin queue depth to the minimum size
1825 * specified by the Fabrics standard.
1826 */
1827 if (priv.qid == 0) {
1828 priv.hrqsize = cpu_to_le16(NVME_AQ_DEPTH);
1829 priv.hsqsize = cpu_to_le16(NVME_AQ_DEPTH - 1);
1830 } else {
1831 /*
1832 * current interpretation of the fabrics spec
1833 * is at minimum you make hrqsize sqsize+1, or a
1834 * 1's based representation of sqsize.
1835 */
1836 priv.hrqsize = cpu_to_le16(queue->queue_size);
1837 priv.hsqsize = cpu_to_le16(queue->ctrl->ctrl.sqsize);
1838 }
1839
1840 ret = rdma_connect(queue->cm_id, ¶m);
1841 if (ret) {
1842 dev_err(ctrl->ctrl.device,
1843 "rdma_connect failed (%d).\n", ret);
1844 goto out_destroy_queue_ib;
1845 }
1846
1847 return 0;
1848
1849 out_destroy_queue_ib:
1850 nvme_rdma_destroy_queue_ib(queue);
1851 return ret;
1852 }
1853
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[jfern:rcu-segcb 3/7] kernel/rcu/tree_plugin.h:791:2: error: too few arguments to function 'trace_rcu_grace_period'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git rcu-segcb
head: fb866e723f8f64bc4f1e6d19add6a4ff285fcc02
commit: 6c20fe430956a44bc2034f58d55678fb8e8cff19 [3/7] rcu/trace: Add name of the source for gp_seq
config: x86_64-rhel-7.6 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout 6c20fe430956a44bc2034f58d55678fb8e8cff19
# save the attached .config to linux build tree
make W=1 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 >>):
In file included from include/asm-generic/percpu.h:7,
from arch/x86/include/asm/percpu.h:556,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from kernel/rcu/tree.c:23:
kernel/rcu/tree_plugin.h: In function 'rcu_qs':
>> include/linux/percpu-defs.h:444:2: warning: passing argument 2 of 'trace_rcu_grace_period' makes pointer from integer without a cast [-Wint-conversion]
444 | ({ \
| ~^~~~~~~~~~~
| |
| long unsigned int
445 | __this_cpu_preempt_check("read"); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
446 | raw_cpu_read(pcp); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~
447 | })
| ~~
>> kernel/rcu/tree_plugin.h:792:11: note: in expansion of macro '__this_cpu_read'
792 | __this_cpu_read(rcu_data.gp_seq), TPS("cpuqs"));
| ^~~~~~~~~~~~~~~
In file included from include/linux/trace_events.h:11,
from kernel/rcu/tree.c:47:
include/trace/events/rcu.h:71:44: note: expected 'const char *' but argument is of type 'long unsigned int'
71 | TP_PROTO(const char *rcuname, const char *gp_seq_src,
| ~~~~~~~~~~~~^~~~~~~~~~
include/linux/tracepoint.h:530:34: note: in definition of macro 'DECLARE_EVENT_NOP'
530 | static inline void trace_##name(proto) \
| ^~~~~
include/linux/tracepoint.h:538:26: note: in expansion of macro 'PARAMS'
538 | DECLARE_EVENT_NOP(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
>> include/trace/events/rcu.h:13:25: note: in expansion of macro 'TRACE_EVENT_NOP'
13 | #define TRACE_EVENT_RCU TRACE_EVENT_NOP
| ^~~~~~~~~~~~~~~
>> include/trace/events/rcu.h:71:2: note: in expansion of macro 'TP_PROTO'
71 | TP_PROTO(const char *rcuname, const char *gp_seq_src,
| ^~~~~~~~
>> include/linux/tracepoint.h:360:3: warning: passing argument 3 of 'trace_rcu_grace_period' makes integer from pointer without a cast [-Wint-conversion]
360 | ({ \
| ~^~~~~~~~~~
| |
| const char *
361 | static const char *___tp_str __tracepoint_string = str; \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
362 | ___tp_str; \
| ~~~~~~~~~~~~~~~~~
363 | })
| ~~
>> kernel/rcu/rcu.h:247:17: note: in expansion of macro 'tracepoint_string'
247 | #define TPS(x) tracepoint_string(x)
| ^~~~~~~~~~~~~~~~~
>> kernel/rcu/tree_plugin.h:792:45: note: in expansion of macro 'TPS'
792 | __this_cpu_read(rcu_data.gp_seq), TPS("cpuqs"));
| ^~~
include/trace/events/rcu.h:72:17: note: expected 'long unsigned int' but argument is of type 'const char *'
72 | unsigned long gp_seq, const char *gpevent),
| ~~~~~~~~~~~~~~^~~~~~
include/linux/tracepoint.h:530:34: note: in definition of macro 'DECLARE_EVENT_NOP'
530 | static inline void trace_##name(proto) \
| ^~~~~
include/linux/tracepoint.h:538:26: note: in expansion of macro 'PARAMS'
538 | DECLARE_EVENT_NOP(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
>> include/trace/events/rcu.h:13:25: note: in expansion of macro 'TRACE_EVENT_NOP'
13 | #define TRACE_EVENT_RCU TRACE_EVENT_NOP
| ^~~~~~~~~~~~~~~
>> include/trace/events/rcu.h:71:2: note: in expansion of macro 'TP_PROTO'
71 | TP_PROTO(const char *rcuname, const char *gp_seq_src,
| ^~~~~~~~
In file included from kernel/rcu/tree.c:4281:
>> kernel/rcu/tree_plugin.h:791:2: error: too few arguments to function 'trace_rcu_grace_period'
791 | trace_rcu_grace_period(TPS("rcu_sched"),
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/trace_events.h:11,
from kernel/rcu/tree.c:47:
include/linux/tracepoint.h:530:21: note: declared here
530 | static inline void trace_##name(proto) \
| ^~~~~~
>> include/linux/tracepoint.h:538:2: note: in expansion of macro 'DECLARE_EVENT_NOP'
538 | DECLARE_EVENT_NOP(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~~~~~
>> include/trace/events/rcu.h:13:25: note: in expansion of macro 'TRACE_EVENT_NOP'
13 | #define TRACE_EVENT_RCU TRACE_EVENT_NOP
| ^~~~~~~~~~~~~~~
>> include/trace/events/rcu.h:69:1: note: in expansion of macro 'TRACE_EVENT_RCU'
69 | TRACE_EVENT_RCU(rcu_grace_period,
| ^~~~~~~~~~~~~~~
vim +/trace_rcu_grace_period +791 kernel/rcu/tree_plugin.h
f41d911f8c49a5 kernel/rcutree_plugin.h Paul E. McKenney 2009-08-22 779
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 780 /*
90326f0521a880 kernel/rcu/tree_plugin.h Sebastian Andrzej Siewior 2019-10-15 781 * Note a quiescent state for PREEMPTION=n. Because we do not need to know
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 782 * how many quiescent states passed, just if there was at least one since
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 783 * the start of the grace period, this just sets a flag. The caller must
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 784 * have disabled preemption.
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 785 */
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 786 static void rcu_qs(void)
d28139c4e96713 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-06-28 787 {
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 788 RCU_LOCKDEP_WARN(preemptible(), "rcu_qs() invoked with preemption enabled!!!");
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 789 if (!__this_cpu_read(rcu_data.cpu_no_qs.s))
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 790 return;
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 @791 trace_rcu_grace_period(TPS("rcu_sched"),
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 @792 __this_cpu_read(rcu_data.gp_seq), TPS("cpuqs"));
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 793 __this_cpu_write(rcu_data.cpu_no_qs.b.norm, false);
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 794 if (!__this_cpu_read(rcu_data.cpu_no_qs.b.exp))
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 795 return;
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 796 __this_cpu_write(rcu_data.cpu_no_qs.b.exp, false);
63d4c8c97948b0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-03 797 rcu_report_exp_rdp(this_cpu_ptr(&rcu_data));
d28139c4e96713 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-06-28 798 }
d28139c4e96713 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-06-28 799
:::::: The code at line 791 was first introduced by commit
:::::: 45975c7d21a1c0aba97e3d8007e2a7c123145748 rcu: Define RCU-sched API in terms of RCU for Tree RCU PREEMPT builds
:::::: TO: Paul E. McKenney <paulmck(a)linux.vnet.ibm.com>
:::::: CC: Paul E. McKenney <paulmck(a)linux.vnet.ibm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[jfern:rcu-segcb 3/7] kernel/rcu/tree_plugin.h:792:49: warning: passing argument 3 of 'trace_rcu_grace_period' makes integer from pointer without a cast
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git rcu-segcb
head: fb866e723f8f64bc4f1e6d19add6a4ff285fcc02
commit: 6c20fe430956a44bc2034f58d55678fb8e8cff19 [3/7] rcu/trace: Add name of the source for gp_seq
config: riscv-defconfig (attached as .config)
compiler: riscv64-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
git checkout 6c20fe430956a44bc2034f58d55678fb8e8cff19
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
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 >>, old ones prefixed by <<):
In file included from include/asm-generic/percpu.h:7,
from ./arch/riscv/include/generated/asm/percpu.h:1,
from include/asm-generic/mmiowb.h:26,
from arch/riscv/include/asm/mmiowb.h:13,
from include/linux/spinlock.h:60,
from kernel/rcu/tree.c:23:
kernel/rcu/tree_plugin.h: In function 'rcu_qs':
include/linux/percpu-defs.h:444:2: warning: passing argument 2 of 'trace_rcu_grace_period' makes pointer from integer without a cast [-Wint-conversion]
444 | ({ | ~^~~~~~~~~~~
| |
| long unsigned int
445 | __this_cpu_preempt_check("read"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
446 | raw_cpu_read(pcp); | ~~~~~~~~~~~~~~~~~~~~~~~~~
447 | })
| ~~
kernel/rcu/tree_plugin.h:792:11: note: in expansion of macro '__this_cpu_read'
792 | __this_cpu_read(rcu_data.gp_seq), TPS("cpuqs"));
| ^~~~~~~~~~~~~~~
In file included from include/linux/trace_events.h:11,
from kernel/rcu/tree.c:47:
include/trace/events/rcu.h:71:44: note: expected 'const char *' but argument is of type 'long unsigned int'
71 | TP_PROTO(const char *rcuname, const char *gp_seq_src,
| ~~~~~~~~~~~~^~~~~~~~~~
include/linux/tracepoint.h:530:34: note: in definition of macro 'DECLARE_EVENT_NOP'
530 | static inline void trace_##name(proto) | ^~~~~
include/linux/tracepoint.h:538:26: note: in expansion of macro 'PARAMS'
538 | DECLARE_EVENT_NOP(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
include/trace/events/rcu.h:13:25: note: in expansion of macro 'TRACE_EVENT_NOP'
13 | #define TRACE_EVENT_RCU TRACE_EVENT_NOP
| ^~~~~~~~~~~~~~~
include/trace/events/rcu.h:71:2: note: in expansion of macro 'TP_PROTO'
71 | TP_PROTO(const char *rcuname, const char *gp_seq_src,
| ^~~~~~~~
>> kernel/rcu/tree_plugin.h:792:49: warning: passing argument 3 of 'trace_rcu_grace_period' makes integer from pointer without a cast [-Wint-conversion]
792 | __this_cpu_read(rcu_data.gp_seq), TPS("cpuqs"));
| ^~~~~~~
| |
| char *
include/linux/tracepoint.h:371:33: note: in definition of macro 'tracepoint_string'
371 | # define tracepoint_string(str) str
| ^~~
kernel/rcu/tree_plugin.h:792:45: note: in expansion of macro 'TPS'
792 | __this_cpu_read(rcu_data.gp_seq), TPS("cpuqs"));
| ^~~
include/trace/events/rcu.h:72:17: note: expected 'long unsigned int' but argument is of type 'char *'
72 | unsigned long gp_seq, const char *gpevent),
| ~~~~~~~~~~~~~~^~~~~~
include/linux/tracepoint.h:530:34: note: in definition of macro 'DECLARE_EVENT_NOP'
530 | static inline void trace_##name(proto) | ^~~~~
include/linux/tracepoint.h:538:26: note: in expansion of macro 'PARAMS'
538 | DECLARE_EVENT_NOP(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
include/trace/events/rcu.h:13:25: note: in expansion of macro 'TRACE_EVENT_NOP'
13 | #define TRACE_EVENT_RCU TRACE_EVENT_NOP
| ^~~~~~~~~~~~~~~
include/trace/events/rcu.h:71:2: note: in expansion of macro 'TP_PROTO'
71 | TP_PROTO(const char *rcuname, const char *gp_seq_src,
| ^~~~~~~~
In file included from kernel/rcu/tree.c:4281:
kernel/rcu/tree_plugin.h:791:2: error: too few arguments to function 'trace_rcu_grace_period'
791 | trace_rcu_grace_period(TPS("rcu_sched"),
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/trace_events.h:11,
from kernel/rcu/tree.c:47:
include/linux/tracepoint.h:530:21: note: declared here
530 | static inline void trace_##name(proto) | ^~~~~~
include/linux/tracepoint.h:538:2: note: in expansion of macro 'DECLARE_EVENT_NOP'
538 | DECLARE_EVENT_NOP(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~~~~~
include/trace/events/rcu.h:13:25: note: in expansion of macro 'TRACE_EVENT_NOP'
13 | #define TRACE_EVENT_RCU TRACE_EVENT_NOP
| ^~~~~~~~~~~~~~~
include/trace/events/rcu.h:69:1: note: in expansion of macro 'TRACE_EVENT_RCU'
69 | TRACE_EVENT_RCU(rcu_grace_period,
| ^~~~~~~~~~~~~~~
vim +/trace_rcu_grace_period +792 kernel/rcu/tree_plugin.h
f41d911f8c49a5 kernel/rcutree_plugin.h Paul E. McKenney 2009-08-22 779
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 780 /*
90326f0521a880 kernel/rcu/tree_plugin.h Sebastian Andrzej Siewior 2019-10-15 781 * Note a quiescent state for PREEMPTION=n. Because we do not need to know
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 782 * how many quiescent states passed, just if there was at least one since
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 783 * the start of the grace period, this just sets a flag. The caller must
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 784 * have disabled preemption.
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 785 */
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 786 static void rcu_qs(void)
d28139c4e96713 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-06-28 787 {
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 788 RCU_LOCKDEP_WARN(preemptible(), "rcu_qs() invoked with preemption enabled!!!");
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 789 if (!__this_cpu_read(rcu_data.cpu_no_qs.s))
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 790 return;
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 791 trace_rcu_grace_period(TPS("rcu_sched"),
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 @792 __this_cpu_read(rcu_data.gp_seq), TPS("cpuqs"));
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 793 __this_cpu_write(rcu_data.cpu_no_qs.b.norm, false);
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 794 if (!__this_cpu_read(rcu_data.cpu_no_qs.b.exp))
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 795 return;
45975c7d21a1c0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-02 796 __this_cpu_write(rcu_data.cpu_no_qs.b.exp, false);
63d4c8c97948b0 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-07-03 797 rcu_report_exp_rdp(this_cpu_ptr(&rcu_data));
d28139c4e96713 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-06-28 798 }
d28139c4e96713 kernel/rcu/tree_plugin.h Paul E. McKenney 2018-06-28 799
:::::: The code at line 792 was first introduced by commit
:::::: 45975c7d21a1c0aba97e3d8007e2a7c123145748 rcu: Define RCU-sched API in terms of RCU for Tree RCU PREEMPT builds
:::::: TO: Paul E. McKenney <paulmck(a)linux.vnet.ibm.com>
:::::: CC: Paul E. McKenney <paulmck(a)linux.vnet.ibm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH 1/3] ARM: dts: change AM33XX_PADCONF macro separate conf and mux
by kernel test robot
Hi Drew,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on robh/for-next]
[also build test ERROR on omap/for-next pinctrl/devel v5.8-rc1 next-20200618]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Drew-Fustini/pinctrl-single-supp...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
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 >>):
>> Error: arch/arm/boot/dts/am335x-baltos.dtsi:53.39-40 syntax error
FATAL ERROR: Unable to parse input tree
--
>> Error: arch/arm/boot/dts/am335x-igep0033.dtsi:57.39-40 syntax error
FATAL ERROR: Unable to parse input tree
--
>> Error: arch/arm/boot/dts/am335x-bone-common.dtsi:71.39-40 syntax error
FATAL ERROR: Unable to parse input tree
--
>> Error: arch/arm/boot/dts/am335x-osd335x-common.dtsi:39.39-40 syntax error
FATAL ERROR: Unable to parse input tree
--
>> Error: arch/arm/boot/dts/am335x-chilisom.dtsi:30.39-40 syntax error
FATAL ERROR: Unable to parse input tree
--
>> Error: arch/arm/boot/dts/am335x-cm-t335.dts:93.39-40 syntax error
FATAL ERROR: Unable to parse input tree
--
>> Error: arch/arm/boot/dts/am335x-evm.dts:170.39-40 syntax error
FATAL ERROR: Unable to parse input tree
--
>> Error: arch/arm/boot/dts/am335x-evmsk.dts:207.39-40 syntax error
FATAL ERROR: Unable to parse input tree
--
>> Error: arch/arm/boot/dts/am335x-icev2.dts:157.39-40 syntax error
FATAL ERROR: Unable to parse input tree
--
>> Error: arch/arm/boot/dts/am335x-lxm.dts:46.39-40 syntax error
FATAL ERROR: Unable to parse input tree
--
>> Error: arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi:36.39-40 syntax error
FATAL ERROR: Unable to parse input tree
..
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH v5 3/3] net: phy: mscc: handle the clkout control on some phy variants
by kernel test robot
Hi Heiko,
I love your patch! Yet something to improve:
[auto build test ERROR on robh/for-next]
[also build test ERROR on sparc-next/master net-next/master net/master linus/master v5.8-rc1 next-20200618]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Heiko-Stuebner/add-clkout-suppor...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
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
# 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 errors (new ones prefixed by >>):
In file included from drivers/net/phy/mscc/mscc_macsec.c:17:
>> drivers/net/phy/mscc/mscc.h:371:16: error: field has incomplete type 'struct clk_hw'
struct clk_hw clkout_hw;
^
drivers/net/phy/mscc/mscc.h:371:9: note: forward declaration of 'struct clk_hw'
struct clk_hw clkout_hw;
^
1 error generated.
vim +371 drivers/net/phy/mscc/mscc.h
354
355 struct vsc8531_private {
356 int rate_magic;
357 u16 supp_led_modes;
358 u32 leds_mode[MAX_LEDS];
359 u8 nleds;
360 const struct vsc85xx_hw_stat *hw_stats;
361 u64 *stats;
362 int nstats;
363 /* PHY address within the package. */
364 u8 addr;
365 /* For multiple port PHYs; the MDIO address of the base PHY in the
366 * package.
367 */
368 unsigned int base_addr;
369
370 #ifdef CONFIG_COMMON_CLK
> 371 struct clk_hw clkout_hw;
372 #endif
373 u32 clkout_rate;
374 int clkout_enabled;
375
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH v6 35/36] videobuf2: use sgtable-based scatterlist wrappers
by kernel test robot
Hi Marek,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20200618]
[also build test ERROR on v5.8-rc1]
[cannot apply to linuxtv-media/master staging/staging-testing drm-exynos/exynos-drm-next drm-intel/for-linux-next linus/master v5.8-rc1 v5.7 v5.7-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Marek-Szyprowski/DRM-fix-struct-...
base: ce2cc8efd7a40cbd17841add878cb691d0ce0bba
config: alpha-allyesconfig (attached as .config)
compiler: alpha-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
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/media/common/videobuf2/videobuf2-dma-sg.c: In function 'vb2_dma_sg_alloc':
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:173:13: error: invalid storage class for function 'vb2_dma_sg_put'
173 | static void vb2_dma_sg_put(void *buf_priv)
| ^~~~~~~~~~~~~~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:173:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
173 | static void vb2_dma_sg_put(void *buf_priv)
| ^~~~~~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:195:13: error: invalid storage class for function 'vb2_dma_sg_prepare'
195 | static void vb2_dma_sg_prepare(void *buf_priv)
| ^~~~~~~~~~~~~~~~~~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:207:13: error: invalid storage class for function 'vb2_dma_sg_finish'
207 | static void vb2_dma_sg_finish(void *buf_priv)
| ^~~~~~~~~~~~~~~~~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:219:14: error: invalid storage class for function 'vb2_dma_sg_get_userptr'
219 | static void *vb2_dma_sg_get_userptr(struct device *dev, unsigned long vaddr,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c: In function 'vb2_dma_sg_get_userptr':
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:278:13: error: invalid storage class for function 'vb2_dma_sg_put_userptr'
278 | static void vb2_dma_sg_put_userptr(void *buf_priv)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c:278:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
278 | static void vb2_dma_sg_put_userptr(void *buf_priv)
| ^~~~~~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:298:14: error: invalid storage class for function 'vb2_dma_sg_vaddr'
298 | static void *vb2_dma_sg_vaddr(void *buf_priv)
| ^~~~~~~~~~~~~~~~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:315:21: error: invalid storage class for function 'vb2_dma_sg_num_users'
315 | static unsigned int vb2_dma_sg_num_users(void *buf_priv)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:322:12: error: invalid storage class for function 'vb2_dma_sg_mmap'
322 | static int vb2_dma_sg_mmap(void *buf_priv, struct vm_area_struct *vma)
| ^~~~~~~~~~~~~~~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:358:12: error: invalid storage class for function 'vb2_dma_sg_dmabuf_ops_attach'
358 | static int vb2_dma_sg_dmabuf_ops_attach(struct dma_buf *dbuf,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:396:13: error: invalid storage class for function 'vb2_dma_sg_dmabuf_ops_detach'
396 | static void vb2_dma_sg_dmabuf_ops_detach(struct dma_buf *dbuf,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c: In function 'vb2_dma_sg_dmabuf_ops_detach':
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:409:3: error: too few arguments to function 'dma_unmap_sgtable'
409 | dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir);
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/dma-buf.h:20,
from include/media/videobuf2-core.h:18,
from include/media/videobuf2-v4l2.h:16,
from drivers/media/common/videobuf2/videobuf2-dma-sg.c:21:
include/linux/dma-mapping.h:651:20: note: declared here
651 | static inline void dma_unmap_sgtable(struct device *dev, struct sg_table *sgt,
| ^~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c: In function 'vb2_dma_sg_get_userptr':
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:415:25: error: invalid storage class for function 'vb2_dma_sg_dmabuf_ops_map'
415 | static struct sg_table *vb2_dma_sg_dmabuf_ops_map(
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c: In function 'vb2_dma_sg_dmabuf_ops_map':
drivers/media/common/videobuf2/videobuf2-dma-sg.c:434:3: error: too few arguments to function 'dma_unmap_sgtable'
434 | dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir);
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/dma-buf.h:20,
from include/media/videobuf2-core.h:18,
from include/media/videobuf2-v4l2.h:16,
from drivers/media/common/videobuf2/videobuf2-dma-sg.c:21:
include/linux/dma-mapping.h:651:20: note: declared here
651 | static inline void dma_unmap_sgtable(struct device *dev, struct sg_table *sgt,
| ^~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c: In function 'vb2_dma_sg_get_userptr':
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:452:13: error: invalid storage class for function 'vb2_dma_sg_dmabuf_ops_unmap'
452 | static void vb2_dma_sg_dmabuf_ops_unmap(struct dma_buf_attachment *db_attach,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:458:13: error: invalid storage class for function 'vb2_dma_sg_dmabuf_ops_release'
458 | static void vb2_dma_sg_dmabuf_ops_release(struct dma_buf *dbuf)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:464:14: error: invalid storage class for function 'vb2_dma_sg_dmabuf_ops_vmap'
464 | static void *vb2_dma_sg_dmabuf_ops_vmap(struct dma_buf *dbuf)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:471:12: error: invalid storage class for function 'vb2_dma_sg_dmabuf_ops_mmap'
471 | static int vb2_dma_sg_dmabuf_ops_mmap(struct dma_buf *dbuf,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:478:12: error: initializer element is not constant
478 | .attach = vb2_dma_sg_dmabuf_ops_attach,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c:478:12: note: (near initialization for 'vb2_dma_sg_dmabuf_ops.attach')
drivers/media/common/videobuf2/videobuf2-dma-sg.c:479:12: error: initializer element is not constant
479 | .detach = vb2_dma_sg_dmabuf_ops_detach,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c:479:12: note: (near initialization for 'vb2_dma_sg_dmabuf_ops.detach')
drivers/media/common/videobuf2/videobuf2-dma-sg.c:480:17: error: initializer element is not constant
480 | .map_dma_buf = vb2_dma_sg_dmabuf_ops_map,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c:480:17: note: (near initialization for 'vb2_dma_sg_dmabuf_ops.map_dma_buf')
drivers/media/common/videobuf2/videobuf2-dma-sg.c:481:19: error: initializer element is not constant
481 | .unmap_dma_buf = vb2_dma_sg_dmabuf_ops_unmap,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c:481:19: note: (near initialization for 'vb2_dma_sg_dmabuf_ops.unmap_dma_buf')
drivers/media/common/videobuf2/videobuf2-dma-sg.c:482:10: error: initializer element is not constant
482 | .vmap = vb2_dma_sg_dmabuf_ops_vmap,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c:482:10: note: (near initialization for 'vb2_dma_sg_dmabuf_ops.vmap')
drivers/media/common/videobuf2/videobuf2-dma-sg.c:483:10: error: initializer element is not constant
483 | .mmap = vb2_dma_sg_dmabuf_ops_mmap,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c:483:10: note: (near initialization for 'vb2_dma_sg_dmabuf_ops.mmap')
drivers/media/common/videobuf2/videobuf2-dma-sg.c:484:13: error: initializer element is not constant
484 | .release = vb2_dma_sg_dmabuf_ops_release,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c:484:13: note: (near initialization for 'vb2_dma_sg_dmabuf_ops.release')
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:487:24: error: invalid storage class for function 'vb2_dma_sg_get_dmabuf'
487 | static struct dma_buf *vb2_dma_sg_get_dmabuf(void *buf_priv, unsigned long flags)
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/media/common/videobuf2/videobuf2-dma-sg.c:515:12: error: invalid storage class for function 'vb2_dma_sg_map_dmabuf'
515 | static int vb2_dma_sg_map_dmabuf(void *mem_priv)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c:543:13: error: invalid storage class for function 'vb2_dma_sg_unmap_dmabuf'
543 | static void vb2_dma_sg_unmap_dmabuf(void *mem_priv)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c:567:13: error: invalid storage class for function 'vb2_dma_sg_detach_dmabuf'
567 | static void vb2_dma_sg_detach_dmabuf(void *mem_priv)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c:580:14: error: invalid storage class for function 'vb2_dma_sg_attach_dmabuf'
580 | static void *vb2_dma_sg_attach_dmabuf(struct device *dev, struct dma_buf *dbuf,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c:612:14: error: invalid storage class for function 'vb2_dma_sg_cookie'
612 | static void *vb2_dma_sg_cookie(void *buf_priv)
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/media/common/videobuf2/videobuf2-dma-sg.c:13:
drivers/media/common/videobuf2/videobuf2-dma-sg.c:636:19: error: extern declaration of 'vb2_dma_sg_memops' follows declaration with no linkage
636 | EXPORT_SYMBOL_GPL(vb2_dma_sg_memops);
| ^~~~~~~~~~~~~~~~~
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
159 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c:636:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
636 | EXPORT_SYMBOL_GPL(vb2_dma_sg_memops);
| ^~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c:619:26: note: previous definition of 'vb2_dma_sg_memops' was here
619 | const struct vb2_mem_ops vb2_dma_sg_memops = {
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/media/common/videobuf2/videobuf2-dma-sg.c:13:
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
67 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
include/linux/export.h:108:2: note: in expansion of macro '__KSYMTAB_ENTRY'
108 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
147 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
159 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c:636:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
636 | EXPORT_SYMBOL_GPL(vb2_dma_sg_memops);
| ^~~~~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c:640:1: error: expected declaration or statement at end of input
640 | MODULE_LICENSE("GPL");
| ^~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c: In function 'vb2_dma_sg_alloc':
drivers/media/common/videobuf2/videobuf2-dma-sg.c:640:1: error: expected declaration or statement at end of input
drivers/media/common/videobuf2/videobuf2-dma-sg.c: At top level:
drivers/media/common/videobuf2/videobuf2-dma-sg.c:56:13: warning: 'vb2_dma_sg_put' used but never defined
56 | static void vb2_dma_sg_put(void *buf_priv);
| ^~~~~~~~~~~~~~
drivers/media/common/videobuf2/videobuf2-dma-sg.c:219:14: warning: 'vb2_dma_sg_get_userptr' defined but not used [-Wunused-function]
219 | static void *vb2_dma_sg_get_userptr(struct device *dev, unsigned long vaddr,
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/vb2_dma_sg_put +173 drivers/media/common/videobuf2/videobuf2-dma-sg.c
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 55
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 @56 static void vb2_dma_sg_put(void *buf_priv);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 57
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 58 static int vb2_dma_sg_alloc_compacted(struct vb2_dma_sg_buf *buf,
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 59 gfp_t gfp_flags)
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 60 {
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 61 unsigned int last_page = 0;
14f28f5cea9e399 drivers/media/common/videobuf2/videobuf2-dma-sg.c Sakari Ailus 2018-12-12 62 unsigned long size = buf->size;
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 63
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 64 while (size > 0) {
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 65 struct page *pages;
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 66 int order;
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 67 int i;
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 68
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 69 order = get_order(size);
4b129dc907e9b95 drivers/media/common/videobuf2/videobuf2-dma-sg.c Mauro Carvalho Chehab 2019-02-18 70 /* Don't over allocate*/
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 71 if ((PAGE_SIZE << order) > size)
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 72 order--;
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 73
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 74 pages = NULL;
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 75 while (!pages) {
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 76 pages = alloc_pages(GFP_KERNEL | __GFP_ZERO |
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 77 __GFP_NOWARN | gfp_flags, order);
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 78 if (pages)
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 79 break;
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 80
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 81 if (order == 0) {
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 82 while (last_page--)
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 83 __free_page(buf->pages[last_page]);
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 84 return -ENOMEM;
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 85 }
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 86 order--;
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 87 }
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 88
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 89 split_page(pages, order);
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 90 for (i = 0; i < (1 << order); i++)
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 91 buf->pages[last_page++] = &pages[i];
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 92
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 93 size -= PAGE_SIZE << order;
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 94 }
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 95
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 96 return 0;
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 97 }
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 98
00085f1efa387a8 drivers/media/v4l2-core/videobuf2-dma-sg.c Krzysztof Kozlowski 2016-08-03 99 static void *vb2_dma_sg_alloc(struct device *dev, unsigned long dma_attrs,
d16e832da23edff drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2016-04-15 100 unsigned long size, enum dma_data_direction dma_dir,
d16e832da23edff drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2016-04-15 101 gfp_t gfp_flags)
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 102 {
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 103 struct vb2_dma_sg_buf *buf;
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 104 struct sg_table *sgt;
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 105 int ret;
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 106 int num_pages;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 107
0ff657b0f6120cb drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2016-07-21 108 if (WARN_ON(!dev))
0ff657b0f6120cb drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2016-07-21 109 return ERR_PTR(-EINVAL);
0ff657b0f6120cb drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2016-07-21 110
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 111 buf = kzalloc(sizeof *buf, GFP_KERNEL);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 112 if (!buf)
0ff657b0f6120cb drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2016-07-21 113 return ERR_PTR(-ENOMEM);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 114
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 115 buf->vaddr = NULL;
d935c57e8fb6902 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 116 buf->dma_dir = dma_dir;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 117 buf->offset = 0;
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 118 buf->size = size;
7f8414594e47552 drivers/media/v4l2-core/videobuf2-dma-sg.c Mauro Carvalho Chehab 2013-04-19 119 /* size is already page aligned */
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 120 buf->num_pages = size >> PAGE_SHIFT;
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 121 buf->dma_sgt = &buf->sg_table;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 122
758d90e161382c1 drivers/media/v4l2-core/videobuf2-dma-sg.c Tomasz Figa 2017-06-19 123 buf->pages = kvmalloc_array(buf->num_pages, sizeof(struct page *),
758d90e161382c1 drivers/media/v4l2-core/videobuf2-dma-sg.c Tomasz Figa 2017-06-19 124 GFP_KERNEL | __GFP_ZERO);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 125 if (!buf->pages)
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 126 goto fail_pages_array_alloc;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 127
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 128 ret = vb2_dma_sg_alloc_compacted(buf, gfp_flags);
df23728118cd0f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 129 if (ret)
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 130 goto fail_pages_alloc;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 131
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 132 ret = sg_alloc_table_from_pages(buf->dma_sgt, buf->pages,
47bc59c52b005f5 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-08-01 133 buf->num_pages, 0, size, GFP_KERNEL);
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 134 if (ret)
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 135 goto fail_table_alloc;
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 136
0c3a14c177aa85a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 137 /* Prevent the device from being released while the buffer is used */
36c0f8b32c4bd4f drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2016-04-15 138 buf->dev = get_device(dev);
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 139
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 140 sgt = &buf->sg_table;
251a79f8f5adfd8 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 141 /*
251a79f8f5adfd8 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 142 * No need to sync to the device, this will happen later when the
251a79f8f5adfd8 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 143 * prepare() memop is called.
251a79f8f5adfd8 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 144 */
b8bd9d592f68e3c drivers/media/common/videobuf2/videobuf2-dma-sg.c Marek Szyprowski 2020-06-18 145 if (dma_map_sgtable(buf->dev, sgt, buf->dma_dir,
b8bd9d592f68e3c drivers/media/common/videobuf2/videobuf2-dma-sg.c Marek Szyprowski 2020-06-18 146 DMA_ATTR_SKIP_CPU_SYNC)) {
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 147 goto fail_map;
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 148
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 149 buf->handler.refcount = &buf->refcount;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 150 buf->handler.put = vb2_dma_sg_put;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 151 buf->handler.arg = buf;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 152
6c4bb65d0be8f34 drivers/media/v4l2-core/videobuf2-dma-sg.c Elena Reshetova 2017-03-06 153 refcount_set(&buf->refcount, 1);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 154
ffdc78efe1a8a01 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2013-03-02 155 dprintk(1, "%s: Allocated buffer of %d pages\n",
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 156 __func__, buf->num_pages);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 157 return buf;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 158
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 159 fail_map:
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 160 put_device(buf->dev);
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 161 sg_free_table(buf->dma_sgt);
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 162 fail_table_alloc:
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 163 num_pages = buf->num_pages;
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 164 while (num_pages--)
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 165 __free_page(buf->pages[num_pages]);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 166 fail_pages_alloc:
758d90e161382c1 drivers/media/v4l2-core/videobuf2-dma-sg.c Tomasz Figa 2017-06-19 167 kvfree(buf->pages);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 168 fail_pages_array_alloc:
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 169 kfree(buf);
0ff657b0f6120cb drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2016-07-21 170 return ERR_PTR(-ENOMEM);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 171 }
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 172
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 @173 static void vb2_dma_sg_put(void *buf_priv)
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 174 {
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 175 struct vb2_dma_sg_buf *buf = buf_priv;
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 176 struct sg_table *sgt = &buf->sg_table;
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 177 int i = buf->num_pages;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 178
6c4bb65d0be8f34 drivers/media/v4l2-core/videobuf2-dma-sg.c Elena Reshetova 2017-03-06 179 if (refcount_dec_and_test(&buf->refcount)) {
ffdc78efe1a8a01 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2013-03-02 180 dprintk(1, "%s: Freeing buffer of %d pages\n", __func__,
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 181 buf->num_pages);
b8bd9d592f68e3c drivers/media/common/videobuf2/videobuf2-dma-sg.c Marek Szyprowski 2020-06-18 182 dma_unmap_sgtable(buf->dev, sgt, buf->dma_dir,
b8bd9d592f68e3c drivers/media/common/videobuf2/videobuf2-dma-sg.c Marek Szyprowski 2020-06-18 183 DMA_ATTR_SKIP_CPU_SYNC);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 184 if (buf->vaddr)
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 185 vm_unmap_ram(buf->vaddr, buf->num_pages);
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 186 sg_free_table(buf->dma_sgt);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 187 while (--i >= 0)
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 188 __free_page(buf->pages[i]);
758d90e161382c1 drivers/media/v4l2-core/videobuf2-dma-sg.c Tomasz Figa 2017-06-19 189 kvfree(buf->pages);
0c3a14c177aa85a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 190 put_device(buf->dev);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 191 kfree(buf);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 192 }
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 193 }
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 194
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 @195 static void vb2_dma_sg_prepare(void *buf_priv)
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 196 {
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 197 struct vb2_dma_sg_buf *buf = buf_priv;
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 198 struct sg_table *sgt = buf->dma_sgt;
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 199
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 200 /* DMABUF exporter will flush the cache for us */
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 201 if (buf->db_attach)
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 202 return;
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 203
b8bd9d592f68e3c drivers/media/common/videobuf2/videobuf2-dma-sg.c Marek Szyprowski 2020-06-18 204 dma_sync_sgtable_for_device(buf->dev, sgt, buf->dma_dir);
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 205 }
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 206
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 @207 static void vb2_dma_sg_finish(void *buf_priv)
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 208 {
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 209 struct vb2_dma_sg_buf *buf = buf_priv;
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 210 struct sg_table *sgt = buf->dma_sgt;
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 211
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 212 /* DMABUF exporter will flush the cache for us */
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 213 if (buf->db_attach)
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 214 return;
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 215
b8bd9d592f68e3c drivers/media/common/videobuf2/videobuf2-dma-sg.c Marek Szyprowski 2020-06-18 216 dma_sync_sgtable_for_cpu(buf->dev, sgt, buf->dma_dir);
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 217 }
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 218
36c0f8b32c4bd4f drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2016-04-15 @219 static void *vb2_dma_sg_get_userptr(struct device *dev, unsigned long vaddr,
cd474037c4a9a9c drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 220 unsigned long size,
cd474037c4a9a9c drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 221 enum dma_data_direction dma_dir)
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 222 {
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 223 struct vb2_dma_sg_buf *buf;
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 224 struct sg_table *sgt;
3336c24f25ec932 drivers/media/v4l2-core/videobuf2-dma-sg.c Jan Kara 2015-07-13 225 struct frame_vector *vec;
251a79f8f5adfd8 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 226
10791829eb52d57 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2016-07-21 227 if (WARN_ON(!dev))
10791829eb52d57 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2016-07-21 228 return ERR_PTR(-EINVAL);
10791829eb52d57 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2016-07-21 229
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 230 buf = kzalloc(sizeof *buf, GFP_KERNEL);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 231 if (!buf)
0ff657b0f6120cb drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2016-07-21 232 return ERR_PTR(-ENOMEM);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 233
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 234 buf->vaddr = NULL;
36c0f8b32c4bd4f drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2016-04-15 235 buf->dev = dev;
cd474037c4a9a9c drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 236 buf->dma_dir = dma_dir;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 237 buf->offset = vaddr & ~PAGE_MASK;
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 238 buf->size = size;
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 239 buf->dma_sgt = &buf->sg_table;
707947247e9517b drivers/media/common/videobuf2/videobuf2-dma-sg.c Hans Verkuil 2019-04-04 240 vec = vb2_create_framevec(vaddr, size);
3336c24f25ec932 drivers/media/v4l2-core/videobuf2-dma-sg.c Jan Kara 2015-07-13 241 if (IS_ERR(vec))
3336c24f25ec932 drivers/media/v4l2-core/videobuf2-dma-sg.c Jan Kara 2015-07-13 242 goto userptr_fail_pfnvec;
3336c24f25ec932 drivers/media/v4l2-core/videobuf2-dma-sg.c Jan Kara 2015-07-13 243 buf->vec = vec;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 244
3336c24f25ec932 drivers/media/v4l2-core/videobuf2-dma-sg.c Jan Kara 2015-07-13 245 buf->pages = frame_vector_pages(vec);
3336c24f25ec932 drivers/media/v4l2-core/videobuf2-dma-sg.c Jan Kara 2015-07-13 246 if (IS_ERR(buf->pages))
3336c24f25ec932 drivers/media/v4l2-core/videobuf2-dma-sg.c Jan Kara 2015-07-13 247 goto userptr_fail_sgtable;
3336c24f25ec932 drivers/media/v4l2-core/videobuf2-dma-sg.c Jan Kara 2015-07-13 248 buf->num_pages = frame_vector_count(vec);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 249
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 250 if (sg_alloc_table_from_pages(buf->dma_sgt, buf->pages,
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 251 buf->num_pages, buf->offset, size, 0))
3336c24f25ec932 drivers/media/v4l2-core/videobuf2-dma-sg.c Jan Kara 2015-07-13 252 goto userptr_fail_sgtable;
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 253
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 254 sgt = &buf->sg_table;
251a79f8f5adfd8 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 255 /*
251a79f8f5adfd8 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 256 * No need to sync to the device, this will happen later when the
251a79f8f5adfd8 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 257 * prepare() memop is called.
251a79f8f5adfd8 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 258 */
b8bd9d592f68e3c drivers/media/common/videobuf2/videobuf2-dma-sg.c Marek Szyprowski 2020-06-18 259 if (dma_map_sgtable(buf->dev, sgt, buf->dma_dir,
b8bd9d592f68e3c drivers/media/common/videobuf2/videobuf2-dma-sg.c Marek Szyprowski 2020-06-18 260 DMA_ATTR_SKIP_CPU_SYNC)) {
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 261 goto userptr_fail_map;
6a5d77cbf26078e drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2015-04-29 262
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 263 return buf;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 264
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 265 userptr_fail_map:
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 266 sg_free_table(&buf->sg_table);
3336c24f25ec932 drivers/media/v4l2-core/videobuf2-dma-sg.c Jan Kara 2015-07-13 267 userptr_fail_sgtable:
3336c24f25ec932 drivers/media/v4l2-core/videobuf2-dma-sg.c Jan Kara 2015-07-13 268 vb2_destroy_framevec(vec);
3336c24f25ec932 drivers/media/v4l2-core/videobuf2-dma-sg.c Jan Kara 2015-07-13 269 userptr_fail_pfnvec:
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 270 kfree(buf);
0ff657b0f6120cb drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2016-07-21 271 return ERR_PTR(-ENOMEM);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 272 }
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 273
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 274 /*
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 275 * @put_userptr: inform the allocator that a USERPTR buffer will no longer
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 276 * be used
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 277 */
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 @278 static void vb2_dma_sg_put_userptr(void *buf_priv)
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 279 {
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 280 struct vb2_dma_sg_buf *buf = buf_priv;
d790b7eda953df4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-24 281 struct sg_table *sgt = &buf->sg_table;
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 282 int i = buf->num_pages;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 283
ffdc78efe1a8a01 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2013-03-02 284 dprintk(1, "%s: Releasing userspace buffer of %d pages\n",
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 285 __func__, buf->num_pages);
b8bd9d592f68e3c drivers/media/common/videobuf2/videobuf2-dma-sg.c Marek Szyprowski 2020-06-18 286 dma_unmap_sgtable(buf->dev, sgt, buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 287 if (buf->vaddr)
223012475968fb8 drivers/media/v4l2-core/videobuf2-dma-sg.c Ricardo Ribalda 2013-08-02 288 vm_unmap_ram(buf->vaddr, buf->num_pages);
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 289 sg_free_table(buf->dma_sgt);
5b6f9abe5a49df8 drivers/media/v4l2-core/videobuf2-dma-sg.c Stanimir Varbanov 2017-08-21 290 if (buf->dma_dir == DMA_FROM_DEVICE ||
5b6f9abe5a49df8 drivers/media/v4l2-core/videobuf2-dma-sg.c Stanimir Varbanov 2017-08-21 291 buf->dma_dir == DMA_BIDIRECTIONAL)
c0cb76589c77b9a drivers/media/v4l2-core/videobuf2-dma-sg.c Stanimir Varbanov 2017-08-29 292 while (--i >= 0)
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 293 set_page_dirty_lock(buf->pages[i]);
3336c24f25ec932 drivers/media/v4l2-core/videobuf2-dma-sg.c Jan Kara 2015-07-13 294 vb2_destroy_framevec(buf->vec);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 295 kfree(buf);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 296 }
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 297
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 @298 static void *vb2_dma_sg_vaddr(void *buf_priv)
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 299 {
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 300 struct vb2_dma_sg_buf *buf = buf_priv;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 301
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 302 BUG_ON(!buf);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 303
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 304 if (!buf->vaddr) {
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 305 if (buf->db_attach)
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 306 buf->vaddr = dma_buf_vmap(buf->db_attach->dmabuf);
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 307 else
d4efd79a81abc70 drivers/media/common/videobuf2/videobuf2-dma-sg.c Christoph Hellwig 2020-06-01 308 buf->vaddr = vm_map_ram(buf->pages, buf->num_pages, -1);
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 309 }
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 310
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 311 /* add offset in case userptr is not page-aligned */
e078b79d8aa70a4 drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 312 return buf->vaddr ? buf->vaddr + buf->offset : NULL;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 313 }
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 314
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 @315 static unsigned int vb2_dma_sg_num_users(void *buf_priv)
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 316 {
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 317 struct vb2_dma_sg_buf *buf = buf_priv;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 318
6c4bb65d0be8f34 drivers/media/v4l2-core/videobuf2-dma-sg.c Elena Reshetova 2017-03-06 319 return refcount_read(&buf->refcount);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 320 }
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 321
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 @322 static int vb2_dma_sg_mmap(void *buf_priv, struct vm_area_struct *vma)
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 323 {
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 324 struct vb2_dma_sg_buf *buf = buf_priv;
a17ae14766935aa drivers/media/common/videobuf2/videobuf2-dma-sg.c Souptick Joarder 2019-05-13 325 int err;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 326
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 327 if (!buf) {
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 328 printk(KERN_ERR "No memory to map\n");
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 329 return -EINVAL;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 330 }
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 331
a17ae14766935aa drivers/media/common/videobuf2/videobuf2-dma-sg.c Souptick Joarder 2019-05-13 332 err = vm_map_pages(vma, buf->pages, buf->num_pages);
a17ae14766935aa drivers/media/common/videobuf2/videobuf2-dma-sg.c Souptick Joarder 2019-05-13 333 if (err) {
a17ae14766935aa drivers/media/common/videobuf2/videobuf2-dma-sg.c Souptick Joarder 2019-05-13 334 printk(KERN_ERR "Remapping memory, error: %d\n", err);
a17ae14766935aa drivers/media/common/videobuf2/videobuf2-dma-sg.c Souptick Joarder 2019-05-13 335 return err;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 336 }
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 337
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 338 /*
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 339 * Use common vm_area operations to track buffer refcount.
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 340 */
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 341 vma->vm_private_data = &buf->handler;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 342 vma->vm_ops = &vb2_common_vm_ops;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 343
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 344 vma->vm_ops->open(vma);
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 345
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 346 return 0;
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 347 }
5ba3f757f0592ca drivers/media/video/videobuf2-dma-sg.c Andrzej Pietrasiewicz 2010-11-29 348
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 349 /*********************************************/
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 350 /* DMABUF ops for exporters */
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 351 /*********************************************/
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 352
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 353 struct vb2_dma_sg_attachment {
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 354 struct sg_table sgt;
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 355 enum dma_data_direction dma_dir;
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 356 };
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 357
a19741e5e5a9f1f drivers/media/common/videobuf2/videobuf2-dma-sg.c Christian König 2018-05-28 @358 static int vb2_dma_sg_dmabuf_ops_attach(struct dma_buf *dbuf,
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 359 struct dma_buf_attachment *dbuf_attach)
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 360 {
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 361 struct vb2_dma_sg_attachment *attach;
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 362 unsigned int i;
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 363 struct scatterlist *rd, *wr;
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 364 struct sg_table *sgt;
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 365 struct vb2_dma_sg_buf *buf = dbuf->priv;
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 366 int ret;
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 367
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 368 attach = kzalloc(sizeof(*attach), GFP_KERNEL);
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 369 if (!attach)
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 370 return -ENOMEM;
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 371
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 372 sgt = &attach->sgt;
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 373 /* Copy the buf->base_sgt scatter list to the attachment, as we can't
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 374 * map the same scatter list to multiple attachments at the same time.
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 375 */
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 376 ret = sg_alloc_table(sgt, buf->dma_sgt->orig_nents, GFP_KERNEL);
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 377 if (ret) {
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 378 kfree(attach);
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 379 return -ENOMEM;
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 380 }
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 381
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 382 rd = buf->dma_sgt->sgl;
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 383 wr = sgt->sgl;
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 384 for (i = 0; i < sgt->orig_nents; ++i) {
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 385 sg_set_page(wr, sg_page(rd), rd->length, rd->offset);
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 386 rd = sg_next(rd);
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 387 wr = sg_next(wr);
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 388 }
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 389
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 390 attach->dma_dir = DMA_NONE;
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 391 dbuf_attach->priv = attach;
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 392
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 393 return 0;
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 394 }
041c7b6ac74ee7a drivers/media/v4l2-core/videobuf2-dma-sg.c Hans Verkuil 2014-11-18 395
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months