linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ezequiel.garcia@free-electrons.com (Ezequiel Garcia)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: pxa: Move iotable mapping inside vmalloc region
Date: Mon, 25 Nov 2013 08:11:27 -0300	[thread overview]
Message-ID: <20131125111126.GB2408@localhost> (raw)
In-Reply-To: <alpine.LFD.2.10.1311241824380.9667@knanqh.ubzr>

On Sun, Nov 24, 2013 at 06:26:45PM -0500, Nicolas Pitre wrote:
> On Sun, 24 Nov 2013, Ezequiel Garcia wrote:
> 
> > In order to remove the following ugly message:
> > 
> >   BUG: mapping for 0x00000000 at 0xff000000 out of vmalloc space
> > 
> > the iotable mappings should be re-located inside the vmalloc
> > region. Such move was introduced at commit:
> > 
> > commit 0536bdf33faff4d940ac094c77998cfac368cfff
> > Author: Nicolas Pitre <nicolas.pitre@linaro.org>
> > Date:   Thu Aug 25 00:35:59 2011 -0400
> > 
> >     ARM: move iotable mappings within the vmalloc region
> > 
> > While at it, let's add some nicer defines to make the code
> > more readable.
> > 
> > Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
> > Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> > ---
> >  arch/arm/mach-pxa/generic.c | 12 +++++++++---
> >  1 file changed, 9 insertions(+), 3 deletions(-)
> > 
> > diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
> > index 4225417..7c01095 100644
> > --- a/arch/arm/mach-pxa/generic.c
> > +++ b/arch/arm/mach-pxa/generic.c
> > @@ -24,6 +24,7 @@
> >  #include <mach/hardware.h>
> >  #include <asm/mach/map.h>
> >  #include <asm/mach-types.h>
> > +#include <asm/pgtable.h>
> >  
> >  #include <mach/reset.h>
> >  #include <mach/smemc.h>
> > @@ -77,6 +78,11 @@ EXPORT_SYMBOL(get_clk_frequency_khz);
> >   * Note: virtual 0xfffe0000-0xffffffff is reserved for the vector table
> >   *       and cache flush area.
> >   */
> > +
> > +#define UNCACHED_PHY	0x00000000
> > +#define UNCACHED_SIZE	SZ_1M
> > +#define UNCACHED_VIRT	(VMALLOC_END - UNCACHED_SIZE)
> > +
> >  static struct map_desc common_io_desc[] __initdata = {
> >    	{	/* Devs */
> >  		.virtual	=  0xf2000000,
> > @@ -84,9 +90,9 @@ static struct map_desc common_io_desc[] __initdata = {
> >  		.length		= 0x02000000,
> >  		.type		= MT_DEVICE
> >  	}, {	/* UNCACHED_PHYS_0 */
> > -		.virtual	= 0xff000000,
> > -		.pfn		= __phys_to_pfn(0x00000000),
> > -		.length		= 0x00100000,
> > +		.virtual	= UNCACHED_VIRT,
> > +		.pfn		= __phys_to_pfn(UNCACHED_PHY),
> > +		.length		= UNCACHED_SIZE,
> >  		.type		= MT_DEVICE
> >  	}
> >  };
> 
> You might wish to change the virtual address for this mapping, but 
> nowhere in your patch you are changing users of that virtual mapping.
> 

Yeah, this patch is pure crap. I'll re-work it and submit a new
(hopefully not stupid) version.

Thanks for taking a look!
-- 
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com

      reply	other threads:[~2013-11-25 11:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-24 12:36 [PATCH] ARM: pxa: Move iotable mapping inside vmalloc region Ezequiel Garcia
2013-11-24 12:41 ` Russell King - ARM Linux
2013-11-24 22:56   ` Ezequiel Garcia
2013-11-24 23:26 ` Nicolas Pitre
2013-11-25 11:11   ` Ezequiel Garcia [this message]

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=20131125111126.GB2408@localhost \
    --to=ezequiel.garcia@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).