From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============5560625164509169491==" MIME-Version: 1.0 From: Dan Carpenter Subject: Re: [Intel-gfx] [PATCH] drm/i915: Add lmem fault handler Date: Fri, 13 Dec 2019 12:49:46 +0300 Message-ID: <20191213094946.GA2407@kadam> In-Reply-To: <20191211055907.8398-1-abdiel.janulgue@linux.intel.com> List-Id: To: kbuild@lists.01.org --===============5560625164509169491== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Abdiel, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-intel/for-linux-next] [also build test WARNING on drm-tip/drm-tip next-20191210] [if your patch is applied to the wrong git tree, please drop us a note to h= elp improve the system. BTW, we also suggest to use '--base' option to specify = the base tree in git format-patch, please see https://stackoverflow.com/a/37406= 982] url: https://github.com/0day-ci/linux/commits/Abdiel-Janulgue/drm-i915-A= dd-lmem-fault-handler/20191212-031235 base: git://anongit.freedesktop.org/drm-intel for-linux-next If you fix the issue, kindly add following tag Reported-by: kbuild test robot Reported-by: Dan Carpenter smatch warnings: drivers/gpu/drm/i915/gem/i915_gem_lmem.c:40 vm_fault_lmem() error: uninitia= lized symbol 'vmf_ret'. # https://github.com/0day-ci/linux/commit/527bcb2414222221b5b3cea4909756095= ae07d6a git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout 527bcb2414222221b5b3cea4909756095ae07d6a vim +/vmf_ret +40 drivers/gpu/drm/i915/gem/i915_gem_lmem.c 527bcb24142222 Abdiel Janulgue 2019-12-11 12 vm_fault_t vm_fault_lmem(str= uct vm_fault *vmf) 527bcb24142222 Abdiel Janulgue 2019-12-11 13 { 527bcb24142222 Abdiel Janulgue 2019-12-11 14 struct vm_area_struct *area= =3D vmf->vma; 527bcb24142222 Abdiel Janulgue 2019-12-11 15 struct i915_mmap_offset *pr= iv =3D area->vm_private_data; 527bcb24142222 Abdiel Janulgue 2019-12-11 16 struct drm_i915_gem_object = *obj =3D priv->obj; 527bcb24142222 Abdiel Janulgue 2019-12-11 17 unsigned long size =3D area= ->vm_end - area->vm_start; 527bcb24142222 Abdiel Janulgue 2019-12-11 18 bool write =3D area->vm_fla= gs & VM_WRITE; 527bcb24142222 Abdiel Janulgue 2019-12-11 19 vm_fault_t vmf_ret; ^^^^^^^^^^^^^^^^^^^ 527bcb24142222 Abdiel Janulgue 2019-12-11 20 int i, ret; 527bcb24142222 Abdiel Janulgue 2019-12-11 21 = 527bcb24142222 Abdiel Janulgue 2019-12-11 22 /* Sanity check that we all= ow writing into this object */ 527bcb24142222 Abdiel Janulgue 2019-12-11 23 if (i915_gem_object_is_read= only(obj) && write) 527bcb24142222 Abdiel Janulgue 2019-12-11 24 return VM_FAULT_SIGBUS; 527bcb24142222 Abdiel Janulgue 2019-12-11 25 = 527bcb24142222 Abdiel Janulgue 2019-12-11 26 ret =3D i915_gem_object_pin= _pages(obj); 527bcb24142222 Abdiel Janulgue 2019-12-11 27 if (ret) 527bcb24142222 Abdiel Janulgue 2019-12-11 28 return i915_error_to_vmf_f= ault(ret); 527bcb24142222 Abdiel Janulgue 2019-12-11 29 = 527bcb24142222 Abdiel Janulgue 2019-12-11 30 for (i =3D 0; i < size >> P= AGE_SHIFT; i++) { Can size be less than a page? 527bcb24142222 Abdiel Janulgue 2019-12-11 31 vmf_ret =3D vmf_insert_pfn= (area, 527bcb24142222 Abdiel Janulgue 2019-12-11 32 (unsigned long)area->v= m_start + i * PAGE_SIZE, 527bcb24142222 Abdiel Janulgue 2019-12-11 33 i915_gem_object_lmem_i= o_pfn(obj, i)); 527bcb24142222 Abdiel Janulgue 2019-12-11 34 if (vmf_ret !=3D VM_FAULT_= NOPAGE) 527bcb24142222 Abdiel Janulgue 2019-12-11 35 break; 527bcb24142222 Abdiel Janulgue 2019-12-11 36 } 527bcb24142222 Abdiel Janulgue 2019-12-11 37 = 527bcb24142222 Abdiel Janulgue 2019-12-11 38 i915_gem_object_unpin_pages= (obj); 527bcb24142222 Abdiel Janulgue 2019-12-11 39 = 527bcb24142222 Abdiel Janulgue 2019-12-11 @40 return vmf_ret; 527bcb24142222 Abdiel Janulgue 2019-12-11 41 } --- 0-DAY kernel test infrastructure Open Source Technology Cen= ter https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corpor= ation --===============5560625164509169491==-- 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 X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, FAKE_REPLY_C,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70C5FC2D0DD for ; Fri, 13 Dec 2019 20:44:58 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id A2BD624671 for ; Fri, 13 Dec 2019 20:44:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="PSwgECE4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A2BD624671 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 00E5A6E4F3; Fri, 13 Dec 2019 11:19:07 +0000 (UTC) Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) by gabe.freedesktop.org (Postfix) with ESMTPS id 10E656E4F3 for ; Fri, 13 Dec 2019 11:19:05 +0000 (UTC) Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xBD9hwsR136015; Fri, 13 Dec 2019 09:49:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type : in-reply-to; s=corp-2019-08-05; bh=KLopqxMi7M/B0qcpC/dJbgi+ckc8OHBzkcW24nCAyTc=; b=PSwgECE4e0vun8eiHAjnE0yUqS7TlppjEA229Yhxn48CThXiEPHqCVFgEQ0uI/DuEHVV LUWsQbIXW5FNBzbud9i8Ix+XfIQ9NiSULO30dEYI2S0om7M3AbFnupDCO3D/MSgrh5GH d79+j63S8LqTlTQg/C1xNGm+FMWGmsTJ+GMH0WfBObup9MPha2X7zHG8r+YUP8Jzml23 J1PcLZXER0vbwJC5sXI4rNUN1PZRCD6BgN8OoEJhV/IHw1ak0mJwcZzwIUxG0ZoogsR7 u5e4EzxnLCm47IpCpvObpB4lQe1+Lzem1JFCP4MJU3Bkm1ad6arRcCZl534D3ukbvB48 Aw== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 2wr4qs02dt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 13 Dec 2019 09:49:56 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xBD9mrNG115963; Fri, 13 Dec 2019 09:49:55 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 2wumsbd07f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 13 Dec 2019 09:49:55 +0000 Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id xBD9nrBC027103; Fri, 13 Dec 2019 09:49:53 GMT Received: from kadam (/129.205.23.165) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 13 Dec 2019 01:49:52 -0800 Date: Fri, 13 Dec 2019 12:49:46 +0300 From: Dan Carpenter To: kbuild@lists.01.org, Abdiel Janulgue Message-ID: <20191213094946.GA2407@kadam> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191211055907.8398-1-abdiel.janulgue@linux.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9469 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912130078 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9469 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912130078 Subject: Re: [Intel-gfx] [PATCH] drm/i915: Add lmem fault handler X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, kbuild-all@lists.01.org, Matthew Auld Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Hi Abdiel, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-intel/for-linux-next] [also build test WARNING on drm-tip/drm-tip next-20191210] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Abdiel-Janulgue/drm-i915-Add-lmem-fault-handler/20191212-031235 base: git://anongit.freedesktop.org/drm-intel for-linux-next If you fix the issue, kindly add following tag Reported-by: kbuild test robot Reported-by: Dan Carpenter smatch warnings: drivers/gpu/drm/i915/gem/i915_gem_lmem.c:40 vm_fault_lmem() error: uninitialized symbol 'vmf_ret'. # https://github.com/0day-ci/linux/commit/527bcb2414222221b5b3cea4909756095ae07d6a git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout 527bcb2414222221b5b3cea4909756095ae07d6a vim +/vmf_ret +40 drivers/gpu/drm/i915/gem/i915_gem_lmem.c 527bcb24142222 Abdiel Janulgue 2019-12-11 12 vm_fault_t vm_fault_lmem(struct vm_fault *vmf) 527bcb24142222 Abdiel Janulgue 2019-12-11 13 { 527bcb24142222 Abdiel Janulgue 2019-12-11 14 struct vm_area_struct *area = vmf->vma; 527bcb24142222 Abdiel Janulgue 2019-12-11 15 struct i915_mmap_offset *priv = area->vm_private_data; 527bcb24142222 Abdiel Janulgue 2019-12-11 16 struct drm_i915_gem_object *obj = priv->obj; 527bcb24142222 Abdiel Janulgue 2019-12-11 17 unsigned long size = area->vm_end - area->vm_start; 527bcb24142222 Abdiel Janulgue 2019-12-11 18 bool write = area->vm_flags & VM_WRITE; 527bcb24142222 Abdiel Janulgue 2019-12-11 19 vm_fault_t vmf_ret; ^^^^^^^^^^^^^^^^^^^ 527bcb24142222 Abdiel Janulgue 2019-12-11 20 int i, ret; 527bcb24142222 Abdiel Janulgue 2019-12-11 21 527bcb24142222 Abdiel Janulgue 2019-12-11 22 /* Sanity check that we allow writing into this object */ 527bcb24142222 Abdiel Janulgue 2019-12-11 23 if (i915_gem_object_is_readonly(obj) && write) 527bcb24142222 Abdiel Janulgue 2019-12-11 24 return VM_FAULT_SIGBUS; 527bcb24142222 Abdiel Janulgue 2019-12-11 25 527bcb24142222 Abdiel Janulgue 2019-12-11 26 ret = i915_gem_object_pin_pages(obj); 527bcb24142222 Abdiel Janulgue 2019-12-11 27 if (ret) 527bcb24142222 Abdiel Janulgue 2019-12-11 28 return i915_error_to_vmf_fault(ret); 527bcb24142222 Abdiel Janulgue 2019-12-11 29 527bcb24142222 Abdiel Janulgue 2019-12-11 30 for (i = 0; i < size >> PAGE_SHIFT; i++) { Can size be less than a page? 527bcb24142222 Abdiel Janulgue 2019-12-11 31 vmf_ret = vmf_insert_pfn(area, 527bcb24142222 Abdiel Janulgue 2019-12-11 32 (unsigned long)area->vm_start + i * PAGE_SIZE, 527bcb24142222 Abdiel Janulgue 2019-12-11 33 i915_gem_object_lmem_io_pfn(obj, i)); 527bcb24142222 Abdiel Janulgue 2019-12-11 34 if (vmf_ret != VM_FAULT_NOPAGE) 527bcb24142222 Abdiel Janulgue 2019-12-11 35 break; 527bcb24142222 Abdiel Janulgue 2019-12-11 36 } 527bcb24142222 Abdiel Janulgue 2019-12-11 37 527bcb24142222 Abdiel Janulgue 2019-12-11 38 i915_gem_object_unpin_pages(obj); 527bcb24142222 Abdiel Janulgue 2019-12-11 39 527bcb24142222 Abdiel Janulgue 2019-12-11 @40 return vmf_ret; 527bcb24142222 Abdiel Janulgue 2019-12-11 41 } --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8212531672546344458==" MIME-Version: 1.0 From: Dan Carpenter To: kbuild-all@lists.01.org Subject: Re: [Intel-gfx] [PATCH] drm/i915: Add lmem fault handler Date: Fri, 13 Dec 2019 12:49:46 +0300 Message-ID: <20191213094946.GA2407@kadam> In-Reply-To: <20191211055907.8398-1-abdiel.janulgue@linux.intel.com> List-Id: --===============8212531672546344458== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Abdiel, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-intel/for-linux-next] [also build test WARNING on drm-tip/drm-tip next-20191210] [if your patch is applied to the wrong git tree, please drop us a note to h= elp improve the system. BTW, we also suggest to use '--base' option to specify = the base tree in git format-patch, please see https://stackoverflow.com/a/37406= 982] url: https://github.com/0day-ci/linux/commits/Abdiel-Janulgue/drm-i915-A= dd-lmem-fault-handler/20191212-031235 base: git://anongit.freedesktop.org/drm-intel for-linux-next If you fix the issue, kindly add following tag Reported-by: kbuild test robot Reported-by: Dan Carpenter smatch warnings: drivers/gpu/drm/i915/gem/i915_gem_lmem.c:40 vm_fault_lmem() error: uninitia= lized symbol 'vmf_ret'. # https://github.com/0day-ci/linux/commit/527bcb2414222221b5b3cea4909756095= ae07d6a git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout 527bcb2414222221b5b3cea4909756095ae07d6a vim +/vmf_ret +40 drivers/gpu/drm/i915/gem/i915_gem_lmem.c 527bcb24142222 Abdiel Janulgue 2019-12-11 12 vm_fault_t vm_fault_lmem(str= uct vm_fault *vmf) 527bcb24142222 Abdiel Janulgue 2019-12-11 13 { 527bcb24142222 Abdiel Janulgue 2019-12-11 14 struct vm_area_struct *area= =3D vmf->vma; 527bcb24142222 Abdiel Janulgue 2019-12-11 15 struct i915_mmap_offset *pr= iv =3D area->vm_private_data; 527bcb24142222 Abdiel Janulgue 2019-12-11 16 struct drm_i915_gem_object = *obj =3D priv->obj; 527bcb24142222 Abdiel Janulgue 2019-12-11 17 unsigned long size =3D area= ->vm_end - area->vm_start; 527bcb24142222 Abdiel Janulgue 2019-12-11 18 bool write =3D area->vm_fla= gs & VM_WRITE; 527bcb24142222 Abdiel Janulgue 2019-12-11 19 vm_fault_t vmf_ret; ^^^^^^^^^^^^^^^^^^^ 527bcb24142222 Abdiel Janulgue 2019-12-11 20 int i, ret; 527bcb24142222 Abdiel Janulgue 2019-12-11 21 = 527bcb24142222 Abdiel Janulgue 2019-12-11 22 /* Sanity check that we all= ow writing into this object */ 527bcb24142222 Abdiel Janulgue 2019-12-11 23 if (i915_gem_object_is_read= only(obj) && write) 527bcb24142222 Abdiel Janulgue 2019-12-11 24 return VM_FAULT_SIGBUS; 527bcb24142222 Abdiel Janulgue 2019-12-11 25 = 527bcb24142222 Abdiel Janulgue 2019-12-11 26 ret =3D i915_gem_object_pin= _pages(obj); 527bcb24142222 Abdiel Janulgue 2019-12-11 27 if (ret) 527bcb24142222 Abdiel Janulgue 2019-12-11 28 return i915_error_to_vmf_f= ault(ret); 527bcb24142222 Abdiel Janulgue 2019-12-11 29 = 527bcb24142222 Abdiel Janulgue 2019-12-11 30 for (i =3D 0; i < size >> P= AGE_SHIFT; i++) { Can size be less than a page? 527bcb24142222 Abdiel Janulgue 2019-12-11 31 vmf_ret =3D vmf_insert_pfn= (area, 527bcb24142222 Abdiel Janulgue 2019-12-11 32 (unsigned long)area->v= m_start + i * PAGE_SIZE, 527bcb24142222 Abdiel Janulgue 2019-12-11 33 i915_gem_object_lmem_i= o_pfn(obj, i)); 527bcb24142222 Abdiel Janulgue 2019-12-11 34 if (vmf_ret !=3D VM_FAULT_= NOPAGE) 527bcb24142222 Abdiel Janulgue 2019-12-11 35 break; 527bcb24142222 Abdiel Janulgue 2019-12-11 36 } 527bcb24142222 Abdiel Janulgue 2019-12-11 37 = 527bcb24142222 Abdiel Janulgue 2019-12-11 38 i915_gem_object_unpin_pages= (obj); 527bcb24142222 Abdiel Janulgue 2019-12-11 39 = 527bcb24142222 Abdiel Janulgue 2019-12-11 @40 return vmf_ret; 527bcb24142222 Abdiel Janulgue 2019-12-11 41 } --- 0-DAY kernel test infrastructure Open Source Technology Cen= ter https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corpor= ation --===============8212531672546344458==--