From patchwork Thu Sep 24 13:58:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 11797521 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 78E9D139A for ; Thu, 24 Sep 2020 13:59:23 +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 4268720B1F for ; Thu, 24 Sep 2020 13:59:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="uu25bWkH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4268720B1F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de 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 D12976EB19; Thu, 24 Sep 2020 13:59:19 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7C07D6EB0D; Thu, 24 Sep 2020 13:59:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=X+38u3dxn/7egb0TxSukZV81QAaP08nl9fHTuMV9EMQ=; b=uu25bWkHo+Hl7Pv/rKxKpa+6P4 BHLFMKp4K/8UDfROjPA4Ae2Eh5k+yTJFfu+RAvj1L9krzANI/zjRwfKYM/zsgaWcPV6nmH4Hxg+De AWPM3v8Oca4Zul2mpMbnZdDPftGBE9ef4mz5QtL0o4NIe6A9ODUCLIL6vivqj4asYns9nniEMLLv4 JanSFdyALR7K6k0IJIxIW4LU+EtxaghLks3e7eMcxljYpzfM2oZXYNnBT+UPOvVriZp7nosdFqmOW mpVnRwbMmLG/ksy86yoATba6R5XOZXKSbTkq+PTth7Gz++eLMVHv522QJZ8XQKYxGLcq1VzdTJ4nm Y34AuxnA==; Received: from p4fdb0c34.dip0.t-ipconnect.de ([79.219.12.52] helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kLRm3-0003wA-9Q; Thu, 24 Sep 2020 13:59:03 +0000 From: Christoph Hellwig To: Andrew Morton Date: Thu, 24 Sep 2020 15:58:49 +0200 Message-Id: <20200924135853.875294-8-hch@lst.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200924135853.875294-1-hch@lst.de> References: <20200924135853.875294-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Subject: [Intel-gfx] [PATCH 07/11] drm/i915: stop using kmap in i915_gem_object_map 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: Juergen Gross , Stefano Stabellini , Matthew Wilcox , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, Peter Zijlstra , linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, x86@kernel.org, Chris Wilson , Minchan Kim , Matthew Auld , xen-devel@lists.xenproject.org, Boris Ostrovsky , Nitin Gupta Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" kmap for !PageHighmem is just a convoluted way to say page_address, and kunmap is a no-op in that case. Signed-off-by: Christoph Hellwig Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pages.c b/drivers/gpu/drm/i915/gem/i915_gem_pages.c index d6eeefab3d018b..6550c0bc824ea2 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_pages.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_pages.c @@ -162,8 +162,6 @@ static void unmap_object(struct drm_i915_gem_object *obj, void *ptr) { if (is_vmalloc_addr(ptr)) vunmap(ptr); - else - kunmap(kmap_to_page(ptr)); } struct sg_table * @@ -277,11 +275,10 @@ static void *i915_gem_object_map(struct drm_i915_gem_object *obj, * forever. * * So if the page is beyond the 32b boundary, make an explicit - * vmap. On 64b, this check will be optimised away as we can - * directly kmap any page on the system. + * vmap. */ if (!PageHighMem(page)) - return kmap(page); + return page_address(page); } mem = stack;