From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D6A3C282C2 for ; Wed, 23 Jan 2019 07:15:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3BD982183F for ; Wed, 23 Jan 2019 07:15:32 +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="SgueDaaF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726301AbfAWHPa (ORCPT ); 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.