Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp535863ybb; Wed, 8 Apr 2020 05:05:23 -0700 (PDT) X-Google-Smtp-Source: APiQypIq9M/R1FKx0ckPTUt9LnfjRfq7vVE71lxjc7IDZRXEPesSMHswncQiGKLw5cl+fBpZwbY7 X-Received: by 2002:a9d:12ce:: with SMTP id g72mr5385392otg.350.1586347523422; Wed, 08 Apr 2020 05:05:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586347523; cv=none; d=google.com; s=arc-20160816; b=gl86iIUj7gzPaNEmjtdijTXorM7irQ9mcmd/cXI4UYjeOv8I7oV9P37xdmPv+Tq4x4 4FVNDkzu1JnaUAUgEcLEc3v4Ua0apBvrESPhev6RVCtyg5vBEP662RDkwCSbeTZPW0ZE yAZt8myHF3QKOC2NwQadM/Xr8BQmIEwmyDnip5fec2jLKfpidEfeoV93NKYseyEMIsIp X1I+k3n8ohj7jskgJycnDY6jiVJNffIx9mGjALucaw24cQPT7o+avXzRehWyAQEEuS0x AaHnaulh+5OBSR4L/Txgj4P1InKo1NKDZ5hd7ezMzi9CZv9vi7ebdDsTj/TZZM2fskId WWuA== 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=ukiT7cjWiYzMkls/B9h9QYB1LDc96srkW4GA62ogYa8=; b=BjxZswhfKUAqWixMPgocOQOpD5mny9UpzQBRav3k8t117mgc+G0e5Q/bE5fgrT/N8u r51QOu3+0KcjUxvaN6kCx5+IYa/1tUZFAOQpELgELAEB3Na6RjAhtZM/Mqgtlubanqyc 2NzvG2V08PEfq3mobafzSYGPp9EQzcFgn/cwBDqfo9+KCdnSicxj80Qy90bkUMExrSyl 6yDm/1ia2bcftkeoMQij6ToJTjHimgjJEnrtGAAzjW5aNKpbl4bgasBEVdNF7ZTXhagt jBPAiLnfDkZ8gCSTZYHx6iS0tz+/M+5OqmpuwMgpvg9dS6JaMOTSh3a8yGAroUA6dRCh J86g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=by4MCf4F; 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 i15si2437653oib.46.2020.04.08.05.05.00; Wed, 08 Apr 2020 05:05: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=by4MCf4F; 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 S1728220AbgDHMBE (ORCPT + 99 others); Wed, 8 Apr 2020 08:01:04 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:50790 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726734AbgDHMBA (ORCPT ); Wed, 8 Apr 2020 08:01:00 -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; bh=ukiT7cjWiYzMkls/B9h9QYB1LDc96srkW4GA62ogYa8=; b=by4MCf4FVlspiK89hC2yTnCIIQ QPo0j86FrRXcZr2VQ9RBlmnLAAB1yGmTiwAs/Ycl5Fen4vhNhgr7/M739lbjWc6iM7I9k/siTyB6a pgcyhntBma3DHBWqkHk4iDyNhx7tU0qWbzsxwDp9GoGnFR4USOqnuZmzB4Y1b01eNHlvlYGBe81MB XygDQ2P7YtQmA2jdzBhXzrBiFHp+aaP03P0JjPP22LfjDvWsiFP9MeldguZFabAdtW9q7GktxCOvz bHYelFOQxTAwWNU846W6+h/RDzX+V4ldekVITCi+H+sZJ/fxG8IXK/jpC+2PtGZN4GXXo55sx/ZIx u921kA+g==; Received: from [2001:4bb8:180:5765:65b6:f11e:f109:b151] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jM9Nn-0005S9-I6; Wed, 08 Apr 2020 12:00:40 +0000 From: Christoph Hellwig To: Andrew Morton , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , x86@kernel.org, David Airlie , Daniel Vetter , Laura Abbott , Sumit Semwal , Sakari Ailus , Minchan Kim , Nitin Gupta Cc: Robin Murphy , Christophe Leroy , Peter Zijlstra , linuxppc-dev@lists.ozlabs.org, linux-hyperv@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 19/28] gpu/drm: remove the powerpc hack in drm_legacy_sg_alloc Date: Wed, 8 Apr 2020 13:59:17 +0200 Message-Id: <20200408115926.1467567-20-hch@lst.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200408115926.1467567-1-hch@lst.de> References: <20200408115926.1467567-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 If this code was broken for non-coherent caches a crude powerpc hack isn't going to help anyone else. Remove the hack as it is the last user of __vmalloc passing a page protection flag other than PAGE_KERNEL. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/drm_scatter.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/gpu/drm/drm_scatter.c b/drivers/gpu/drm/drm_scatter.c index ca520028b2cb..f4e6184d1877 100644 --- a/drivers/gpu/drm/drm_scatter.c +++ b/drivers/gpu/drm/drm_scatter.c @@ -43,15 +43,6 @@ #define DEBUG_SCATTER 0 -static inline void *drm_vmalloc_dma(unsigned long size) -{ -#if defined(__powerpc__) && defined(CONFIG_NOT_COHERENT_CACHE) - return __vmalloc(size, GFP_KERNEL, pgprot_noncached_wc(PAGE_KERNEL)); -#else - return vmalloc_32(size); -#endif -} - static void drm_sg_cleanup(struct drm_sg_mem * entry) { struct page *page; @@ -126,7 +117,7 @@ int drm_legacy_sg_alloc(struct drm_device *dev, void *data, return -ENOMEM; } - entry->virtual = drm_vmalloc_dma(pages << PAGE_SHIFT); + entry->virtual = vmalloc_32(pages << PAGE_SHIFT); if (!entry->virtual) { kfree(entry->busaddr); kfree(entry->pagelist); -- 2.25.1