Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp465659imu; Tue, 22 Jan 2019 23:16:52 -0800 (PST) X-Google-Smtp-Source: ALg8bN6MWIhNRcJw29xBXoqYKyW/2IpgFCvndkUv5EjtNpaDtE2Eomw026KTTcL2nFSW7WVYsY4E X-Received: by 2002:a62:8add:: with SMTP id o90mr1083989pfk.210.1548227812209; Tue, 22 Jan 2019 23:16:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548227812; cv=none; d=google.com; s=arc-20160816; b=Ye8xgO4nY0sgYYzteH6DD1Dh7d9tnpG71Rm9Xf/v1+VHYCZK+3LueEFVT/ufPMw9ZV uqcrNhZUHKCjfudDtC/xI4OX58Q237kWUGNNJo9FPuBYTwbY9BKBClBQ9Nc5SepaDuG3 XpSiRq3GAdR/epUxDFqZf9RZDR11WorpwZl+GXhnNxiUXvjZ0wkVJalpua+5ZIgHIDN9 zGefroDkJe0C4bTarVqx8zS02zOMXzZBCaMTBLQU1hJk8iNEYcSONAhmpudY9sbSDamk 346tlzJ+jaF5R9E2tfC7EWd9qp0RVn89fNVvFyIce71FE2KlBKDzT7iCHTJM5rH9YVdt Z/Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fU3Tp5X5mg3VkzsKQJ/bzPanWP1fn5wZRu0id58SM70=; b=zCCyg9sova6IrGO8cwrCzTUFLUdkfD6wnjhw7Xs+WfBEnI/7DHET2U3MwCqWdGqAX+ Lyhbr+jnc6/fIIHohugjlBy/B75OFm8OGZhRGvZqpoEDMOMFLku8b06POOx+W6HudWxc 9OLrEr4/q/M+xMuRDCR75+OJ/LW0GA3o19ScY+eVfSzErPPm57iR2xPM6HMPb+28pfAR TwsEWBcLxxIkPS+0PIUBW6DMNEXUPH9VFg+0hiNWxhcrm5VnbaU6vrJZMvGirMtSwUtk avqRbjgdWWApVpwClhUCIH7JQDRJDg3umIZziXWzN6CCrobsw5mEStXBgOuk+lg4EXGw 9jJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SgueDaaF; 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 x8si18253257plo.259.2019.01.22.23.16.36; Tue, 22 Jan 2019 23:16:52 -0800 (PST) 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=SgueDaaF; 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 S1726289AbfAWHPa (ORCPT + 99 others); Wed, 23 Jan 2019 02:15:30 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:60032 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725950AbfAWHP3 (ORCPT ); Wed, 23 Jan 2019 02:15:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=fU3Tp5X5mg3VkzsKQJ/bzPanWP1fn5wZRu0id58SM70=; b=SgueDaaFWbThNyTXXny6pl1un RNiHq22AU335tbMtznh3r72u1FRxLOGF2FFZBY4m8Z3SIbMkITimVOpom3myxt9qf4z8A+WcAdYsO s9FNM/OQiVNReECoGjf36k0673a9XrJZs48LUA+lKaNFsaK1T7pc+eLTKQlyD//AFeoeK16Ah63gJ It5baQ4x+I5Rb0moAKumgxOVG58N5R4ccO023EMeK3qjoz/i7Az1R0Rd5S0EVWsr2oCfaOy2cRsMN Zie3wvNiCGY0rWlbvtfYfTyB3vTWe0P9jna/LFb0i7SsCKeosMkCEyShap/srDGaA7LKeDZCPRnlm PiCrzxp+w==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gmCks-0006hg-0j; Wed, 23 Jan 2019 07:15:22 +0000 Date: Tue, 22 Jan 2019 23:15:21 -0800 From: Christoph Hellwig To: Ard Biesheuvel Cc: Alex Deucher , Michel =?iso-8859-1?Q?D=E4nzer?= , Maxime Ripard , Will Deacon , Linux Kernel Mailing List , amd-gfx list , Christoph Hellwig , David Airlie , Huang Rui , dri-devel , Michael Ellerman , Junwei Zhang , Alex Deucher , Sean Paul , Christian Koenig , linux-arm-kernel Subject: Re: [RFC PATCH] drm: disable WC optimization for cache coherent devices on non-x86 Message-ID: <20190123071521.GB20526@infradead.org> References: <59ccf85d-b99d-b5c8-ea87-66c2a892e197@daenzer.net> <850b6aee-0040-c333-b125-45211c18ada5@daenzer.net> <047667fd-17be-1c37-5d2a-26768cfd6ab8@daenzer.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) 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 On Tue, Jan 22, 2019 at 10:07:07PM +0100, Ard Biesheuvel wrote: > Yes, so much was clear. And the reason this breaks on some arm64 > systems is because > a) non-snooped PCIe TLP attributes may be ignored, and > b) non-x86 CPUs do not snoop the caches when accessing uncached mappings. > > I don't think there is actually any disagreement on this part. And I > think my patch is reasonable, only Christoph is objecting to it on the > grounds that drivers should not go around the DMA API and create > vmap()s of DMA pages with self chosen attributes. I object to it on various grounds. While the above is correct it really is a mid to long-term fix. But even in the short term your patch just maintains a random list of idefs in a random driver, pokes into the dma-mapping internals and lacks any comments in the code explaining on what is going on, leading to futher cargo culting. So it very clearly is not acceptable.