Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp624963ybb; Wed, 8 Apr 2020 06:48:31 -0700 (PDT) X-Google-Smtp-Source: APiQypKEfs+oYrtf6cc5Kc4mZ4UKWYnHR0haobggIYF28i936hcLZnWXW1MBKTgx8bYmqf5anku0 X-Received: by 2002:a9d:6315:: with SMTP id q21mr5826068otk.16.1586353711104; Wed, 08 Apr 2020 06:48:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586353711; cv=none; d=google.com; s=arc-20160816; b=nPVW8Tu1DlrSHSkLe6CKsPOFE8jeWlJ69YBgF3fSR/iiAeWPSZ5l4I+BRBqXkijAax LzUj96UXgUG5L21bQpN/rjs3VE8uC4DI6eU30nkEJGlIMppFE48H2tDqh6cP/r02WTih 3KdRe+BTsMj+oP9OYLTtBXSHn69/i/fx2euWjcODWAvxUCkKqmHJ4beHDIl6Ym75ipew xQq1RkTWYVm6P2/xFSHKENgyES3nG0db9/wQ7p+eSmoOE3knFHTeUMHpqzdqlGekv+2h 4kaAJjNmkkJTqlxZ0F8AtA0SAKQEYgwjngdRwnR04ZiQViBAwcXgxXMmtJO3dGdoWJ6K aJBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:dkim-signature; bh=S+T3eMWPDVVKjkhAMCN4OLY+AXtsqs3KpyYmqj2eyPw=; b=DjDg86ziim5c9DfZuhxE25luDDJnaOYGQmshKhlzt2izv4R9CQaTdR1OJuh6roaqq8 oGYb6RwF5VadS3ge4i6f+W8W4618hWxcR5qlVXyg1hrp3sGRtnSq9N77KDnlugazPRmS reBl8MQPDPN4TOu3NjgSGycpIxVDvlLzSJgENgTceDGHoM9Tr4ImR9nmDr/L11NMZBWQ YiKpU59N8TBOT4GhlZtTmlhdS6bPKPSjhsMjjEl7y1fcMDlOCnmwWPKEnZ21PAvhAYOZ 888SxnwdLkQ+YyTnGE+pxFrRx+8CQHBrijOGl+QNrMzLX3GEG/40aKN5+tdhIyiRuGmK TSfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=iTDVFh9z; 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 l17si860417ots.13.2020.04.08.06.48.16; Wed, 08 Apr 2020 06:48:31 -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=pass header.i=@ffwll.ch header.s=google header.b=iTDVFh9z; 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 S1728251AbgDHMZL (ORCPT + 99 others); Wed, 8 Apr 2020 08:25:11 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:34173 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727612AbgDHMZK (ORCPT ); Wed, 8 Apr 2020 08:25:10 -0400 Received: by mail-wr1-f67.google.com with SMTP id 65so7617545wrl.1 for ; Wed, 08 Apr 2020 05:25:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=S+T3eMWPDVVKjkhAMCN4OLY+AXtsqs3KpyYmqj2eyPw=; b=iTDVFh9zGz+cA8knHYYQ0Yf9dPIyYyDTxXa4CjSfrmLiD5i70f+PrvxbUf3+NKNs6P 0FpMET5mzx+JLVZSzcC1hvsXM+4Tttd8dTrz+Xv2lGQ2cbnW/q88kgg5209meIQ7muh4 h9U+2WX4Hzg6PB+HIxI6ZXmC8Lzm/Rzktbqts= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=S+T3eMWPDVVKjkhAMCN4OLY+AXtsqs3KpyYmqj2eyPw=; b=ToikSFkwzb8VPlKrNlfDLtVaX6HEK436lRCa9AyORAO3J0Nzt0/L2nNdYaXzc39X1a Ai60doCauTULWOskk1BXadOvt98qMqthDpEABqZ2cAu6s14iQ1nGMFKecXWtDn2ikR9r s6TaqWYFAM5Iqy6jo3/fylHVkeoZEQnUTT8F6v+rQF10rRDLutweIFt7j9wS1ECf6dgO XvMwkKiAYg8/r+8p4g693psUd5TabbCSwS6bz/Sqp3pxveRrESAqhe0DG7G9fPfG+Oi4 bHSWdU93sDL8bliE3kNka+uxhNb7U1TcSl7MiNwPnNDX+WVdioPbDYkonreNqdm5BHTO 5C4A== X-Gm-Message-State: AGi0PuYMj58VwtKsHXnhOXm+8kWHBwbdhJd6FEaWjisFk1ERQdcE8jIG mOjHYlyTwIIR58cZlhJmLIGpLg== X-Received: by 2002:a5d:4111:: with SMTP id l17mr8794439wrp.271.1586348708002; Wed, 08 Apr 2020 05:25:08 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id v7sm35651554wrs.96.2020.04.08.05.25.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2020 05:25:07 -0700 (PDT) Date: Wed, 8 Apr 2020 14:25:04 +0200 From: Daniel Vetter To: Christoph Hellwig , Benjamin Herrenschmidt Cc: 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 , 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: Re: [PATCH 19/28] gpu/drm: remove the powerpc hack in drm_legacy_sg_alloc Message-ID: <20200408122504.GO3456981@phenom.ffwll.local> Mail-Followup-To: Christoph Hellwig , Benjamin Herrenschmidt , Andrew Morton , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , x86@kernel.org, David Airlie , Laura Abbott , Sumit Semwal , Sakari Ailus , Minchan Kim , Nitin Gupta , 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 References: <20200408115926.1467567-1-hch@lst.de> <20200408115926.1467567-20-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200408115926.1467567-20-hch@lst.de> X-Operating-System: Linux phenom 5.3.0-3-amd64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 08, 2020 at 01:59:17PM +0200, Christoph Hellwig wrote: > 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. Well Ben added this to make stuff work on ppc, ofc the home grown dma layer in drm from back then isn't going to work in other places. I guess should have at least an ack from him, in case anyone still cares about this on ppc. Adding Ben to cc. -Daniel > > 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 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch