mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@linux.ibm.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>,
	Michael Schmitz <schmitzmic@gmail.com>,
	Sam Creasey <sammy@sammy.net>, Greg Ungerer <gerg@linux-m68k.org>,
	linux-m68k <linux-m68k@lists.linux-m68k.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] m68k: Fix memblock-related crashes
Date: Sat, 8 Dec 2018 19:11:50 +0200	[thread overview]
Message-ID: <20181208171143.GB19067@rapoport-lnx> (raw)
In-Reply-To: <CAMuHMdVHDn5=3SBvmHSHsY5rCZKgRXRbk258RAKJp8V8__Hi8w@mail.gmail.com>

On Sat, Dec 08, 2018 at 11:51:38AM +0100, Geert Uytterhoeven wrote:
> Hi Mike,
> 
> On Fri, Dec 7, 2018 at 10:02 PM Mike Rapoport <rppt@linux.ibm.com> wrote:
> > On Fri, Dec 07, 2018 at 05:50:11PM +0100, Geert Uytterhoeven wrote:
> > > Sun-3 must be broken before this fix, as it fills in m68k_memory[0] in
> > > config_sun3(), i.e. after m68k_parse_bootinfo().
> > > Sun-3 is not fixed by this fix, as it uses its own paging_init(), not
> > > the one in motorola.c.
> > > Fixing Sun-3 requires adding memblock_add()/memblock_reserve() calls to
> > > the Sun-3 memory management code.
> >
> > I think that adding memblock_add() to config_sun3 would be sufficient,
> > something like the diff below. This will make memblock aware of the
> > available physical memory and it seems there no allocations in sun3 before
> > paging_init().
> >
> > diff --git a/arch/m68k/sun3/config.c b/arch/m68k/sun3/config.c
> > index 542c440..9a5b9dd 100644
> > --- a/arch/m68k/sun3/config.c
> > +++ b/arch/m68k/sun3/config.c
> > @@ -150,6 +150,7 @@ void __init config_sun3(void)
> >
> >         m68k_num_memory=1;
> >          m68k_memory[0].size=*(romvec->pv_sun3mem);
> > +       memblock_add(memory_start, memory_end - memory_start);
> >
> >         sun3_bootmem_alloc(memory_start, memory_end);
> >  }
> 
> Thanks!
> 
> It doesn't need a memblock_reserve() for the kernel, as memory_start is
> already adjusted for that, right?

Yes, unless I've missed something.
 
> Anyone who can test this is on Sun-3? Thanks!
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> -- 
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-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
> 

-- 
Sincerely yours,
Mike.


  parent reply	other threads:[~2018-12-08 17:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-07 16:50 Geert Uytterhoeven
2018-12-07 21:02 ` Mike Rapoport
2018-12-08 10:51   ` Geert Uytterhoeven
2018-12-08 11:17     ` John Paul Adrian Glaubitz
2018-12-08 17:11     ` Mike Rapoport [this message]
2018-12-12 14:58 ` Geert Uytterhoeven
2018-12-13 17:45   ` Andreas Schwab
2018-12-17 19:00     ` Andreas Schwab
2018-12-17 19:34       ` Andreas Schwab
2018-12-19  9:34         ` 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=20181208171143.GB19067@rapoport-lnx \
    --to=rppt@linux.ibm.com \
    --cc=geert@linux-m68k.org \
    --cc=gerg@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=sammy@sammy.net \
    --cc=schmitzmic@gmail.com \
    --cc=schwab@linux-m68k.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®