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 82BC9C05027 for ; Fri, 10 Feb 2023 00:17:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229953AbjBJARS (ORCPT ); Thu, 9 Feb 2023 19:17:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229606AbjBJARQ (ORCPT ); Thu, 9 Feb 2023 19:17:16 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8EB843927 for ; Thu, 9 Feb 2023 16:17:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675988234; x=1707524234; h=date:from:to:cc:subject:message-id:mime-version; bh=MBV1CCcvByHKYWDJ6Pn77FleOe6JE3tmZtdekYxNjbE=; b=gboyEV1SElHZqP7bkLzYMIYaXJzIV8bZ+v1iyQRbu40Rk0IW24ExXowe 3HKfLFiYL7DnnA5Etwukzj3kzEo+TC+rabh/tXdifvn6/hzOu+43Isedb +aOZBZl3cxzPjpNYB9K5MqK6tw6//0a4k03F2nR7bjE8UZfU/aldMKhGb AIVSDLbVkRu9pSa9wb3awiLmR8hnY54gJH/Oe/PmziFWON61I+agJDTW1 73ZNSLvyyKXSL3cSEMznAfEC3zOCnjOZIEE40OC4SfN0jaWeu6rHGiSzu 6DQmfVV/kekoH4WEkSoyOAd9fgWDCGABObx4njISUJ1nBUsbwlHPhRTkM Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10616"; a="318305273" X-IronPort-AV: E=Sophos;i="5.97,285,1669104000"; d="scan'208";a="318305273" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2023 16:17:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10616"; a="791789122" X-IronPort-AV: E=Sophos;i="5.97,285,1669104000"; d="scan'208";a="791789122" Received: from lkp-server01.sh.intel.com (HELO 4455601a8d94) ([10.239.97.150]) by orsmga004.jf.intel.com with ESMTP; 09 Feb 2023 16:17:12 -0800 Received: from kbuild by 4455601a8d94 with local (Exim 4.96) (envelope-from ) id 1pQH6G-0005Oa-0C; Fri, 10 Feb 2023 00:17:12 +0000 Date: Fri, 10 Feb 2023 08:16:29 +0800 From: kernel test robot To: Suman Anna Cc: oe-kbuild-all@lists.linux.dev, 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: <202302100833.iRTqJ94Y-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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: e544a07438522ab3688416e6e2e34bf0ee6d8755 commit: 1168af40b1ad8cb2e78f4a70869fa4a076320e4f remoteproc: k3-r5: Add support for IPC-only mode for all R5Fs date: 11 months ago config: arm64-randconfig-s043-20230208 (https://download.01.org/0day-ci/archive/20230210/202302100833.iRTqJ94Y-lkp@intel.com/config) compiler: aarch64-linux-gcc (GCC) 12.1.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-39-gce1a6720-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 mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/infiniband/hw/hns/ drivers/remoteproc/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Link: https://lore.kernel.org/oe-kbuild-all/202302100833.iRTqJ94Y-lkp@intel.com/ 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 * @@ got void [noderef] __iomem *cpu_addr @@ drivers/remoteproc/ti_k3_r5_remoteproc.c:476:28: sparse: expected void * 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 * @@ got void [noderef] __iomem *cpu_addr @@ drivers/remoteproc/ti_k3_r5_remoteproc.c:479:28: sparse: expected void * 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://github.com/intel/lkp-tests