From: kernel test robot <lkp@intel.com>
To: Akhil R <akhilrajeev@nvidia.com>,
christian.koenig@amd.com, digetx@gmail.com, jonathanh@nvidia.com,
ldewangan@nvidia.com, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
sumit.semwal@linaro.org, thierry.reding@gmail.com,
wsa@kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, akhilrajeev@nvidia.com
Subject: Re: [PATCH] i2c: tegra: Share same DMA channel for Rx and Tx
Date: Wed, 22 Feb 2023 01:41:56 +0800 [thread overview]
Message-ID: <202302220130.flKenlan-lkp@intel.com> (raw)
In-Reply-To: <20230221135726.40720-1-akhilrajeev@nvidia.com>
Hi Akhil,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tegra/for-next]
[also build test ERROR on linus/master v6.2 next-20230221]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Akhil-R/i2c-tegra-Share-same-DMA-channel-for-Rx-and-Tx/20230221-215924
base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next
patch link: https://lore.kernel.org/r/20230221135726.40720-1-akhilrajeev%40nvidia.com
patch subject: [PATCH] i2c: tegra: Share same DMA channel for Rx and Tx
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20230222/202302220130.flKenlan-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/643ca30fdac50b54b2ee65f97e6e2eda9974dd3c
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Akhil-R/i2c-tegra-Share-same-DMA-channel-for-Rx-and-Tx/20230221-215924
git checkout 643ca30fdac50b54b2ee65f97e6e2eda9974dd3c
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/i2c/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302220130.flKenlan-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from arch/m68k/include/asm/irqflags.h:6,
from include/linux/irqflags.h:16,
from arch/m68k/include/asm/atomic.h:6,
from include/linux/atomic.h:7,
from include/linux/cpumask.h:13,
from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/mutex.h:17,
from include/linux/kernfs.h:11,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:36,
from include/linux/acpi.h:13,
from drivers/i2c/busses/i2c-tegra.c:9:
drivers/i2c/busses/i2c-tegra.c: In function 'tegra_i2c_init_dma':
>> drivers/i2c/busses/i2c-tegra.c:465:26: error: 'struct tegra_i2c_dev' has no member named 'tx_dma_chan'; did you mean 'dma_chan'?
465 | WARN_ON(i2c_dev->tx_dma_chan->device != i2c_dev->rx_dma_chan->device);
| ^~~~~~~~~~~
include/asm-generic/bug.h:122:32: note: in definition of macro 'WARN_ON'
122 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
>> drivers/i2c/busses/i2c-tegra.c:465:58: error: 'struct tegra_i2c_dev' has no member named 'rx_dma_chan'; did you mean 'dma_chan'?
465 | WARN_ON(i2c_dev->tx_dma_chan->device != i2c_dev->rx_dma_chan->device);
| ^~~~~~~~~~~
include/asm-generic/bug.h:122:32: note: in definition of macro 'WARN_ON'
122 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
vim +465 drivers/i2c/busses/i2c-tegra.c
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 432
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 433 static int tegra_i2c_init_dma(struct tegra_i2c_dev *i2c_dev)
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 434 {
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 435 struct dma_chan *chan;
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 436 dma_addr_t dma_phys;
89e3748acd0bf6 Dmitry Osipenko 2020-09-30 437 u32 *dma_buf;
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 438 int err;
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 439
48cb6356fae125 Akhil R 2022-09-06 440 if (i2c_dev->is_vi)
89328b1b81858f Jonathan Hunter 2019-02-21 441 return 0;
89328b1b81858f Jonathan Hunter 2019-02-21 442
48cb6356fae125 Akhil R 2022-09-06 443 if (!i2c_dev->hw->has_apb_dma) {
89328b1b81858f Jonathan Hunter 2019-02-21 444 if (!IS_ENABLED(CONFIG_TEGRA20_APB_DMA)) {
48cb6356fae125 Akhil R 2022-09-06 445 dev_dbg(i2c_dev->dev, "APB DMA support not enabled\n");
48cb6356fae125 Akhil R 2022-09-06 446 return 0;
48cb6356fae125 Akhil R 2022-09-06 447 }
48cb6356fae125 Akhil R 2022-09-06 448 } else if (!IS_ENABLED(CONFIG_TEGRA186_GPC_DMA)) {
48cb6356fae125 Akhil R 2022-09-06 449 dev_dbg(i2c_dev->dev, "GPC DMA support not enabled\n");
89328b1b81858f Jonathan Hunter 2019-02-21 450 return 0;
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 451 }
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 452
643ca30fdac50b Akhil R 2023-02-21 453 /* The same channel will be used for both Rx and Tx.
643ca30fdac50b Akhil R 2023-02-21 454 * Keeping the name as tx for backward compatibility with
643ca30fdac50b Akhil R 2023-02-21 455 * existing devicetrees.
643ca30fdac50b Akhil R 2023-02-21 456 */
79e4be2c08bbbf Peter Ujfalusi 2019-11-13 457 chan = dma_request_chan(i2c_dev->dev, "tx");
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 458 if (IS_ERR(chan)) {
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 459 err = PTR_ERR(chan);
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 460 goto err_out;
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 461 }
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 462
643ca30fdac50b Akhil R 2023-02-21 463 i2c_dev->dma_chan = chan;
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 464
cdbf26251d3b35 Thierry Reding 2022-10-20 @465 WARN_ON(i2c_dev->tx_dma_chan->device != i2c_dev->rx_dma_chan->device);
cdbf26251d3b35 Thierry Reding 2022-10-20 466 i2c_dev->dma_dev = chan->device->dev;
cdbf26251d3b35 Thierry Reding 2022-10-20 467
55c52f16a017ca Dmitry Osipenko 2020-09-30 468 i2c_dev->dma_buf_size = i2c_dev->hw->quirks->max_write_len +
55c52f16a017ca Dmitry Osipenko 2020-09-30 469 I2C_PACKET_HEADER_SIZE;
55c52f16a017ca Dmitry Osipenko 2020-09-30 470
cdbf26251d3b35 Thierry Reding 2022-10-20 471 dma_buf = dma_alloc_coherent(i2c_dev->dma_dev, i2c_dev->dma_buf_size,
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 472 &dma_phys, GFP_KERNEL | __GFP_NOWARN);
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 473 if (!dma_buf) {
76d06443cc5b37 Dmitry Osipenko 2020-09-30 474 dev_err(i2c_dev->dev, "failed to allocate DMA buffer\n");
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 475 err = -ENOMEM;
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 476 goto err_out;
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 477 }
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 478
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 479 i2c_dev->dma_buf = dma_buf;
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 480 i2c_dev->dma_phys = dma_phys;
c886a4a03a0155 Dmitry Osipenko 2020-09-30 481
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 482 return 0;
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 483
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 484 err_out:
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 485 tegra_i2c_release_dma(i2c_dev);
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 486 if (err != -EPROBE_DEFER) {
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 487 dev_err(i2c_dev->dev, "cannot use DMA: %d\n", err);
bb0e9b1d2a1f93 Colin Ian King 2019-02-15 488 dev_err(i2c_dev->dev, "falling back to PIO\n");
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 489 return 0;
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 490 }
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 491
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 492 return err;
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 493 }
86c92b9965ff17 Sowjanya Komatineni 2019-02-12 494
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
prev parent reply other threads:[~2023-02-21 17:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 13:57 [PATCH] i2c: tegra: Share same DMA channel for Rx and Tx Akhil R
2023-02-21 17:41 ` kernel test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202302220130.flKenlan-lkp@intel.com \
--to=lkp@intel.com \
--cc=akhilrajeev@nvidia.com \
--cc=christian.koenig@amd.com \
--cc=devicetree@vger.kernel.org \
--cc=digetx@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=ldewangan@nvidia.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh+dt@kernel.org \
--cc=sumit.semwal@linaro.org \
--cc=thierry.reding@gmail.com \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.