Message ID | 20220822150128.1562046-65-Liam.Howlett@oracle.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69279C28D13 for <linux-mm@archiver.kernel.org>; Mon, 22 Aug 2022 15:07:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0D52B6B007E; Mon, 22 Aug 2022 11:07:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 083A26B0081; Mon, 22 Aug 2022 11:07:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E18F08D0002; Mon, 22 Aug 2022 11:07:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id D2B4F6B007E for <linux-mm@kvack.org>; Mon, 22 Aug 2022 11:07:14 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 82ED9C1257 for <linux-mm@kvack.org>; Mon, 22 Aug 2022 15:07:14 +0000 (UTC) X-FDA: 79827556788.17.1951DA3 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf06.hostedemail.com (Postfix) with ESMTP id E99EE180070 for <linux-mm@kvack.org>; Mon, 22 Aug 2022 15:07:13 +0000 (UTC) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27MEirIT017918; Mon, 22 Aug 2022 15:07:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=1gGgnmnzZTiH4CWqaOQaOlKOGm6COOZTpG7+W4yswJA=; b=fVaT8Vo1GdLAXV+1q//mlx0zee/dUROnQ2pkz10DBDDVsE3DVSjoZ/gBnhd5P8fcf1bE 3BMxUweGWxVwVNIICfZYlrF3wVM/D0ziy8YOXtsoJ2bFdfFhdEAsfleAhMb1mWmAY0hn 2m0meFq86mIwFTA8IIUZ+krxcvQHHgr6YzUahhimX3ZEB0nQBLo5H1sI2/jXLgiAwur2 MFeksZYhkyVu/jy+aAeBAWmmcZgtlYbibUifz59cNTgF68yLAt1AO1Mq9OGiJNX+HbA5 PBB9hauACiv6xGVloR+KdfPo4YIIMV+MZDfPt/IunFf88ULrFud8lpzcLJudTgtvc7cz jQ== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3j4bkt04dq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Aug 2022 15:07:10 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 27ME4MWl035318; Mon, 22 Aug 2022 15:07:09 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2044.outbound.protection.outlook.com [104.47.66.44]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3j3mq1u2en-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Aug 2022 15:07:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oVyhnyD8ScJSNz9yaOwO09F9tmW1XcmnnVWJ+tIo0BJX17i2wwcMl/wmA0UQRG0yexCFyb8/1xtiCD+hg5MBXd+by3dENgoAyVgP1xulqPRNqXO7J2Qe0rCJSs2wbiqxPuJJr31+OGWocRrzDmZDISOiaYvYw1EBcZVaMYBDhaLsxt1ZdxX0wlaKgbcfCG15hmggJjH4c/mxi/SIFstar9ge3EAmvueHEhU5H/EdUHhaZkIs2TdL7Tn7zpj90ibENV8+j/oxOqMFI7emzTFD41H9seG9gyRC9qZ+7lssIihkH4KJg5JO4g1zX4dVj/6FMiwTdTqcGHvuAayM9ypmuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1gGgnmnzZTiH4CWqaOQaOlKOGm6COOZTpG7+W4yswJA=; b=lgtcWntYQvdYhug0IJGxlWrHPWkcVUFCGLRcexgjJstDO4/q+Za/gqTLpg/iAahSxRWv6u+GOyhB4MM3e1c25t2ymHKv5G8cTisNtb4MuHB7hebUTf5Zkx5VMxxKo+jwjb7MaEzmG0bvzgbvoVbW4uu+/7gYKQsgyQBo1CO4RYuYYRufFia9c7IHiHt6X5pts2Xj//uszYJJbOXj/WLGitLArj+W7FIDjrXusBMsjxxxebZpge0AFH300v0AOAkjbq4EAxDlLHrHzFw2TKi/Fj3NXORgLHTn4ExETg3x2rox/FvycRNYEbVZN2mMnqHDnXiAG5falsmQvQxgrhUzuw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1gGgnmnzZTiH4CWqaOQaOlKOGm6COOZTpG7+W4yswJA=; b=Ai+rYuS/x/jhFL8mQIQr4KKrV02Zed2BgymH7OddxIBprOiRyOOlA5oJ3gTQeZKEohIuHQV/EW259XPshNgklDIeU5/FziEJFPuz2p4F2CkLvMsz/Nzr6ngAkv/x8eyKA3weIxibefDP0aj6XrkJA3+8ecbjtn2sJVuMCah+a/c= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by SJ0PR10MB4512.namprd10.prod.outlook.com (2603:10b6:a03:2dc::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.18; Mon, 22 Aug 2022 15:07:08 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::3d34:ebb5:d9df:98b3]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::3d34:ebb5:d9df:98b3%5]) with mapi id 15.20.5546.023; Mon, 22 Aug 2022 15:07:07 +0000 From: Liam Howlett <liam.howlett@oracle.com> To: "maple-tree@lists.infradead.org" <maple-tree@lists.infradead.org>, "linux-mm@kvack.org" <linux-mm@kvack.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Andrew Morton <akpm@linux-foundation.org> CC: "Matthew Wilcox (Oracle)" <willy@infradead.org>, Liam Howlett <liam.howlett@oracle.com>, Vlastimil Babka <vbabka@suse.cz> Subject: [PATCH v13 64/70] i915: use the VMA iterator Thread-Topic: [PATCH v13 64/70] i915: use the VMA iterator Thread-Index: AQHYtjjDWgfgbSHc2U6pwSHNa70o4Q== Date: Mon, 22 Aug 2022 15:06:32 +0000 Message-ID: <20220822150128.1562046-65-Liam.Howlett@oracle.com> References: <20220822150128.1562046-1-Liam.Howlett@oracle.com> In-Reply-To: <20220822150128.1562046-1-Liam.Howlett@oracle.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.35.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e98a07c3-ddfd-4a89-367c-08da844ffb02 x-ms-traffictypediagnostic: SJ0PR10MB4512:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: JnEd4qg+WzkTodOhA/Wquk5gMv1dHo0F2N+p6IPaXh6/tC3RHya9tRketK/nV4vk5uZacYMMsDst8IQuf+pd6V11I7cY9eaFO1JmULxfweiUoXBwLrj3qR/3C3v5mgllS6CyFiw8RGtRDVnj5oYXKQ6nfEMIB3AYK1IH+lO+KAd5wxbQYNhAp3cvWFRQN/s3cNeKCkYWXUGzbjWR/CiNn+qXCplUyD6nzxxo/3vPg8F7If+wM5+QqAKW+SprlLlUQ6adwA7ecYAo/MsuoQBQSvZkkkK3u4yo3u8DCb3zJge/eTnP47E0hazLIFz5fcG35D96UyknOEQeLNEv1x5D0/MDoS0vF7Azecn4eBSlenK1Hku0ODwYZVGmnoovl1mFzFWiZ3bmAuZvmlwajJgycb0/8dv0czdNl3GJFuRcA1fbck3TDCQNjeb0x0koWn9fdbhBb5PT4M9qwA1i1VLvEWdFbF0irdkoAAFcDdnDenfawgYCLwqDi5fMcYnGdjXVMKPkdsHng2lMrszM8yLhwBkB4Op5L+eM0D5eiHXe4yFbRGt2svHbN7SpgGAyrLJwPTs+5Z1y+53CY/T1rtqU7JRgxmxip7V85QNm+qFKTGxEjwVp6t6A0EyZfTWea0GNr9D1udjisZGRMIMp4zfupJD26Cbcb9ssqNU9Hw6FMHHV54xvtfDt4r36yWu3qI0IqKXMy0E6wD6R3HalmKcsaBDKmFV13BVFdmcpAlO5JFh+eqCDTY/grxDGhx7/oDQ7AX7Dx3CIWj/F+K4hgFQn5A== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB3022.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(39860400002)(366004)(136003)(396003)(376002)(346002)(2906002)(38100700002)(86362001)(38070700005)(478600001)(6486002)(186003)(41300700001)(1076003)(2616005)(6666004)(26005)(6506007)(71200400001)(6512007)(83380400001)(5660300002)(8936002)(122000001)(44832011)(4326008)(54906003)(110136005)(91956017)(316002)(76116006)(8676002)(66946007)(66446008)(66476007)(66556008)(64756008)(36756003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?zGG2/xzkt+uz4aTJE2+Fqfw?= =?iso-8859-1?q?wX2of0Be8ypO/THPd1Pa+dm2wYXwCqHy6I/fgEi7Nn/VkUzoB/wtRPKf5s5j?= =?iso-8859-1?q?N5zgH4ufGZ+AUdqSwPGMsIjS6DJnMv2/LWM9xi642Riq6W7dcNAXdJdtZjUe?= =?iso-8859-1?q?mKDcPbNY9ojje4YNrfn/O1CUDwM0484bPjnktPFy+VjYR46RToQHESkkqwHO?= =?iso-8859-1?q?50XTWNYYFK5b7dghURukJ9XgSM/1ntlBej4ZwZxsKNB/r2snJVvWEg+GnIFj?= =?iso-8859-1?q?2YVPYaYRCHNFxlWByjnh6KJm27ITeI2I639UfRSFv/r3fDMG+zeh5b6ZNRGr?= =?iso-8859-1?q?OF3vEh3QkAjIyjYuj8aVWCNFi0TMpALoaZceBm9uim3F2GtYTvDtJ/BMDpdU?= =?iso-8859-1?q?mQvqhBCIghViIQl0qzgsqcjcV42Nic+IVsL3E96IJ6LhTbhm4EY8RpUaoV/d?= =?iso-8859-1?q?OO4Vse2tGh9zFnA2kZT4joet+I5R2RT/ktaZ22Derf3lFcURylJOA7yMc03v?= =?iso-8859-1?q?MSONW3NUGyBYFQwpeg5yg2vG65XU6Le+Z4bZ5Vx6uJ4ho2QnbMA1MYB5hMIw?= =?iso-8859-1?q?Mfb5ie2SW/pFZPZ2txQZdm6j85ROWKAU0Wyo/Cogl0zN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1?q?VDgAu8yF95A6z9fqQAbZ3i1ZTcVN2g9KwcOlLftV05D9L2SOcmt0QSoWtZCl?= =?iso-8859-1?q?q2jYtf9QArWj5aW6DhBpHFvRNUk2Tp3qZ/U2QYhLEOK8rPfxzP7IZFG0HPWz?= =?iso-8859-1?q?YFcZmT1gelcmAQfr5Ofr7aE3BwI57n6w40qO7+Q=3D=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e98a07c3-ddfd-4a89-367c-08da844ffb02 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Aug 2022 15:06:32.5034 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: lF9wuqE19gTY/AYZP5c1r2xViCJYVYleRUXnYAWNbiIAtcczFgPsZQcwBaDc8hIRYiS3YfD/2Jx/T87seFv2tA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB4512 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-22_09,2022-08-22_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208220065 X-Proofpoint-ORIG-GUID: -EEI6ffCMAD1mx3z0oIRpc-c6ny43lCo X-Proofpoint-GUID: -EEI6ffCMAD1mx3z0oIRpc-c6ny43lCo ARC-Authentication-Results: i=2; imf06.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b=fVaT8Vo1; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="Ai+rYuS/"; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf06.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1661180834; a=rsa-sha256; cv=pass; b=zb8b8dtYW39aeaaNf78wlR5xeHstphREBhjg/ItGlFG81r2RAxBz6ubXK0BW4NKVCOUfH0 NUB3GmlInzGQu9hVJ/OKAugaa5fixTitBF4JaPpJC7dLGRH0Qk+734aL101nd8c/QlW5rv icMo0dBmExrRYIfVRcQexxyV9Fx1WCY= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661180834; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=1gGgnmnzZTiH4CWqaOQaOlKOGm6COOZTpG7+W4yswJA=; b=7LV0eWcHUyrARgUH9rWyhZxqmjt3yY4vDToaF/90fZkrdWKFaRaZ+cZ6ZQpE+ZOtNS1gU+ ezJQpxY+P5ZmVdMuGSv8Q74ArMBVRRKp2d75zrGwmFRFbP3t81CG57z92BmIpaS+QWe6Lg mU44EOBFF2kRP6OE1yrGBBWptWNTbvI= Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b=fVaT8Vo1; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="Ai+rYuS/"; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf06.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=none) header.from=oracle.com X-Stat-Signature: y5d9pwqzu5goxwiyyr38q1bbqanhkocy X-Rspamd-Queue-Id: E99EE180070 X-Rspam-User: X-Rspamd-Server: rspam12 X-HE-Tag: 1661180833-273409 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
Introducing the Maple Tree
|
expand
|
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c index 8423df021b71..d4398948f016 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c @@ -426,12 +426,11 @@ static const struct drm_i915_gem_object_ops i915_gem_userptr_ops = { static int probe_range(struct mm_struct *mm, unsigned long addr, unsigned long len) { - const unsigned long end = addr + len; + VMA_ITERATOR(vmi, mm, addr); struct vm_area_struct *vma; - int ret = -EFAULT; mmap_read_lock(mm); - for (vma = find_vma(mm, addr); vma; vma = vma->vm_next) { + for_each_vma_range(vmi, vma, addr + len) { /* Check for holes, note that we also update the addr below */ if (vma->vm_start > addr) break; @@ -439,16 +438,13 @@ probe_range(struct mm_struct *mm, unsigned long addr, unsigned long len) if (vma->vm_flags & (VM_PFNMAP | VM_MIXEDMAP)) break; - if (vma->vm_end >= end) { - ret = 0; - break; - } - addr = vma->vm_end; } mmap_read_unlock(mm); - return ret; + if (vma) + return -EFAULT; + return 0; } /*