Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6541773rwb; Mon, 14 Nov 2022 23:17:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf60gEQMndLoOBJcklcAZPbvtq9UzjteM4tZxNt0R4UGm+sXrxmorRHZFAQNKcv1Ra1EGKsU X-Received: by 2002:a63:5fce:0:b0:430:9008:4e0a with SMTP id t197-20020a635fce000000b0043090084e0amr15176175pgb.191.1668496669255; Mon, 14 Nov 2022 23:17:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668496669; cv=none; d=google.com; s=arc-20160816; b=m2Aqg88Lmsb3UZ44/Ff3xsIWxUw95KC7vGYwik36Yi9ZtM59XEq9Cvv0NvS0mOIpcC OL5RFFFHKzUIvGZQChYCM0cwmzlbC5i1pMZ4yguLs4dY4B6Qjox7MKKf0QdHiT3TUeGA I1Knu8lEuZuD4yMpRi0520ax1Rs7bNZUAackxcJzrRLIrFsct2KcaakYwOwV9qOpScPJ NFLn1XL2+cl7++JrGo4jOZzc2rbvwyt1GhYw0j0KpHzvUARNKmsoQ46slXfHRQuoUYfK Ur6Pwi7LLcoaYgdf8vIv7J3mtsbGLIkyn8Df1M+v3KJGo20PTokm/TLo1cM9+uGVqKOm /bPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=UoXoSthSp0P9T2vw8hecflY4YtwvIVD8vIAro/BIZMI=; b=IR1iF4qMD/lsuhK0uQii0CGToPee1BhPfdF7fzGNeZNVKuWIldSKGFTQWM5A0floUk B2Z1BaTCeeKQawGy8eafwvlV92qDwM1h/N3hMc/yeAO7Hi5jgg1HKy+kNG+KigmKz6vD m/7iIXq+lb9TmxDTiAdlbWndCivKNrDmZ2c7Uf+crUjVoXMSayWfe/zxm8zrGYPR7PuD BNg6A7m1Qr3shBCfshWCTMMtwvCCoxCcO5n90c3eQ0kkdZWXA56styxf44NTvto4n3Zx U4lVLX0ILxogcKPm1+2SnMcvWn3zXsrxFVq3WJ9Tv5QbVtKnN7+uZo4qYDZspDSN2RDx bWlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mw17-20020a17090b4d1100b00212f0d1bf7csi12888611pjb.158.2022.11.14.23.17.37; Mon, 14 Nov 2022 23:17:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231898AbiKOHLj (ORCPT + 90 others); Tue, 15 Nov 2022 02:11:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229732AbiKOHLh (ORCPT ); Tue, 15 Nov 2022 02:11:37 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6F0510FCB for ; Mon, 14 Nov 2022 23:11:35 -0800 (PST) Received: from dggpeml500022.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4NBHQb6C39zHvtc; Tue, 15 Nov 2022 15:11:03 +0800 (CST) Received: from dggpeml500002.china.huawei.com (7.185.36.158) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 15 Nov 2022 15:11:33 +0800 Received: from [10.67.103.44] (10.67.103.44) by dggpeml500002.china.huawei.com (7.185.36.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 15 Nov 2022 15:11:33 +0800 Subject: Re: [PATCH v12 1/2] drivers/coresight: Add UltraSoc System Memory Buffer driver To: Suzuki K Poulose , kernel test robot , , , , , References: <20221109135008.9485-2-hejunhao3@huawei.com> <202211120623.aFVBerTp-lkp@intel.com> <901ee9b4-f0b3-437e-fce9-be3c6c214afe@huawei.com> <66dc097f-c568-bb50-1d93-dba812bf7091@arm.com> CC: , , , , , , , , From: hejunhao Message-ID: <13871c95-164b-c2e2-2489-7271a0ca845a@huawei.com> Date: Tue, 15 Nov 2022 15:11:33 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <66dc097f-c568-bb50-1d93-dba812bf7091@arm.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.103.44] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500002.china.huawei.com (7.185.36.158) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/11/14 21:59, Suzuki K Poulose wrote: > On 14/11/2022 13:06, hejunhao wrote: >> >> >> On 2022/11/14 18:49, Suzuki K Poulose wrote: >>> On 11/11/2022 22:06, kernel test robot wrote: >>>> Hi Junhao, >>>> >>>> I love your patch! Perhaps something to improve: >>>> >>>> [auto build test WARNING on soc/for-next] >>>> [also build test WARNING on linus/master v6.1-rc4 next-20221111] >>>> [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/Junhao-He/Add-support-for-UltraSoc-System-Memory-Buffer/20221109-215158 >>>> base: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git >>>> for-next >>>> patch link: >>>> https://lore.kernel.org/r/20221109135008.9485-2-hejunhao3%40huawei.com >>>> patch subject: [PATCH v12 1/2] drivers/coresight: Add UltraSoc >>>> System Memory Buffer driver >>>> config: arm64-randconfig-s033-20221111 >>>> 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://github.com/intel-lab-lkp/linux/commit/49ede03fd874b65deca5382ea84c3377188136da >>>> git remote add linux-review >>>> https://github.com/intel-lab-lkp/linux >>>> git fetch --no-tags linux-review >>>> Junhao-He/Add-support-for-UltraSoc-System-Memory-Buffer/20221109-215158 >>>> >>>> git checkout 49ede03fd874b65deca5382ea84c3377188136da >>>> # 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 SHELL=/bin/bash drivers/hwtracing/coresight/ >>>> >>>> If you fix the issue, kindly add following tag where applicable >>>> | Reported-by: kernel test robot >>>> >>>> sparse warnings: (new ones prefixed by >>) >>>>>> drivers/hwtracing/coresight/ultrasoc-smb.c:113:33: sparse: >>>>>> sparse: cast removes address space '__iomem' of expression >>>>>> drivers/hwtracing/coresight/ultrasoc-smb.c:354:17: sparse: >>>>>> sparse: incorrect type in argument 1 (different address spaces) >>>>>> @@ expected void const * @@ got void [noderef] __iomem * @@ >>>> drivers/hwtracing/coresight/ultrasoc-smb.c:354:17: sparse: >>>> expected void const * >>>> drivers/hwtracing/coresight/ultrasoc-smb.c:354:17: sparse: got >>>> void [noderef] __iomem * >>>>>> drivers/hwtracing/coresight/ultrasoc-smb.c:354:17: sparse: >>>>>> sparse: incorrect type in argument 1 (different address spaces) >>>>>> @@ expected void const * @@ got void [noderef] __iomem * @@ >>>> drivers/hwtracing/coresight/ultrasoc-smb.c:354:17: sparse: >>>> expected void const * >>>> drivers/hwtracing/coresight/ultrasoc-smb.c:354:17: sparse: got >>>> void [noderef] __iomem * >>>> drivers/hwtracing/coresight/ultrasoc-smb.c:354:17: sparse: >>>> sparse: incorrect type in argument 2 (different address spaces) >>>> @@ expected void const * @@ got void [noderef] __iomem * @@ >>>> drivers/hwtracing/coresight/ultrasoc-smb.c:354:17: sparse: >>>> expected void const * >>>> drivers/hwtracing/coresight/ultrasoc-smb.c:354:17: sparse: got >>>> void [noderef] __iomem * >>>>>> drivers/hwtracing/coresight/ultrasoc-smb.c:463:14: sparse: >>>>>> sparse: incorrect type in assignment (different address spaces) >>>>>> @@ expected void [noderef] __iomem *base @@ got void * @@ >>>> drivers/hwtracing/coresight/ultrasoc-smb.c:463:14: sparse: >>>> expected void [noderef] __iomem *base >>>> drivers/hwtracing/coresight/ultrasoc-smb.c:463:14: sparse: got >>>> void * >>>> >>>> vim +/__iomem +113 drivers/hwtracing/coresight/ultrasoc-smb.c >>>> >>>> 89 >>>> 90 static ssize_t smb_read(struct file *file, char __user >>>> *data, size_t len, >>>> 91 loff_t *ppos) >>>> 92 { >>>> 93 struct smb_drv_data *drvdata = >>>> container_of(file->private_data, >>>> 94 struct smb_drv_data, miscdev); >>>> 95 struct smb_data_buffer *sdb = &drvdata->sdb; >>>> 96 struct device *dev = &drvdata->csdev->dev; >>>> 97 ssize_t to_copy = 0; >>>> 98 >>>> 99 mutex_lock(&drvdata->mutex); >>>> 100 >>>> 101 if (!sdb->data_size) { >>>> 102 smb_update_data_size(drvdata); >>>> 103 if (!sdb->data_size) >>>> 104 goto out; >>>> 105 } >>>> 106 >>>> 107 to_copy = min(sdb->data_size, len); >>>> 108 >>>> 109 /* Copy parts of trace data when read pointer wrap >>>> around SMB buffer */ >>>> 110 if (sdb->rd_offset + to_copy > sdb->buf_size) >>>> 111 to_copy = sdb->buf_size - sdb->rd_offset; >>>> 112 >>>> > 113 if (copy_to_user(data, (void *)sdb->buf_base + >>>> sdb->rd_offset, >>>> 114 to_copy)) { >>>> 115 dev_dbg(dev, "Failed to copy data to user\n"); >>>> 116 to_copy = -EFAULT; >>>> 117 goto out; >>>> 118 } >>>> 119 >>> >>> Please could we replace this with copy_to_user_fromio() ? >>> >>> Suzuki >>> >>> _______________________________________________ >>> CoreSight mailing list -- coresight@lists.linaro.org >>> To unsubscribe send an email to coresight-leave@lists.linaro.org >>> . >>> >> Hi Suzuki, >> >> This is a cache memory, due to improper use of "__iomem" , the >> sparse generates warnings. >> I has fix it in v13. >> https://lore.kernel.org/lkml/20221114090316.63157-2-hejunhao3@huawei.com/ >> > > I don't see a ChangeLog mentioning that this change. Please make sure > you accurately describe the changes (especially fixes like these). > > Thanks > Suzuki > Hi Suzuki, Sure, I will fill in the v13 change log. Thanks for your comments. Any comment or suggestion is appreciated. Best regards, Junhao. >> >> Best regards, >> Junhao. >> >> >> > > _______________________________________________ > CoreSight mailing list -- coresight@lists.linaro.org > To unsubscribe send an email to coresight-leave@lists.linaro.org