Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1089747pxk; Fri, 25 Sep 2020 06:05:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsHA+vxCdAqZXk0bS8Akd2BIKfz+K4zAHd9ivpBuhr0LC61oByjIR6DYWjThaG+wBC+fvl X-Received: by 2002:a05:6402:1148:: with SMTP id g8mr1195693edw.271.1601039145150; Fri, 25 Sep 2020 06:05:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601039145; cv=none; d=google.com; s=arc-20160816; b=p+JXvEM3XUSF7L5hx5azLNi3WK4Xz4EbaBO2TeTtmhn4Rq4zvabZJE0gWEVmMjSLNC 1uYfmwRhbHtvSMLNHQ5jsSNku/JjJ0Jcagnm8EVRxtEMPmPuYEaq81oMK3QtBuvz7nga 0fIRTTZo52I/2Epp9cH+gETVmb6sECn3QiWRBiHJkWoPoh7MkhBITkPgFiVnUkl6AT+P MDwcwXVDae7ESdqrejiwvKIe3zeF10cYrc5F01Gv/+VFWPxLX2KFTgYUeM46+VhVGwi6 tGQO6V4bQ4sVhEHm7wzx2uTumsgFec4n/MuMHcf5tw8+btP6d/u2p3gND/qfeWZnI4W5 l36A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=ZeuHkHCQJDbYVobTk6v/BwdIEfq2kMHo7byixJbf/wE=; b=WsHZ/GCbBfbeh3t9pE+NrZ8uCnoPLh7g1AKtLQERFdmOh2MS5eUp7mzSmFjb50TaGG /eIzoAN06JsIINdbdbwN9llJxXvke3KYbdswxUjxHQITVcO0t5hkKYihXfN00NhXqkYr 0+GuEo4MXR6YwVAuluRyHgaUO3NOYbWf2AhT/lHw4tjiVk5OwMxOxDSsPF8I/gTy+UHa rZ2yFsxrWaGoBDg3Vuymtq5Nd/sn2jzXeXddujwN/6f0Xkk2BOGXz5FWn5tgqXbvVFsN JhUQuTdFynNGWltYJnGbOliXqdxMFsjYHlXC2HBo9hsrBsPkfCsx5raohyvXQP3eVjlr LoSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q6si1714268ejx.221.2020.09.25.06.05.18; Fri, 25 Sep 2020 06:05:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728629AbgIYNCN (ORCPT + 99 others); Fri, 25 Sep 2020 09:02:13 -0400 Received: from mga06.intel.com ([134.134.136.31]:40472 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727733AbgIYNCM (ORCPT ); Fri, 25 Sep 2020 09:02:12 -0400 IronPort-SDR: KyH5qmpxGyonUpXu3pBCxmr1sFOd0fXZqlm78L3EYsEe0mnUat5kmhAkT3sGh/f9Vo/RQQGXuV IqMLAd3Wdydg== X-IronPort-AV: E=McAfee;i="6000,8403,9754"; a="223111328" X-IronPort-AV: E=Sophos;i="5.77,302,1596524400"; d="scan'208";a="223111328" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2020 06:02:11 -0700 IronPort-SDR: OZamlwX2zWqLUrbLSEoIsVvtwGhUUsxA4uAx8BG9zebWwmpfo9ZeyTDwYsvjJeAEWzi0tdodhs m+aC4Xx9uiAA== X-IronPort-AV: E=Sophos;i="5.77,302,1596524400"; d="scan'208";a="455821735" Received: from mlevy2-mobl.ger.corp.intel.com (HELO [10.251.176.131]) ([10.251.176.131]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2020 06:02:02 -0700 Subject: Re: [PATCH 07/11] drm/i915: stop using kmap in i915_gem_object_map To: Christoph Hellwig , Andrew Morton Cc: Peter Zijlstra , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Jani Nikula , Joonas Lahtinen , Chris Wilson , Matthew Auld , Rodrigo Vivi , Minchan Kim , Matthew Wilcox , Nitin Gupta , x86@kernel.org, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-mm@kvack.org References: <20200924135853.875294-1-hch@lst.de> <20200924135853.875294-8-hch@lst.de> From: Tvrtko Ursulin Organization: Intel Corporation UK Plc Message-ID: <8d318fcb-f472-85ed-6639-18f9c45f30e4@linux.intel.com> Date: Fri, 25 Sep 2020 14:01:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200924135853.875294-8-hch@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/09/2020 14:58, Christoph Hellwig wrote: > 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 > --- > 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; > Reviewed-by: Tvrtko Ursulin Regards, Tvrtko