lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202301062332.7NZrPV0J-lkp@intel.com>
Date:   Fri, 6 Jan 2023 23:23:04 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Peng Fan (OSS)" <peng.fan@....nxp.com>, andersson@...nel.org,
        mathieu.poirier@...aro.org, shawnguo@...nel.org,
        s.hauer@...gutronix.de, arnaud.pouliquen@...s.st.com
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        kernel@...gutronix.de, festevam@...il.com, linux-imx@....com,
        linux-remoteproc@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Peng Fan <peng.fan@....com>
Subject: Re: [PATCH 4/5] remoteproc: imx_rproc: set Cortex-M stack/pc to TCML

Hi Peng,

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-rc2 next-20230106]
[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/Peng-Fan-OSS/remoteproc-elf_loader-introduce-rproc_elf_find_shdr/20230106-114403
base:   git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git rproc-next
patch link:    https://lore.kernel.org/r/20230106034305.2868740-5-peng.fan%40oss.nxp.com
patch subject: [PATCH 4/5] remoteproc: imx_rproc: set Cortex-M stack/pc to TCML
config: arm64-randconfig-r022-20230106
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 8d9828ef5aa9688500657d36cd2aefbe12bbd162)
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 arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/intel-lab-lkp/linux/commit/40239477bcfaaea196729da9c6e4b68b862eeff7
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Peng-Fan-OSS/remoteproc-elf_loader-introduce-rproc_elf_find_shdr/20230106-114403
        git checkout 40239477bcfaaea196729da9c6e4b68b862eeff7
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 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 >>):

>> drivers/remoteproc/imx_rproc.c:647:6: warning: variable 'sh_addr' set but not used [-Wunused-but-set-variable]
           u64 sh_addr, offset;
               ^
   1 warning generated.


vim +/sh_addr +647 drivers/remoteproc/imx_rproc.c

   638	
   639	static u64 imx_rproc_get_boot_addr(struct rproc *rproc, const struct firmware *fw)
   640	{
   641		struct imx_rproc *priv = rproc->priv;
   642		const u8 *elf_data = (void *)fw->data;
   643		u8 class = fw_elf_get_class(fw);
   644		u64 bootaddr = rproc_elf_get_boot_addr(rproc, fw);
   645		const void *shdr;
   646		void *va;
 > 647		u64 sh_addr, offset;
   648	
   649		if (priv->dcfg->devtype == IMX_RPROC_IMX8M) {
   650			/*
   651			 * i.MX8M Cortex-M requires [stack, pc] be put in address
   652			 * [0, 4], so the da address is 0, size is 8 words.
   653			 */
   654			va = rproc_da_to_va(rproc, 0, 8, NULL);
   655			shdr = rproc_elf_find_shdr(rproc, fw, ".interrupts");
   656			if (!shdr || !va)
   657				return bootaddr;
   658			sh_addr = elf_shdr_get_sh_addr(class, shdr);
   659			offset = elf_shdr_get_sh_offset(class, shdr);
   660	
   661			/*
   662			 * Write stack, pc to TCML start address. The TCML region
   663			 * is marked with ATT_IOMEM, so use writel.
   664			 */
   665			writel(*(u32 *)(elf_data + offset), va);
   666			writel(*(u32 *)(elf_data + offset + 4), va + 4);
   667		}
   668	
   669		return bootaddr;
   670	}
   671	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

View attachment "config" of type "text/plain" (160430 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ