From: Mark Salter <msalter@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
linux-arm-kernel@lists.infradead.org,
Arnd Bergmann <arnd@arndb.de>, Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Russell King <linux@arm.linux.org.uk>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
patches@linaro.org
Subject: Re: [PATCH 2/5] mm: create generic early_ioremap() support
Date: Thu, 06 Mar 2014 16:25:10 -0500 [thread overview]
Message-ID: <1394141110.5094.37.camel@deneb.redhat.com> (raw)
In-Reply-To: <20140305142953.669fd030495e802b2e03879c@linux-foundation.org>
On Wed, 2014-03-05 at 14:29 -0800, Andrew Morton wrote:
> On Tue, 4 Mar 2014 15:08:55 -0500 Mark Salter <msalter@redhat.com> wrote:
>
> > This patch creates a generic implementation of early_ioremap() support
> > based on the existing x86 implementation. early_ioremp() is useful for
> > early boot code which needs to temporarily map I/O or memory regions
> > before normal mapping functions such as ioremap() are available.
> >
> > Some architectures have optional MMU. In the no-MMU case, the remap
> > functions simply return the passed in physical address and the unmap
> > functions do nothing.
> >
> >
> > ....
> >
> > --- /dev/null
> > +++ b/mm/early_ioremap.c
> > @@ -0,0 +1,271 @@
> > +/*
> > + * Provide common bits of early_ioremap() support for architectures needing
> > + * temporary mappings during boot before ioremap() is available.
> > + *
> > + * This is mostly a direct copy of the x86 early_ioremap implementation.
> > + *
> > + * (C) Copyright 1995 1996, 2014 Linus Torvalds
> > + *
> > + */
>
> I suppose one should include linux/kernel.h.
Okay.
>
> > +#include <linux/init.h>
> > +#include <linux/io.h>
> > +#include <linux/module.h>
> > +#include <linux/slab.h>
> > +#include <linux/mm.h>
> > +#include <linux/vmalloc.h>
> > +#include <asm/fixmap.h>
> > +
> > +#ifdef CONFIG_MMU
> > +static int early_ioremap_debug __initdata;
> > +
> > +static int __init early_ioremap_debug_setup(char *str)
> > +{
> > + early_ioremap_debug = 1;
> > +
> > + return 0;
> > +}
> > +early_param("early_ioremap_debug", early_ioremap_debug_setup);
>
> Should be documented somewhere. Documentation/kernel-parameters.txt?
Okay.
>
> > +static int after_paging_init __initdata;
> > +
> > +void __init __attribute__((weak)) early_ioremap_shutdown(void)
>
> __weak
>
> Do __init and __weak work together? They should, but I don't recall
> seeing it.
Yes. Will use __weak here and clean up the uses of WARN/WARN_ON
as noted.
Thanks.
next prev parent reply other threads:[~2014-03-06 21:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 20:08 [PATCH 0/5] mm: generic early_ioremap support Mark Salter
2014-03-04 20:08 ` [PATCH 1/5] x86/mm: sparse warning fix for early_memremap Mark Salter
2014-03-04 20:08 ` [PATCH 2/5] mm: create generic early_ioremap() support Mark Salter
2014-03-05 22:29 ` Andrew Morton
2014-03-06 21:25 ` Mark Salter [this message]
2014-03-04 20:08 ` [PATCH 3/5] x86: use generic early_ioremap Mark Salter
2014-03-04 20:08 ` [PATCH 4/5] arm64: initialize pgprot info earlier in boot Mark Salter
2014-03-04 20:08 ` [PATCH 5/5] arm64: add early_ioremap support Mark Salter
2014-03-04 23:31 ` Rob Herring
2014-03-05 16:38 ` Mark Salter
2014-03-06 8:20 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1394141110.5094.37.camel@deneb.redhat.com \
--to=msalter@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=hpa@zytor.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mingo@kernel.org \
--cc=patches@linaro.org \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome