[intel-linux-intel-lts:4.19/android_r 19126/23450] ld.lld: error: undefined symbol: kb_cs
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 4.19/android_r
head: 449e3e67d8fe417b8eac3def79fbe560bd222d6b
commit: 414a2dc8c36b7533f15309082141f086bfd6eaa6 [19126/23450] [Clang] Fix Clang compile errors in security.
config: powerpc64-randconfig-r002-20210618 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/intel/linux-intel-lts/commit/414a2dc8c36b7533f15309082...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 4.19/android_r
git checkout 414a2dc8c36b7533f15309082141f086bfd6eaa6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
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 >>):
>> ld.lld: error: undefined symbol: kb_cs
>>> referenced by i8042.c
>>> drivers/input/serio/i8042.o:(__i8042_command) in archive built-in.a
>>> referenced by i8042.c
>>> drivers/input/serio/i8042.o:(__i8042_command) in archive built-in.a
>>> referenced by i8042.c
>>> drivers/input/serio/i8042.o:(__i8042_command) in archive built-in.a
>>> referenced 45 more times
--
>> ld.lld: error: undefined symbol: kb_data
>>> referenced by i8042.c
>>> drivers/input/serio/i8042.o:(__i8042_command) in archive built-in.a
>>> referenced by i8042.c
>>> drivers/input/serio/i8042.o:(__i8042_command) in archive built-in.a
>>> referenced by i8042.c
>>> drivers/input/serio/i8042.o:(__i8042_command) in archive built-in.a
>>> referenced 15 more times
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH v3 1/3] riscv: optimized memcpy
by kernel test robot
Hi Matteo,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.13-rc6 next-20210617]
[cannot apply to atish-riscv-linux/topo_v3]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Matteo-Croce/riscv-optimized-mem...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git dd860052c99b1e088352bdd4fb7aef46f8d2ef47
config: riscv-randconfig-r031-20210618 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/c35a3474b6782645ff0695db1f30be0e8...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Matteo-Croce/riscv-optimized-mem-functions/20210617-232934
git checkout c35a3474b6782645ff0695db1f30be0e8123c131
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 >>):
>> arch/riscv/lib/string.c:90:57: warning: attribute declaration must precede definition [-Wignored-attributes]
void *memcpy(void *dest, const void *src, size_t count) __weak __alias(__memcpy);
^
include/linux/compiler_attributes.h:291:56: note: expanded from macro '__weak'
#define __weak __attribute__((__weak__))
^
include/linux/fortify-string.h:178:24: note: previous definition is here
__FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size)
^
1 warning generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for LOCKDEP
Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
Selected by
- PROVE_LOCKING && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
- LOCK_STAT && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
- DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
vim +90 arch/riscv/lib/string.c
89
> 90 void *memcpy(void *dest, const void *src, size_t count) __weak __alias(__memcpy);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[nbd168-wireless:mt76 55/80] drivers/net/wireless/mediatek/mt76/mt7921/mac.c:27:1: warning: no previous prototype for function 'mt7921_next_txs_set'
by kernel test robot
tree: https://github.com/nbd168/wireless mt76
head: 089a831fb7a99526b602bc34764dc213f335d07d
commit: 97c4bed80d5a6889eb1335b3dfb31e0afb8e3196 [55/80] mt76: mt7921: introduce mac tx done handling
config: powerpc-randconfig-r032-20210618 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/nbd168/wireless/commit/97c4bed80d5a6889eb1335b3dfb31e0...
git remote add nbd168-wireless https://github.com/nbd168/wireless
git fetch --no-tags nbd168-wireless mt76
git checkout 97c4bed80d5a6889eb1335b3dfb31e0afb8e3196
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
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 >>):
In file included from drivers/net/wireless/mediatek/mt76/mt7921/mac.c:4:
In file included from include/linux/devcoredump.h:8:
In file included from include/linux/device.h:15:
In file included from include/linux/dev_printk.h:16:
In file included from include/linux/ratelimit.h:6:
In file included from include/linux/sched.h:12:
In file included from arch/powerpc/include/asm/current.h:13:
In file included from arch/powerpc/include/asm/paca.h:17:
In file included from arch/powerpc/include/asm/lppaca.h:46:
In file included from arch/powerpc/include/asm/mmu.h:147:
In file included from include/linux/bug.h:5:
In file included from arch/powerpc/include/asm/bug.h:109:
In file included from include/asm-generic/bug.h:20:
In file included from include/linux/kernel.h:12:
In file included from include/linux/bitops.h:32:
In file included from arch/powerpc/include/asm/bitops.h:62:
arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined]
#define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")
^
<built-in>:309:9: note: previous definition is here
#define __lwsync __builtin_ppc_lwsync
^
>> drivers/net/wireless/mediatek/mt76/mt7921/mac.c:27:1: warning: no previous prototype for function 'mt7921_next_txs_set' [-Wmissing-prototypes]
mt7921_next_txs_set(struct mt7921_dev *dev, struct mt76_wcid *wcid,
^
drivers/net/wireless/mediatek/mt76/mt7921/mac.c:26:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
unsigned long
^
static
>> drivers/net/wireless/mediatek/mt76/mt7921/mac.c:38:1: warning: no previous prototype for function 'mt7921_next_txs_timeout' [-Wmissing-prototypes]
mt7921_next_txs_timeout(struct mt7921_dev *dev, struct mt76_wcid *wcid)
^
drivers/net/wireless/mediatek/mt76/mt7921/mac.c:37:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool
^
static
3 warnings generated.
vim +/mt7921_next_txs_set +27 drivers/net/wireless/mediatek/mt76/mt7921/mac.c
25
26 unsigned long
> 27 mt7921_next_txs_set(struct mt7921_dev *dev, struct mt76_wcid *wcid,
28 u32 timeout)
29 {
30 struct mt7921_sta *msta;
31
32 msta = container_of(wcid, struct mt7921_sta, wcid);
33 msta->next_txs_ts = jiffies + msecs_to_jiffies(timeout);
34 return msta->next_txs_ts;
35 }
36
37 bool
> 38 mt7921_next_txs_timeout(struct mt7921_dev *dev, struct mt76_wcid *wcid)
39 {
40 struct mt7921_sta *msta;
41
42 msta = container_of(wcid, struct mt7921_sta, wcid);
43 return time_is_before_jiffies(msta->next_txs_ts);
44 }
45
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH net-next v2 3/3] net: wwan: Allow WWAN drivers to provide blocking tx and poll function
by kernel test robot
Hi Stephan,
I love your patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Stephan-Gerhold/net-wwan-Add-RPM...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 8fe088bd4fd12f4c8899b51d5bc3daad98767d49
config: arm-randconfig-r024-20210618 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/3e8b96e21bab08cfd3136fb7348c4cb77...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Stephan-Gerhold/net-wwan-Add-RPMSG-WWAN-CTRL-driver/20210618-155527
git checkout 3e8b96e21bab08cfd3136fb7348c4cb77815e969
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 >>):
>> drivers/usb/class/cdc-wdm.c:917:8: error: incompatible function pointer types initializing 'int (*)(struct wwan_port *, struct sk_buff *, bool)' (aka 'int (*)(struct wwan_port *, struct sk_buff *, _Bool)') with an expression of type 'int (struct wwan_port *, struct sk_buff *)' [-Werror,-Wincompatible-function-pointer-types]
.tx = wdm_wwan_port_tx,
^~~~~~~~~~~~~~~~
1 error generated.
vim +917 drivers/usb/class/cdc-wdm.c
cac6fb015f7191 Loic Poulain 2021-05-11 913
cac6fb015f7191 Loic Poulain 2021-05-11 914 static struct wwan_port_ops wdm_wwan_port_ops = {
cac6fb015f7191 Loic Poulain 2021-05-11 915 .start = wdm_wwan_port_start,
cac6fb015f7191 Loic Poulain 2021-05-11 916 .stop = wdm_wwan_port_stop,
cac6fb015f7191 Loic Poulain 2021-05-11 @917 .tx = wdm_wwan_port_tx,
cac6fb015f7191 Loic Poulain 2021-05-11 918 };
cac6fb015f7191 Loic Poulain 2021-05-11 919
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH v2 3/5] mt76: mt7663s: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx path
by kernel test robot
Hi Lorenzo,
I love your patch! Yet something to improve:
[auto build test ERROR on wireless-drivers/master]
[also build test ERROR on v5.13-rc6 next-20210617]
[cannot apply to wireless-drivers-next/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Lorenzo-Bianconi/mt7663s-enable-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git master
config: arm-randconfig-r024-20210618 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/80a27acf098f3392d9b7392c1af5678aa...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Lorenzo-Bianconi/mt7663s-enable-runtime-pm-support/20210618-161033
git checkout 80a27acf098f3392d9b7392c1af5678aa154da72
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 >>):
>> drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c:322:35: error: too many arguments to function call, expected single argument 'pm', have 2 arguments
mt76_connac_pm_unref(&dev->mphy, &dev->pm);
~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7615/../mt76_connac.h:119:1: note: 'mt76_connac_pm_unref' declared here
mt76_connac_pm_unref(struct mt76_connac_pm *pm)
^
1 error generated.
vim +/pm +322 drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c
281
282 void mt7663s_txrx_worker(struct mt76_worker *w)
283 {
284 struct mt76_sdio *sdio = container_of(w, struct mt76_sdio,
285 txrx_worker);
286 struct mt76_dev *mdev = container_of(sdio, struct mt76_dev, sdio);
287 struct mt7615_dev *dev = container_of(mdev, struct mt7615_dev, mt76);
288 int i, nframes, ret;
289
290 if (!mt76_connac_pm_ref(&dev->mphy, &dev->pm)) {
291 queue_work(mdev->wq, &dev->pm.wake_work);
292 return;
293 }
294
295 /* disable interrupt */
296 sdio_claim_host(sdio->func);
297 sdio_writel(sdio->func, WHLPCR_INT_EN_CLR, MCR_WHLPCR, NULL);
298
299 do {
300 nframes = 0;
301
302 /* tx */
303 for (i = 0; i <= MT_TXQ_PSD; i++) {
304 ret = mt7663s_tx_run_queue(mdev, mdev->phy.q_tx[i]);
305 if (ret > 0)
306 nframes += ret;
307 }
308 ret = mt7663s_tx_run_queue(mdev, mdev->q_mcu[MT_MCUQ_WM]);
309 if (ret > 0)
310 nframes += ret;
311
312 /* rx */
313 ret = mt7663s_rx_handler(mdev);
314 if (ret > 0)
315 nframes += ret;
316 } while (nframes > 0);
317
318 /* enable interrupt */
319 sdio_writel(sdio->func, WHLPCR_INT_EN_SET, MCR_WHLPCR, NULL);
320 sdio_release_host(sdio->func);
321
> 322 mt76_connac_pm_unref(&dev->mphy, &dev->pm);
323 }
324
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[intel-linux-intel-lts:5.4/yocto 39/1142] drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:703:9: warning: variable 'total_len' set but not used
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: eeb611e5394c56d45c5cc8f7dc484c9f19e93143
commit: 2baf6e1cd6f179dd497cfc10294920e99bc3a66e [39/1142] dmaengine: dw-axi-dma: support slave dma mode
config: x86_64-randconfig-a004-20210618 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/intel/linux-intel-lts/commit/2baf6e1cd6f179dd497cfc102...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout 2baf6e1cd6f179dd497cfc10294920e99bc3a66e
# 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 >>):
>> drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:703:9: warning: variable 'total_len' set but not used [-Wunused-but-set-variable]
size_t total_len = 0;
^
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:112:13: warning: unused function 'axi_free_hw_channel' [-Wunused-function]
static void axi_free_hw_channel(struct axi_dma_chip *chip, u32 hs_id)
^
2 warnings generated.
vim +/total_len +703 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
684
685 static struct dma_async_tx_descriptor *
686 dma_chan_prep_slave_sg(struct dma_chan *dchan, struct scatterlist *sgl,
687 unsigned int sg_len,
688 enum dma_transfer_direction direction,
689 unsigned long flags, void *context)
690 {
691 struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
692 unsigned int data_width = BIT(chan->chip->dw->hdata->m_data_width);
693 struct axi_dma_desc *first = NULL, *prev = NULL;
694 size_t block_ts, max_block_ts;
695 struct scatterlist *sg;
696 u32 reg_width;
697 u32 mem_width;
698 dma_addr_t reg;
699 u32 reg_value;
700 u32 i;
701 u32 ctllo, ctlhi;
702 u32 offset;
> 703 size_t total_len = 0;
704 u8 lms = 0; /* Select AXI0 master for LLI fetching */
705
706 if (unlikely(!is_slave_direction(direction) || !sg_len))
707 return NULL;
708
709 chan->direction = direction;
710
711 max_block_ts = chan->chip->dw->hdata->block_size[chan->id];
712
713 axi_set_hw_channel(chan->chip, chan->hw_hs_num);
714
715 switch (direction) {
716 case DMA_MEM_TO_DEV:
717 reg_width = __ffs(chan->slave_config.dst_addr_width);
718 chan->reg_width = reg_width;
719
720 if (reg_width == DWAXIDMAC_TRANS_WIDTH_16) {
721 offset = DMAC_APB_HALFWORD_WR_CH_EN;
722 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
723 reg_value |= 0x1 << chan->id;
724 axi_dma_apb_iowrite32(chan->chip, offset, reg_value);
725 } else if (reg_width == DWAXIDMAC_TRANS_WIDTH_8) {
726 offset = DMAC_APB_BYTE_WR_CH_EN;
727 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
728 reg_value |= 0x1 << chan->id;
729 axi_dma_apb_iowrite32(chan->chip, offset, reg_value);
730 }
731
732 reg = chan->slave_config.dst_addr;
733
734 ctllo = axi_dma_prepare_ctllo(chan) |
735 reg_width << CH_CTL_L_DST_WIDTH_POS |
736 DWAXIDMAC_CH_CTL_L_NOINC << CH_CTL_L_DST_INC_POS |
737 DWAXIDMAC_CH_CTL_L_INC << CH_CTL_L_SRC_INC_POS;
738
739 for_each_sg(sgl, sg, sg_len, i) {
740 struct axi_dma_desc *desc;
741 size_t xfer_len;
742 u32 mem, len;
743
744 mem = sg_dma_address(sg);
745 len = sg_dma_len(sg);
746
747 mem_width = __ffs(data_width | mem | len);
748 if (mem_width > DWAXIDMAC_TRANS_WIDTH_32)
749 mem_width = DWAXIDMAC_TRANS_WIDTH_32;
750
751 xfer_len = len;
752 block_ts = xfer_len >> mem_width;
753
754 slave_sg_todev_fill_desc:
755 desc = axi_desc_get(chan);
756 if (unlikely(!desc))
757 goto err_desc_get;
758 if (block_ts > max_block_ts) {
759 block_ts = max_block_ts;
760 xfer_len = max_block_ts << mem_width;
761 }
762 block_ts = xfer_len; /* Workaround */
763 ctlhi = axi_dma_prepare_ctlhi(chan);
764
765 ctllo |= mem_width << CH_CTL_L_SRC_WIDTH_POS;
766
767 write_desc_sar(desc, mem);
768 write_desc_dar(desc, reg);
769 desc->lli.block_ts_lo = cpu_to_le32(block_ts - 1);
770 desc->lli.ctl_hi = cpu_to_le32(ctlhi);
771 desc->lli.ctl_lo = cpu_to_le32(ctllo);
772
773 set_desc_src_master(desc);
774
775 /* Manage transfer list (xfer_list) */
776 if (!first) {
777 first = desc;
778 } else {
779 write_desc_llp(prev, desc->vd.tx.phys | lms);
780 list_add_tail(&desc->xfer_list,
781 &first->xfer_list);
782 }
783 prev = desc;
784
785 /* update the length and addresses */
786 mem += xfer_len;
787 len -= xfer_len;
788 total_len += xfer_len;
789
790 if (len)
791 goto slave_sg_todev_fill_desc;
792
793 /* Set end-of-link to the last link descriptor */
794 set_desc_last(desc);
795 }
796 break;
797 case DMA_DEV_TO_MEM:
798 reg_width = __ffs(chan->slave_config.src_addr_width);
799 chan->reg_width = reg_width;
800 reg = chan->slave_config.src_addr;
801 ctllo = axi_dma_prepare_ctllo_rx(chan) |
802 reg_width << CH_CTL_L_SRC_WIDTH_POS |
803 DWAXIDMAC_CH_CTL_L_INC << CH_CTL_L_DST_INC_POS |
804 DWAXIDMAC_CH_CTL_L_NOINC << CH_CTL_L_SRC_INC_POS;
805
806 for_each_sg(sgl, sg, sg_len, i) {
807 struct axi_dma_desc *desc;
808 size_t xfer_len;
809 u32 mem, len;
810
811 mem = sg_dma_address(sg);
812 len = sg_dma_len(sg);
813
814 slave_sg_fromdev_fill_desc:
815 desc = axi_desc_get(chan);
816 if (unlikely(!desc))
817 goto err_desc_get;
818
819 xfer_len = len;
820 block_ts = xfer_len >> reg_width;
821 if (block_ts > max_block_ts) {
822 block_ts = max_block_ts;
823 xfer_len = max_block_ts << reg_width;
824 }
825
826 mem_width = __ffs(data_width | mem | xfer_len);
827 if (mem_width > DWAXIDMAC_TRANS_WIDTH_32)
828 mem_width = DWAXIDMAC_TRANS_WIDTH_32;
829 ctlhi = axi_dma_prepare_ctlhi_rx(chan);
830 ctllo |= mem_width << CH_CTL_L_DST_WIDTH_POS;
831
832 ctllo |= mem_width << CH_CTL_L_DST_WIDTH_POS;
833
834 write_desc_sar(desc, reg);
835 write_desc_dar(desc, mem);
836 desc->lli.block_ts_lo = cpu_to_le32(block_ts - 1);
837 desc->lli.ctl_hi = cpu_to_le32(ctlhi);
838 desc->lli.ctl_lo = cpu_to_le32(ctllo);
839
840 set_desc_src_master(desc);
841
842 /* Manage transfer list (xfer_list) */
843 if (!first) {
844 first = desc;
845 } else {
846 write_desc_llp(prev, desc->vd.tx.phys | lms);
847 list_add_tail(&desc->xfer_list,
848 &first->xfer_list);
849 }
850 prev = desc;
851
852 /* update the length and addresses */
853 mem += xfer_len;
854 len -= xfer_len;
855 total_len += xfer_len;
856
857 if (len)
858 goto slave_sg_fromdev_fill_desc;
859
860 /* Set end-of-link to the last link descriptor */
861 set_desc_last(desc);
862 }
863 break;
864 default:
865 return NULL;
866 }
867
868 if (unlikely(!first))
869 return NULL;
870
871 return vchan_tx_prep(&chan->vc, &first->vd, flags);
872
873 err_desc_get:
874 if (first)
875 axi_desc_put(first);
876
877 return NULL;
878 }
879
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months