[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202302041520.m9CY8p6U-lkp@intel.com>
Date: Sat, 4 Feb 2023 15:23:49 +0800
From: kernel test robot <lkp@...el.com>
To: "Iuliana Prodan (OSS)" <iuliana.prodan@....nxp.com>,
Bjorn Andersson <andersson@...nel.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
"S.J. Wang" <shengjiu.wang@....com>,
Fabio Estevam <festevam@...il.com>,
Daniel Baluta <daniel.baluta@....com>,
Paul Olaru <paul.olaru@....com>,
Laurentiu Mihalcea <laurentiu.mihalcea@....com>,
Iuliana Prodan <iuliana.prodan@....com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-imx <linux-imx@....com>,
linux-remoteproc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Pengutronix Kernel Team <kernel@...gutronix.de>
Subject: Re: [PATCH v2] remoteproc: imx_dsp_rproc: add custom memory copy
implementation for i.MX DSP Cores
Hi Iuliana,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on remoteproc/rproc-next]
[also build test WARNING on linus/master v6.2-rc6]
[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/Iuliana-Prodan-OSS/remoteproc-imx_dsp_rproc-add-custom-memory-copy-implementation-for-i-MX-DSP-Cores/20230201-011011
base: git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git rproc-next
patch link: https://lore.kernel.org/r/20230131170436.31280-1-iuliana.prodan%40oss.nxp.com
patch subject: [PATCH v2] remoteproc: imx_dsp_rproc: add custom memory copy implementation for i.MX DSP Cores
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20230204/202302041520.m9CY8p6U-lkp@intel.com/config)
compiler: arm-linux-gnueabi-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/65bca8739891378a92cf6a5774e2ad72630a4276
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Iuliana-Prodan-OSS/remoteproc-imx_dsp_rproc-add-custom-memory-copy-implementation-for-i-MX-DSP-Cores/20230201-011011
git checkout 65bca8739891378a92cf6a5774e2ad72630a4276
# 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=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/remoteproc/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/kernel.h:15,
from include/linux/clk.h:13,
from drivers/remoteproc/imx_dsp_rproc.c:6:
drivers/remoteproc/imx_dsp_rproc.c: In function 'imx_dsp_rproc_memcpy':
>> drivers/remoteproc/imx_dsp_rproc.c:732:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
732 | if (!IS_ALIGNED((u64)dest, 4))
| ^
include/linux/align.h:13:44: note: in definition of macro 'IS_ALIGNED'
13 | #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
| ^
>> drivers/remoteproc/imx_dsp_rproc.c:732:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
732 | if (!IS_ALIGNED((u64)dest, 4))
| ^
include/linux/align.h:13:58: note: in definition of macro 'IS_ALIGNED'
13 | #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
| ^
drivers/remoteproc/imx_dsp_rproc.c: In function 'imx_dsp_rproc_memset':
drivers/remoteproc/imx_dsp_rproc.c:776:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
776 | if (!IS_ALIGNED((u64)addr, 4))
| ^
include/linux/align.h:13:44: note: in definition of macro 'IS_ALIGNED'
13 | #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
| ^
drivers/remoteproc/imx_dsp_rproc.c:776:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
776 | if (!IS_ALIGNED((u64)addr, 4))
| ^
include/linux/align.h:13:58: note: in definition of macro 'IS_ALIGNED'
13 | #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
| ^
vim +732 drivers/remoteproc/imx_dsp_rproc.c
717
718 /*
719 * Custom memory copy implementation for i.MX DSP Cores
720 *
721 * The IRAM is part of the HiFi DSP.
722 * According to hw specs only 32-bits writes are allowed.
723 */
724 static int imx_dsp_rproc_memcpy(void *dest, const void *src, size_t size)
725 {
726 const u8 *src_byte = src;
727 u32 affected_mask;
728 u32 tmp;
729 int i, q, r;
730
731 /* destination must be 32bit aligned */
> 732 if (!IS_ALIGNED((u64)dest, 4))
733 return -EINVAL;
734
735 q = size / 4;
736 r = size % 4;
737
738 /* __iowrite32_copy use 32bit size values so divide by 4 */
739 __iowrite32_copy(dest, src, q);
740
741 if (r) {
742 affected_mask = (1 << (8 * r)) - 1;
743
744 /* first read the 32bit data of dest, then change affected
745 * bytes, and write back to dest.
746 * For unaffected bytes, it should not be changed
747 */
748 tmp = ioread32(dest + q * 4);
749 tmp &= ~affected_mask;
750
751 /* avoid reading after end of source */
752 for (i = 0; i < r; i++)
753 tmp |= (src_byte[q * 4 + i] << (8 * i));
754
755 iowrite32(tmp, dest + q * 4);
756 }
757
758 return 0;
759 }
760
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
Powered by blists - more mailing lists