LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@kernel.crashing.org>
To: "Mark A. Greer" <mgreer@mvista.com>
Cc: Jim Thompson <jim@musenki.com>, Sergiy Kovtun <skovtun@yahoo.com>,
	linuxppc-embedded@lists.linuxppc.org
Subject: Re: 64Mbytes on Sandpoint-X3B
Date: Fri, 31 May 2002 11:13:49 -0700	[thread overview]
Message-ID: <20020531181349.GX32412@opus.bloom.county> (raw)
In-Reply-To: <3CF7B768.D2C20A4B@mvista.com>


On Fri, May 31, 2002 at 01:48:24PM -0400, Mark A. Greer wrote:
> Tom Rini wrote:
>
> > On Fri, May 31, 2002 at 10:20:08AM -0500, Jim Thompson wrote:
> > >
> > > Tom Rini writes:
> > > > On Fri, May 31, 2002 at 10:01:39AM -0500, Jim Thompson wrote:
> > > > >
> > > > > Tom Rini writes:
> > > > > >
> > > > > > On Thu, May 30, 2002 at 11:02:44PM -0700, Sergiy Kovtun wrote:
> > >
> > > > > My question is how have_of got set:
> > > > >
> > > > > arch/ppc/mm/init.c:
> > > > >         if (!have_of)
> > > > >                 FREESEC(openfirmware);
> > > >
> > > > On !CONFIG_ALL_PPC, we have:
> > > > #define have_of 0
> > > > In include/asm-ppc/processor.h, or so.  And the compiler happily
> > > > optimizes things in/out with this.
> > >
> > > I should have been more explicit.
> > >
> > > in include/asm-ppc/processor.h, I'd found:
> > >
> > > #define have_of (_machine == _MACH_chrp || _machine == _MACH_Pmac)
> >
> > Thanks for the memory jog :)
> >
> > Up near the top, we have:
> > #ifdef CONFIG_ALL_PPC
> > ...
> > int _machine;
> > ...
> > #else
> > #define _machine 0
> > #endif
> >
> > So have_of becomes: (0 == 0x4 || 0 == 0x2)
> >
> > > A sandpoint (esp with Dink) is neither CHRP or PMAC, so the call to
> > > FREESEC(openfirmware) shouldn't have occurred.
> >
> > It's !have_of, so we really did want to free the __openfirmware stuff.
>
> I dunno guys, I think the compiler usually optimizes that all away and you
> should never see "openfirmware".  I don't recall ever seeing it print out.  I
> think something fishy is going on...

Er, first, it becomes:
if (1)
So we always 'do it'.  However, all of the __openfirmware code is now
almost never compiled in on !CONFIG_ALL_PPC, so we never see it being
free'd.

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2002-05-31 18:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-31  6:02 64Mbytes on Sandpoint-X3B Sergiy Kovtun
2002-05-31 14:51 ` Tom Rini
2002-05-31 15:01   ` Jim Thompson
2002-05-31 15:11     ` Tom Rini
2002-05-31 15:20       ` Jim Thompson
2002-05-31 15:26         ` Tom Rini
2002-05-31 15:43           ` Jim Thompson
2002-05-31 17:48           ` Mark A. Greer
2002-05-31 18:13             ` Tom Rini [this message]
2002-05-31 18:18               ` Mark A. Greer
2002-05-31 18:25                 ` Tom Rini
2002-06-24  1:52                   ` PPCboot+MPC7410+Sandpoint Sergiy Kovtun
2002-06-25  0:15                     ` PPCboot+MPC7410+Sandpoint Boo Geum Jung
2002-06-25  0:19                       ` PPCboot+MPC7410+Sandpoint Wolfgang Denk
2002-06-25  0:44                         ` PPCboot+MPC7410+Sandpoint Boo Geum Jung
2002-05-31 18:23       ` 64Mbytes on Sandpoint-X3B Mark A. Greer
2002-05-31 20:35         ` Gary Milliorn
2002-05-31 17:55 ` Mark A. Greer

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=20020531181349.GX32412@opus.bloom.county \
    --to=trini@kernel.crashing.org \
    --cc=jim@musenki.com \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    --cc=mgreer@mvista.com \
    --cc=skovtun@yahoo.com \
    /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