Am Freitag, den 03.04.2015, 15:17 +0200 schrieb Geert Uytterhoeven:
> On Fri, Apr 3, 2015 at 1:59 PM, Thomas Meyer <tho...@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;
> 
> 
> 
> 




------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to