Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1005362pxb; Tue, 9 Feb 2021 19:44:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJyu1GeRc7UxtRWxZ1Kp3ohtWk5pccfasrzoHoUSog2oP3odLDtdqiKLF9u5SJRWPn2ahWkn X-Received: by 2002:a17:906:40d2:: with SMTP id a18mr981199ejk.82.1612928646790; Tue, 09 Feb 2021 19:44:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612928646; cv=none; d=google.com; s=arc-20160816; b=GtJibCgFxQd66+notW0PHuigjd9Sfu7uOk2BYljMIWTaac8gJtjr5ECLWhlxwJA0+C agEma/nIUt98qF9vqi+tMfLQe/bjUBzWKw/kUVaPdIBmvpeXp6Q91yUSBRnCMXC8+Scm dy7vpaMWcSOdUqeOXNWdWqzaSSkUa3ghd1l0k4rMjqVw/oYlg0jBdhKfLu4h4rmCm3Ul REXxdqwiF2EAGfNq82QEkQ9RG+fkj/wvXQ9LGA5/MvCa5LdI1wUMYOi6SojrmshJLuH/ zf+uO3WeTWociRSfVtL42DLJ78o52ZxJVLt1es4DWWPybV06kQnlhNHxv9Z3hZ0u5QBs T5tw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=yNCQ54XigATAf/E+tWYlb/D3DITWjzHuxrB0Lw0c3wg=; b=f4GabJsHCFSVb6sNUMmkOnvIQgTY+SRZba59Kz2EQ8tvjK1ZKEnYjMzGcM8aBEPYtI 4XNhMwFza+6+UFQiKMEae0ALhOZAO/gRcJBLmf7WYp8geIRlF2uPMyOtrog9cUNLAbTD BhZC4fd6KE4F5Ua4DulBpQVojQtyu/NXJnTJJFIPmIqCcm5wzxM/hZccIfh60mnB+f7e x060JlJSoxOjbTUan7tUHLbDvDAUQLGw+om7gJbQZuq0N4pc8EvsCIFpXjA1zx9IMQkV De+8SjuyiHn9x8IkmbTmQj4ht9dC4dnBlwxCDcIWzNXmbJ1G1fne0666JjGrYga7sCrU TS/Q== 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 m19si698345edd.202.2021.02.09.19.43.44; Tue, 09 Feb 2021 19:44:06 -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 S231220AbhBINN7 (ORCPT + 99 others); Tue, 9 Feb 2021 08:13:59 -0500 Received: from elvis.franken.de ([193.175.24.41]:36604 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230521AbhBINNc (ORCPT ); Tue, 9 Feb 2021 08:13:32 -0500 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1l9Soz-0003io-00; Tue, 09 Feb 2021 14:12:49 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id 93C26C0DBF; Tue, 9 Feb 2021 14:06:36 +0100 (CET) Date: Tue, 9 Feb 2021 14:06:36 +0100 From: Thomas Bogendoerfer To: Christoph Hellwig Cc: Greg Kroah-Hartman , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org Subject: Re: [PATCH 5/6] driver core: lift dma_default_coherent into common code Message-ID: <20210209130636.GA11915@alpha.franken.de> References: <20210208145024.3320420-1-hch@lst.de> <20210208145024.3320420-6-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210208145024.3320420-6-hch@lst.de> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 08, 2021 at 03:50:23PM +0100, Christoph Hellwig wrote: > Lift the dma_default_coherent variable from the mips architecture code > to the driver core. This allows an architecture to sdefault all device > to be DMA coherent at run time, even if the kernel is build with support > for DMA noncoherent device. By allowing device_initialize to ѕet the > ->dma_coherent field to this default the amount of arch hooks required > for this behavior can be greatly reduced. > > Signed-off-by: Christoph Hellwig > --- > [..] > @@ -143,7 +143,7 @@ static void __init plat_setup_iocoherency(void) > pr_crit("IOCU OPERATION DISABLED BY SWITCH - DEFAULTING TO SW IO COHERENCY\n"); > } > > - if (supported) > + if (supported) { > if (dma_force_noncoherent) { > pr_info("Hardware DMA cache coherency disabled\n"); > return; this hunk needs to be in patch 1, otherwise it's not compilable Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]