All of lore.kernel.org
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: bug in identity map for 4KB pages?
Date: Wed, 29 Jul 2015 13:30:02 +0100	[thread overview]
Message-ID: <20150729123002.GH4797@arm.com> (raw)
In-Reply-To: <CAKv+Gu8uOO52xt+VX7YR5YHCN-Tan7mBRpR-xCJD33eE=vJcSA@mail.gmail.com>

On Wed, Jul 29, 2015 at 12:58:07PM +0100, Ard Biesheuvel wrote:
> On 29 July 2015 at 13:49, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> > Wouldn't something like this make more sense?
> >
> > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
> > index 597831bdddf3..64480b65ef17 100644
> > --- a/arch/arm64/mm/init.c
> > +++ b/arch/arm64/mm/init.c
> > @@ -158,6 +158,15 @@ early_param("mem", early_mem);
> >
> >  void __init arm64_memblock_init(void)
> >  {
> > +       /*
> > +        * Remove the memory that we will not be able to cover
> > +        * with the linear mapping.
> > +        */
> > +       const s64 linear_region_size = -(s64)PAGE_OFFSET;
> > +
> > +       memblock_remove(0, memstart_addr);
> > +       memblock_remove(memstart_addr + linear_region_size, ULLONG_MAX);
> > +
> >         memblock_enforce_memory_limit(memory_limit);
> >
> >         /*
> > """
> >
> > (taken from my patch 'arm64: override early_init_dt_add_memory_arch()'
> > sent to the list a while ago as part of the linear mapping decoupling
> > series)
> >
> 
> (replying to self) but actually, either solution still means that, of
> the ~16 GB this platform seems to have installed, only 2 GB is made
> available.
> 
> I suppose there is little we can do about it, since we cannot ignore
> the lower 2GB if the kernel resides there ...

Printing a message to the console isn't a bad idea, though.

Will

  reply	other threads:[~2015-07-29 12:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-29  2:37 bug in identity map for 4KB pages? Stuart Yoder
2015-07-29  7:47 ` Ard Biesheuvel
2015-07-29 11:42   ` Mark Rutland
2015-07-29 11:49     ` Ard Biesheuvel
2015-07-29 11:58       ` Ard Biesheuvel
2015-07-29 12:30         ` Will Deacon [this message]
2015-07-29 12:36           ` Mark Rutland
2015-07-29 12:32         ` Mark Rutland
2015-07-29 12:53       ` Mark Rutland
2015-07-29 12:57         ` Ard Biesheuvel
2015-07-29 13:24           ` Mark Rutland
2015-07-29 15:45     ` Stuart Yoder
2015-07-29 15:48       ` Ard Biesheuvel
2015-07-29 15:58         ` Stuart Yoder
2015-07-29 16:12           ` Ard Biesheuvel
2015-07-29 18:40             ` Ard Biesheuvel
2015-07-29 19:19               ` Stuart Yoder
2015-07-29 19:19             ` Stuart Yoder
2015-07-29 20:37               ` Ard Biesheuvel

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=20150729123002.GH4797@arm.com \
    --to=will.deacon@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.