From patchwork Wed Oct 7 16:44:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11821221 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E933C16C1 for ; Wed, 7 Oct 2020 16:47:01 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 A2D17206FC for ; Wed, 7 Oct 2020 16:47:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fDg1tkYH"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="M9/9cFkL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A2D17206FC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=EQWjoMw6+j3Rs8SOvDQZtVf14iXqnBiE6ik+GnruQZY=; b=fDg1tkYHZGV9/KUc9RkxPwGCQ EUXrTcb7w4pmKPEZ5Rj1bIC+30st1e38sTYPj2aXNRBDWCKeETiEi+OrXIeBAH/tiORBwjlVG8Ddl HOrhFAK8lEv+f7E+EH5/bfOC0g3dGAgFffcJJrmyzK8zUKlKodQdD+YA6cJHOFYWPiScEsMh1TZDw 2rToVJuS4vnmbEQEiAX5qbZ8sRiVs+MCP+LAgLIW8GLPEZQxOWAoevEih0V643xhEQhGesU3Egxzi B569TfbxMWvVdXzROQlnaAfRz0kypkrIMkmOcCZgm51TEBhGcm+IywZNo3LZ5nUtj3UcERKyVlyGi N9Sx9T3Qg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQCZ4-0001RY-RG; Wed, 07 Oct 2020 16:45:18 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQCYR-00018B-I9 for linux-arm-kernel@lists.infradead.org; Wed, 07 Oct 2020 16:44:44 +0000 Received: by mail-wm1-x344.google.com with SMTP id d81so3055401wmc.1 for ; Wed, 07 Oct 2020 09:44:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CXmXX9/hQfgNA2sDFICXZ2LHoeIrjelysU1qQvq0pLo=; b=M9/9cFkLYvtsV+XSvB3EIEIsseQMf3Ht42LRs7L3X5P1WwWl9Oi2KvxQBCacCcF14m fJV8CQS9LPrjIIfBd4aiNt1OxGBmDjd9OCGq8SR0MHNMsO52kAQKbH++f9zP6zkYkuCb ir3n+83k7vXH52uffeOAdQ1DpKcQF6dl1WTl4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CXmXX9/hQfgNA2sDFICXZ2LHoeIrjelysU1qQvq0pLo=; b=T2+yb6wh6gCAQRL9gJuOGLjnxmx96ttkQQm6iXEmmUxCIwoQ9KWcHX+AgPSxQLnXfC IkrLH2m9VKua532S5jp42jUqETJiZ9m0prTr+IK7uB2L5ackz/eAJAX4uD/ZsIMsyXPo pkIx5FjfViwBB6gPO/lgEhxVBrTo4z2pbdIBXCWG3wQirIkwYLjNR5IRik/Haxro5iGo suUcPtOuEFQlCwKJLGNsd2VAYalO1NKQdFKEUUYgpVlaUV4DJaQCKy5KHmvwKyBD/5oy jSqHUmzxtYAehMeq2JUTXXfpFtZyGZ2NHaDDz2FbvtmTdyhQ18zB9bA9YYWL5jo4mcd1 9u3w== X-Gm-Message-State: AOAM533V7qxxEkV9xrMaPatxVFkmRDbWdAke5zNbEPK7f4gcpO2wRCpg zzpNb+IGmd1g1n0qreWDn5EhZA== X-Google-Smtp-Source: ABdhPJxC/lomxhrpmJUvYBJInJM6vUgAB59jFw18I6b4BWoKkPAiJCuoXppD6fu/bxyn6KUpfhv2Zw== X-Received: by 2002:a05:600c:1149:: with SMTP id z9mr1651741wmz.180.1602089078573; Wed, 07 Oct 2020 09:44:38 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id z191sm3332280wme.40.2020.10.07.09.44.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Oct 2020 09:44:37 -0700 (PDT) From: Daniel Vetter To: DRI Development , LKML Subject: [PATCH 04/13] misc/habana: Use FOLL_LONGTERM for userptr Date: Wed, 7 Oct 2020 18:44:17 +0200 Message-Id: <20201007164426.1812530-5-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201007164426.1812530-1-daniel.vetter@ffwll.ch> References: <20201007164426.1812530-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201007_124439_716170_B324A700 X-CRM114-Status: GOOD ( 15.61 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:344 listed in] [list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Oded Gabbay , linux-s390@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Jan Kara , kvm@vger.kernel.org, Jason Gunthorpe , Pawel Piskorski , Daniel Vetter , Greg Kroah-Hartman , Ofir Bitton , linux-mm@kvack.org, =?utf-8?b?SsOpcsO0bWUg?= =?utf-8?b?R2xpc3Nl?= , Tomer Tayar , Omer Shpigelman , John Hubbard , Daniel Vetter , Andrew Morton , Moti Haimovski , Dan Williams , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org These are persistent, not just for the duration of a dma operation. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: Dan Williams Cc: linux-mm@kvack.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-media@vger.kernel.org Cc: Oded Gabbay Cc: Omer Shpigelman Cc: Ofir Bitton Cc: Tomer Tayar Cc: Moti Haimovski Cc: Daniel Vetter Cc: Greg Kroah-Hartman Cc: Pawel Piskorski Reviewed-by: John Hubbard --- drivers/misc/habanalabs/common/memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/misc/habanalabs/common/memory.c b/drivers/misc/habanalabs/common/memory.c index ef89cfa2f95a..94bef8faa82a 100644 --- a/drivers/misc/habanalabs/common/memory.c +++ b/drivers/misc/habanalabs/common/memory.c @@ -1288,7 +1288,8 @@ static int get_user_memory(struct hl_device *hdev, u64 addr, u64 size, return -ENOMEM; } - rc = pin_user_pages_fast(start, npages, FOLL_FORCE | FOLL_WRITE, + rc = pin_user_pages_fast(start, npages, + FOLL_FORCE | FOLL_WRITE | FOLL_LONGTERM, userptr->pages); if (rc != npages) {