mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Barebox List <barebox@lists.infradead.org>,
	Peter Kardos <kardos.peter.sk@gmail.com>
Subject: Re: [PATCH] ARM: vector_table: Fix creation of second level page table
Date: Thu, 25 Aug 2016 08:37:14 +0200	[thread overview]
Message-ID: <20160825063714.GJ20657@pengutronix.de> (raw)
In-Reply-To: <CAHQ1cqFGc8r+kGrKinM3_y+3GPAz=-=nfpRyUiwSSvQSvVXuZA@mail.gmail.com>

On Wed, Aug 24, 2016 at 09:07:22AM -0700, Andrey Smirnov wrote:
> On Wed, Aug 24, 2016 at 5:23 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > The second level page tables can only start at a 1MiB section boundary,
> > so instead of calling arm_create_pte() with the high vector address
> > (which is 0xffff0000, not 1MiB aligned) we have to call it with
> > 0xfff00000 to correctly create a second level page table. The vectors
> > themselves worked as expected with the old value, but the memory around
> > it did not do a 1:1 mapping anymore. This breaks SoCs which have
> > peripherals in that area, for example Atmel SoCs like the AT91RM9200.
> >
> 
> Would you mind re-wording it as something to the effect of: "...
> mapping anymore, breaking SoCs which also have peripherals in that
> area..."? The original sentence structure, to me, reads as if this
> patch/commit introduces a change that breaks Atmel SoCs.

Sure.

> 
> > Fixes: f6b77fe9: ARM: Rework vector table setup
> >
> > Reported-by: Peter Kardos <kardos.peter.sk@gmail.com>
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> >  arch/arm/cpu/mmu.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c
> > index a31bce4..2b70866 100644
> > --- a/arch/arm/cpu/mmu.c
> > +++ b/arch/arm/cpu/mmu.c
> > @@ -307,7 +307,7 @@ static void create_vector_table(unsigned long adr)
> >                 vectors = xmemalign(PAGE_SIZE, PAGE_SIZE);
> >                 pr_debug("Creating vector table, virt = 0x%p, phys = 0x%08lx\n",
> >                          vectors, adr);
> > -               exc = arm_create_pte(adr);
> > +               exc = arm_create_pte(adr & ~(SZ_1M - 1));
> 
> ALIGN_DOWN(adr, SZ_1M) ?

Yes, that's better. I just sent an updated version.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2016-08-25  6:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24 12:23 Sascha Hauer
2016-08-24 16:07 ` Andrey Smirnov
2016-08-25  6:37   ` Sascha Hauer [this message]
2016-08-25 20:50 ` Peter Kardos

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=20160825063714.GJ20657@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=kardos.peter.sk@gmail.com \
    /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