Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6854416ybi; Mon, 22 Jul 2019 02:52:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqzH/bK9Gn7sPpl26YUgInTclT3WORSFyXUwSkgZfD9f5Ffc21iCB8jFQcgSFydmkts+JCsP X-Received: by 2002:a17:90b:8d8:: with SMTP id ds24mr652014pjb.135.1563789143715; Mon, 22 Jul 2019 02:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563789143; cv=none; d=google.com; s=arc-20160816; b=KX/zocHx5RBzGOfPM4LBv5D94AP7cszVTGBG/G7pX9j4JPNgALBis6LgP2fnKV3Y1k izpBhia54ZpMm2tivZkI7jNVlO3Nk4ygOgahp5/ZmhGH9ZgZpidRca9AstgO99rd/NxM Y6RQWodiRCe4N1hUtnVp4ChiGv0OcMEm69LVLsuggsbI7CnS/q8pF9Lkjj4B2enC9CQh dJADJGxoBQgIap32z8e/uOiQ+pel56VBea8RGWMrIvQxp+y9iPV/BikbdtFmTKexGjIl HVaDwf9b0bzrL5Yv5tMU8zQQxTIso49v7XkV+QRHm323u248DJfyuwO6o3r/d/JRPW4C MBtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YLjcXCEMJf5xAF7DKuZC+yJ48qIL8uSBqOcNS6lxEPI=; b=oCTaqqJpEBBjCP3DbqzKLYLqMvjmhXSM0xa3jrFHu0/vR21RpHT4MT9OibZAVr6Uqx pslqMR5/a8mR+3pXi5o3leoYpKOBbBWx7w8N7QeTeYnYepbU2R2YmQRFQwHZbK7i2xi8 Fge/17STWDUo6ln4az9kdIqek9DNthZCvnS7pf3H1T7ow0LgJN5kwygVP4OO3aVrG9U8 X/gBGMVscJcFiJ8ULbB9XW/BhXwbOmsBdKaKuqikDrFFd73rcG4XnW+zkEp0YnrFUqNg 70NLYLT0jzguyN73ZV9qmG9B/1OnUQBgDKOnTqb/tUcoZnQVXe52g5z+XHExRJehX4sl edLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=o00qtjJL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a17si9692092pfk.246.2019.07.22.02.52.08; Mon, 22 Jul 2019 02:52:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=o00qtjJL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729153AbfGVJoj (ORCPT + 99 others); Mon, 22 Jul 2019 05:44:39 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:35298 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729122AbfGVJoi (ORCPT ); Mon, 22 Jul 2019 05:44:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=YLjcXCEMJf5xAF7DKuZC+yJ48qIL8uSBqOcNS6lxEPI=; b=o00qtjJLkuy9H2u+xS5JRsIFEN ocjpNR3PZxUm1M6MGmjzKD9EZjw6fTAP39WnD4xaKsJqXi26UYlI2UNgc3bXFJrXwQBEfHcf6foVq Dva6X9pnLleGD2QJ5qVXMWg70Sbsx8KlBGkTuhImkHN4/+x7XldgDUWZygTsWnEG8wj41+yeB+4A6 dQAuv0iPGkUgGg7V8reOEDSKWvytYUS9nl1APlxiLWl4Q68PcIOPcqGPYItMFhwTG1fmYITlOEGHh LAjydc5V1PE1A8GEjGkB2YcyCuEhWzee1fBb3ng0KIrbY87SsDQOxQMchBjrNAeMX+ZaEZMX/89kI 902bJNMA==; Received: from 089144207240.atnat0016.highway.bob.at ([89.144.207.240] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hpUrz-0001sJ-OG; Mon, 22 Jul 2019 09:44:36 +0000 From: Christoph Hellwig To: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Jason Gunthorpe , Ben Skeggs Cc: Ralph Campbell , linux-mm@kvack.org, nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] nouveau: remove the block parameter to nouveau_range_fault Date: Mon, 22 Jul 2019 11:44:23 +0200 Message-Id: <20190722094426.18563-4-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190722094426.18563-1-hch@lst.de> References: <20190722094426.18563-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The parameter is always false, so remove it as well as the -EAGAIN handling that can only happen for the non-blocking case. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/nouveau/nouveau_svm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c b/drivers/gpu/drm/nouveau/nouveau_svm.c index cde09003c06b..5dd83a46578f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_svm.c +++ b/drivers/gpu/drm/nouveau/nouveau_svm.c @@ -484,8 +484,7 @@ static inline bool nouveau_range_done(struct hmm_range *range) } static int -nouveau_range_fault(struct hmm_mirror *mirror, struct hmm_range *range, - bool block) +nouveau_range_fault(struct hmm_mirror *mirror, struct hmm_range *range) { long ret; @@ -503,7 +502,7 @@ nouveau_range_fault(struct hmm_mirror *mirror, struct hmm_range *range, return -EAGAIN; } - ret = hmm_range_fault(range, block); + ret = hmm_range_fault(range, true); if (ret <= 0) { if (ret == -EBUSY || !ret) { up_read(&range->vma->vm_mm->mmap_sem); @@ -690,7 +689,7 @@ nouveau_svm_fault(struct nvif_notify *notify) range.values = nouveau_svm_pfn_values; range.pfn_shift = NVIF_VMM_PFNMAP_V0_ADDR_SHIFT; again: - ret = nouveau_range_fault(&svmm->mirror, &range, true); + ret = nouveau_range_fault(&svmm->mirror, &range); if (ret == 0) { mutex_lock(&svmm->mutex); if (!nouveau_range_done(&range)) { -- 2.20.1