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 smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5DE41C43334 for ; Wed, 22 Jun 2022 07:24:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 00E1841CC6; Wed, 22 Jun 2022 07:24:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 00E1841CC6 Authentication-Results: smtp4.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=QgUftnS9 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n9yV9LHlLOQp; Wed, 22 Jun 2022 07:24:45 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 3D3F54091A; Wed, 22 Jun 2022 07:24:45 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3D3F54091A Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 18823C0032; Wed, 22 Jun 2022 07:24:45 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 05A71C002D for ; Wed, 22 Jun 2022 07:24:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id C64D96123D for ; Wed, 22 Jun 2022 07:24:43 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org C64D96123D Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=QgUftnS9 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uHvDo_C9PX6U for ; Wed, 22 Jun 2022 07:24:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 664D161236 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by smtp3.osuosl.org (Postfix) with ESMTPS id 664D161236 for ; Wed, 22 Jun 2022 07:24:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655882682; x=1687418682; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=NgoHLyZGRgMPgNFB7tpululSiyLjykD0PpFVx9n2Or0=; b=QgUftnS9QXVRkS1+5REL+XuB+6tf/aG0tEqGHYwE3oUx2Ww1OXB/Lqnv cUFtBsbpDWSB23LDKyjVfoPzf1m5jN3/BzIAV1xnTpv7aseUBoh7Jddn/ dsIW/DPwBPqIXnPHrRME4Lk2bwLPuUf/7lYDr08gPumPo5+6Iw6qmHyr9 CE00KFyw3fypDznoo8DpNhbw/hJ4Rlowy4MHJBoJUjKgoDY/3vWOkzdD7 jkqhExFhvfzgD+cnplDgdXbJXKPnZXh4FwBV+zDaDwaG9s58+NyUTp9XS yga4nTRa4z71EiMZoJKuJOED774gBzbjIR55gi+Rvf/3v1afKuUOm3Poh A==; X-IronPort-AV: E=McAfee;i="6400,9594,10385"; a="366663935" X-IronPort-AV: E=Sophos;i="5.92,211,1650956400"; d="scan'208";a="366663935" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 00:24:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,211,1650956400"; d="scan'208";a="562834083" Received: from lkp-server02.sh.intel.com (HELO a67cc04a5eeb) ([10.239.97.151]) by orsmga006.jf.intel.com with ESMTP; 22 Jun 2022 00:24:37 -0700 Received: from kbuild by a67cc04a5eeb with local (Exim 4.95) (envelope-from ) id 1o3uj7-0000zN-5j; Wed, 22 Jun 2022 07:24:37 +0000 Date: Wed, 22 Jun 2022 15:24:35 +0800 From: kernel test robot To: Mikko Perttunen , thierry.reding@gmail.com, jonathanh@nvidia.com, joro@8bytes.org, will@kernel.org, robin.murphy@arm.com, robh+dt@kernel.org, krzysztof.kozlowski@canonical.com Subject: Re: [PATCH v6 04/10] gpu: host1x: Add context device management code Message-ID: <202206221557.laES8yNQ-lkp@intel.com> References: <20220621151022.1416300-5-cyndis@kapsi.fi> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220621151022.1416300-5-cyndis@kapsi.fi> Cc: devicetree@vger.kernel.org, kbuild-all@lists.01.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Mikko Perttunen , iommu@lists.linux-foundation.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" Hi Mikko, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm/drm-next] [also build test ERROR on tegra/for-next linus/master v5.19-rc3] [cannot apply to tegra-drm/drm/tegra/for-next next-20220621] [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/intel-lab-lkp/linux/commits/Mikko-Perttunen/Host1x-context-isolation-support/20220621-231339 base: git://anongit.freedesktop.org/drm/drm drm-next config: arm64-randconfig-r021-20220622 (https://download.01.org/0day-ci/archive/20220622/202206221557.laES8yNQ-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 8b8d126598ce7bd5243da7f94f69fa1104288bee) 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/2501beeae7469b805f9f624049fd56643cf6e18e git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Mikko-Perttunen/Host1x-context-isolation-support/20220621-231339 git checkout 2501beeae7469b805f9f624049fd56643cf6e18e # 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 SHELL=/bin/bash drivers/gpu/host1x/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/gpu/host1x/context.c:80:28: error: no member named 'ids' in 'struct iommu_fwspec' ctx->stream_id = fwspec->ids[0] & 0xffff; ~~~~~~ ^ 1 error generated. vim +80 drivers/gpu/host1x/context.c 15 16 int host1x_memory_context_list_init(struct host1x *host1x) 17 { 18 struct host1x_memory_context_list *cdl = &host1x->context_list; 19 struct device_node *node = host1x->dev->of_node; 20 struct host1x_memory_context *ctx; 21 unsigned int i; 22 int err; 23 24 cdl->devs = NULL; 25 cdl->len = 0; 26 mutex_init(&cdl->lock); 27 28 err = of_property_count_u32_elems(node, "iommu-map"); 29 if (err < 0) 30 return 0; 31 32 cdl->devs = kcalloc(err, sizeof(*cdl->devs), GFP_KERNEL); 33 if (!cdl->devs) 34 return -ENOMEM; 35 cdl->len = err / 4; 36 37 for (i = 0; i < cdl->len; i++) { 38 struct iommu_fwspec *fwspec; 39 40 ctx = &cdl->devs[i]; 41 42 ctx->host = host1x; 43 44 device_initialize(&ctx->dev); 45 46 /* 47 * Due to an issue with T194 NVENC, only 38 bits can be used. 48 * Anyway, 256GiB of IOVA ought to be enough for anyone. 49 */ 50 ctx->dma_mask = DMA_BIT_MASK(38); 51 ctx->dev.dma_mask = &ctx->dma_mask; 52 ctx->dev.coherent_dma_mask = ctx->dma_mask; 53 dev_set_name(&ctx->dev, "host1x-ctx.%d", i); 54 ctx->dev.bus = &host1x_context_device_bus_type; 55 ctx->dev.parent = host1x->dev; 56 57 dma_set_max_seg_size(&ctx->dev, UINT_MAX); 58 59 err = device_add(&ctx->dev); 60 if (err) { 61 dev_err(host1x->dev, "could not add context device %d: %d\n", i, err); 62 goto del_devices; 63 } 64 65 err = of_dma_configure_id(&ctx->dev, node, true, &i); 66 if (err) { 67 dev_err(host1x->dev, "IOMMU configuration failed for context device %d: %d\n", 68 i, err); 69 device_del(&ctx->dev); 70 goto del_devices; 71 } 72 73 fwspec = dev_iommu_fwspec_get(&ctx->dev); 74 if (!fwspec) { 75 dev_err(host1x->dev, "Context device %d has no IOMMU!\n", i); 76 device_del(&ctx->dev); 77 goto del_devices; 78 } 79 > 80 ctx->stream_id = fwspec->ids[0] & 0xffff; 81 } 82 83 return 0; 84 85 del_devices: 86 while (i--) 87 device_del(&cdl->devs[i].dev); 88 89 kfree(cdl->devs); 90 cdl->len = 0; 91 92 return err; 93 } 94 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 17CDBCCA47A for ; Wed, 22 Jun 2022 07:24:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233938AbiFVHYn (ORCPT ); Wed, 22 Jun 2022 03:24:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232569AbiFVHYm (ORCPT ); Wed, 22 Jun 2022 03:24:42 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF42D22BF6; Wed, 22 Jun 2022 00:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655882681; x=1687418681; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=NgoHLyZGRgMPgNFB7tpululSiyLjykD0PpFVx9n2Or0=; b=hjvJ4wk1B0xZ2fNj3mZ3rnC200GGaPOmafmT7Sp663brWx5d5H4gT5xc WjdEgMTIDgawZ4CGYTF8xuLfGmip5DZEbXgYV2yDmwfnPa+nNdu2WQSz6 1u4LgN5tSWuLxvOOaTte1xV+JO8fAnkAI2Q2uBxGUAkzJe/5b+EGQ5Pgx SStxsKD/K1QSawdY3j/qstpTRbICh4x551gvVBClIM+ovgoFDxIERvtC1 UpyMI1p2xfGgFctvSf/lPBwJsR+l7Pbrtrpbj24wHhAxhs+Iy50SgqqDs U//XnNJRHkEDC5qOy0O7gMWu1MGY99/JQNqwQsxQ44KXzbGabr1QBRJ8p g==; X-IronPort-AV: E=McAfee;i="6400,9594,10385"; a="281071179" X-IronPort-AV: E=Sophos;i="5.92,211,1650956400"; d="scan'208";a="281071179" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 00:24:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,211,1650956400"; d="scan'208";a="562834083" Received: from lkp-server02.sh.intel.com (HELO a67cc04a5eeb) ([10.239.97.151]) by orsmga006.jf.intel.com with ESMTP; 22 Jun 2022 00:24:37 -0700 Received: from kbuild by a67cc04a5eeb with local (Exim 4.95) (envelope-from ) id 1o3uj7-0000zN-5j; Wed, 22 Jun 2022 07:24:37 +0000 Date: Wed, 22 Jun 2022 15:24:35 +0800 From: kernel test robot To: Mikko Perttunen , thierry.reding@gmail.com, jonathanh@nvidia.com, joro@8bytes.org, will@kernel.org, robin.murphy@arm.com, robh+dt@kernel.org, krzysztof.kozlowski@canonical.com Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Mikko Perttunen , iommu@lists.linux-foundation.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v6 04/10] gpu: host1x: Add context device management code Message-ID: <202206221557.laES8yNQ-lkp@intel.com> References: <20220621151022.1416300-5-cyndis@kapsi.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220621151022.1416300-5-cyndis@kapsi.fi> Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Hi Mikko, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm/drm-next] [also build test ERROR on tegra/for-next linus/master v5.19-rc3] [cannot apply to tegra-drm/drm/tegra/for-next next-20220621] [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/intel-lab-lkp/linux/commits/Mikko-Perttunen/Host1x-context-isolation-support/20220621-231339 base: git://anongit.freedesktop.org/drm/drm drm-next config: arm64-randconfig-r021-20220622 (https://download.01.org/0day-ci/archive/20220622/202206221557.laES8yNQ-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 8b8d126598ce7bd5243da7f94f69fa1104288bee) 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/2501beeae7469b805f9f624049fd56643cf6e18e git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Mikko-Perttunen/Host1x-context-isolation-support/20220621-231339 git checkout 2501beeae7469b805f9f624049fd56643cf6e18e # 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 SHELL=/bin/bash drivers/gpu/host1x/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/gpu/host1x/context.c:80:28: error: no member named 'ids' in 'struct iommu_fwspec' ctx->stream_id = fwspec->ids[0] & 0xffff; ~~~~~~ ^ 1 error generated. vim +80 drivers/gpu/host1x/context.c 15 16 int host1x_memory_context_list_init(struct host1x *host1x) 17 { 18 struct host1x_memory_context_list *cdl = &host1x->context_list; 19 struct device_node *node = host1x->dev->of_node; 20 struct host1x_memory_context *ctx; 21 unsigned int i; 22 int err; 23 24 cdl->devs = NULL; 25 cdl->len = 0; 26 mutex_init(&cdl->lock); 27 28 err = of_property_count_u32_elems(node, "iommu-map"); 29 if (err < 0) 30 return 0; 31 32 cdl->devs = kcalloc(err, sizeof(*cdl->devs), GFP_KERNEL); 33 if (!cdl->devs) 34 return -ENOMEM; 35 cdl->len = err / 4; 36 37 for (i = 0; i < cdl->len; i++) { 38 struct iommu_fwspec *fwspec; 39 40 ctx = &cdl->devs[i]; 41 42 ctx->host = host1x; 43 44 device_initialize(&ctx->dev); 45 46 /* 47 * Due to an issue with T194 NVENC, only 38 bits can be used. 48 * Anyway, 256GiB of IOVA ought to be enough for anyone. 49 */ 50 ctx->dma_mask = DMA_BIT_MASK(38); 51 ctx->dev.dma_mask = &ctx->dma_mask; 52 ctx->dev.coherent_dma_mask = ctx->dma_mask; 53 dev_set_name(&ctx->dev, "host1x-ctx.%d", i); 54 ctx->dev.bus = &host1x_context_device_bus_type; 55 ctx->dev.parent = host1x->dev; 56 57 dma_set_max_seg_size(&ctx->dev, UINT_MAX); 58 59 err = device_add(&ctx->dev); 60 if (err) { 61 dev_err(host1x->dev, "could not add context device %d: %d\n", i, err); 62 goto del_devices; 63 } 64 65 err = of_dma_configure_id(&ctx->dev, node, true, &i); 66 if (err) { 67 dev_err(host1x->dev, "IOMMU configuration failed for context device %d: %d\n", 68 i, err); 69 device_del(&ctx->dev); 70 goto del_devices; 71 } 72 73 fwspec = dev_iommu_fwspec_get(&ctx->dev); 74 if (!fwspec) { 75 dev_err(host1x->dev, "Context device %d has no IOMMU!\n", i); 76 device_del(&ctx->dev); 77 goto del_devices; 78 } 79 > 80 ctx->stream_id = fwspec->ids[0] & 0xffff; 81 } 82 83 return 0; 84 85 del_devices: 86 while (i--) 87 device_del(&cdl->devs[i].dev); 88 89 kfree(cdl->devs); 90 cdl->len = 0; 91 92 return err; 93 } 94 -- 0-DAY CI Kernel Test Service https://01.org/lkp 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DCA04C433EF for ; Wed, 22 Jun 2022 07:25:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WqP64eZwYXvcn1x+gX6NGpV3ydOTSY6L0Wyh4gehGxc=; b=UfjqB4AHb8eotd IVVcfMJ2D5U4uhqQXCaK9IH/Nfe3636/DveJR/PW3CNS7j3rAIXFCQ3UVUlNGBEmkTFDL4UgS4U3a 7AuLSiLWKo6K3iGsAXidXWWtukiG2rxL5T06zBUJ5D+iGhJycL698WOVdHvBawm5jHWjSrPeOFEzE oidUltReBPCu+6u9eheSF78fizp4f6DP5Fq8gqFtUTZrvDXImMAau/eCqzAnxeuSGUFUiRNtTdBtH BNaiFwFpWO8qmHxQlFEaggYKOeSqyclJnA+AxwuYh+MI8WfKF8TxGZL36vYwY0JVPzaX+nK0OALAX AbBWzBMgPw2UOhFh3Sbw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3ujH-0093Ql-4G; Wed, 22 Jun 2022 07:24:47 +0000 Received: from mga03.intel.com ([134.134.136.65]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3ujD-0093PT-C1 for linux-arm-kernel@lists.infradead.org; Wed, 22 Jun 2022 07:24:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655882683; x=1687418683; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=NgoHLyZGRgMPgNFB7tpululSiyLjykD0PpFVx9n2Or0=; b=LfHd06WPosCmiNdCWESriL+kbR1XoW1CB6qNiiEt5asMZJuS1euP6Ur6 vcfw5Axsl73gPQwrmmPQZd3RpA4Diy7OFOPtzxt8hcDyvrHYO33WRSO74 7zC+cR81DUbHgWnTbegxdezpz6TcnulPZ7cZhyiTbw43x08xbUDfftC9d TLkYDDQVMGiTAuwNYZD2PDQwMAcr0YbfKlbzPRuboguQGhlCoPeyjegGV IBh6zEUdZcXVMOZO5ux8nakTCw/Iz9aCJ0gitOsF0RbxxOqD53F2RcbcG NL3/11EO3JbKFhcWts+jhdPBpGS2vCvXz6L+y8h38fdQixRLjJsGgibBt w==; X-IronPort-AV: E=McAfee;i="6400,9594,10385"; a="281414206" X-IronPort-AV: E=Sophos;i="5.92,211,1650956400"; d="scan'208";a="281414206" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 00:24:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,211,1650956400"; d="scan'208";a="562834083" Received: from lkp-server02.sh.intel.com (HELO a67cc04a5eeb) ([10.239.97.151]) by orsmga006.jf.intel.com with ESMTP; 22 Jun 2022 00:24:37 -0700 Received: from kbuild by a67cc04a5eeb with local (Exim 4.95) (envelope-from ) id 1o3uj7-0000zN-5j; Wed, 22 Jun 2022 07:24:37 +0000 Date: Wed, 22 Jun 2022 15:24:35 +0800 From: kernel test robot To: Mikko Perttunen , thierry.reding@gmail.com, jonathanh@nvidia.com, joro@8bytes.org, will@kernel.org, robin.murphy@arm.com, robh+dt@kernel.org, krzysztof.kozlowski@canonical.com Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Mikko Perttunen , iommu@lists.linux-foundation.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v6 04/10] gpu: host1x: Add context device management code Message-ID: <202206221557.laES8yNQ-lkp@intel.com> References: <20220621151022.1416300-5-cyndis@kapsi.fi> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220621151022.1416300-5-cyndis@kapsi.fi> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220622_002443_529317_A9B43903 X-CRM114-Status: GOOD ( 14.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Mikko, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm/drm-next] [also build test ERROR on tegra/for-next linus/master v5.19-rc3] [cannot apply to tegra-drm/drm/tegra/for-next next-20220621] [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/intel-lab-lkp/linux/commits/Mikko-Perttunen/Host1x-context-isolation-support/20220621-231339 base: git://anongit.freedesktop.org/drm/drm drm-next config: arm64-randconfig-r021-20220622 (https://download.01.org/0day-ci/archive/20220622/202206221557.laES8yNQ-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 8b8d126598ce7bd5243da7f94f69fa1104288bee) 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/2501beeae7469b805f9f624049fd56643cf6e18e git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Mikko-Perttunen/Host1x-context-isolation-support/20220621-231339 git checkout 2501beeae7469b805f9f624049fd56643cf6e18e # 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 SHELL=/bin/bash drivers/gpu/host1x/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/gpu/host1x/context.c:80:28: error: no member named 'ids' in 'struct iommu_fwspec' ctx->stream_id = fwspec->ids[0] & 0xffff; ~~~~~~ ^ 1 error generated. vim +80 drivers/gpu/host1x/context.c 15 16 int host1x_memory_context_list_init(struct host1x *host1x) 17 { 18 struct host1x_memory_context_list *cdl = &host1x->context_list; 19 struct device_node *node = host1x->dev->of_node; 20 struct host1x_memory_context *ctx; 21 unsigned int i; 22 int err; 23 24 cdl->devs = NULL; 25 cdl->len = 0; 26 mutex_init(&cdl->lock); 27 28 err = of_property_count_u32_elems(node, "iommu-map"); 29 if (err < 0) 30 return 0; 31 32 cdl->devs = kcalloc(err, sizeof(*cdl->devs), GFP_KERNEL); 33 if (!cdl->devs) 34 return -ENOMEM; 35 cdl->len = err / 4; 36 37 for (i = 0; i < cdl->len; i++) { 38 struct iommu_fwspec *fwspec; 39 40 ctx = &cdl->devs[i]; 41 42 ctx->host = host1x; 43 44 device_initialize(&ctx->dev); 45 46 /* 47 * Due to an issue with T194 NVENC, only 38 bits can be used. 48 * Anyway, 256GiB of IOVA ought to be enough for anyone. 49 */ 50 ctx->dma_mask = DMA_BIT_MASK(38); 51 ctx->dev.dma_mask = &ctx->dma_mask; 52 ctx->dev.coherent_dma_mask = ctx->dma_mask; 53 dev_set_name(&ctx->dev, "host1x-ctx.%d", i); 54 ctx->dev.bus = &host1x_context_device_bus_type; 55 ctx->dev.parent = host1x->dev; 56 57 dma_set_max_seg_size(&ctx->dev, UINT_MAX); 58 59 err = device_add(&ctx->dev); 60 if (err) { 61 dev_err(host1x->dev, "could not add context device %d: %d\n", i, err); 62 goto del_devices; 63 } 64 65 err = of_dma_configure_id(&ctx->dev, node, true, &i); 66 if (err) { 67 dev_err(host1x->dev, "IOMMU configuration failed for context device %d: %d\n", 68 i, err); 69 device_del(&ctx->dev); 70 goto del_devices; 71 } 72 73 fwspec = dev_iommu_fwspec_get(&ctx->dev); 74 if (!fwspec) { 75 dev_err(host1x->dev, "Context device %d has no IOMMU!\n", i); 76 device_del(&ctx->dev); 77 goto del_devices; 78 } 79 > 80 ctx->stream_id = fwspec->ids[0] & 0xffff; 81 } 82 83 return 0; 84 85 del_devices: 86 while (i--) 87 device_del(&cdl->devs[i].dev); 88 89 kfree(cdl->devs); 90 cdl->len = 0; 91 92 return err; 93 } 94 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5EC66C43334 for ; Wed, 22 Jun 2022 07:24:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 833F11138BF; Wed, 22 Jun 2022 07:24:43 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5A92E113B5E for ; Wed, 22 Jun 2022 07:24:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655882682; x=1687418682; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=NgoHLyZGRgMPgNFB7tpululSiyLjykD0PpFVx9n2Or0=; b=QgUftnS9QXVRkS1+5REL+XuB+6tf/aG0tEqGHYwE3oUx2Ww1OXB/Lqnv cUFtBsbpDWSB23LDKyjVfoPzf1m5jN3/BzIAV1xnTpv7aseUBoh7Jddn/ dsIW/DPwBPqIXnPHrRME4Lk2bwLPuUf/7lYDr08gPumPo5+6Iw6qmHyr9 CE00KFyw3fypDznoo8DpNhbw/hJ4Rlowy4MHJBoJUjKgoDY/3vWOkzdD7 jkqhExFhvfzgD+cnplDgdXbJXKPnZXh4FwBV+zDaDwaG9s58+NyUTp9XS yga4nTRa4z71EiMZoJKuJOED774gBzbjIR55gi+Rvf/3v1afKuUOm3Poh A==; X-IronPort-AV: E=McAfee;i="6400,9594,10385"; a="279108869" X-IronPort-AV: E=Sophos;i="5.92,211,1650956400"; d="scan'208";a="279108869" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 00:24:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,211,1650956400"; d="scan'208";a="562834083" Received: from lkp-server02.sh.intel.com (HELO a67cc04a5eeb) ([10.239.97.151]) by orsmga006.jf.intel.com with ESMTP; 22 Jun 2022 00:24:37 -0700 Received: from kbuild by a67cc04a5eeb with local (Exim 4.95) (envelope-from ) id 1o3uj7-0000zN-5j; Wed, 22 Jun 2022 07:24:37 +0000 Date: Wed, 22 Jun 2022 15:24:35 +0800 From: kernel test robot To: Mikko Perttunen , thierry.reding@gmail.com, jonathanh@nvidia.com, joro@8bytes.org, will@kernel.org, robin.murphy@arm.com, robh+dt@kernel.org, krzysztof.kozlowski@canonical.com Subject: Re: [PATCH v6 04/10] gpu: host1x: Add context device management code Message-ID: <202206221557.laES8yNQ-lkp@intel.com> References: <20220621151022.1416300-5-cyndis@kapsi.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220621151022.1416300-5-cyndis@kapsi.fi> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, kbuild-all@lists.01.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Mikko Perttunen , iommu@lists.linux-foundation.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Mikko, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm/drm-next] [also build test ERROR on tegra/for-next linus/master v5.19-rc3] [cannot apply to tegra-drm/drm/tegra/for-next next-20220621] [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/intel-lab-lkp/linux/commits/Mikko-Perttunen/Host1x-context-isolation-support/20220621-231339 base: git://anongit.freedesktop.org/drm/drm drm-next config: arm64-randconfig-r021-20220622 (https://download.01.org/0day-ci/archive/20220622/202206221557.laES8yNQ-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 8b8d126598ce7bd5243da7f94f69fa1104288bee) 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/2501beeae7469b805f9f624049fd56643cf6e18e git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Mikko-Perttunen/Host1x-context-isolation-support/20220621-231339 git checkout 2501beeae7469b805f9f624049fd56643cf6e18e # 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 SHELL=/bin/bash drivers/gpu/host1x/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/gpu/host1x/context.c:80:28: error: no member named 'ids' in 'struct iommu_fwspec' ctx->stream_id = fwspec->ids[0] & 0xffff; ~~~~~~ ^ 1 error generated. vim +80 drivers/gpu/host1x/context.c 15 16 int host1x_memory_context_list_init(struct host1x *host1x) 17 { 18 struct host1x_memory_context_list *cdl = &host1x->context_list; 19 struct device_node *node = host1x->dev->of_node; 20 struct host1x_memory_context *ctx; 21 unsigned int i; 22 int err; 23 24 cdl->devs = NULL; 25 cdl->len = 0; 26 mutex_init(&cdl->lock); 27 28 err = of_property_count_u32_elems(node, "iommu-map"); 29 if (err < 0) 30 return 0; 31 32 cdl->devs = kcalloc(err, sizeof(*cdl->devs), GFP_KERNEL); 33 if (!cdl->devs) 34 return -ENOMEM; 35 cdl->len = err / 4; 36 37 for (i = 0; i < cdl->len; i++) { 38 struct iommu_fwspec *fwspec; 39 40 ctx = &cdl->devs[i]; 41 42 ctx->host = host1x; 43 44 device_initialize(&ctx->dev); 45 46 /* 47 * Due to an issue with T194 NVENC, only 38 bits can be used. 48 * Anyway, 256GiB of IOVA ought to be enough for anyone. 49 */ 50 ctx->dma_mask = DMA_BIT_MASK(38); 51 ctx->dev.dma_mask = &ctx->dma_mask; 52 ctx->dev.coherent_dma_mask = ctx->dma_mask; 53 dev_set_name(&ctx->dev, "host1x-ctx.%d", i); 54 ctx->dev.bus = &host1x_context_device_bus_type; 55 ctx->dev.parent = host1x->dev; 56 57 dma_set_max_seg_size(&ctx->dev, UINT_MAX); 58 59 err = device_add(&ctx->dev); 60 if (err) { 61 dev_err(host1x->dev, "could not add context device %d: %d\n", i, err); 62 goto del_devices; 63 } 64 65 err = of_dma_configure_id(&ctx->dev, node, true, &i); 66 if (err) { 67 dev_err(host1x->dev, "IOMMU configuration failed for context device %d: %d\n", 68 i, err); 69 device_del(&ctx->dev); 70 goto del_devices; 71 } 72 73 fwspec = dev_iommu_fwspec_get(&ctx->dev); 74 if (!fwspec) { 75 dev_err(host1x->dev, "Context device %d has no IOMMU!\n", i); 76 device_del(&ctx->dev); 77 goto del_devices; 78 } 79 > 80 ctx->stream_id = fwspec->ids[0] & 0xffff; 81 } 82 83 return 0; 84 85 del_devices: 86 while (i--) 87 device_del(&cdl->devs[i].dev); 88 89 kfree(cdl->devs); 90 cdl->len = 0; 91 92 return err; 93 } 94 -- 0-DAY CI Kernel Test Service https://01.org/lkp