[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190522135422.q6w7lcvh5fgpf7a5@mobilestation>
Date: Wed, 22 May 2019 16:54:23 +0300
From: Serge Semin <fancer.lancer@...il.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Mike Rapoport <rppt@...ux.ibm.com>,
Ralf Baechle <ralf@...ux-mips.org>,
Paul Burton <paul.burton@...s.com>,
James Hogan <jhogan@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...e.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Thomas Bogendoerfer <tbogendoerfer@...e.de>,
Huacai Chen <chenhc@...ote.com>,
Stefan Agner <stefan@...er.ch>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Juergen Gross <jgross@...e.com>, linux-mips@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Atsushi Nemoto <anemo@....ocn.ne.jp>,
"Maciej W. Rozycki" <macro@...ux-mips.org>
Subject: Re: [PATCH 04/12] mips: Reserve memory for the kernel image resources
On Wed, May 22, 2019 at 03:44:47PM +0200, Geert Uytterhoeven wrote:
> Hi Serge,
>
> ...
>
> >
> > The problem might be fixed there by the next patch:
> > ---
> > diff --git a/arch/mips/dec/prom/memory.c b/arch/mips/dec/prom/memory.c
> > index 5073d2ed78bb..5a0c734b5d04 100644
> > --- a/arch/mips/dec/prom/memory.c
> > +++ b/arch/mips/dec/prom/memory.c
> > @@ -91,29 +91,14 @@ void __init prom_meminit(u32 magic)
> > pmax_setup_memory_region();
> > else
> > rex_setup_memory_region();
> > -}
> > -
> > -void __init prom_free_prom_memory(void)
> > -{
> > - unsigned long end;
> > -
> > - /*
> > - * Free everything below the kernel itself but leave
> > - * the first page reserved for the exception handlers.
> > - */
> >
> > #if IS_ENABLED(CONFIG_DECLANCE)
> > /*
> > - * Leave 128 KB reserved for Lance memory for
> > - * IOASIC DECstations.
> > + * Reserve 128 KB for Lance memory for IOASIC DECstations.
> > *
> > * XXX: save this address for use in dec_lance.c?
> > */
> > if (IOASIC)
> > - end = __pa(&_text) - 0x00020000;
> > - else
> > + memblock_reserve(__pa_symbol(&_text), 0x00020000);
>
> Shouldn't that be
>
> memblock_reserve(__pa_symbol(&_text) - 0x00020000, 0x00020000);
>
> ?
>
Right. Thanks. The updated version of the patch is attached to this email.
-Sergey
> > #endif
> > - end = __pa(&_text);
> > -
> > - free_init_pages("unused PROM memory", PAGE_SIZE, end);
> > }
> > ---
> >
> > Didn't wanna use prom_FREE_prom_memory to actually reserve a memory
> > chunk, so I moved the reservation into the prom_meminit() method.
>
> I guess Maciej will test this on real hardware, eventually...
>
> > Regarding the first page for the exception handlers. We don't need
> > to reserve it here, since it is already done in arch/mips/kernel/traps.c .
>
> Thanks for checking! That was actually something I was still wondering
> about...
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
View attachment "fix_dec.patch" of type "text/x-patch" (953 bytes)
Powered by blists - more mailing lists