From: Thomas Meyer <thomas@m3y3r.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: user-mode-linux-devel <user-mode-linux-devel@lists.sourceforge.net>
Subject: Re: [uml-devel] [PATCH v2] um: Print minimum physical memory requirement
Date: Fri, 03 Apr 2015 15:22:04 +0200 [thread overview]
Message-ID: <1428067324.106641.5.camel@m3y3r.de> (raw)
In-Reply-To: <CAMuHMdUXKnoCwoUMNN_zOce=Z4B_YHF73rnkfK1=cdUH5_M8xg@mail.gmail.com>
Am Freitag, den 03.04.2015, 15:17 +0200 schrieb Geert Uytterhoeven:
> On Fri, Apr 3, 2015 at 1:59 PM, Thomas Meyer <thomas@m3y3r.de> wrote:
> > --- a/arch/um/kernel/physmem.c
> > +++ b/arch/um/kernel/physmem.c
> > @@ -61,18 +61,26 @@ void __init setup_physmem(unsigned long start, unsigned long reserve_end,
> > unsigned long len, unsigned long long highmem)
> > {
> > unsigned long reserve = reserve_end - start;
> > - int pfn = PFN_UP(__pa(reserve_end));
> > - int delta = (len - reserve) >> PAGE_SHIFT;
> > - int err, offset, bootmap_size;
> > + unsigned long pfn = PFN_UP(__pa(reserve_end));
> > + unsigned long delta = (len - reserve) >> PAGE_SHIFT;
> > + unsigned long offset, bootmap_size;
> > + int err, map_size;
>
> map_size should be unsigned long.
No, this can actually get negative as the memory size needed by the
executable file (linux) can be bigger then the physical memory assigned
to the kernel via "mem=xxx" command line!
>
> > +
> > + offset = uml_reserved - uml_physmem;
> > + map_size = len - offset;
>
>
>
>
next prev parent reply other threads:[~2015-04-03 13:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-03 11:59 [uml-devel] [PATCH v2] um: Print minimum physical memory requirement Thomas Meyer
2015-04-03 13:17 ` Geert Uytterhoeven
2015-04-03 13:22 ` Thomas Meyer [this message]
2015-04-03 13:25 ` Geert Uytterhoeven
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=1428067324.106641.5.camel@m3y3r.de \
--to=thomas@m3y3r.de \
--cc=geert@linux-m68k.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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