Message ID | 20201009075934.3509076-5-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=0lZN=DQ=kvack.org=owner-linux-mm@kernel.org> 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 62CC9175A for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 9 Oct 2020 08:00:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 114FC22275 for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 9 Oct 2020 08:00:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="LUs8gW8p" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 114FC22275 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 91A556B0070; Fri, 9 Oct 2020 04:00:00 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8A5CB6B0071; Fri, 9 Oct 2020 04:00:00 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 659776B0072; Fri, 9 Oct 2020 04:00:00 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0173.hostedemail.com [216.40.44.173]) by kanga.kvack.org (Postfix) with ESMTP id 312B26B0070 for <linux-mm@kvack.org>; Fri, 9 Oct 2020 04:00:00 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id CC05B180AD806 for <linux-mm@kvack.org>; Fri, 9 Oct 2020 07:59:59 +0000 (UTC) X-FDA: 77351638518.29.rail00_4801279271df Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id A1561180868D3 for <linux-mm@kvack.org>; Fri, 9 Oct 2020 07:59:59 +0000 (UTC) X-Spam-Summary: 1,0,0,3a03ffbaabb4d035,d41d8cd98f00b204,daniel.vetter@ffwll.ch,,RULES_HIT:41:152:355:379:541:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1431:1437:1515:1516:1518:1535:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:3138:3139:3140:3141:3142:3352:3865:3866:4321:5007:6261:6653:6742:6743:7514:8603:10004:10400:11026:11657:11658:11914:12043:12296:12297:12517:12519:12555:12895:12986:13069:13161:13229:13311:13357:13846:13894:14096:14097:14181:14394:14659:14721:21080:21251:21444:21451:21627:21990:30054:30064:30090,0,RBL:209.85.128.66:@ffwll.ch:.lbl8.mailshell.net-62.8.0.100 66.201.201.201;04yrggqh6zk8d1sjct4o1dqpwwyekoc8bypjghp9n3yfso3bwsx4yhtyzmsw7e5.cjo9bbkmk57z9jkxy9rp15yagbwephumzrntfq7ejc84nwr7paw6gpcuo38kzzg.e-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:29,LUA_SUMMARY:none X-HE-Tag: rail00_4801279271df X-Filterd-Recvd-Size: 5069 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by imf45.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Fri, 9 Oct 2020 07:59:58 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id d81so8864269wmc.1 for <linux-mm@kvack.org>; Fri, 09 Oct 2020 00:59:58 -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=uX5hiQf2/6+JGMu7ibulF4yjLrHkS7bzKXomqQaTHWE=; b=LUs8gW8poh/U88b/yPCV1unTccMuHSzIpHlM9z2+BrGZRpT9/SgX900ntWxsVp0THA 6pATcrsdZsxLyB+PObFVC/LN2SqZ3pUmcbdagnolKeMah/pcR69O+r6i8uxjKGpoKgMW IouGPHyDlnYWeMW6lK51rglfKepWnaslSuqQY= 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=uX5hiQf2/6+JGMu7ibulF4yjLrHkS7bzKXomqQaTHWE=; b=Pq8ZRiD+JB922KlbagMrB5HOZIlxIJFQtNsZMBqcFfz0MwmCLZZLoc+NrB2+WpUDJ1 WsWw8UXIqcXHv7Vn5y2lAjZmW0CCCCWhBuLLDuWIbL5P/1fqfht0NZvMgIv0nqeZ34hH mj55EG+HVb0zxj0CoU9lrDGzkftNl2+0i9cZSEAv5MsSWhFteou/dfwrKjQzNz7LQbcc MJBynpAJul4WTdGhpGad6+8yfLDIUPxmRJ/IoDX/9nqjuie2UFxr+kdhWArKlV7iQg6D R6z1NmbxSvx9gwfpaR53A4nqtn37FJMdamf6Yp+BGEgWEpsP2toeE2ksuZRLpWR7gTDN 0B4A== X-Gm-Message-State: AOAM5328ojxs1HzWnR2ny/goyqGnqDyuqFxBFvJHVBbPAYzH8y8eTb/W wagSyzbWwrsTNdXHSgHUJaux1g== X-Google-Smtp-Source: ABdhPJzgf8p51mqg8LMpEmZ8q3ui41jSdEp5wqDSyAI+GdHX93E/LMoGG5UPxz3MA259SCYbT0mGJw== X-Received: by 2002:a7b:c14f:: with SMTP id z15mr13474049wmi.73.1602230397816; Fri, 09 Oct 2020 00:59:57 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id u17sm11634118wri.45.2020.10.09.00.59.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Oct 2020 00:59:57 -0700 (PDT) From: Daniel Vetter <daniel.vetter@ffwll.ch> To: DRI Development <dri-devel@lists.freedesktop.org>, LKML <linux-kernel@vger.kernel.org> Cc: kvm@vger.kernel.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-media@vger.kernel.org, linux-s390@vger.kernel.org, Daniel Vetter <daniel.vetter@ffwll.ch>, Daniel Vetter <daniel.vetter@intel.com>, Jason Gunthorpe <jgg@ziepe.ca>, Andrew Morton <akpm@linux-foundation.org>, John Hubbard <jhubbard@nvidia.com>, =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= <jglisse@redhat.com>, Jan Kara <jack@suse.cz>, Dan Williams <dan.j.williams@intel.com>, Oded Gabbay <oded.gabbay@gmail.com>, Omer Shpigelman <oshpigelman@habana.ai>, Ofir Bitton <obitton@habana.ai>, Tomer Tayar <ttayar@habana.ai>, Moti Haimovski <mhaimovski@habana.ai>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Pawel Piskorski <ppiskorski@habana.ai> Subject: [PATCH v2 04/17] misc/habana: Use FOLL_LONGTERM for userptr Date: Fri, 9 Oct 2020 09:59:21 +0200 Message-Id: <20201009075934.3509076-5-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201009075934.3509076-1-daniel.vetter@ffwll.ch> References: <20201009075934.3509076-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 |
follow_pfn and other iomap races
|
expand
|
diff --git a/drivers/misc/habanalabs/common/memory.c b/drivers/misc/habanalabs/common/memory.c index 327b64479f97..767d3644c033 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) {
These are persistent, not just for the duration of a dma operation. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: John Hubbard <jhubbard@nvidia.com> Cc: Jérôme Glisse <jglisse@redhat.com> Cc: Jan Kara <jack@suse.cz> Cc: Dan Williams <dan.j.williams@intel.com> 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 <oded.gabbay@gmail.com> Cc: Omer Shpigelman <oshpigelman@habana.ai> Cc: Ofir Bitton <obitton@habana.ai> Cc: Tomer Tayar <ttayar@habana.ai> Cc: Moti Haimovski <mhaimovski@habana.ai> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Pawel Piskorski <ppiskorski@habana.ai> --- drivers/misc/habanalabs/common/memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)