From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CF70C433F5 for ; Thu, 7 Apr 2022 02:26:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238910AbiDGC2g (ORCPT ); Wed, 6 Apr 2022 22:28:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbiDGC2e (ORCPT ); Wed, 6 Apr 2022 22:28:34 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC3A316F071 for ; Wed, 6 Apr 2022 19:26:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649298396; x=1680834396; h=date:from:to:cc:subject:message-id:mime-version; bh=mBLo6LKSsvK+C8zzUEKV7j9FsdTRZDfKdf4HEOww9Io=; b=avclAgoJuawtvI18wDzdb30qczMzmN68UyWnY7hNGSQL+ZxFMkz41UfW T5zl7K+0SUtZ0nE58FN5e725y+S+9ln0yFrvspuI0jukWoDAlQLEc22or yUEnZ8vS2x977QvHyTHk8d8d9Xt9GKpxcJBVZYMgYM8Z4L4z6+WQQ0vQT hC41MhPYQfmCtAw0Z3vQaC9yml8qW2LuA2KfKOvBwhSChPHwyr+7Cxzsx 4zX6jdQPTBMgHNIQpAiD3gBpTbfVrJWcOocGMDnVK7TCdmkpQKt4igN2m 2p3qjVvXRYnUBpynk/2htz0MxvTPPaHHHWunmfmg+hwxocYpH4mkPHoMS Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10309"; a="286187749" X-IronPort-AV: E=Sophos;i="5.90,241,1643702400"; d="scan'208";a="286187749" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2022 19:26:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,241,1643702400"; d="scan'208";a="570841784" Received: from lkp-server02.sh.intel.com (HELO a44fdfb70b94) ([10.239.97.151]) by orsmga008.jf.intel.com with ESMTP; 06 Apr 2022 19:26:34 -0700 Received: from kbuild by a44fdfb70b94 with local (Exim 4.95) (envelope-from ) id 1ncHr0-0004zH-2Q; Thu, 07 Apr 2022 02:26:34 +0000 Date: Thu, 7 Apr 2022 10:26:29 +0800 From: kernel test robot To: Suman Anna Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Bjorn Andersson Subject: drivers/remoteproc/ti_k3_r5_remoteproc.c:711:17: sparse: sparse: cast removes address space '__iomem' of expression Message-ID: <202204071033.j2idta4V-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 3e732ebf7316ac83e8562db7e64cc68aec390a18 commit: 1168af40b1ad8cb2e78f4a70869fa4a076320e4f remoteproc: k3-r5: Add support for IPC-only mode for all R5Fs date: 4 weeks ago config: arm64-randconfig-s032-20220406 (https://download.01.org/0day-ci/archive/20220407/202204071033.j2idta4V-lkp@intel.com/config) compiler: aarch64-linux-gcc (GCC) 11.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1168af40b1ad8cb2e78f4a70869fa4a076320e4f git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 1168af40b1ad8cb2e78f4a70869fa4a076320e4f # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/remoteproc/ lib/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) drivers/remoteproc/ti_k3_r5_remoteproc.c:476:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *p @@ got void [noderef] __iomem *cpu_addr @@ drivers/remoteproc/ti_k3_r5_remoteproc.c:476:28: sparse: expected void *p drivers/remoteproc/ti_k3_r5_remoteproc.c:476:28: sparse: got void [noderef] __iomem *cpu_addr drivers/remoteproc/ti_k3_r5_remoteproc.c:479:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *p @@ got void [noderef] __iomem *cpu_addr @@ drivers/remoteproc/ti_k3_r5_remoteproc.c:479:28: sparse: expected void *p drivers/remoteproc/ti_k3_r5_remoteproc.c:479:28: sparse: got void [noderef] __iomem *cpu_addr >> drivers/remoteproc/ti_k3_r5_remoteproc.c:711:17: sparse: sparse: cast removes address space '__iomem' of expression vim +/__iomem +711 drivers/remoteproc/ti_k3_r5_remoteproc.c 681 682 /* 683 * This function implements the .get_loaded_rsc_table() callback and is used 684 * to provide the resource table for the booted R5F in IPC-only mode. The K3 R5F 685 * firmwares follow a design-by-contract approach and are expected to have the 686 * resource table at the base of the DDR region reserved for firmware usage. 687 * This provides flexibility for the remote processor to be booted by different 688 * bootloaders that may or may not have the ability to publish the resource table 689 * address and size through a DT property. This callback is invoked only in 690 * IPC-only mode. 691 */ 692 static struct resource_table *k3_r5_get_loaded_rsc_table(struct rproc *rproc, 693 size_t *rsc_table_sz) 694 { 695 struct k3_r5_rproc *kproc = rproc->priv; 696 struct device *dev = kproc->dev; 697 698 if (!kproc->rmem[0].cpu_addr) { 699 dev_err(dev, "memory-region #1 does not exist, loaded rsc table can't be found"); 700 return ERR_PTR(-ENOMEM); 701 } 702 703 /* 704 * NOTE: The resource table size is currently hard-coded to a maximum 705 * of 256 bytes. The most common resource table usage for K3 firmwares 706 * is to only have the vdev resource entry and an optional trace entry. 707 * The exact size could be computed based on resource table address, but 708 * the hard-coded value suffices to support the IPC-only mode. 709 */ 710 *rsc_table_sz = 256; > 711 return (struct resource_table *)kproc->rmem[0].cpu_addr; 712 } 713 -- 0-DAY CI Kernel Test Service https://01.org/lkp