lkml.org 
[lkml]   [2019]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/3] dmaengine: imx-sdma: fix buffer ownership
Hi Philipp,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3 next-20190918]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Philipp-Puschmann/dmaengine-imx-sdma-fix-buffer-ownership/20190919-182516
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0
reproduce:
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
GCC_VERSION=7.4.0 make.cross ARCH=arm
:::::: branch date: 4 hours ago
:::::: commit date: 4 hours ago

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

drivers/dma/imx-sdma.c: In function 'sdma_update_channel_loop':
>> drivers/dma/imx-sdma.c:819:3: error: implicit declaration of function 'dma_wb'; did you mean 'dma_wmb'? [-Werror=implicit-function-declaration]
dma_wb();
^~~~~~
dma_wmb
cc1: some warnings being treated as errors

# https://github.com/0day-ci/linux/commit/750aab0984840c5966a75794c457c1e79e88d34e
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 750aab0984840c5966a75794c457c1e79e88d34e
vim +819 drivers/dma/imx-sdma.c

57b772b86871e0 Robin Gong 2018-06-20 774
d1a792f3b4072b Russell King - ARM Linux 2014-06-25 775 static void sdma_update_channel_loop(struct sdma_channel *sdmac)
d1a792f3b4072b Russell King - ARM Linux 2014-06-25 776 {
1ec1e82f2510e2 Sascha Hauer 2010-09-30 777 struct sdma_buffer_descriptor *bd;
5881826ded79cf Nandor Han 2016-08-08 778 int error = 0;
5881826ded79cf Nandor Han 2016-08-08 779 enum dma_status old_status = sdmac->status;
1ec1e82f2510e2 Sascha Hauer 2010-09-30 780
1ec1e82f2510e2 Sascha Hauer 2010-09-30 781 /*
1ec1e82f2510e2 Sascha Hauer 2010-09-30 782 * loop mode. Iterate over descriptors, re-setup them and
1ec1e82f2510e2 Sascha Hauer 2010-09-30 783 * call callback function.
1ec1e82f2510e2 Sascha Hauer 2010-09-30 784 */
57b772b86871e0 Robin Gong 2018-06-20 785 while (sdmac->desc) {
76c33d27073e29 Sascha Hauer 2018-06-20 786 struct sdma_desc *desc = sdmac->desc;
76c33d27073e29 Sascha Hauer 2018-06-20 787
76c33d27073e29 Sascha Hauer 2018-06-20 788 bd = &desc->bd[desc->buf_tail];
1ec1e82f2510e2 Sascha Hauer 2010-09-30 789
1ec1e82f2510e2 Sascha Hauer 2010-09-30 790 if (bd->mode.status & BD_DONE)
1ec1e82f2510e2 Sascha Hauer 2010-09-30 791 break;
1ec1e82f2510e2 Sascha Hauer 2010-09-30 792
5881826ded79cf Nandor Han 2016-08-08 793 if (bd->mode.status & BD_RROR) {
5881826ded79cf Nandor Han 2016-08-08 794 bd->mode.status &= ~BD_RROR;
1ec1e82f2510e2 Sascha Hauer 2010-09-30 795 sdmac->status = DMA_ERROR;
5881826ded79cf Nandor Han 2016-08-08 796 error = -EIO;
5881826ded79cf Nandor Han 2016-08-08 797 }
1ec1e82f2510e2 Sascha Hauer 2010-09-30 798
5881826ded79cf Nandor Han 2016-08-08 799 /*
5881826ded79cf Nandor Han 2016-08-08 800 * We use bd->mode.count to calculate the residue, since contains
5881826ded79cf Nandor Han 2016-08-08 801 * the number of bytes present in the current buffer descriptor.
5881826ded79cf Nandor Han 2016-08-08 802 */
5881826ded79cf Nandor Han 2016-08-08 803
76c33d27073e29 Sascha Hauer 2018-06-20 804 desc->chn_real_count = bd->mode.count;
76c33d27073e29 Sascha Hauer 2018-06-20 805 bd->mode.count = desc->period_len;
76c33d27073e29 Sascha Hauer 2018-06-20 806 desc->buf_ptail = desc->buf_tail;
76c33d27073e29 Sascha Hauer 2018-06-20 807 desc->buf_tail = (desc->buf_tail + 1) % desc->num_bd;
15f30f51311152 Nandor Han 2016-08-08 808
15f30f51311152 Nandor Han 2016-08-08 809 /*
15f30f51311152 Nandor Han 2016-08-08 810 * The callback is called from the interrupt context in order
15f30f51311152 Nandor Han 2016-08-08 811 * to reduce latency and to avoid the risk of altering the
15f30f51311152 Nandor Han 2016-08-08 812 * SDMA transaction status by the time the client tasklet is
15f30f51311152 Nandor Han 2016-08-08 813 * executed.
15f30f51311152 Nandor Han 2016-08-08 814 */
57b772b86871e0 Robin Gong 2018-06-20 815 spin_unlock(&sdmac->vc.lock);
57b772b86871e0 Robin Gong 2018-06-20 816 dmaengine_desc_get_callback_invoke(&desc->vd.tx, NULL);
57b772b86871e0 Robin Gong 2018-06-20 817 spin_lock(&sdmac->vc.lock);
15f30f51311152 Nandor Han 2016-08-08 818
750aab0984840c Philipp Puschmann 2019-09-19 @819 dma_wb();
750aab0984840c Philipp Puschmann 2019-09-19 820 bd->mode.status |= BD_DONE;
750aab0984840c Philipp Puschmann 2019-09-19 821
5881826ded79cf Nandor Han 2016-08-08 822 if (error)
5881826ded79cf Nandor Han 2016-08-08 823 sdmac->status = old_status;
1ec1e82f2510e2 Sascha Hauer 2010-09-30 824 }
1ec1e82f2510e2 Sascha Hauer 2010-09-30 825 }
1ec1e82f2510e2 Sascha Hauer 2010-09-30 826

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2019-09-21 17:11    [W:0.191 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site