Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1157821pxb; Wed, 10 Feb 2021 01:15:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJw7oslDWRHO4W/+S97Ypvxy0IAAmjb/fFr4TL+/UH/rgC/TPVZzkr3hvM2bVfe/mKvs5HU5 X-Received: by 2002:a05:6402:149a:: with SMTP id e26mr2330238edv.254.1612948538336; Wed, 10 Feb 2021 01:15:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612948538; cv=none; d=google.com; s=arc-20160816; b=VHz+/BJF19XhMlIZbNiwyeuKlnpXQ8ZX0R7VKm1gQoCY4eQbsfSoqJKZLBJ1QUz3g8 TUjxsz92yxbgPMS0gRK8owbQVcd7LV6SD/cnhAFJPHAiQAt1FxnNJy2fn08GBfWWRIPf 39EvOVUyLZkhvsPIKTySitfRgW0QkDJgNvklRNmLbRyKk4ePJA3Ofy6tlS/jR8jHqliB zFUuk+VhUSe5jHUuwxZXGF54J3Ku6ztA3HF6lo+opJyfzWRdz+LxiGInursexjRG4H4P tQfvgxBtqUoUuxYhP41s/iVp29ZAU9dv59jWe4Uz5t9YKABv+TjAKo9S/ThQNlT4kI06 DxLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=syfAhNNvJqHFJteqbRVdmHAjWNUwENanvC/EOpMe+wQ=; b=OnGGi3t1kSeb3pOLCJ6AXvgjp1q26V6N5tB9ALPO60gpQjx9qaRoKhRz+RGo5gq7fW HbRFxbunXQP6Wli6NUkeu0hhAlM+jWb1D/yFRRP2Y8gfkD2p8oSyNfsDr9vykJQkB2I3 tM6kp2TyqxuAeLqYM3zUAFy3vcIGjU8HF47V0ZTIHTUn1mk57XqsW3L7umP1u4EbYqsU XcX66sJfuAqpN2fhSx2V8h0ceWS7otEhzrJR/pUCgx4D9rTHnRRt1lDCUtNcXGkManec RbmpZy5FMzkQhJkEbj9pSZVRVX4P0WcFQ1gCghMU3UPA249HnoXW4PAHCmeQ4Hkuv3P4 XCIA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f17si929809ejd.597.2021.02.10.01.15.15; Wed, 10 Feb 2021 01:15:38 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230353AbhBJJFO (ORCPT + 99 others); Wed, 10 Feb 2021 04:05:14 -0500 Received: from verein.lst.de ([213.95.11.211]:49933 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230091AbhBJI6M (ORCPT ); Wed, 10 Feb 2021 03:58:12 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 37B6B6736F; Wed, 10 Feb 2021 09:57:25 +0100 (CET) Date: Wed, 10 Feb 2021 09:57:24 +0100 From: Christoph Hellwig To: Thomas Bogendoerfer Cc: Christoph Hellwig , Greg Kroah-Hartman , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org Subject: Re: [PATCH 4/6] MIPS: refactor the maybe coherent DMA indicators Message-ID: <20210210085724.GA24610@lst.de> References: <20210208145024.3320420-1-hch@lst.de> <20210208145024.3320420-5-hch@lst.de> <20210209131237.GB11915@alpha.franken.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210209131237.GB11915@alpha.franken.de> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 09, 2021 at 02:12:37PM +0100, Thomas Bogendoerfer wrote: > > +#ifdef CONFIG_DMA_MAYBE_COHERENT > > +extern bool dma_default_coherent; > > static inline bool dev_is_dma_coherent(struct device *dev) > > { > > - return coherentio == IO_COHERENCE_ENABLED || > > - (coherentio == IO_COHERENCE_DEFAULT && hw_coherentio); > > + return dma_default_coherent; > > this breaks overriding of coherentio via command line. plat_mem_setup/ > plat_setup_iocoherency is called before earlyparams are handled. So > changing coherentio after that doesn't have any effect. Hmm. In that case a manual override does actually work for alchemy, as that initializes coherentio from plat_mem_setup(). But the elaborate sanity checking that malta performs in plat_setup_iocoherency is rather pointless then, as coherentio will always be set to IO_COHERENCE_DISABLED at this point.