From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH v2 28/76] ARC: I/O and DMA Mappings Date: Fri, 18 Jan 2013 16:18:11 +0000 Message-ID: <201301181618.11736.arnd@arndb.de> References: <1358511930-7424-1-git-send-email-vgupta@synopsys.com> <201301181555.43487.arnd@arndb.de> <20130118160106.GD14019@linux-sh.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130118160106.GD14019@linux-sh.org> Sender: linux-kernel-owner@vger.kernel.org To: Paul Mundt Cc: Vineet Gupta , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-arch.vger.kernel.org On Friday 18 January 2013, Paul Mundt wrote: > On Fri, Jan 18, 2013 at 03:55:43PM +0000, Arnd Bergmann wrote: > > On Friday 18 January 2013, Vineet Gupta wrote: > > > TBD: Do we need early ioremap support like openrisc > > > > > > Signed-off-by: Vineet Gupta > > > > Can you explain why early ioremap is necessary for you? > > > > I wasn't aware that openrisc has it. In a lot of cases, > > you can use fixmap as a replacement. > > > The two don't need to be mutually exclusive, either. sh implements early > ioremap transparently via fixmaps for example: > > arch/sh/mm/ioremap.c > arch/sh/mm/ioremap_fixed.c Ah, right. It also seems that openrisc uses the same approach for its early ioremap. I usually recommend doing as few things as possible "early" though, that's why I was asking. If it's only one or two drivers that need an early mapping and can't be moved to a later stage of bootup, using only hardcoded fixmaps would make it harder to add more users, which one might consider a good thing. Allowing ioremap to be used before memory_init() adds flexibility but could lead to code being moved into an early stage by accident rather than by necessity. Arnd