Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754454AbdCPWGI (ORCPT ); Thu, 16 Mar 2017 18:06:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:52431 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754176AbdCPWFi (ORCPT ); Thu, 16 Mar 2017 18:05:38 -0400 Date: Thu, 16 Mar 2017 23:05:19 +0100 From: "Luis R. Rodriguez" To: bjorn@helgaas.com Cc: "Luis R. Rodriguez" , mingo@kernel.org, bp@suse.de, arnd@arndb.de, dan.j.williams@intel.com, Christoph Hellwig , luto@amacapital.net, hpa@zytor.com, tglx@linutronix.de, geert@linux-m68k.org, ralf@linux-mips.org, hmh@hmh.eng.br, ross.zwisler@linux.intel.com, akpm@linux-foundation.org, jgross@suse.com, Benjamin Herrenschmidt , mpe@ellerman.id.au, tj@kernel.org, x86 , tomi.valkeinen@ti.com, mst@redhat.com, toshi.kani@hp.com, stefan.bader@canonical.com, linux-mm@kvack.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] x86/mm, asm-generic: Add IOMMU ioremap_uc() variant default Message-ID: <20170316220519.GU28800@wotan.suse.de> References: <1436488096-3165-1-git-send-email-mcgrof@do-not-panic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1209 Lines: 26 On Thu, Mar 16, 2017 at 03:46:51PM -0500, Bjorn Helgaas wrote: > On Thu, Jul 9, 2015 at 7:28 PM, Luis R. Rodriguez > wrote: > > > +/** > > + * DOC: ioremap() and ioremap_*() variants > > + * > > + * If you have an IOMMU your architecture is expected to have both ioremap() > > + * and iounmap() implemented otherwise the asm-generic helpers will provide a > > + * direct mapping. > > + * > > + * There are ioremap_*() call variants, if you have no IOMMU we naturally will > > + * default to direct mapping for all of them, you can override these defaults. > > + * If you have an IOMMU you are highly encouraged to provide your own > > + * ioremap variant implementation as there currently is no safe architecture > > + * agnostic default. To avoid possible improper behaviour default asm-generic > > + * ioremap_*() variants all return NULL when an IOMMU is available. If you've > > + * defined your own ioremap_*() variant you must then declare your own > > + * ioremap_*() variant as defined to itself to avoid the default NULL return. > > Are the references above to "IOMMU" typos? Should they say "MMU" > instead, so they match the #ifdef below? Yes. Patch welcomed. Luis