linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Marcus Sundberg <erammsu@kieraypc01.p.y.ki.era.ericsson.se>
To: Heinz Blaettner <heinz@bintec.de>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: Help booting MBX through bootd
Date: Mon, 14 Jun 1999 12:57:11 +0200	[thread overview]
Message-ID: <3764E007.E09568FA@switchboard.ericsson.se> (raw)
In-Reply-To: XFMail.990611232427.heinz@bintec.de


Heinz Blaettner wrote:
> 
> On 11-Jun-99 Wolfgang Denk wrote:
> >> The fact that the cache magic in sysdeps/powerpc/memset.S in glibc
> >> will make the dynamic linker crash in it's early startup phase is
> >> quite a big problem... ;)
> >> Also sysdeps/powerpc/dl-machine.c makes an assumption about the cache
> >> line size, but that seems to be less fatal.
> >
> > Grrrghh... I see.
> 
> Maybe a thumb question ?

Not a dumb question at all, what's dumb is the person who hardcoded
cache line sizes into userland code without even a comment...

> How does the wrong cache line size makes that the code corrupts ???
> I will belive that the execution speed might not be optimal ?

Glibc optimizes memset-to-zero using the dcbz instruction. Now when
you shrink the cache line size to half (as is the case with MPC860)
every other cache line will not be cleared, resulting in bad things
happening.

As for the dl-machine.c the dcbst instruction is used in a loop to
ensure consistency after relocating (==copying) code. Here however
the dependency on cache line size == 32 was at least documented...

//Marcus
-- 
-------------------------------+------------------------------------
        Marcus Sundberg        | http://www.stacken.kth.se/~mackan/
 Royal Institute of Technology |       Phone: +46 707 295404
       Stockholm, Sweden       |   E-Mail: mackan@stacken.kth.se

[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

  reply	other threads:[~1999-06-14 10:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <376110CB.8CE16CAF@switchboard.ericsson.se>
1999-06-11 16:44 ` Help booting MBX through bootd Wolfgang Denk
1999-06-11 21:24   ` Heinz Blaettner
1999-06-14 10:57     ` Marcus Sundberg [this message]
1999-06-09 11:39 R&D
1999-06-10 12:38 ` Magnus Damm
1999-06-10 20:24   ` Wolfgang Denk

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=3764E007.E09568FA@switchboard.ericsson.se \
    --to=erammsu@kieraypc01.p.y.ki.era.ericsson.se \
    --cc=heinz@bintec.de \
    --cc=linuxppc-dev@lists.linuxppc.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;
as well as URLs for NNTP newsgroup(s).