Hi Akhil,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on vkoul-dmaengine/next]
[also build test WARNING on robh/for-next arm64/for-next/core v5.16 next-20220110]
[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/Akhil-R/Add-NVIDIA-Tegra-GPC-DMA...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
config: parisc-allyesconfig
(
https://download.01.org/0day-ci/archive/20220111/202201110405.jnZaAyE4-lk...)
compiler: hppa-linux-gcc (GCC) 11.2.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/0day-ci/linux/commit/c8498ed60baaec5b689dbe5d3882342c8...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Akhil-R/Add-NVIDIA-Tegra-GPC-DMA-driver/20220111-000734
git checkout c8498ed60baaec5b689dbe5d3882342c88981eb3
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir
ARCH=parisc SHELL=/bin/bash drivers/dma/
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 <command-line>:
drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_prep_dma_memset':
> drivers/dma/tegra186-gpc-dma.c:861:74: warning: right shift count
>= width of type [-Wshift-count-overflow]
861 |
FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >> 32));
| ^~
include/linux/compiler_types.h:315:23: note: in definition of macro
'__compiletime_assert'
315 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:335:9: note: in expansion of macro
'_compiletime_assert'
335 | _compiletime_assert(condition, msg, __compiletime_assert_,
__COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro
'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:49:17: note: in expansion of macro 'BUILD_BUG_ON_MSG'
49 | BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \
| ^~~~~~~~~~~~~~~~
include/linux/bitfield.h:94:17: note: in expansion of macro '__BF_FIELD_CHECK'
94 | __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");
\
| ^~~~~~~~~~~~~~~~
drivers/dma/tegra186-gpc-dma.c:861:25: note: in expansion of macro
'FIELD_PREP'
861 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest
>> 32));
| ^~~~~~~~~~
In file included from drivers/dma/tegra186-gpc-dma.c:8:
> drivers/dma/tegra186-gpc-dma.c:861:74: warning: right shift count
>= width of type [-Wshift-count-overflow]
861 |
FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >> 32));
| ^~
include/linux/bitfield.h:95:34: note: in definition of macro 'FIELD_PREP'
95 | ((typeof(_mask))(_val) << __bf_shf(_mask)) & (_mask);
\
| ^~~~
In file included from <command-line>:
drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_prep_dma_memcpy':
drivers/dma/tegra186-gpc-dma.c:929:65: warning: right shift count >= width of type
[-Wshift-count-overflow]
929 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (src >> 32));
| ^~
include/linux/compiler_types.h:315:23: note: in definition of macro
'__compiletime_assert'
315 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:335:9: note: in expansion of macro
'_compiletime_assert'
335 | _compiletime_assert(condition, msg, __compiletime_assert_,
__COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro
'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:49:17: note: in expansion of macro 'BUILD_BUG_ON_MSG'
49 | BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \
| ^~~~~~~~~~~~~~~~
include/linux/bitfield.h:94:17: note: in expansion of macro '__BF_FIELD_CHECK'
94 | __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");
\
| ^~~~~~~~~~~~~~~~
drivers/dma/tegra186-gpc-dma.c:929:17: note: in expansion of macro
'FIELD_PREP'
929 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (src >> 32));
| ^~~~~~~~~~
In file included from drivers/dma/tegra186-gpc-dma.c:8:
drivers/dma/tegra186-gpc-dma.c:929:65: warning: right shift count >= width of type
[-Wshift-count-overflow]
929 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (src >> 32));
| ^~
include/linux/bitfield.h:95:34: note: in definition of macro 'FIELD_PREP'
95 | ((typeof(_mask))(_val) << __bf_shf(_mask)) & (_mask);
\
| ^~~~
In file included from <command-line>:
drivers/dma/tegra186-gpc-dma.c:931:66: warning: right shift count >= width of type
[-Wshift-count-overflow]
931 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >>
32));
| ^~
include/linux/compiler_types.h:315:23: note: in definition of macro
'__compiletime_assert'
315 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:335:9: note: in expansion of macro
'_compiletime_assert'
335 | _compiletime_assert(condition, msg, __compiletime_assert_,
__COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro
'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:49:17: note: in expansion of macro 'BUILD_BUG_ON_MSG'
49 | BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \
| ^~~~~~~~~~~~~~~~
include/linux/bitfield.h:94:17: note: in expansion of macro '__BF_FIELD_CHECK'
94 | __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");
\
| ^~~~~~~~~~~~~~~~
drivers/dma/tegra186-gpc-dma.c:931:17: note: in expansion of macro
'FIELD_PREP'
931 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >>
32));
| ^~~~~~~~~~
In file included from drivers/dma/tegra186-gpc-dma.c:8:
drivers/dma/tegra186-gpc-dma.c:931:66: warning: right shift count >= width of type
[-Wshift-count-overflow]
931 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >>
32));
| ^~
include/linux/bitfield.h:95:34: note: in definition of macro 'FIELD_PREP'
95 | ((typeof(_mask))(_val) << __bf_shf(_mask)) & (_mask);
\
| ^~~~
In file included from <command-line>:
drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_prep_slave_sg':
drivers/dma/tegra186-gpc-dma.c:1040:81: warning: right shift count >= width of type
[-Wshift-count-overflow]
1040 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (mem
>> 32));
|
^~
include/linux/compiler_types.h:315:23: note: in definition of macro
'__compiletime_assert'
315 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:335:9: note: in expansion of macro
'_compiletime_assert'
335 | _compiletime_assert(condition, msg, __compiletime_assert_,
__COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro
'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:49:17: note: in expansion of macro 'BUILD_BUG_ON_MSG'
49 | BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \
| ^~~~~~~~~~~~~~~~
include/linux/bitfield.h:94:17: note: in expansion of macro '__BF_FIELD_CHECK'
94 | __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");
\
| ^~~~~~~~~~~~~~~~
drivers/dma/tegra186-gpc-dma.c:1040:33: note: in expansion of macro
'FIELD_PREP'
1040 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (mem
>> 32));
| ^~~~~~~~~~
In file included from drivers/dma/tegra186-gpc-dma.c:8:
drivers/dma/tegra186-gpc-dma.c:1040:81: warning: right shift count >= width of type
[-Wshift-count-overflow]
1040 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (mem
>> 32));
|
^~
include/linux/bitfield.h:95:34: note: in definition of macro 'FIELD_PREP'
95 | ((typeof(_mask))(_val) << __bf_shf(_mask)) & (_mask);
\
| ^~~~
In file included from <command-line>:
drivers/dma/tegra186-gpc-dma.c:1045:81: warning: right shift count >= width of type
[-Wshift-count-overflow]
1045 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (mem
>> 32));
|
^~
include/linux/compiler_types.h:315:23: note: in definition of macro
'__compiletime_assert'
315 | if (!(condition)) \
vim +861 drivers/dma/tegra186-gpc-dma.c
806
807 static struct dma_async_tx_descriptor *
808 tegra_dma_prep_dma_memset(struct dma_chan *dc, dma_addr_t dest, int value,
809 size_t len, unsigned long flags)
810 {
811 struct tegra_dma_channel *tdc = to_tegra_dma_chan(dc);
812 unsigned int max_dma_count = tdc->tdma->chip_data->max_dma_count;
813 struct tegra_dma_sg_req *sg_req;
814 struct tegra_dma_desc *dma_desc;
815 unsigned long csr, mc_seq;
816
817 if ((len & 3) || (dest & 3) || len > max_dma_count) {
818 dev_err(tdc2dev(tdc),
819 "DMA length/memory address is not supported\n");
820 return NULL;
821 }
822
823 /* Set dma mode to fixed pattern */
824 csr = TEGRA_GPCDMA_CSR_DMA_FIXED_PAT;
825 /* Enable once or continuous mode */
826 csr |= TEGRA_GPCDMA_CSR_ONCE;
827 /* Enable IRQ mask */
828 csr |= TEGRA_GPCDMA_CSR_IRQ_MASK;
829 /* Enable the dma interrupt */
830 if (flags & DMA_PREP_INTERRUPT)
831 csr |= TEGRA_GPCDMA_CSR_IE_EOC;
832 /* Configure default priority weight for the channel */
833 csr |= FIELD_PREP(TEGRA_GPCDMA_CSR_WEIGHT, 1);
834
835 mc_seq = tdc_read(tdc, TEGRA_GPCDMA_CHAN_MCSEQ);
836 /* retain stream-id and clean rest */
837 mc_seq &= TEGRA_GPCDMA_MCSEQ_STREAM_ID0_MASK;
838
839 /* Set the address wrapping */
840 mc_seq |= FIELD_PREP(TEGRA_GPCDMA_MCSEQ_WRAP0,
841 TEGRA_GPCDMA_MCSEQ_WRAP_NONE);
842 mc_seq |= FIELD_PREP(TEGRA_GPCDMA_MCSEQ_WRAP1,
843 TEGRA_GPCDMA_MCSEQ_WRAP_NONE);
844
845 /* Program outstanding MC requests */
846 mc_seq |= FIELD_PREP(TEGRA_GPCDMA_MCSEQ_REQ_COUNT, 1);
847 /* Set burst size */
848 mc_seq |= TEGRA_GPCDMA_MCSEQ_BURST_16;
849
850 dma_desc = kzalloc(struct_size(dma_desc, sg_req, 1), GFP_NOWAIT);
851 if (!dma_desc)
852 return NULL;
853
854 dma_desc->bytes_requested = len;
855 dma_desc->sg_count = 1;
856 sg_req = dma_desc->sg_req;
857
858 sg_req[0].ch_regs.src_ptr = 0;
859 sg_req[0].ch_regs.dst_ptr = dest;
860 sg_req[0].ch_regs.high_addr_ptr =
861 FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >>
32));
862 sg_req[0].ch_regs.fixed_pattern = value;
863 /* Word count reg takes value as (N +1) words */
864 sg_req[0].ch_regs.wcount = ((len - 4) >> 2);
865 sg_req[0].ch_regs.csr = csr;
866 sg_req[0].ch_regs.mmio_seq = 0;
867 sg_req[0].ch_regs.mc_seq = mc_seq;
868 sg_req[0].len = len;
869
870 dma_desc->cyclic = false;
871 return vchan_tx_prep(&tdc->vc, &dma_desc->vd, flags);
872 }
873
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org